Porting an old app to a recent image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting an old app to a recent image

Matthias Korn-4
Hi all,

is there some documentation, help, tools, etc. to port a Squeak app
written in SqueakV2.sources to a recent image?

fileOut -> fileIn gives me all sorts of error messages I cannot
understand/debug.

I actually just want to port parts of the app to re-use the code. But
it proofs really difficult for me

Thanks,
Matthias
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Karl Ramberg
Matthias Korn wrote:

> Hi all,
>
> is there some documentation, help, tools, etc. to port a Squeak app
> written in SqueakV2.sources to a recent image?
>
> fileOut -> fileIn gives me all sorts of error messages I cannot
> understand/debug.
>
> I actually just want to port parts of the app to re-use the code. But
> it proofs really difficult for me
Hi,
in FileList you can try to look at the code with the CodeBrowser.
Select the file you want to load, press the code button, or select
browse code from the context menu.
This will load the code in a temporary way and you can browse it and see
the methods that change, and file in the parts you want.

Karl
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Matthias Korn-4
Hi,

I already tried to fileIn a minimal part (one Morph class) of the
application I want to port and started resolving the errors in the
debugger one by one. Still, now I am stuck with the following error:
Metaclass(Object)>>doesNotUnderstand: #category
(the full Stack Trace is attached)

Were there some changes in the Metaclass between V2 and V3 that explain
this error?

Thanks for the hint, though Karl. I didn't know about that possibility.

Regards,
Matthias


Am Wed, 8 Oct 2008 18:07:55 +0200
schrieb Karl Ramberg <[hidden email]>:

> Matthias Korn wrote:
> > Hi all,
> >
> > is there some documentation, help, tools, etc. to port a Squeak app
> > written in SqueakV2.sources to a recent image?
> >
> > fileOut -> fileIn gives me all sorts of error messages I cannot
> > understand/debug.
> >
> > I actually just want to port parts of the app to re-use the code.
> > But it proofs really difficult for me
> Hi,
> in FileList you can try to look at the code with the CodeBrowser.
> Select the file you want to load, press the code button, or select
> browse code from the context menu.
> This will load the code in a temporary way and you can browse it and
> see the methods that change, and file in the parts you want.
>
> Karl
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Metaclass_category.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Yoshiki Ohshima-2
At Thu, 9 Oct 2008 15:37:39 +0200,
Matthias Korn wrote:

>
> [1  <text/plain; US-ASCII (7bit)>]
> Hi,
>
> I already tried to fileIn a minimal part (one Morph class) of the
> application I want to port and started resolving the errors in the
> debugger one by one. Still, now I am stuck with the following error:
> Metaclass(Object)>>doesNotUnderstand: #category
> (the full Stack Trace is attached)
>
> Were there some changes in the Metaclass between V2 and V3 that explain
> this error?
>
> Thanks for the hint, though Karl. I didn't know about that possibility.

  This apparently happens after some syntax error already happened.

  So the method being compiled has an issue.  Then the question is to
find out which method.  In the debugger that produced the stack trace,
visit somewhere at the bottom and see the content of aStream variable
for Compiler>>translate:noPattern:ifFail:.  The method should have
some problem.

  But it could be a subtle one...  You could also define #category
method at Metaclass that simply returns nil and then try to file in, I
think.

-- Yoshiki

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

stephane ducasse
In reply to this post by Matthias Korn-4
this is really strange.
can you select one class of your app and fileout it and send it?

stef

On Oct 9, 2008, at 3:37 PM, Matthias Korn wrote:

