Page 1 of 1

DynaDictionary - Anybody played with this yet?

Posted: Fri Aug 07, 2009 2:25 pm
by ConvertFromOldNGs
by Eric Peachey >> Tue, 23 May 2000 6:19:08 GMT

Hello,

Noticed that there's a DynaDictionary class lurking in Jade 5 (5.0.15 & 5.0.16 at least).

Am I just behind the times down here in Dunedin and are all you others are busily using it?

Eric in Dunedin (where reflections of the dockside lights are glittering on the water)

Re: DynaDictionary - Anybody played with this yet?

Posted: Fri Aug 07, 2009 2:25 pm
by ConvertFromOldNGs
by Arjan van Hasselt >> Fri, 2 Jun 2000 2:01:43 GMT

I have used the dynaDictionary class in the AdvancedFaultApplication
Here is the code ...
=============================
// Create Dynamic Dictionary Object
create dynaDict;

// Indicate which class it is going to collect
dynaDict.setMembership (myClass);

// Add the keys in order and signify DESC or ASC
foreach row in 2 to tableKeys.rows do
dynaDict.addMemberKey (tableKeys.getCellText (row, 1), tableKeys.getCellText (row, 2).Integer.Boolean, false);
endforeach;

// Signal end of key definition and mention if Collection is allowed duplicates!
dynaDict.endKeys(true);

// copy objects into the dictionary
myClass.instances.copy (dynaDict);

// now iterate your way thru the dictionary =========================================

Simple stuff really....AJ