RE: SetData pointer facility for Dialog list structures (List, Co mbo, Selection)

From: Wijck, Bart van <"Wijck,>
Date: Wed, 1 Sep 2004 09:13:57 +0200

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

Hi Gerard,

Neat idea to use an AVL tree to implement the list (instead of a linked
list) and thereby retain the SetData facility, that certainly would work
well. However to make BlackBox really consistent I think the SetData
procedure should be tied to Dialog list structures as well. It's not a big
point, but I wonder how many Black Box programmers are looping through a
linked list to retrieve the original key structure. I bet I was not the
first.

By the way do OmS still do minor updates to BlackBox?

Thanks for your input,

Regards

Bart

-----Original Message-----
From: Gérard Meunier [mailto:gemeu{([at]})nowhere.xy
Sent: Tuesday, August 31, 2004 3:05 PM
To: blackbox{([at]})nowhere.xy
Subject: Re: SetData pointer facility for Dialog list structures (List,
Combo, Selection)


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.


-- 
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-352738139_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBIaSBHZXJhcmQsXHBhcg0KXHBh
cg0KTmVhdCBpZGVhIHRvIHVzZSBhbiBBVkwgdHJlZSB0byBpbXBsZW1lbnQgdGhlIGxpc3QgKGlu
c3RlYWQgb2YgYSBsaW5rZWRccGFyDQpsaXN0KSBhbmQgdGhlcmVieSByZXRhaW4gdGhlIFNldERh
dGEgZmFjaWxpdHksIHRoYXQgY2VydGFpbmx5IHdvdWxkIHdvcmtccGFyDQp3ZWxsLiBIb3dldmVy
IHRvIG1ha2UgQmxhY2tCb3ggcmVhbGx5IGNvbnNpc3RlbnQgSSB0aGluayB0aG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