creating instance variable accessors

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

creating instance variable accessors

Jimmie Houchin-3
Hello,

Do any of the browser have the capability of creating accessors for all
instance variables at the same time?
Or also, the ability to create accessors for variables which do not have
accessors?

I thought I had seen the ability to create accessors in a browser a few
years ago. But I am missing it or overlooking it in the browsers I've
seen in the squeak-dev images.

While working today, I was using the RB browser and it offered the
ability to create accessors, but for only one variable at a time. While
easier than manually doing it one variable at a time it would be nice to
have the option to do them all at once.

If not I might have to look at the OB browser code and figure it out. :)

Thanks for any pointers.

Jimmie

Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

tblanchard
Yes, but the feature is inexplicably buried.
Cmd-click in class list pane to get menu that begins with 'browse full'
choose 'more...'
on subsequent menu it is the last item 'create inst var accessors'

On Sep 21, 2007, at 3:58 PM, Jimmie Houchin wrote:

> Hello,
>
> Do any of the browser have the capability of creating accessors for  
> all instance variables at the same time?
> Or also, the ability to create accessors for variables which do not  
> have accessors?
>
> I thought I had seen the ability to create accessors in a browser a  
> few years ago. But I am missing it or overlooking it in the  
> browsers I've seen in the squeak-dev images.
>
> While working today, I was using the RB browser and it offered the  
> ability to create accessors, but for only one variable at a time.  
> While easier than manually doing it one variable at a time it would  
> be nice to have the option to do them all at once.
>
> If not I might have to look at the OB browser code and figure it  
> out. :)
>
> Thanks for any pointers.
>
> Jimmie
>


Reply | Threaded
Open this post in threaded view
|

RE: creating instance variable accessors

Ramon Leon-5

> Yes, but the feature is inexplicably buried.
> Cmd-click in class list pane to get menu that begins with
> 'browse full'
> choose 'more...'
> on subsequent menu it is the last item 'create inst var accessors'

Any menu that has a "more..." option can be accessed directly by shift-right
click instead of just right-clicking.  I just think of it as two levels of
context menus, quite nice actually.

Ramon Leon
http://onsmalltalk.com


Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

tblanchard
Uh, no, that just unselects the item in the class pane.

On Sep 21, 2007, at 4:40 PM, Ramon Leon wrote:

>
>> Yes, but the feature is inexplicably buried.
>> Cmd-click in class list pane to get menu that begins with
>> 'browse full'
>> choose 'more...'
>> on subsequent menu it is the last item 'create inst var accessors'
>
> Any menu that has a "more..." option can be accessed directly by  
> shift-right
> click instead of just right-clicking.  I just think of it as two  
> levels of
> context menus, quite nice actually.
>
> Ramon Leon
> http://onsmalltalk.com
>
>


Reply | Threaded
Open this post in threaded view
|

RE: creating instance variable accessors

Ramon Leon-5
>
> Uh, no, that just unselects the item in the class pane.
>

Are you on a Mac?  I'm on Windows.

Ramon Leon
http://onsmalltalk.com


Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

Blake-5
On Fri, 21 Sep 2007 17:06:30 -0700, Ramon Leon <[hidden email]>  
wrote:

>>
>> Uh, no, that just unselects the item in the class pane.
>>
>
> Are you on a Mac?  I'm on Windows.

Isn't it preference adjustible? I admit to being muddled on this between  
the settings I've tweaked, versus the defaults on various OSes and  
versions....


Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

tblanchard
In reply to this post by Ramon Leon-5
Yep - Mac.

On Sep 21, 2007, at 5:06 PM, Ramon Leon wrote:

>>
>> Uh, no, that just unselects the item in the class pane.
>>
>
> Are you on a Mac?  I'm on Windows.
>
> Ramon Leon
> http://onsmalltalk.com
>
>


Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

Jimmie Houchin-3
In reply to this post by tblanchard
Todd Blanchard wrote:
> Yes, but the feature is inexplicably buried.
> Cmd-click in class list pane to get menu that begins with 'browse full'
> choose 'more...'
> on subsequent menu it is the last item 'create inst var accessors'
[snip]

Thanks Todd,

I thought I had looked in that menu. But I guess I missed it.

