[Q] adding new tiles?

Ted Kaehler Ted at squeakland.org
Sun Apr 14 14:26:40 PDT 2002


Anindita,
	See the method  TextMorph class>>additionsToViewerCategories. 
That is where you need to add a line for each new tile you want. 
Make a duplicate of the inner array below, and edit it.

#((basic "The category name in the viewer" (
(slot  characters "name on the tile"
   'The characters in my contents'   "balloon help string"
   String    "Type that it returns"
   readWrite  "both setting and getting"
   Player  "put into viewers on objects of this class"
   getCharacters   "getter selector  (your method name goes here)"
   Player   "put into viewers on objects of this class"
   setCharacters:    "setter selector  (your method name goes here)")
"another slot" )))

--Ted.


At 12:08 PM -0400 4/14/02, Anindita wrote:
>Hi,
>
>I'd like to add a few tiles to the TextMorph viewer and I was wondering
>where I can write the code to do this.  I've looked through
>Morphic-Kernel, Morphic-Basic, Morphic-Text Support and Morphic-Scriptors,
>etc. to try to find where tile functions are defined and how tiles are
>created, but I've been getting a little bit lost in all of the methods.
>
>I saw some methods under TextMorph's "scripting access" that match the
>text-specific viewer tiles.  Can I just add a few methods there and have
>them automatically tiled and added to textmorph viewers or is there a
>more involved multi-layer process?
>
>I also saw that many of the viewer tile scripts are defined in
>Morphic-Scripting Player. . . again, is this the place to define new
>methods to create new tiles?
>
>
>Thanks,
>
>Anindita


-- 
Ted Kaehler         http://www.squeakland.org/~ted/ 
http://www.concordens.com
(home) 3261 Montecito Drive, Las Vegas, NV 89120.  voice (702) 456-7930
If builders built buildings the way programmers write programs,
then the first woodpecker to come along would destroy civilization.
     --Weinberg's Second Law



More information about the Squeakland mailing list