Stupid Question

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

Stupid Question

Bob Williams
I am exploring Morphs and I tried the following code:

|sm ws|
    ws := WideString new: 5.
    ws wordAt: 1 put: 16r2264.
    ws wordAt: 2 put: 16r22C5.
    ws wordAt: 3 put: 16r2211.
    ws wordAt: 4 put: 16r2219.
    ws wordAt: 5 put: 16r221A.
    sm := SimpleSwitchMorph new.
    sm label: ws font: (LogicalFont familyName: 'Cambria Math' pointSize: 15).
    sm openInWorld.

Now in the upper left corner of the World screen I have a button that shows the math symbols, LTE, dot, Summation, large-dot and SQRT, and will change backcolor from gray to light-red. Exactly what I wanted; however, how do I get rid of the morph? The class documentation is full of examples of this kind so there must be a way to clean up the World as It persists through a quit and save and then open.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

hernanmd
Bring the halo menu.
In Windows: Alt+Shift+Left click over the morph

Cheers,

Hernán


2014-02-08 14:12 GMT-03:00 Bob Williams <[hidden email]>:
I am exploring Morphs and I tried the following code:

|sm ws|
    ws := WideString new: 5.
    ws wordAt: 1 put: 16r2264.
    ws wordAt: 2 put: 16r22C5.
    ws wordAt: 3 put: 16r2211.
    ws wordAt: 4 put: 16r2219.
    ws wordAt: 5 put: 16r221A.
    sm := SimpleSwitchMorph new.
    sm label: ws font: (LogicalFont familyName: 'Cambria Math' pointSize: 15).
    sm openInWorld.

Now in the upper left corner of the World screen I have a button that shows the math symbols, LTE, dot, Summation, large-dot and SQRT, and will change backcolor from gray to light-red. Exactly what I wanted; however, how do I get rid of the morph? The class documentation is full of examples of this kind so there must be a way to clean up the World as It persists through a quit and save and then open.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

Benjamin Van Ryseghem (Pharo)
In reply to this post by Bob Williams
sm delete ?

Ben

On 08 Feb 2014, at 18:12, Bob Williams <[hidden email]> wrote:

I am exploring Morphs and I tried the following code:

|sm ws|
    ws := WideString new: 5.
    ws wordAt: 1 put: 16r2264.
    ws wordAt: 2 put: 16r22C5.
    ws wordAt: 3 put: 16r2211.
    ws wordAt: 4 put: 16r2219.
    ws wordAt: 5 put: 16r221A.
    sm := SimpleSwitchMorph new.
    sm label: ws font: (LogicalFont familyName: 'Cambria Math' pointSize: 15).
    sm openInWorld.

Now in the upper left corner of the World screen I have a button that shows the math symbols, LTE, dot, Summation, large-dot and SQRT, and will change backcolor from gray to light-red. Exactly what I wanted; however, how do I get rid of the morph? The class documentation is full of examples of this kind so there must be a way to clean up the World as It persists through a quit and save and then open.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

Clément Béra
In reply to this post by hernanmd
Hello,

On Mac, I press Cmd + shift + mouse click and while keeping all these pressed I move the mouse, and it automatically create a rectangle selecting all the morphs inside. It allows to select multiple morphs which is much better in some cases.


2014-02-08 18:22 GMT+01:00 Hernán Morales Durand <[hidden email]>:
Bring the halo menu.
In Windows: Alt+Shift+Left click over the morph

Cheers,

Hernán


2014-02-08 14:12 GMT-03:00 Bob Williams <[hidden email]>:

I am exploring Morphs and I tried the following code:

|sm ws|
    ws := WideString new: 5.
    ws wordAt: 1 put: 16r2264.
    ws wordAt: 2 put: 16r22C5.
    ws wordAt: 3 put: 16r2211.
    ws wordAt: 4 put: 16r2219.
    ws wordAt: 5 put: 16r221A.
    sm := SimpleSwitchMorph new.
    sm label: ws font: (LogicalFont familyName: 'Cambria Math' pointSize: 15).
    sm openInWorld.

Now in the upper left corner of the World screen I have a button that shows the math symbols, LTE, dot, Summation, large-dot and SQRT, and will change backcolor from gray to light-red. Exactly what I wanted; however, how do I get rid of the morph? The class documentation is full of examples of this kind so there must be a way to clean up the World as It persists through a quit and save and then open.

Thanks.


Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

Sean P. DeNigris
Administrator
Clément Bera-4 wrote
On Mac, I press Cmd + shift + mouse click and while keeping all these
There's also a setting (search for "easy selection") which let's you just click and drag, without the game of Twister [1] ;)

[1] http://upload.wikimedia.org/wikipedia/en/0/09/1966_Twister_Cover.jpg
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

David Harris
In reply to this post by hernanmd
Alt-Shift-Left click does indeed initiate the halo under Windows.

But...

In my testing, I used AthensDemoMorph new openInWorld

When I use the Move element of the halo, I get "MessageNotUnderstood: AthensDemoMorph>>passenger"

I'm a novice, but that seems unusual.

From: Hernán Morales Durand <[hidden email]>
To: Any question about pharo is welcome <[hidden email]>
Sent: Saturday, February 8, 2014 12:22 PM
Subject: Re: [Pharo-users] Stupid Question

Bring the halo menu.
In Windows: Alt+Shift+Left click over the morph

Cheers,

Hernán


2014-02-08 14:12 GMT-03:00 Bob Williams <[hidden email]>:
I am exploring Morphs and I tried the following code:

|sm ws|
    ws := WideString new: 5.
    ws wordAt: 1 put: 16r2264.
    ws wordAt: 2 put: 16r22C5.
    ws wordAt: 3 put: 16r2211.
    ws wordAt: 4 put: 16r2219.
    ws wordAt: 5 put: 16r221A.
    sm := SimpleSwitchMorph new.
    sm label: ws font: (LogicalFont familyName: 'Cambria Math' pointSize: 15).
    sm openInWorld.

Now in the upper left corner of the World screen I have a button that shows the math symbols, LTE, dot, Summation, large-dot and SQRT, and will change backcolor from gray to light-red. Exactly what I wanted; however, how do I get rid of the morph? The class documentation is full of examples of this kind so there must be a way to clean up the World as It persists through a quit and save and then open.

Thanks.



Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

Sean P. DeNigris
Administrator
David Harris wrote
When I use the Move element of the halo, I get "MessageNotUnderstood: AthensDemoMorph>>passenger"
...
I'm a novice, but that seems unusual.
Athens is a work in progress… that is a bug
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Stupid Question

Clément Béra
The halo works on morphs. If you have an athens surface which is not in a morph, the halo does not work.

Anyway this is a bug.


2014-02-09 4:27 GMT+01:00 Sean P. DeNigris <[hidden email]>:
David Harris wrote
> When I use the Move element of the halo, I get "MessageNotUnderstood:
> AthensDemoMorph>>passenger"
> ...
> I'm a novice, but that seems unusual.

Athens is a work in progress… that is a bug



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Stupid-Question-tp4742358p4742390.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.