Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » more functions which use keys [FEATURE REQUEST]
more functions which use keys [FEATURE REQUEST] [message #14521] Thu, 28 February 2008 17:53 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
I am currently working with a DropList and whilst I can add items of the form

m_drop.Add(key,value);

there does not appear to be a function for

m_drop.SetCurrentKey(key);

as an alternative to

m_drop.SetIndex(index);

Keys are great for adding and retrieving data but it would also be handy to be able to do everything with keys. I worked around this for now so its just a suggestion.

Nick
Re: more functions which use keys [FEATURE REQUEST] [message #14522 is a reply to message #14521] Thu, 28 February 2008 19:31 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

droplist <<= key;
droplist.SetData(key);
Re: more functions which use keys [FEATURE REQUEST] [message #14535 is a reply to message #14522] Fri, 29 February 2008 15:37 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks Daniel,

Not sure what the first function does but it looks like the second function will be interpreted as

droplist.SetData(Value);


Nick

Re: more functions which use keys [FEATURE REQUEST] [message #14536 is a reply to message #14535] Fri, 29 February 2008 16:01 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
the <<= operator is the same as SetData(key).

In this case calling SetData(key) looks for the matching key and selects it. It's the same as:
droplist.SetIndex(droplist.FindKey(key))
Re: more functions which use keys [FEATURE REQUEST] [message #14538 is a reply to message #14536] Fri, 29 February 2008 16:54 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks James,

Now I understand much better.

Cheers,

Nick
Previous Topic: [SOLVED] Maybe a bug... ?
Next Topic: [BUG] DnD Cursor flicker
Goto Forum:
  


Current Time: Thu Mar 28 09:40:37 CET 2024

Total time taken to generate the page: 0.01743 seconds