initialExtent in CRC Card Morph

John Hinsley johnhinsley at blueyonder.co.uk
Sun May 19 23:02:13 UTC 2002


On Sun, 19 May 2002, John Hinsley wrote:
> Hi all
> 
> I'm trying to podge together a Morph with some of the functionality of Lex and
> Mark's CRC Card morph. That's to say, resizing the morph should resize all of
> the panes. 
> 
> Hopefully I can simplify it a bit: I don't need the scroll bars and don't
> really need the labels either, but I thought I'd start off by subclassing Grid
> Morph and using all of L & M's code that doesn't refer directly to the
> LabelledGridMorph.
> 
> If you're with me so far, here's my first big stumbling block: initialExtent in
> the original is   
> 
> initialExtent
> 	^230 at 230
> 
> but changing the values here does absolutely nothing. It's as though this code
> serves no function.
> 
> How can I get the thing (that is, the morph as it initialises) to be 120 at 120?

Ah, something like: 

openAsMorph
	"open a set of windows for viewing this browser"
	|win  |
	"create a window for it"

	win _ GridMorph new.
	win extent: 120 at 120.
	"win label: 'CRC Card'."

		"And so on..................."

Seems to work

Cheers

John (very rusty!)

-- 
M$ convicted of software piracy:
http://www.theregister.co.uk/content/7/25227.html
Peruvian Senator cuts through M$ FUD:
http://www.theregister.co.uk/content/4/25157.html




More information about the Squeak-dev mailing list