It seems that it would be nice if it were in the Instance Variable
submenu, possible right below the
3. Create accessors for instance variable
we could have
4. Create accessors for instance variables.
or if we want to be truly explicit
4. Create accessors for all instance variables.


I played with it just now to see if it met my other question with regard
to adding accessors to variables which do not have them and it did. I
even modified one of the existing accessors to see if it would leave it
alone or overwrite it. It did as I had hoped. Beautiful!

Thanks again for pointing this out.

Jimmie

Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

tblanchard
In general - Squeak's menus need reorganizing in a BIG way.

On Sep 21, 2007, at 9:42 PM, Jimmie Houchin wrote:

> Todd Blanchard wrote:
>> Yes, but the feature is inexplicably buried.
>> Cmd-click in class list pane to get menu that begins with 'browse  
>> full'
>> choose 'more...'
>> on subsequent menu it is the last item 'create inst var accessors'
> [snip]
>
> Thanks Todd,
>
> I thought I had looked in that menu. But I guess I missed it.
>
> It seems that it would be nice if it were in the Instance Variable  
> submenu, possible right below the
> 3. Create accessors for instance variable
> we could have
> 4. Create accessors for instance variables.
> or if we want to be truly explicit
> 4. Create accessors for all instance variables.
>
>
> I played with it just now to see if it met my other question with  
> regard to adding accessors to variables which do not have them and  
> it did. I even modified one of the existing accessors to see if it  
> would leave it alone or overwrite it. It did as I had hoped.  
> Beautiful!
>
> Thanks again for pointing this out.
>
> Jimmie
>


Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

timrowledge
In reply to this post by Jimmie Houchin-3
Please, please, don't get in the habit of willy-nilly making  
accessors for every instance variable. All you're doing that way is  
opening the door to writing C code.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: REP: Randomly Execute Programmers



Reply | Threaded
Open this post in threaded view
|

RE: creating instance variable accessors

Sebastian Sastre-2
In reply to this post by tblanchard
If usability and design principles, Fitts law, etc. are the criteria to
materialize the reorganization, then is a good news. If not, there is an
excellent time to think about putting them in practice. Thousands of eyes
and articulations would silently thank you again and again for making that.

        cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En
> nombre de Todd Blanchard
> Enviado el: Sábado, 22 de Septiembre de 2007 01:44
> Para: The general-purpose Squeak developers list
> CC: Squeak's User Interface
> Asunto: Re: creating instance variable accessors
>
> In general - Squeak's menus need reorganizing in a BIG way.
>
> On Sep 21, 2007, at 9:42 PM, Jimmie Houchin wrote:
>
> > Todd Blanchard wrote:
> >> Yes, but the feature is inexplicably buried.
> >> Cmd-click in class list pane to get menu that begins with 'browse
> >> full'
> >> choose 'more...'
> >> on subsequent menu it is the last item 'create inst var accessors'
> > [snip]
> >
> > Thanks Todd,
> >
> > I thought I had looked in that menu. But I guess I missed it.
> >
> > It seems that it would be nice if it were in the Instance Variable
> > submenu, possible right below the 3. Create accessors for instance
> > variable we could have 4. Create accessors for instance variables.
> > or if we want to be truly explicit
> > 4. Create accessors for all instance variables.
> >
> >
> > I played with it just now to see if it met my other question with
> > regard to adding accessors to variables which do not have
> them and it
> > did. I even modified one of the existing accessors to see
> if it would
> > leave it alone or overwrite it. It did as I had hoped.
> > Beautiful!
> >
> > Thanks again for pointing this out.
> >
> > Jimmie
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: creating instance variable accessors

Jimmie Houchin-3
In reply to this post by timrowledge
tim Rowledge wrote:
> Please, please, don't get in the habit of willy-nilly making accessors
> for every instance variable. All you're doing that way is opening the
> door to writing C code.

I will not dispute your wisdom here.

But in this specific instance I had an object with lots of variables
which contained data gathered for and supplied to a web page.

I could even see situations where it would be easier to create them all
and then delete the unnecessary, rather than creating only the necessary.

Any way, none of this conflicts with your wisdom above.
And a note of caution is welcome. Especially from those of us who
haven't had the years of experience to gain some of the hard earned
wisdom available in this group.

Thanks.

Jimmie