[squeakland] Tools to Export Images from Etoys (eventually directly to a Blog Post)

Bert Freudenberg bert at freudenbergs.de
Mon Apr 4 13:15:30 EDT 2011


On 04.04.2011, at 19:09, Scott Wallace wrote:

> On Apr 4, 2011, at 7:09 AM, Bert Freudenberg wrote:
> 
>> On 04.04.2011, at 15:20, Steve Thomas wrote:
>> 
>>> How can I detect if a player variable is a book object? (sometimes it is hard to click on the book and if you get another object and try to run the script an exception is thrown).
>> 
>> 	(var costume class isKindOf: BookMorph) ifTrue: [...]
> 
> This should be simply
> 
> 	(var costume isKindOf: BookMorph) ifTrue: [...]
> 
> i.e. the "class" shouldn't be there.

Oops.

> Also, for completeness, perhaps the "best" version would be:
> 
> 	(var costume renderedMorph isKindOf: BookMorph) ifTrue: [...]
> 
> ... because this will work even if the BookMorph has been rotated ;-)

You're right, of course :)

- Bert -



More information about the squeakland mailing list