[Pharo-project] Other Morphic question: allKnownNames
Hi I'm reading innocuousName allKnownNames allSubmorphNamesDo: and friends It seems to me that Morph submorph elements could be given names from the user interface and this would define automatically instance variables or something like that with the given name. My gut feeling is shouting inside me to tell me that we should remove that. I would really like to know your point of view. I checked in Squeak2.8 allKnownNames "Answer a list of all the names of all named objects borne in my instance variable values" ^ self instanceVariableValues select: [:e | (e ~~ nil) and: [e knownName ~~ nil]] thenCollect: [:e | e knownName] Stef
On 24.09.2008, at 21:03, Stéphane Ducasse wrote:
Hi
I'm reading innocuousName allKnownNames allSubmorphNamesDo:
and friends
It seems to me that Morph submorph elements could be given names from the user interface and this would define automatically instance variables or something like that with the given name.
And this has even been used to find morphs to send messages to. Because, besides "findA:" and "submorphThat:", there is even: submorphNamed: in CodeHolder, there is this wonderful piece of code: buttonWithSelector: aSelector "If receiver has a control button with the given action selector answer it, else answer nil. morphic only at this point" | aWindow aPane | ((aWindow := self containingWindow) isSystemWindow) ifFalse: [^nil]. (aPane := aWindow submorphNamed: 'buttonPane') ifNil: [^nil]. ^aPane submorphThat: [:m | (m isKindOf: PluggableButtonMorph) and: [m actionSelector == aSelector]] ifNone: [^nil] ;-) Marcus -- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker
We are in sync then I think that morphic will be quite small once we will get done with it. :) I will release ComponentLikeModel removal BTW scriptEditorMoprh is not in etoy package but it smells like it. I think that I will try to remove it too. What do you think? Stef On Sep 24, 2008, at 9:17 PM, Marcus Denker wrote:
On 24.09.2008, at 21:03, Stéphane Ducasse wrote:
Hi
I'm reading innocuousName allKnownNames allSubmorphNamesDo:
and friends
It seems to me that Morph submorph elements could be given names from the user interface and this would define automatically instance variables or something like that with the given name.
And this has even been used to find morphs to send messages to. Because, besides "findA:" and "submorphThat:", there is even: submorphNamed:
in CodeHolder, there is this wonderful piece of code:
buttonWithSelector: aSelector "If receiver has a control button with the given action selector answer it, else answer nil. morphic only at this point"
| aWindow aPane | ((aWindow := self containingWindow) isSystemWindow) ifFalse: [^nil]. (aPane := aWindow submorphNamed: 'buttonPane') ifNil: [^nil]. ^aPane submorphThat: [:m | (m isKindOf: PluggableButtonMorph) and: [m actionSelector == aSelector]] ifNone: [^nil]
;-)
Marcus
-- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 24.09.2008, at 21:27, Stéphane Ducasse wrote:
We are in sync then I think that morphic will be quite small once we will get done with it. :) I will release ComponentLikeModel removal
BTW scriptEditorMoprh is not in etoy package but it smells like it. I think that I will try to remove it too. What do you think?
Yes, that's etoys. I think there was some work going on to make the tiles more general and use them for non-kids stuff, too. see senders of #universalTiles. Marcus -- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker
participants (2)
-
Marcus Denker -
Stéphane Ducasse