Hi list,
I need to ask for more pointers... =(
Now I know how to debug what happens when I send certain keys to certains morphs. My code is here - not on the wiki yet, sorry -
http://anggtwu.net/eev-squeak.html#key-events
and I am using that to learn how lots of things work. But the morphs seem to fall in several different families, each one with a different way of initializing... for morphs like these ones I can just use openInWorld,
sm := SimpleSwitchMorph new. sm openInWorld. bm := SimpleButtonMorph new. bm openInWorld. bm position: bm position + (0@32). rm := RectangleMorph new. rm openInWorld. rm position: rm position + (0@64).
but for SelectorBrowser I need to use "prototypicalToolWindow" instead of new, and there are other ones, like SearchBar, that I don't know how to create a new morph of that kind...
Where can I learn more about that? And where do people usually learn how to create interfaces in which a single window displays several subwindows and subwidgets? In Tcl/Tk this is considered basic... here is an example of this "this": the code below
frame .top frame .bottom text .textbox -width 10 -height 5 listbox .listbox -width 10 -height 5 button .button1 -text B1 button .button2 -text B2 button .button3 -text B3 .textbox insert end "Foo\nBar" .listbox insert end "Item 1" .listbox insert end "Item 2" .listbox insert end "Item 3" pack .top -side top pack .bottom -side bottom -fill x -expand 1 pack .listbox -side left -in .top pack .textbox -side right -in .top pack .button1 -side left -in .bottom -fill x -expand 1 pack .button2 -side left -in .bottom -fill x -expand 1 pack .button3 -side left -in .bottom -fill x -expand 1
creates the window in this screenshot:
https://i.ibb.co/ZcZGRjW/sshot.png
Thanks in advance! =) Eduardo Ochs http://anggtwu.net/eev-squeak.html
Hi, What you are trying to do is better accomplished in a browser. There you can more easily subclass a morph and put in break points to see what is happening etc.
While you can do much of this from a Workspace it's reccommended to learn to use a browser. There is better tool support for maintaining code etc.
See example in attachment.
TestMorph new openInWorld
This morph will halt and open a debugger once you either click on it or use the keyboard once it has keyboard focus. In the debugger you can see what messages and values are sent to the morph etc.
Use this to browse the code: TestMorph browse
[image: image.png]
Best, Karl
On Sat, Feb 25, 2023 at 8:21 AM Eduardo Ochs eduardoochs@gmail.com wrote:
Hi list,
I need to ask for more pointers... =(
Now I know how to debug what happens when I send certain keys to certains morphs. My code is here - not on the wiki yet, sorry -
http://anggtwu.net/eev-squeak.html#key-events
and I am using that to learn how lots of things work. But the morphs seem to fall in several different families, each one with a different way of initializing... for morphs like these ones I can just use openInWorld,
sm := SimpleSwitchMorph new. sm openInWorld. bm := SimpleButtonMorph new. bm openInWorld. bm position: bm position + (0@32). rm := RectangleMorph new. rm openInWorld. rm position: rm position + (0@64).
but for SelectorBrowser I need to use "prototypicalToolWindow" instead of new, and there are other ones, like SearchBar, that I don't know how to create a new morph of that kind...
Where can I learn more about that? And where do people usually learn how to create interfaces in which a single window displays several subwindows and subwidgets? In Tcl/Tk this is considered basic... here is an example of this "this": the code below
frame .top frame .bottom text .textbox -width 10 -height 5 listbox .listbox -width 10 -height 5 button .button1 -text B1 button .button2 -text B2 button .button3 -text B3 .textbox insert end "Foo\nBar" .listbox insert end "Item 1" .listbox insert end "Item 2" .listbox insert end "Item 3" pack .top -side top pack .bottom -side bottom -fill x -expand 1 pack .listbox -side left -in .top pack .textbox -side right -in .top pack .button1 -side left -in .bottom -fill x -expand 1 pack .button2 -side left -in .bottom -fill x -expand 1 pack .button3 -side left -in .bottom -fill x -expand 1
creates the window in this screenshot:
https://i.ibb.co/ZcZGRjW/sshot.png
Thanks in advance! =) Eduardo Ochs http://anggtwu.net/eev-squeak.html
On Sat, Feb 25, 2023 at 8:21 AM Eduardo Ochs eduardoochs@gmail.com wrote:
Hi list,
I need to ask for more pointers... =(
Now I know how to debug what happens when I send certain keys to certains morphs. My code is here - not on the wiki yet, sorry -
http://anggtwu.net/eev-squeak.html#key-events
and I am using that to learn how lots of things work. But the morphs seem to fall in several different families, each one with a different way of initializing... for morphs like these ones I can just use openInWorld,
sm := SimpleSwitchMorph new. sm openInWorld. bm := SimpleButtonMorph new. bm openInWorld. bm position: bm position + (0@32). rm := RectangleMorph new. rm openInWorld. rm position: rm position + (0@64).
but for SelectorBrowser I need to use "prototypicalToolWindow" instead of new, and there are other ones, like SearchBar, that I don't know how to create a new morph of that kind...
Where can I learn more about that? And where do people usually learn how to create interfaces in which a single window displays several subwindows and subwidgets? In Tcl/Tk this is considered basic... here is an example of this "this": the code below
Here is an example of a simple interface TestLayoutMorph new openInWorld
Best, Karl
frame .top frame .bottom text .textbox -width 10 -height 5 listbox .listbox -width 10 -height 5 button .button1 -text B1 button .button2 -text B2 button .button3 -text B3 .textbox insert end "Foo\nBar" .listbox insert end "Item 1" .listbox insert end "Item 2" .listbox insert end "Item 3" pack .top -side top pack .bottom -side bottom -fill x -expand 1 pack .listbox -side left -in .top pack .textbox -side right -in .top pack .button1 -side left -in .bottom -fill x -expand 1 pack .button2 -side left -in .bottom -fill x -expand 1 pack .button3 -side left -in .bottom -fill x -expand 1
creates the window in this screenshot:
https://i.ibb.co/ZcZGRjW/sshot.png
Thanks in advance! =) Eduardo Ochs http://anggtwu.net/eev-squeak.html
squeak-dev@lists.squeakfoundation.org