Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Propose a slight change to DropCoice/WithDropChoice
Propose a slight change to DropCoice/WithDropChoice [message #13358] |
Wed, 02 January 2008 23:13  |
 |
tvanriper
Messages: 85 Registered: September 2007 Location: Germantown, MD, USA
|
Member |
|
|
I have this need, sometimes, to iterate over the items within a drop choice, and use that information in some fashion. In particular, I want to give the user the opportunity to modify a 'history' list in some fashion, and the information is generally only stored inside this control.
As of 712-dev1, I am unable to do this without modifying the DropChoice.h file to (safely) expose the underlying objects I need to acquire this information.
I don't see a particular reason why we cannot expose this information in the manner I expose it, so I wonder if we might update DropChoice.h accordingly?
I've included my altered header file.
The file contains the following changes:
to DropChoice (public):
int GetCount() const { return list.GetCount(); }
Value Get( int i ) const { return list.Get( i, 0 ); }
to WithDropChoice (public):
const DropChoice& GetDropChoice() const { return select; }
I hope this is useful.
EDIT
Bah... I had some errors. These should be corrected now, both in this message, and in the header file I've uploaded.. I failed to use the 'return' keyword in GetCount() and Get( int ). Silly me.
-
Attachment: DropChoice.h
(Size: 9.82KB, Downloaded 369 times)
[Updated on: Thu, 03 January 2008 15:55] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Apr 28 01:15:25 CEST 2025
Total time taken to generate the page: 0.00744 seconds
|