debugging by using a global variable?

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

debugging by using a global variable?

Joseph Alotta
Greetings,

My code has some complex parts and I think it would be good to pull parts of it out and practice with it in a workspace window.

For example, I have an Array of Transaction objects, that is a instance variable.  It is mostly populated from reading a file.

What would be the best method to extract this array?

Assign it to a global variable?


Sincerely,

Joe.


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

Re: debugging by using a global variable?

jelena

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

Re: debugging by using a global variable?

Bert Freudenberg
In reply to this post by Joseph Alotta

> On 20.04.2016, at 17:19, Joseph Alotta <[hidden email]> wrote:
>
> Greetings,
>
> My code has some complex parts and I think it would be good to pull parts of it out and practice with it in a workspace window.
>
> For example, I have an Array of Transaction objects, that is a instance variable.  It is mostly populated from reading a file.
>
> What would be the best method to extract this array?
>
> Assign it to a global variable?
That’s one way to do it.

You can also drag that instance variable from the inspector to the workspace, which will create a variable reference.

In the latest trunk image this should work seamlessly: If you drop an Array, the workspace variable will be named something like “array12345” and be bound to that Array.

In the stable release image, you have to first enable the workspace’s “accept dropped morphs” flag from its menu button. It will create a variable named “transfer12345” and put the morph in it. You will have to refer to the Array as “transfer12345 passenger”.

- Bert -




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

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: debugging by using a global variable?

Joseph Alotta
bert,

thanks.  I heard something ding when I dragged it, but nothing happened.  I couldn’t find the item on the menus.

Sincerely,

Joe.


> On Apr 20, 2016, at 10:53 AM, Bert Freudenberg [via Smalltalk] <[hidden email]> wrote:
>
>
> > On 20.04.2016, at 17:19, Joseph Alotta <[hidden email]> wrote:
> >
> > Greetings,
> >
> > My code has some complex parts and I think it would be good to pull parts of it out and practice with it in a workspace window.
> >
> > For example, I have an Array of Transaction objects, that is a instance variable.  It is mostly populated from reading a file.
> >
> > What would be the best method to extract this array?
> >
> > Assign it to a global variable?
> That’s one way to do it.
>
> You can also drag that instance variable from the inspector to the workspace, which will create a variable reference.
>
> In the latest trunk image this should work seamlessly: If you drop an Array, the workspace variable will be named something like “array12345” and be bound to that Array.
>
> In the stable release image, you have to first enable the workspace’s “accept dropped morphs” flag from its menu button. It will create a variable named “transfer12345” and put the morph in it. You will have to refer to the Array as “transfer12345 passenger”.
>
> - Bert -
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>  smime.p7s (5K) Download Attachment
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/debugging-by-using-a-global-variable-tp4891014p4891032.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML

Reply | Threaded
Open this post in threaded view
|

Re: debugging by using a global variable?

Bert Freudenberg
The menu item is behind the blue button in the workspace’s title bar:


- Bert -

On 20.04.2016, at 21:00, Joseph Alotta <[hidden email]> wrote:

bert, 

thanks.  I heard something ding when I dragged it, but nothing happened.  I couldn’t find the item on the menus. 

Sincerely, 

Joe. 


> On Apr 20, 2016, at 10:53 AM, Bert Freudenberg [via Smalltalk] <<a href="x-msg://213/user/SendEmail.jtp?type=node&amp;node=4891050&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote: 
> 
> 
> > On 20.04.2016, at 17:19, Joseph Alotta <[hidden email]> wrote: 
> > 
> > Greetings, 
> > 
> > My code has some complex parts and I think it would be good to pull parts of it out and practice with it in a workspace window. 
> > 
> > For example, I have an Array of Transaction objects, that is a instance variable.  It is mostly populated from reading a file. 
> > 
> > What would be the best method to extract this array? 
> > 
> > Assign it to a global variable? 
> That’s one way to do it. 
> 
> You can also drag that instance variable from the inspector to the workspace, which will create a variable reference. 
> 
> In the latest trunk image this should work seamlessly: If you drop an Array, the workspace variable will be named something like “array12345” and be bound to that Array. 
> 
> In the stable release image, you have to first enable the workspace’s “accept dropped morphs” flag from its menu button. It will create a variable named “transfer12345” and put the morph in it. You will have to refer to the Array as “transfer12345 passenger”. 
> 
> - Bert - 
> 



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

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: debugging by using a global variable?

Joseph Alotta
Thank you.  I found the menu now.  Wow!  There is a lot of other interesting things there.


Sincerely,

Joe.


> On Apr 21, 2016, at 8:58 AM, Bert Freudenberg [via Smalltalk] <[hidden email]> wrote:
>
> The menu item is behind the blue button in the workspace’s title bar:
>
>
>
> - Bert -
>
>> On 20.04.2016, at 21:00, Joseph Alotta <[hidden email]> wrote:
>>
>> bert,
>>
>> thanks.  I heard something ding when I dragged it, but nothing happened.  I couldn’t find the item on the menus.
>>
>> Sincerely,
>>
>> Joe.
>>
>>
>> > On Apr 20, 2016, at 10:53 AM, Bert Freudenberg [via Smalltalk] <<a href="x-msg://213/user/SendEmail.jtp?type=node&amp;node=4891050&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >
>> >
>> > > On 20.04.2016, at 17:19, Joseph Alotta <[hidden email]> wrote:
>> > >
>> > > Greetings,
>> > >
>> > > My code has some complex parts and I think it would be good to pull parts of it out and practice with it in a workspace window.
>> > >
>> > > For example, I have an Array of Transaction objects, that is a instance variable.  It is mostly populated from reading a file.
>> > >
>> > > What would be the best method to extract this array?
>> > >
>> > > Assign it to a global variable?
>> > That’s one way to do it.
>> >
>> > You can also drag that instance variable from the inspector to the workspace, which will create a variable reference.
>> >
>> > In the latest trunk image this should work seamlessly: If you drop an Array, the workspace variable will be named something like “array12345” and be bound to that Array.
>> >
>> > In the stable release image, you have to first enable the workspace’s “accept dropped morphs” flag from its menu button. It will create a variable named “transfer12345” and put the morph in it. You will have to refer to the Array as “transfer12345 passenger”.
>> >
>> > - Bert -
>> >
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>  smime.p7s (5K) Download Attachment
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.world.st/debugging-by-using-a-global-variable-tp4891014p4891186.html
> To start a new topic under Squeak - Beginners, email [hidden email]
> To unsubscribe from Squeak - Beginners, click here.
> NAML

Reply | Threaded
Open this post in threaded view
|

Re: debugging by using a global variable?

jelena
In reply to this post by Joseph Alotta

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