Removing tabs from a PluggableTabBarMorph.

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

Removing tabs from a PluggableTabBarMorph.

William G. Davis
Hi. I'm currently using Squeak 3.8.

I need a way to remove tabs from a
PluggableTabBarMorph but it appears that the class
doesn't support this functionality. Could I suggest it
be added in 3.9?

Something as simple as changing addTab:withAction: so
it returns the new PluggableTabMorph object and then
adding a message like this:

removeTab: aTabMorph

         | tabToRemove |

        tabToRemove := self tabs detect: [:anAssociation |
anAssociation key = aTabMorph].
        tabToRemove ifNil: [^ self].
        self tabs remove: tabToRemove.
        self layoutChanged.
        self changed.

        aTabMorph delete.

does the trick.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

Re: Removing tabs from a PluggableTabBarMorph.

stéphane ducasse-2
Hi william

Do you have the code to be added? Because in this case, I'm that the  
morphic team will integrate it.

Stef


On 13 mars 06, at 14:18, William G. Davis wrote:

> Hi. I'm currently using Squeak 3.8.
>
> I need a way to remove tabs from a
> PluggableTabBarMorph but it appears that the class
> doesn't support this functionality. Could I suggest it
> be added in 3.9?
>
> Something as simple as changing addTab:withAction: so
> it returns the new PluggableTabMorph object and then
> adding a message like this:
>
> removeTab: aTabMorph
>
> | tabToRemove |
>
> tabToRemove := self tabs detect: [:anAssociation |
> anAssociation key = aTabMorph].
> tabToRemove ifNil: [^ self].
> self tabs remove: tabToRemove.
> self layoutChanged.
> self changed.
>
> aTabMorph delete.
>
> does the trick.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


Reply | Threaded
Open this post in threaded view
|

Re: Removing tabs from a PluggableTabBarMorph.

William G. Davis
Thanks for the reply, Stéphane.

Yes, I have the code. Where and how should I submit
it?

--- stéphane ducasse <[hidden email]> wrote:

> Hi william
>
> Do you have the code to be added? Because in this
> case, I'm that the  
> morphic team will integrate it.
>
> Stef
>
>
> On 13 mars 06, at 14:18, William G. Davis wrote:
>
> > Hi. I'm currently using Squeak 3.8.
> >
> > I need a way to remove tabs from a
> > PluggableTabBarMorph but it appears that the class
> > doesn't support this functionality. Could I
> suggest it
> > be added in 3.9?
> >
> > Something as simple as changing addTab:withAction:
> so
> > it returns the new PluggableTabMorph object and
> then
> > adding a message like this:
> >
> > removeTab: aTabMorph
> >
> > | tabToRemove |
> >
> > tabToRemove := self tabs detect: [:anAssociation
> |
> > anAssociation key = aTabMorph].
> > tabToRemove ifNil: [^ self].
> > self tabs remove: tabToRemove.
> > self layoutChanged.
> > self changed.
> >
> > aTabMorph delete.
> >
> > does the trick.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
>
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com