> Hi,
>
> I already tried to fileIn a minimal part (one Morph class) of the
> application I want to port and started resolving the errors in the
> debugger one by one. Still, now I am stuck with the following error:
> Metaclass(Object)>>doesNotUnderstand: #category
> (the full Stack Trace is attached)
>
> Were there some changes in the Metaclass between V2 and V3 that  
> explain
> this error?
>
> Thanks for the hint, though Karl. I didn't know about that  
> possibility.
>
> Regards,
> Matthias
>
>
> Am Wed, 8 Oct 2008 18:07:55 +0200
> schrieb Karl Ramberg <[hidden email]>:
>
>> Matthias Korn wrote:
>>> Hi all,
>>>
>>> is there some documentation, help, tools, etc. to port a Squeak app
>>> written in SqueakV2.sources to a recent image?
>>>
>>> fileOut -> fileIn gives me all sorts of error messages I cannot
>>> understand/debug.
>>>
>>> I actually just want to port parts of the app to re-use the code.
>>> But it proofs really difficult for me
>> Hi,
>> in FileList you can try to look at the code with the CodeBrowser.
>> Select the file you want to load, press the code button, or select
>> browse code from the context menu.
>> This will load the code in a temporary way and you can browse it and
>> see the methods that change, and file in the parts you want.
>>
>> Karl
> <
> Metaclass_category.txt>_______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Matthias Korn-4
In reply to this post by Yoshiki Ohshima-2
Hi,

Am Thu, 9 Oct 2008 16:32:40 -0700
schrieb Yoshiki Ohshima <[hidden email]>:

> At Thu, 9 Oct 2008 15:37:39 +0200,
> Matthias Korn wrote:
> >
> > [1  <text/plain; US-ASCII (7bit)>]
> > Hi,
> >
> > I already tried to fileIn a minimal part (one Morph class) of the
> > application I want to port and started resolving the errors in the
> > debugger one by one. Still, now I am stuck with the following error:
> > Metaclass(Object)>>doesNotUnderstand: #category
> > (the full Stack Trace is attached)
[..]
>   This apparently happens after some syntax error already happened.

I re-checked the errors I got before this one and I think I solved them
alright.

>   So the method being compiled has an issue.  Then the question is to
> find out which method.  In the debugger that produced the stack trace,
> visit somewhere at the bottom and see the content of aStream variable
> for Compiler>>translate:noPattern:ifFail:.  The method should have
> some problem.

I checked the method in the ReadStream of message, but couldn't make
out any problems (it is attached, though).

>   But it could be a subtle one...  You could also define #category
> method at Metaclass that simply returns nil and then try to file in, I
> think.

