[Oberon] Gadgets programming

Jacques Eloff eloff at cs.sun.ac.za
Mon Oct 27 15:39:00 CET 2003


Hi

I'm trying to use gadgets as output for an interactive display. Basically, I 
want to place Iconizers on a panel and link certain Iconizers with Line 
objects to create a chart.

What I would like to know is the following:
 - Should I use the slink field to link the Iconizers and Lines
 - Is slink also used to link each object individually to the panel
 - Should a ConsumeMsg using the 'drop' type be specified to make the
   gadgets visible?
 - What happens if I want to link multiple lines from one Iconizer to 
different Iconizers. For example a graph with 3 vertices (v1, v2, v3) and two
edges (v1,v2) and (v1, v3).

I've looked at the Oberon companion, specifically Example16 on page 217 and it 
seems close to what I want to do. Example16 uses Gadgets.ThisFrame to locate 
the coordinates of the * marker, but I will be working directly with a Panel. 
Should I still use ThisFrame or can I use the Attributes module to determine 
the panel's coordinates and size?

As I understand things I basically need to do the following:
1) Locate the my Panel using Gadgets.FindObj
2) Use the Gadgets.CreateObject to create my Iconizers and Lines
3) Link everything (the question is what is 'everything')
4) Broadcast a ConsumeMsg or perhaps multiple consume messages after setting 
the coordinates of the objects, etc.
5) Do I need to call Gadgets.Update for the panel or would the ConsumeMsg
take care of redisplaying everything

Does this sound right?

Thanks
-- 
Jacques Eloff
Department of Computer Science
University of Stellenbosch
http://www.cs.sun.ac.za/~eloff




More information about the Oberon mailing list