[Gtk-sharp-list] Possible Error in gapi2-parser util.

Dan Winship danw at novell.com
Wed Sep 28 10:06:07 EDT 2005


enzo - Eduardo Garcia wrote:
> when im run #gapi2-parser sources/planner.sources.xml
> 
> this command tranforms the enum in this code:

>                Readwrite = MRP_STORAGE_READABLE |MRP_STORAGE_WRITABLE,
>                SupportsAll = MRP_STORAGE_SUPPORTS_TASK 
> |MRP_STORAGE_SUPPORTS_RESOURCE |MRP_STORAGE_SUPPORTS_PRIMARY,

> The questions is, is real error or bug or i is this a bad programming way?

Neither really. You can do arbitrarily complex things in your source 
code, and there's no way gapi can handle all of them. But handling this 
case seems like a good idea, so you could file a bug suggesting it 
should do that.

Until then, you can fix your generated code by adding rules to your 
.metadata file, like this rule from gdk.metadata:

<attr 
path="/api/namespace/enum[@cname='GdkModifierType']/member[@name='ModifierMask']" 
name="value">ReleaseMask | 0x1fff</attr>

-- Dan


More information about the Gtk-sharp-list mailing list