I tried that before (with returning self though), but without any luck
(I am getting: Metaclass(Object)>>error: ... "Error: Instances of
Metaclass are not indexable").

> -- Yoshiki

Thanks,
Matthias
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

ScratchFrameMorph class-readPaintSkinFrom.st (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Matthias Korn-4
In reply to this post by stephane ducasse
Hi,

attached is the class I tried to fileIn, which also throws the error.

Thanks,
Matthias


Am Fri, 10 Oct 2008 08:46:57 +0200
schrieb stephane ducasse <[hidden email]>:

> this is really strange.
> can you select one class of your app and fileout it and send it?
>
> stef
>
> On Oct 9, 2008, at 3:37 PM, Matthias Korn wrote:
>
> > Hi,
> >
> > I already tried to fileIn a minimal part (one Morph class) of the
> > application I want to port and started resolving the errors in the
> > debugger one by one. Still, now I am stuck with the following error:
> > Metaclass(Object)>>doesNotUnderstand: #category
> > (the full Stack Trace is attached)
> >
> > Were there some changes in the Metaclass between V2 and V3 that  
> > explain
> > this error?
> >
> > Thanks for the hint, though Karl. I didn't know about that  
> > possibility.
> >
> > Regards,
> > Matthias
> >
> >
> > Am Wed, 8 Oct 2008 18:07:55 +0200
> > schrieb Karl Ramberg <[hidden email]>:
> >
> >> Matthias Korn wrote:
> >>> Hi all,
> >>>
> >>> is there some documentation, help, tools, etc. to port a Squeak
> >>> app written in SqueakV2.sources to a recent image?
> >>>
> >>> fileOut -> fileIn gives me all sorts of error messages I cannot
> >>> understand/debug.
> >>>
> >>> I actually just want to port parts of the app to re-use the code.
> >>> But it proofs really difficult for me
> >> Hi,
> >> in FileList you can try to look at the code with the CodeBrowser.
> >> Select the file you want to load, press the code button, or select
> >> browse code from the context menu.
> >> This will load the code in a temporary way and you can browse it
> >> and see the methods that change, and file in the parts you want.
> >>
> >> Karl
> > <
> > Metaclass_category.txt>_______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

--
Matthias Korn
Institut für Wirtschaftsinformatik
Fachbereich 5
Universität Siegen
Telefon: +49 (0) 271 / 23 67 660
Mobil: +49 (0) 176 / 700 17 17 8
Uni: +49 (0) 271/ 740 - 3382
eMail: [hidden email]

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

ScratchFrameMorph.st (152K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Karl Ramberg
Matthias Korn wrote:
> Hi,
>
> attached is the class I tried to fileIn, which also throws the error.
>
> Thanks,
> Matthias
>  
Tested on 3.8 image:
You can left click on the red text in the syntax error and proceede.
Code seems to be dependent on ScratchPlugin .
 There is also a problem with StrikeFont initializion.
If you leave a Trancript open you will see file in messages.

Karl

>
> Am Fri, 10 Oct 2008 08:46:57 +0200
> schrieb stephane ducasse <[hidden email]>:
>
>  
>> this is really strange.
>> can you select one class of your app and fileout it and send it?
>>
>> stef
>>
>> On Oct 9, 2008, at 3:37 PM, Matthias Korn wrote:
>>
>>    
>>> Hi,
>>>
>>> I already tried to fileIn a minimal part (one Morph class) of the
>>> application I want to port and started resolving the errors in the
>>> debugger one by one. Still, now I am stuck with the following error:
>>> Metaclass(Object)>>doesNotUnderstand: #category
>>> (the full Stack Trace is attached)
>>>
>>> Were there some changes in the Metaclass between V2 and V3 that  
>>> explain
>>> this error?
>>>
>>> Thanks for the hint, though Karl. I didn't know about that  
>>> possibility.
>>>
>>> Regards,
>>> Matthias
>>>
>>>
>>> Am Wed, 8 Oct 2008 18:07:55 +0200
>>> schrieb Karl Ramberg <[hidden email]>:
>>>
>>>      
>>>> Matthias Korn wrote:
>>>>        
>>>>> Hi all,
>>>>>
>>>>> is there some documentation, help, tools, etc. to port a Squeak
>>>>> app written in SqueakV2.sources to a recent image?
>>>>>
>>>>> fileOut -> fileIn gives me all sorts of error messages I cannot
>>>>> understand/debug.
>>>>>
>>>>> I actually just want to port parts of the app to re-use the code.
>>>>> But it proofs really difficult for me
>>>>>          
>>>> Hi,
>>>> in FileList you can try to look at the code with the CodeBrowser.
>>>> Select the file you want to load, press the code button, or select
>>>> browse code from the context menu.
>>>> This will load the code in a temporary way and you can browse it
>>>> and see the methods that change, and file in the parts you want.
>>>>
>>>> Karl
>>>>        
>>> <
>>> Metaclass_category.txt>_______________________________________________
>>> Beginners mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>>      
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>    
>
>
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>  

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Yoshiki Ohshima-2
In reply to this post by Matthias Korn-4
> ScratchFrameMorph class-readPaintSkinFrom.st

  Cool, it is a fun class to work on.  I tried to file it in to 3.10.2
and did get the Syntax Error panel properly.

The trouble seems to me that in the following part and after, variable
"n" is used but it is a block local variables in the previous blocks.

------------------------------
                        n _ root, part.
------------------------------
which is in:
------------------
        "resizeable button/typein forms"
        #(paintUtilityButton) do: [:root |
                #(Left Middle Right) do: [:part |
                        n _ root, part.
                        pressed _ root, part, 'Pressed'.
                        ScratchSkin at: n asSymbol put: (Utilities form: n from: aDirectory).
                        root ~= #typein ifTrue: [
                                ScratchSkin at: pressed asSymbol put: (Utilities form: pressed from: aDirectory)]]].
