[question]submorphs accessing (with code)

Ricardo Jose Lo Feudo Ferreira lo at inf.ufsc.br
Wed May 10 17:51:20 UTC 2000


On Wed, 10 May 2000, Karl Ramberg wrote:

> Karl Ramberg wrote:
> 
> > Hello,
> >
> > I made a simple RectangleMorph containing a LedMorph. Now I want to
> > send a value to that submorph, but I can't find a way of doing that.
> >
> > Karl
> 
> 'From Squeak2.8alpha of 19 February 2000 [latest update: #2096] on 10
> May 2000 at 6:26:03 pm'!
> 
> RectangleMorph subclass: #Tester
>  instanceVariableNames: 'instVarName1 instVarName2 '
>  classVariableNames: ''
>  poolDictionaries: ''
>  category: 'My Stuff'!
> 
> !Tester methodsFor: 'as yet unclassified' stamp: 'kfr 5/10/2000 18:05'!
> initialize
> 
>  super initialize.
>  self extent: 50 at 50.
> 
>  self addMorph: (LedMorph new extent: 40 at 15; position: 5 at 2; digits: 4).
>  self addMorph: ( SimpleButtonMorph new  label: '100';actionSelector:
> #test; target: self; extent: 20 at 20;position: 15 at 25).
> 
> 
> ! !

Hi, here is one solution:

!Tester methodsFor: 'as yet unclassified' stamp: 'rjf 5/9/2000 14:44'!
test
 "what do i write here?"
 (self findA: LedMorph) value: 100! !


Ricardo J.





More information about the Squeak-dev mailing list