[Cuis] Newbie question

Phil (list) pbpublist at gmail.com
Thu Apr 2 15:53:09 CDT 2015


On Thu, 2015-04-02 at 16:33 -0400, Dan Norton wrote:
> >On 4/1/2015 1:00 PM, Dan Norton wrote: 
> >> On 31 Mar 2015 at 10:30, Juan Vuletich wrote: 
> >>
>  [snip] 
> >> 
> >>> Have you read the class comments at LayoutSpec and LayoutMorph? In 
> >>> addition, LayoutMorph 
> >>> has an 'examples' class category. Try each one. Resize the top 
> >>> morph, and see layouts in action. 
> >>> inspect / explore the morphs, etc. Try to figure out what's 
> >>> happening... 
> >> Having resized the top morph, what's the best way to determine which 
> >> layout is which? 
> >> 
> > 
> >Use middle click on the top morph to open a halo on it. From there, open 
> >an explorer. You can see the morph tree and play with it. 
> > 
> >BTW, be sure to try making it rather large, so you can see all the 
> >morphs inside. For example, #example11 has three rows, the first one 
> >with 5 boxes and 4 draggeable separators, etc. You can open a halo on 
> >each one to inspect it and so on... 
> > 
> (Trying to explain it better) let's say you are reading code and you see that 
> LayoutMorph has examples. You bring up example2, middle click and use the resize 
> halo to make it larger. (Suggestion: the example should make it large enough to 
> distinguish the morphs.)
> 
> You see in the browser that row has 3 submorphs which are BorderedRectMorphs. 
> You middle click on one of the rectangular morphs on the screen to get the halos. At 
> the bottom you see "a BorderedRectMorph(1639)" IMHO this is perfectly correct but 
> utterly useless information because all the others will have similar info with different 
> numbers, none of which tie back to what you see in the browser. Further these 
> numbers will change upon the next instantiation.
> 
> A simple solution is to have #name as an instance variable with 2 supporting 
> methods: #name: and #printOn: . When #name: 'foo' is OPTIONALLY sent, the 
> name will appear  as "a BorderedRectMorph(1639)'foo'" when you middle click on 
> the morph.
> 

Rather than adding an ivar, why not just use a Morph property? (i.e.
#setProperty:toValue: and #valueOfProperty:)

> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org






More information about the Cuis mailing list