Le Fri, Apr 11, 2003, à 01:24:52PM -0400, ashalper@cox.net a écrit:
> > Note that if your list is static, you may want to use PROP_TYPE_ENUM. I
> > think it's prettier and easier to deal with (though I may end up changing
> > the PROP_TYPE_LIST widget (or even removing it -- there's not much
> > difference between the two, all PROP_TYPE_LIST seems to have going for it
> > is that it uses GPtrArray)).
>
> It's dynamic. Functionally quite similar to attributes in the UML (although I know the UML objects still probably don't make use of StdProp yet). Should I avoid PROP_TYPE_LIST if you're considering removing it?
Hmmm; IIRC, I wrote PROP_TYPE_LIST, with the specific intent of using it as
a foundation to rewriting the UML Class with it. Of course, I never got
around to doing it, and that code has never been really tested.
> > { "column_list", PROP_TYPE_LIST, offsetof(Independent, column_list),
> > offsetof(Independent, column_list_index) },
>
> And there are no name and flags fields? Looking at chronoline.c and what you have above, the maximalist in me wants to do something like:
>
> { "column_list", PROP_TYPE_LIST, PROP_FLAG_VISIBLE,
> N_("Column list"), offsetof(Independent, column_list),
> N_("Column index"), offsetof(Independent, column_list_index), NULL },
>
> Also, the quoted example leads to a GCC warning about the column_list_index parameter in offsetof(), which worries me:
>
> independent.c:156: warning: initialization makes pointer from integer without a cast
Hmmm. You've got to check the property descriptor structure definition, but
it's possible you're right. Indeed, doing
char* c = 42;
should trigger the warning your quote.
-- Cyrille
--