modifying code when there is a compile error.

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

modifying code when there is a compile error.

Paul DeBruicker
Hi -

Apparently I'm in the habit of randomly putting two periods at the end
of a statement when I write code in Pharo.  When I go to load that in
Gemstone the compiler throws an error.  I use Monticello/Metacello to
load the packages.  Is there a way to edit the source in the
GemTools/Gemstone debugger when the error happens?  Right now I can
switch back over to Pharo, fix the methoed with the error, save another
version of my package and save another version of my ConfigurationOf and
reload everything.


I can inspect the 'source' but can't figure out how to save my changes
in GemTools/Gemstone.

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: modifying code when there is a compile error.

Paul DeBruicker
Figured it out.

1.  Open the debugger and inspect the messageText so you know what error
your looking for.

2.  Scroll down the stack to "MCMethodDefinition | load"

3.  Left click on the "source" inst var.

4.  Make your changes to the source, and "accept" them.

5.  Click Restart in the debugger.

6.  Click Proceed.



Thanks.

Paul

On 02/04/2011 11:38 AM, Paul DeBruicker wrote:

> Hi -
>
> Apparently I'm in the habit of randomly putting two periods at the end
> of a statement when I write code in Pharo. When I go to load that in
> Gemstone the compiler throws an error. I use Monticello/Metacello to
> load the packages. Is there a way to edit the source in the
> GemTools/Gemstone debugger when the error happens? Right now I can
> switch back over to Pharo, fix the methoed with the error, save another
> version of my package and save another version of my ConfigurationOf and
> reload everything.
>
>
> I can inspect the 'source' but can't figure out how to save my changes
> in GemTools/Gemstone.
>
> Thanks
>

Reply | Threaded
Open this post in threaded view
|

Re: modifying code when there is a compile error.

Max Leske
If I had only known that earlier... :)

Thanks for the tip!

Max


On 04.02.2011, at 17:54, Paul DeBruicker wrote:

> Figured it out.
>
> 1.  Open the debugger and inspect the messageText so you know what error your looking for.
>
> 2.  Scroll down the stack to "MCMethodDefinition | load"
>
> 3.  Left click on the "source" inst var.
>
> 4.  Make your changes to the source, and "accept" them.
>
> 5.  Click Restart in the debugger.
>
> 6.  Click Proceed.
>
>
>
> Thanks.
>
> Paul
>
> On 02/04/2011 11:38 AM, Paul DeBruicker wrote:
>> Hi -
>>
>> Apparently I'm in the habit of randomly putting two periods at the end
>> of a statement when I write code in Pharo. When I go to load that in
>> Gemstone the compiler throws an error. I use Monticello/Metacello to
>> load the packages. Is there a way to edit the source in the
>> GemTools/Gemstone debugger when the error happens? Right now I can
>> switch back over to Pharo, fix the methoed with the error, save another
>> version of my package and save another version of my ConfigurationOf and
>> reload everything.
>>
>>
>> I can inspect the 'source' but can't figure out how to save my changes
>> in GemTools/Gemstone.
>>
>> Thanks
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: modifying code when there is a compile error.

NorbertHartl
In reply to this post by Paul DeBruicker

On 04.02.2011, at 17:54, Paul DeBruicker wrote:

Figured it out.

1.  Open the debugger and inspect the messageText so you know what error your looking for.

2.  Scroll down the stack to "MCMethodDefinition | load"

3.  Left click on the "source" inst var.

4.  Make your changes to the source, and "accept" them.

5.  Click Restart in the debugger.

6.  Click Proceed.

Exactly what I do regularly :) But be careful this sometimes lead to the fact that the code is in the image but will be removed if you save it back with monticello. Didn't have time to investigate but I think it is due the fact that going back in the debugger stack does not reverse side effects and the compile error somehow seems to remove the method definition. 

Norbert