Traits in 6724

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

Traits in 6724

Alexandre Bergel-2
Hi!

Is there some hided menu in the code browser ? How can I add and  
define new traits ?

I dusted off what I did some time ago. The changeset I attached to  
this email offers a minimal support for traits in current browser,  
while waiting for the OB-based trait browser...

Here are the things:
        - You have a popup when you try to remove a trait that has users  
(cf. menu.tiff). It might be interesting to add a new entry 'Flatten  
and remove'.





        - If you select a trait, you have access to an entry 'Browse users'.



        - If you select a trait, you have a new entry -- required -- in the  
message category list. If you clik on it, you see the list of  
required selectors.



I am not sure it makes sense to include it in a new release of  
squeak, but I had to use this changeset if I want to use traits...

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



menu.tiff (24K) Download Attachment
browser.tiff (20K) Download Attachment
required.tiff (11K) Download Attachment
TraitAwareBrowserFor6724.1.cs (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Traits in 6724

Adrian Lienhard
Hi Alex,

> Is there some hided menu in the code browser ? How can I add and  
> define new traits ?

There used to be menu entries to add and create new traits.  
Apparently this was lost somewhere in recent 3.9a changes... Ok, this  
is caused by the Services package that overrides the method  
messageListMenu:shifted:.

> I dusted off what I did some time ago. The changeset I attached to  
> this email offers a minimal support for traits in current browser,  
> while waiting for the OB-based trait browser...
>
> [...]
> I am not sure it makes sense to include it in a new release of  
> squeak, but I had to use this changeset if I want to use traits...

yes, maybe we should include this. I haven't done it because it had  
some issues and because Daniel argued that it would make more sense  
to push forward the Traits OmniBrowser instead of hacking the old  
browser.

Cheers,
Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Traits in 6724

Alexandre Bergel-2
> yes, maybe we should include this. I haven't done it because it had  
> some issues and because Daniel argued that it would make more sense  
> to push forward the Traits OmniBrowser instead of hacking the old  
> browser.

I agree with Daniel, however, this change is really small, and does  
not break existing code.
I am eagerly waiting for the new Browser too...

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: Traits in 6724

Marcus Denker

On 18.02.2006, at 13:25, Alexandre Bergel wrote:

>> yes, maybe we should include this. I haven't done it because it  
>> had some issues and because Daniel argued that it would make more  
>> sense to push forward the Traits OmniBrowser instead of hacking  
>> the old browser.
>
> I agree with Daniel, however, this change is really small, and does  
> not break existing code.
> I am eagerly waiting for the new Browser too...
>

I think we need at least a little bit of functionality in the old  
browser: I *need* to see if a method comes from a trait, and I need  
the ability
to see which of the many copies in the "implementors" list is the  
original. I already nearly destroyed my image by making a change
to a method in Behavoir, resulting in a copy, thus having that change  
not in Traits objects, thus breaking compilation of methods in Traits...

I think we don't need much in the standard browser, just some hint  
"this is a method from a Trait" and then, when doing "alt-m" a hint
"this is the one true original method".

        Marcus


 

Reply | Threaded
Open this post in threaded view
|

Re: Traits in 6724

Alexandre Bergel-2
> I think we need at least a little bit of functionality in the old  
> browser: I *need* to see if a method comes from a trait, and I need  
> the ability

I vote for it...
I will try to spend a bit of time on this...

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: Traits in 6724

Daniel Vainsencher-3
In reply to this post by Alexandre Bergel-2
Hi Alex, Marcus, Adrian.

In what sense are you waiting, and who are you waiting for? if even you
won't load the TraitsOmniBrowser package and try it, then it will never
be ready for prime time. Nathanael recently tried it out and reported a
bug (actually in Traits), I fixed it.

The decision was made to not include the new traits browsers for the OB
in the image, and I'm not going to argue one way or another, since I
don't have a lot of time to support it. But if this means nobody will
install it and nobody will improve it, then yes, you better start
duplicating that work and making your own Traits development environment.

However, I would still recomm end doing it on OB and not on the old
browser, now that at least the OB itself is in 3.9a... in fact I
recommend making the OB the default browser in alpha images, otherwise
how will it ever get that extra testing?

Daniel

Alexandre Bergel wrote:

>> yes, maybe we should include this. I haven't done it because it had  
>> some issues and because Daniel argued that it would make more sense  
>> to push forward the Traits OmniBrowser instead of hacking the old  
>> browser.
>
>
> I agree with Daniel, however, this change is really small, and does  
> not break existing code.
> I am eagerly waiting for the new Browser too...
>
> Cheers,
> Alexandre



Reply | Threaded
Open this post in threaded view
|

Re: Traits in 6724

Marcus Denker

On 18.02.2006, at 15:56, Daniel Vainsencher wrote:

> Hi Alex, Marcus, Adrian.
>
> In what sense are you waiting, and who are you waiting for? if even  
> you won't load the TraitsOmniBrowser package and try it, then it  
> will never be ready for prime time. Nathanael recently tried it out  
> and reported a bug (actually in Traits), I fixed it.
>
> The decision was made to not include the new traits browsers for  
> the OB in the image, and I'm not going to argue one way or another,  
> since I don't have a lot of time to support it. But if this means  
> nobody will install it and nobody will improve it, then yes, you  
> better start duplicating that work and making your own Traits  
> development environment.
>
> However, I would still recomm end doing it on OB and not on the old  
> browser, now that at least the OB itself is in 3.9a... in fact I  
> recommend making the OB the default browser in alpha images,  
> otherwise how will it ever get that extra testing?
>

You are right in priciple... but the idea was to have the system (in  
3.9) not depend on a new Browser to be usefull. The only part were I  
see a problem with
this is when someone starts changing Behavior: You just don't have  
enough information with the old non-Traits browser. I don't want to  
make the old
Browser completely a Traits enabled tool, but having just a little  
bit more information shown when looking at traits classes would help  
a lot, I think.

       Marcus