Back to AI work.

Ned Konz ned at
Sun Aug 18 17:26:03 UTC 2002

On Sunday 18 August 2002 01:05 pm, Alan Grimes wrote:

> Towards my AI work I have been searching through the available
> classes for something that will serve as the AI's visual world. So
> far I have come up with the class "Form". This seems to have many
> of the features I need but still it is unclear how to use this to
> create a vissable on-screen object that can act as a "Display
> Medium" for a Morphic world. and as an efficient input abstraction.
> for the AI.

Depending on what you want your users to be able to manipulate, you 
may well find that separate Morphs make more sense. If you just want 
to draw something on a big background, you can subclass PasteUpMorph 
and override its drawOn: method (and make a new Project subclass that 
uses one of these). Look at the implementors of drawOn:.

> I am very thankful that the information text for the "Form" class
> is present and filled in with relevant, though not very complete,
> information. (unlike other classes! =(.

Form isn't, itself, a UI object. It's just a representation of some 
bitmap that can be drawn (it does no user interaction). There is 
ImageMorph, which is a Morph with its own Form. These may make more 
sense to use in your UI. You can receive and respond to user input 
events (mouse, keyboard), you can implement animation or other 
periodic behavior, and you can re-position the image within the 

You can make one from a Form easily:

myImageMorph := someForm asMorph.

> This is fairly specialized information so it would probably be more
> appropriate for people to reply off list.

Nah, there'll be lots of good ideas here.

Ned Konz

More information about the Squeak-dev mailing list