------------------

If you look at the Syntax Error window, there is "out of scope ->"
indication in front of "n".  In the older image like the MIT Squeak,
it was forgiven but not anymore in the newer images.

So, rename the variable n in that part to something else and it should
be fine.

-- Yoshiki
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Matthias Korn-4
Wow! That's great. I managed to fileIn the class now. They did quite a
lot of this variable saving stuff...


Am Fri, 10 Oct 2008 13:24:09 -0700
schrieb Yoshiki Ohshima <[hidden email]>:

> > ScratchFrameMorph class-readPaintSkinFrom.st
>
>   Cool, it is a fun class to work on.  I tried to file it in to 3.10.2
> and did get the Syntax Error panel properly.

How do you get the "Syntax Error panel"? Is that a special tool? I'm
only getting the debugger where I navigated to the message you told
me...

Thanks,
Matthias


> The trouble seems to me that in the following part and after, variable
> "n" is used but it is a block local variables in the previous blocks.
>
> ------------------------------
> n _ root, part.
> ------------------------------
> which is in:
> ------------------
> "resizeable button/typein forms"
> #(paintUtilityButton) do: [:root |
> #(Left Middle Right) do: [:part |
> n _ root, part.
> pressed _ root, part, 'Pressed'.
> ScratchSkin at: n asSymbol put: (Utilities
> form: n from: aDirectory). root ~= #typein ifTrue: [
> ScratchSkin at: pressed asSymbol put:
> (Utilities form: pressed from: aDirectory)]]]. ------------------
>
> If you look at the Syntax Error window, there is "out of scope ->"
> indication in front of "n".  In the older image like the MIT Squeak,
> it was forgiven but not anymore in the newer images.
>
> So, rename the variable n in that part to something else and it should
> be fine.
>
> -- Yoshiki
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Yoshiki Ohshima-2
At Mon, 13 Oct 2008 12:32:09 +0200,
Matthias Korn wrote:
>
> >   Cool, it is a fun class to work on.  I tried to file it in to 3.10.2
> > and did get the Syntax Error panel properly.
>
> How do you get the "Syntax Error panel"? Is that a special tool? I'm
> only getting the debugger where I navigated to the message you told
> me...

  Did you get a window like attached when filing in the changeset?

-- Yoshiki

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

syntaxerror.png (26K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Matthias Korn-4
No, I didn't.
It's probably due to the image I am using!? Maybe the Syntax Error tool
is not included?
It is sq3.10-7159dev08.03.1.image

Regards,
Matthias

Am Tue, 14 Oct 2008 14:57:40 -0700
schrieb Yoshiki Ohshima <[hidden email]>:

> At Mon, 13 Oct 2008 12:32:09 +0200,
> Matthias Korn wrote:
> >
> > >   Cool, it is a fun class to work on.  I tried to file it in to
> > > 3.10.2 and did get the Syntax Error panel properly.
> >
> > How do you get the "Syntax Error panel"? Is that a special tool? I'm
> > only getting the debugger where I navigated to the message you told
> > me...
>
>   Did you get a window like attached when filing in the changeset?
>
> -- Yoshiki
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Porting an old app to a recent image

Yoshiki Ohshima-2
At Wed, 15 Oct 2008 00:23:24 +0200,
Matthias Korn wrote:
>
> No, I didn't.
> It's probably due to the image I am using!? Maybe the Syntax Error tool
> is not included?
> It is sq3.10-7159dev08.03.1.image

  Now, I remember where it was started^^; So because #category that is
used in the syntax error reporting mechanism raised an error, you
didn't get the window, right?

  You do have SyntaxError class in your system, yes?  So, that must be
a bug somebody introduced in the sq3.10-7159dev08.03.1.image.

-- Yoshiki
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners