Dialog Tree questions

From: Wijck, Bart van <"Wijck,>
Date: Mon, 27 Jan 2003 12:09:26 +0100

----boundary-LibPST-iamunique-36424251_-_-
Content-type: text/plain

Hi BlackBoxers,

First question:
It's nice to have the folder & file icons in the Tree control. However that
ties the tree contol to a rather particular type of view. How can I tie in
any kind icon? This should be made standard (signal to Oberon Microsystems
for release 1.5). Does anyone have an example how to do this?

Second question:
I'm trying to associate some data via a pointer to a node in a tree control
via the treenode SetData procedure. When however later on I try to access
that data again (very simplified in the example below) I find that the
treenode Data procedure will not compile, even though it should return an
ANYPTR type. I'm probably overlooking the obvious, but what am I doing
wrong? (I'm working with 1.4 beta version).

Regards, Bart

MODULE TryTree;
IMPORT Dialog;

TYPE
  DPTR = POINTER TO DREC;
  DREC = RECORD
           val : INTEGER;
         END;

           
VAR
  Dlg* : RECORD
           Tree*: Dialog.Tree;
         END;

(*
--------------------------------------------------------------------------
*)
PROCEDURE Calc*;
VAR
  d,e : DPTR;
  pn,tn : Dialog.TreeNode;
BEGIN
  pn := NIL;
  tn := Dlg.Tree.NewChild(pn,0,'TREE ROOT');

  NEW(d); d^.val := 200;
  tn.SetData(d);

  e := tn.Data(); (* COMPILE ERROR HERE *)

  Dialog.UpdateList(Dlg.Tree);
  Dialog.Update(Dlg);
END Calc;

(*
--------------------------------------------------------------------------
*)
END TryTree.




-- 
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xyTo get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xyCurrent posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-36424251_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpIEJsYWNrQm94ZXJzLFxwYXINClxwYXINCkZp
cnN0IHF1ZXN0aW9uOiBccGFyDQpJdCdzIG5pY2UgdG8gaGF2ZSB0aGUgZm9sZGVyICYgZmlsZSBp
Y29ucyBpbiB0aGUgVHJlZSBjb250cm9sLiBIb3dldmVyIHRoYXRccGFyDQp0aWVzIHRoZSB0cmVl
IGNvbnRvbCB0byBhIHJhdGhlciBwYXJ0aWN1bGFyIHR5cGUgb2Ygdmlldy4gSG93IGNhbiBJIHRp
ZSBpblxwYXINCmFueSBraW5kIGljb24/IFRoaXMgc2hvdWxkIGJlIG1hZGUgc3RhbmRhcmQgKHNp
Z25hbCB0byBPYmVyb24gTWljcm9zeXN0ZW1zXHBhcg0KZm9yIHJlbGVhc2UgMS41KS4gRG9lcyBh
bnlvbmUgaGF2ZSBhbiBleGFtcGxlIGhvdyB0byBkbyB0aGlzP1xwYXINClxwYXINClNlY29uZCBx
dWVzdGlvbjogICBccGFyDQpJJ20gdHJ5aW5nIHRvIGFzc29jaWF0ZSBzb21lIGRhdGEgdmlhIGEg
cG9pbnRlciB0by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