Dropping mp3 on 3.10 world - doesn't work like 3.9/3.8

Brad Fuller bradallenfuller at yahoo.com
Thu Oct 11 18:48:54 UTC 2007


An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20071011/f8518961/attachment.htm
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 8 October 2007 at 4:54:36 pm'!
TextMorph subclass: #UpdatingTextMorph
	instanceVariableNames: 'target getSelector growable stepTime'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'MorphicExtras-Widgets'!
!UpdatingTextMorph commentStamp: 'asm 7/31/2003 21:27' prior: 0!
A TextMorph that constantly tries to show the current data from the target object.  When sent #step, it shows what the target objects has (target perform: getSelector).!


!UpdatingTextMorph methodsFor: 'accessing' stamp: 'dgd 3/7/2004 20:16'!
getSelector
	"answer the receiver's getSelector"
	^ getSelector! !

!UpdatingTextMorph methodsFor: 'accessing' stamp: 'dgd 3/7/2004 20:16'!
getSelector: aSymbol 
	"change the receiver's getSelector"
	getSelector := aSymbol! !

!UpdatingTextMorph methodsFor: 'accessing' stamp: 'dgd 3/7/2004 20:17'!
target
	"answer the receiver's target"
	^ target! !

!UpdatingTextMorph methodsFor: 'accessing' stamp: 'dgd 3/7/2004 20:17'!
target: anObject 
	"change the receiver's target"
	target := anObject! !


!UpdatingTextMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2004 20:17'!
initialize
	"Initialie the receiver to have default values in its instance  
	variables"
	super initialize.""
	stepTime := 50! !


!UpdatingTextMorph methodsFor: 'stepping and presenter' stamp: 'dgd 3/8/2004 20:34'!
step
	"update my contents"
	| newContents |
	super step.
	""
	newContents := self contentsFromTarget.
	self visible: newContents isEmpty not.
	self contents: newContents! !

!UpdatingTextMorph methodsFor: 'stepping and presenter' stamp: 'dgd 3/7/2004 20:19'!
stepTime
	"answer the desired time between steps in milliseconds."
	^ stepTime
		ifNil: [50]! !

!UpdatingTextMorph methodsFor: 'stepping and presenter' stamp: 'dgd 3/7/2004 20:19'!
stepTime: mSecsPerStep 
	"change the receiver's stepTime"
	stepTime := mSecsPerStep rounded! !


!UpdatingTextMorph methodsFor: 'target access' stamp: 'nk 8/30/2004 16:18'!
contentsFromTarget
	"private - answer the contents from the receiver's target"
	(target isNil
			or: [getSelector isNil])
		ifTrue: [^ self contents].
	""
	^ (target perform: getSelector) asString! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

UpdatingTextMorph class
	instanceVariableNames: ''!

!UpdatingTextMorph class methodsFor: 'instance creation' stamp: 'dgd 3/8/2004 20:31'!
on: targetObject selector: aSymbol 
	"answer a new instance of the receiver on a given target and selector"
	^ self new getSelector: aSymbol;
		 target: targetObject! !


More information about the Squeak-dev mailing list