Roy Sutton wrote:> See the attached patch to typedefs.i. I added the enums included from
> CalendarCtrl.i. The calendar sample won''t work correctly without
this
> patch but I''m wondering if there''s a better way, such as
moving the
> declarations into RubyConstants.i instead.
Hm. It seems that the enum itself has to be declared somewhere that all
the .i files will see it, such as typedefs. But the actual enum values
must only be visible to a single .i file. Frustrating.
I ended up manually applying your patch to typedefs (because it
wouldn''t
apply cleanly for me), AND I also moved the enum values over to
RubyConstants.i just because it seems weird to have most of the
constants there, but not these.
I''m slightly torn about whether to lump all the ruby constants in
RubyConstants.i or to put them in the related class .i file (as has been
done with CalendarCtrl. Generally I tend toward the latter, but only if
they clearly belong in one specific class .i file. I hate globals, and
RubyConstants feels slightly like a global. But I also like consistency,
and having all constants in RubyConstants is consistent.
Anyway, it''s committed, and in the calendar sample I can now use the
"highlight special dates" menu item, which was failing before.
Thanks,
Kevin