SimpleButtonMorph openInWorld

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

SimpleButtonMorph openInWorld

DougEdmunds
This code makes a square button appear in the topleft corner

        SimpleButtonMorph new
                target: Smalltalk;
                label: 'Beep!';
                actionSelector: #beep;
                openInWorld


How do I make it go away?

Sorry if I posted to the wrong group.  If so, please tell me where is correct.


Reply | Threaded
Open this post in threaded view
|

Re: SimpleButtonMorph openInWorld

SergeStinckwich
On Fri, Jan 28, 2011 at 9:40 AM, DAE <[hidden email]> wrote:

> This code makes a square button appear in the topleft corner
>
>        SimpleButtonMorph new
>                target: Smalltalk;
>                label: 'Beep!';
>                actionSelector: #beep;
>                openInWorld
>
>
> How do I make it go away?
>
> Sorry if I posted to the wrong group.  If so, please tell me where is correct.

On my macintosh, CTRL+ right mouse button
and select the delete item.

Regards,

--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/

Reply | Threaded
Open this post in threaded view
|

Re: SimpleButtonMorph openInWorld

Fernando olivero-2
You can also evaluate the following expresions in a wokspace,

SimpleButtonMorph allInstances do:[:each| each delete].

or

| buttons |
buttons := World submorphs detect:[:each| each isKindOf: SimpleButtonMorph ] .
buttons anyOne delete.

But i also prefer Serge option, because  Morphs are directly
manipulable for a reason!

Fernando

On Fri, Jan 28, 2011 at 2:49 AM, Serge Stinckwich
<[hidden email]> wrote:

> On Fri, Jan 28, 2011 at 9:40 AM, DAE <[hidden email]> wrote:
>> This code makes a square button appear in the topleft corner
>>
>>        SimpleButtonMorph new
>>                target: Smalltalk;
>>                label: 'Beep!';
>>                actionSelector: #beep;
>>                openInWorld
>>
>>
>> How do I make it go away?
>>
>> Sorry if I posted to the wrong group.  If so, please tell me where is correct.
>
> On my macintosh, CTRL+ right mouse button
> and select the delete item.
>
> Regards,
>
> --
> Serge Stinckwich
> UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
> Every DSL ends up being Smalltalk
> http://doesnotunderstand.org/
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SimpleButtonMorph openInWorld

csrabak
OTOH,

For cases like that I think the best is to attribute the result of "SimpleButtonMorph new..." to a variable and the just use the message delete on this variable...

my 0.019999...

--
Cesar Rabak



Em 28/01/2011 04:17, Fernando Olivero < [hidden email] > escreveu:
You can also evaluate the following expresions in a wokspace,

SimpleButtonMorph allInstances do:[:each| each delete].

or

| buttons |
buttons := World submorphs detect:[:each| each isKindOf: SimpleButtonMorph ] .
buttons anyOne delete.

But i also prefer Serge option, because  Morphs are directly
manipulable for a reason!

Fernando

On Fri, Jan 28, 2011 at 2:49 AM, Serge Stinckwich
 wrote:

> On Fri, Jan 28, 2011 at 9:40 AM, DAE  wrote:
>> This code makes a square button appear in the topleft corner
>>
>>        SimpleButtonMorph new
>>                target: Smalltalk;
>>                label: 'Beep!';
>>                actionSelector: #beep;
>>                openInWorld
>>
>>
>> How do I make it go away?
>>
>> Sorry if I posted to the wrong group.  If so, please tell me where is correct.
>
> On my macintosh, CTRL+ right mouse button
> and select the delete item.
>
> Regards,
>
> --
> Serge Stinckwich
> UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
> Every DSL ends up being Smalltalk
> http://doesnotunderstand.org/
>
>