Solitaire updated for 2203

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

Re: Newbie question

Hannes Hirzel
I tested all examples in

https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st

in the recent Cuis4.2-2243.image

and all work as they did a year ago


For example we have LayoutDemo0 which shows how to subclass
SystemWindow and set the window title.

1. Subclass SystemWindow
2. Create initialize method

    initialize

           super initialize.
       
           self buildMorphicWindow.

3. Define your #buildMorphicWindow method

    buildMorphicWindow

         self setLabel: self className




A simplified variant of LayoutDemo1b is to have step number 3 do the following:


3. Define your #buildMorphicWindow method

    buildMorphicWindow

         self setLabel: self className.
         self layoutMorph  addMorph:
                             (DragAndDropAreaMorph new color: Color green).


This gives you a Window in which you can drop other morphs. A nice way
to keep Morph examples around.


So or with a code snippet from an earlier mail in this thread.


buildMorphicWindow


      | f g |

      self setLabel: self className.
       
       
        g _ RectangleLikeMorph new.
      f _ EllipseMorph new.
      g morphExtent: 400@400; color: Color orange.
      g addMorph: f.
      f morphPosition: 50@50; color: Color blue.
      g morphPosition:70@70.
       
       
  self layoutMorph  addMorph: g



--Hannes

On 5/14/15, Juan Vuletich <[hidden email]> wrote:

> Please retest and keep it updated!
>
> Cheers,
> Juan Vuletich
>
> On 5/13/2015 5:32 PM, H. Hirzel wrote:
>> P.S. I hope that Cuis has not changed to much that you run into
>> compatibility issues. As I wrote I did not do a retest of it in the
>> last 12 months.
>>
>> On 5/13/15, H. Hirzel<[hidden email]>  wrote:
>>> I suggest that you really have a look at
>>>
>>> https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
>>>
>>> They are _really_ basic. No plague....
>>>
>>> At least you learn for example how to put a SystemWindow around your
>>> morphs and have a tool bar. Which is a good thing to know.
>>>
>>> HH
>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
123