Morphic question

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

Morphic question

David Röthlisberger
Hi list,

I have a question concerning morphic in Squeak 3.9... I'm trying hard to
understand morphic, but it's not easy...
I want to display a SystemWindow in the current world, it should be
placed starting at the top left corner going to the top right corner, so
it should take the whole width of the world. How can I achieve that?
I tried to use SystemWindow>>#position: or SystemWindow>>#bounds, I
tried all sort of parameters, but the window doesn't react on these
parameters... I set them before I open the window in world using
#openInWorld.
So how can I let a window open in the top left corner and taking the
whole availabe width of the world? Or how can I move a window
programmatically as soon as it's opened?

Any hint is greatly appreciated, thanks.

btw, is there a good documentation about current Morphic in Squeak
3.8/3.9? I couldn't find any.

David
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Morphic question

Edgar J. De Cleene



El 2/5/07 11:15 AM, "David Röthlisberger" <[hidden email]> escribió:

> Hi list,
>
> I have a question concerning morphic in Squeak 3.9... I'm trying hard to
> understand morphic, but it's not easy...
> I want to display a SystemWindow in the current world, it should be
> placed starting at the top left corner going to the top right corner, so
> it should take the whole width of the world. How can I achieve that?
> I tried to use SystemWindow>>#position: or SystemWindow>>#bounds, I
> tried all sort of parameters, but the window doesn't react on these
> parameters... I set them before I open the window in world using
> #openInWorld.
> So how can I let a window open in the top left corner and taking the
> whole availabe width of the world? Or how can I move a window
> programmatically as soon as it's opened?
>
> Any hint is greatly appreciated, thanks.

 | myWindow |
myWindow width: World with "This way you window have same with of current
world"
myWindow openInWorld "Always Morphs was created at 0@0 or topLeft of current
World"

At later time you could do:
myWindow center: World center "This way your window was centered in current
world"

The best documentation is inside image and taking some else project what do
some similar to what you wish.

And ask questions.

Edgar




       

       
               
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Morphic question

Lukas Renggli
In reply to this post by David Röthlisberger
> Any hint is greatly appreciated, thanks.

SystemWindow new
        openInWorld;
        position: 0 @ 0;
        extent: World extent

You have to open the window first, because sending #openInWorld asks
your model for the bounds and therefor resets anything you set
manually.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Morphic question

David Röthlisberger

>> Any hint is greatly appreciated, thanks.
>
> SystemWindow new
>     openInWorld;
>     position: 0 @ 0;
>     extent: World extent
>
> You have to open the window first, because sending #openInWorld asks
> your model for the bounds and therefor resets anything you set
> manually.

ah, that's the trick, now I understand. I thought the size has to be
defined before opening the window.

Thank you and Edgar for these very fast answers. :)


David
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

SystemWindow (was: Morphic question)

Blake-5
On Mon, 05 Feb 2007 06:43:42 -0800, David Röthlisberger <[hidden email]>  
wrote:

>
>>> Any hint is greatly appreciated, thanks.
>>  SystemWindow new
>>     openInWorld;
>>     position: 0 @ 0;
>>     extent: World extent

That's cool lookin'. What Squeak projects use it?
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Morphic question

Milan Zimmermann-2
In reply to this post by David Röthlisberger
Hi David,

This is quite an aside from what you are asking, but if plan to build portable
UIs or tools, it may be interesting to look at ToolBuilder and ToolsPlus. I
know almost nothing about them, only that I recently learned they can be used
to build (simple) UIs that are portable between Morphic and Tweak, and in
theory, if someone provides the concerete implementation, also Seaside and
MVC.

Milan

On 2007 February 5 09:15, David Röthlisberger wrote:

> Hi list,
>
> I have a question concerning morphic in Squeak 3.9... I'm trying hard to
> understand morphic, but it's not easy...
> I want to display a SystemWindow in the current world, it should be
> placed starting at the top left corner going to the top right corner, so
> it should take the whole width of the world. How can I achieve that?
> I tried to use SystemWindow>>#position: or SystemWindow>>#bounds, I
> tried all sort of parameters, but the window doesn't react on these
> parameters... I set them before I open the window in world using
> #openInWorld.
> So how can I let a window open in the top left corner and taking the
> whole availabe width of the world? Or how can I move a window
> programmatically as soon as it's opened?
>
> Any hint is greatly appreciated, thanks.
>
> btw, is there a good documentation about current Morphic in Squeak
> 3.8/3.9? I couldn't find any.
>
> David
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners