-Method = function(m, memberOf, saveto, keylist) {
- this.propertyType = 'Method';
-
- var flags = GI.function_info_get_flags (m);
- var n = GI.base_info_get_name(m);
- var n_original = n + '';
- // posibly add: sink,
- if (n.match(/_(ref|unref)$/) || n.match(/^(ref|unref|weakref|weakunref)$/)) {
- return false; // skip these!
- }
-
- if (n == 'new') {
- n = 'c_new';
- }
-
-
- var retval = [ {
- name : 0,
- type : this.typeToName(GI.callable_info_get_return_type(m)),
- desc : Introspect.doc(memberOf.alias + '.' + n_original + '.return-value')
- } ];
-
-
-
- var args = this.argsToArrays(m, retval);
-
-
- if ((n == 'c_new') && !args.length && memberOf.constructors.length) {
-
- memberOf.constructors[0].doc = Introspect.doc(memberOf.alias + '.' + n_original);
-
- return false; // skip.
- }
-
-
-
-
-
- //console.log(GI.base_info_get_name(m));
- // console.dump(GI.base_info_get_attribute(m, 'doc') );
-
- // this is a bit messy, as we probably loose the doc's on new..
-
-
- Roo.apply(this, {
- name : n,
- params: args,
- returns : retval,
- isConstructor : flags & GI.IFunctionInfoFlags.IS_CONSTRUCTOR,
- isStatic : !(flags & GI.IFunctionInfoFlags.IS_METHOD),
- memberOf : memberOf.alias,
- exceptions : [],
- desc : Introspect.doc(memberOf.alias + '.' + n_original)
- });
- // add descriptions to the arguments..
- Roo.each(this.params, function(p) {
-
-
- p.desc = Introspect.doc(memberOf.alias + '.' + n_original + '.' + p.name);
- //Seed.print(memberOf.alias + '.' + n_original + '.' + p.name + ':' + p.desc);
-
- });
-
-
- // collect references...
- var addedto = [ memberOf.alias ]; // do not add to self...
-
- for(var i =0; i < args.length;i++) {
- var ty = args[i].type;
- if (typeof(ty) != 'string' || ty.indexOf('.') < 0) {
- continue;
+Method = Object.define(
+ function(m, memberOf, saveto, keylist) {
+ this.propertyType = 'Method';
+
+ var flags = GI.function_info_get_flags (m);
+ var n = GI.base_info_get_name(m);
+ var n_original = n + '';
+ // posibly add: sink,
+ if (n.match(/_(ref|unref)$/) || n.match(/^(ref|unref|weakref|weakunref)$/)) {
+ return false; // skip these!