Just to clarify: yes I did post these convenience functions a while back:

Function Keys(extends src as dictionary) As variant()
Function Values(extends src as dictionary) As variant()

As of RB 2005 Release 2, they are built into RB's Dictionary class. I
have not yet decided whether to pursue intellectual property
litigation. Just kidding! Here are the release notes:

----------

2005.2 [New] [All]

Dictionary.Keys: this new method returns all the keys in the
dictionary, as a Variant array.  The order is guaranteed to be stable
and to match the order returned by Dictionary.Values, at least until
the dictionary is modified.  Tip: use it with "for each" to easily
iterate over all keys.

2005.2 [New] [All]

Dictionary.Values: this new method returns all the values in the
dictionary, as a Variant array.  The order is guaranteed to be stable
and to match the order returned by Dictionary.Keys, at least until the
dictionary is modified.  Tip: use it with "for each" to easily iterate
over all values.

----------

If you put the convenience functions into a project and compile it
with RB2005.2 or greater, they seem to be ignored, so you can go ahead
and put them into a utility library without worrying about which RB
version you're using. On the other hand, you might see them and think
they will be called, and wonder why you can't step the debugger into
them. This leads me to think that it would be nice if the compiler
pointed out such superfluous methods. It would be even nicer if we
could wrap entire methods (and classes, and modules, etc.) in an #if.

lj
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to