Henry, thanks a lot for all the useful information! Concerning the last part my question is: given a window, say a Workspace (or Playground) is there a way to tell which program entity (i.e., method or class) is involved? So, for a SystemBrowser the entity is the #selectedClass or #selectedMethod. For a Playground I should probably extract the source code displayed and parse it? I have no idea on how to do that.. Cheers, Roberto
On 27 Jan 2015, at 13:51, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
On 27 Jan 2015, at 1:21 , Roberto Minelli <roberto.minelli@usi.ch> 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.
For each window Iâd like to know the % that is visible on screen, i.e., not covered from other windows.
That's not possible to calculate accurately in the general case, due to morphs possibly containing fully transparent portions within their bounds. An approximation using bounds would work the same way as the procedure in WorldState >> drawWorld: aWorld submorphs: submorphs invalidAreasOn: aCanvas , where: - The bounds of the morph to check is the damage rect to fill (rectList) - The bounds of higher ordered morphs that might obscure it corresponds to the submorphs parameter. - There's no merging of remnants - No actually drawing/all the other fluff :P
Area of remnants / area of original morph bounds would then be an ok-ish approximation of the % that is visible.
- Is there a âgeneral patternâ on how to extract which entity is âdisplayedâ on a window? In System Browsers is easy, what about other types of windows?
Dunno what you mean by that...
### Zinc-HTTP-Client-Server - How can I do a real upload (HTTP post) in background?
### NautilusRefactoring - How does it work? Why there are different methods to remove a class, for example? e.g., NautilusRefactoring>>#removeClasses: vs. AbstractTool>>#removeClasses: - Why #removeClasses: is triggered before the actual removal (i.e., confirmation dialogue)?
Leaving these for others ;)
Cheers, Henry