[comp.windows.x] Changing font for LiteItem button

chuck@melmac.harris-atd.com (Chuck Musciano) (01/09/90)

[ Bear with me, I'm new to NeWS... ]

     I am trying to create a button object using the classes defined in
liteitem.ps on a Silicon Graphics machine (if that matters).  I tried to set
the ItemFont class variable to no avail.  How is this done?  Could someone
explain the difference between "instance variables" and "class variables"?
I'm no stranger to object-oriented programming, but the documentation from
SGI is so pathetic, I can't figure this out.

     My code looks like:

#! /usr/NeWS/bin/psh 

systemdict /Item known not {
   (NeWS/liteitem.ps) run
} if

/createitems {
/items dictbegin

% Tooltool Current Items %

/item0    (Input Source)
	/nullproc can /new ButtonItem send def
{ /ItemFont /Times-Italic findfont 36 scalefont def % <-- why won't this work?
  /ItemFrame 2 def
} item0 send
8    396  200 10 /reshape item0    send

/item1    (Network Configuration)
	/nullproc can /new ButtonItem send def
8    354  200 10 /reshape item1    send

% End Tooltool Items %

dictend def
} def

/win framebuffer /new DefaultWindow send def
{
	/PaintClient {1 fillcanvas items paintitems} def
	/FrameLabel (Tooltool Sample!) def
	/DestroyClient { currentprocess killprocessgroup } def
} win send
20 20 293 454 /reshape win send
/can /GetCanvas win send def
createitems
/ih items forkitems def
/map win send

     I also tried send a message to the ButtonItem class to change ItemFont,
but that didn't work either.  Any help is very much appreciated!

Chuck Musciano				ARPA  : chuck@trantor.harris-atd.com
Harris Corporation 			Usenet: ...!uunet!x102a!trantor!chuck
PO Box 37, MS 3A/1912			AT&T  : (407) 727-6131
Melbourne, FL 32902			FAX   : (407) 727-{5118,5227,4004}

Gee, Beaver, everything that's fun can get you in trouble.  Haven't you
learned that yet? --Gilbert