Re: Apply the changement of the selected item in the enumeration



Le Wed, Jun 09, 2004, à 02:30:19PM +0200, fenxp free fr a écrit:
I have added a list of items to an object but when I change the item selected
and apply the changement, the item selected isn't changed. 

How to do to save this changement ?
What are the methods to change ?

I suggest you locate an objet which already uses a drop-down list, and
work your way up from the PropEnumData array, following the symbol
dependencies (taking a hypothetical completed object around the code
snippet here, look for uses of the "prop_menu_deroulant_data" array in
the rest of the translation unit)

//declaration of the list

typedef enum {
  OPTION_A,
  OPTION_B,
  OPTION_C
} MenuDeroulant;

static PropEnumData prop_menu_deroulant_data[] = {
  { N_("Option A"), OPTION_A },
  { N_("Option B"), OPTION_B },
  { N_("Option C"), OPTION_C },
  { NULL, 0}
};

You need to tie this to a PROP_ENUM property in the main
PropDescriptions array and the PropOffsets array.



While this is probably a non-issue while you're learning with the code,
please keep in mind that submissions stand a much better chance of
integration if the source code uses English (or at least, Engrish)
identifiers and strings, with the translation in the .po files where
they belong. OK, we don't ask for a TOEIC score of 987, but it should
look understandable by someone with a rough command of written English ;-)

        -- Cyrille
        
-- 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]