[beginner] assign widget to variable?

John Hinsley jhinsley at telinco.co.uk
Wed Dec 5 04:47:40 UTC 2001


morphic wrote:
> 
> once you drag a widget out and place it somewhere, is there a way to
> assign it to a variable so that you can then send it messages? I
> realize you can create things with openInWorld, and that you can do a
> lot of things via halos and menus, but I also want to be able to send
> messages via a line of code to things already dragged out.
> 
> e

Well (all of the US squeakers except Dan seem to be at Thanksgiving, so
I'll have to do) there are plenty of ways to do this: 

stuff like (in a Workspace)

myChessMorph:= ChessMorph new openInWorld
myChessMorph rotateBoard

works. The trick is, finding (or adding to) the protocol.(Use the
browser)

You can also do this stuff in E Toys mode, via the blue eye halo and the
scripting tools. Some ideas on this in my Rolodex tutorial 

http://minnow.cc.gatech.edu/squeak/2102

and a much more sophisticated use of scripting and variables in Karl
Ramberg's SpaceInvader Tutorial on Bob's Super Swiki (BSS)

http://209.143.91.36/super/503

HTH

Cheers

John
-- 
Reputed to be the reason Windows 2000 was nearly a year late, (paid in
shares M$Ds needed the cash and kudos) Netproject's Eddie Bleasdale has
renewed his challenge to virus writers. The first person to infect his
Linux box wins 10,000 pounds.

http://www.silicon.com/bin/bladerunner?30REQEVENT=&REQAUTH=21046&14001REQSUB=REQINT1=48211




More information about the Squeak-dev mailing list