Re: SetData pointer facility for Dialog list structures (List, Combo, Selection)

From: [at]} <Gérard>
Date: Tue, 31 Aug 2004 15:04:57 +0200

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

Bart,

> Easily resolved ofcourse if you use an array to fill the dialog list
> structure (i.e. the selected index is the index value in the array).
>
> However there must be many instances where the length of the list is
> dynamic. So using a SetData pointer facility would be the trick. A
> suggestion for improvement?

Instead of an array, you may use a dynamic structure to store your data. One

very useful and efficient dynamic structure is an AVL tree (see e.g. D. E.
Knuth, The art of Computer Programming, vol. 3). You can find an
implementation of AVL trees in UtilAvl (http://www.zinnamturm.de/#Util).

Regards.

Gérard

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To 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.xy

Current 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-968055219_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBc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