> On 27 Jan 2015, at 1:51 , Henrik Johansen <[email protected]> 
> wrote:
> 
> 
>> On 27 Jan 2015, at 1:21 , Roberto Minelli <[email protected]> wrote:
>> 
>> Dear all,
>> 
>> I have some questions about the following topics: Morphic, the 
>> Zinc-HTTP-Client-Server, and NautilusRefactoring. I am wondering if someone 
>> can help ;)
>> 
>> I am visiting RMoD @ INRIA these days (I am now sitting at the “visiting 
>> tables” @ 3rd floor of INRIA). If someone is willingness to help, please 
>> come forward! To get an idea (and hopefully to collect some answers from 
>> people outside of Lille) here are my doubts
>> 
>> ### Morphic
>> - How can I assess the “z index” of windows?
> That would be their index in the PasteupMorphs submorphs collection, where 
> larger index -> higher in z-order.
> In general, the z-ordering of morphs would be a tree, where
> 
> Morph >> visibilityIndex 
>       ^self owner ifNil:[0] ifNotNil: [:  own | own submorphs indexOf: self ]
> 
> Morph >> visibility
>       ^self owner ifNotNil: [ owner visibility addLast: self visibilityIndex; 
> yourself ] ifNil:[OrderedCollection new]. 
> 
> would give you a list of numbers, all morphs with higher numbers at any level 
> would have a higher z-order.

Hupps, upon further reading, I got the ordering wrong, submorphs at higher 
indexes are drawn first.
It's amazing what you forget over time... (a modification to this method was 
the first thing I contributed to Pharo :) * )
Morph visibilityIndex 
        ^self owner ifNil: [0] ifNotNil: [: | own | own submorphs size - (own 
submorphs indexOf: self) ]

is probably better than switching the definition in the original post, since 
then you'd need to special case the root morph.

Cheers,
Henry

* Related to the Pharo-users thread about when Pharo was publicly announced, 
timestamp in 1.0 shows that change committed 25/2/2009.
I remember first hearing about Pharo from Steph announcing a new dialect at an 
ESUG, which means even though it's not an official post of the program of ESUG 
Amsterdam 2008, at least by the end of that, it was public.


Reply via email to