Problem creating new object

David Kerr (dk@broadcom.ie)
Thu, 06 Jun 1996 17:21:46 +0100

Hi all!

I'm trying to create a new object within TKINED (ie. in addition to the
NODE and GROUP etc. objects).

I have defined an object AUTHORITY which I want to use in an application
I'm developing using TKINED as a front end.

To create the authority object, I have taken the following steps:
tkined.h: #define AUTHORITY 0x0031 (arbitrarily chosen)

objects.c: Tcl_CreateCommand (interp, "AUTHORITY", Tki_CreateObject,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);

editor.c: authority object type handled in procedures:
do_dump
ExpandIconName
ReadDefaultFile

methods.c:
m_authority_create written ala m_node_create
m_authority_retrieve
m_authority_dump
authority object type handled in procedures:
update_links
m_create
m_retrieve
m_icon
m_delete
Tki_DumpObject

misc.c:
authority object type handled in procedures:
type_to_string
string_to_type

When I try to create an instance, using
set authority [AUTHORITY create],
then I get the crosshair cursor over the canvas as expected, but when I
click on it to place the authority object on the canvas, nothing comes
up. As far as I can tell, the authority object *is* created, because
the the value of $authority is, as expected authority0.

What am I missing???
All and any help would be greatly appreciated!

regards,
David.

--
PS: This is code fragment is fom Tool.tcl, and is how I create instances
of the authority object.

set w [$editor toplevel] set c $w.canvas set authority [AUTHORITY create] #which returns 'authority0' puts $authority $authority editor $editor $authority canvas $c $authority move $x $y $authority icon @bitmaps/authority.xbm $authority font [$editor attribute font] $authority color [$editor attribute color] $authority label name

-- 
***********************************************
**  David Kerr | http://www.broadcom.ie/~dk/
**  Broadcom Eireann Research Ltd.
**  Clanwilliam Place, Dublin 2, IRELAND
**  ECN: 830 2720        | Memo: BRI.BRIDK
**  Tel: +353-1-604-6000 | Fax: +353-1-676-1532
***********************************************