I read these;

but it's doesn't seem to be introspection from the vala point of view;
in fact it's position in the pipeline is pre-vapi which makes it not
very much use as the vapi files can be tweaked with metadata files anyway.

I think it's vapi-gen that also needs to be giving xml output.

However, the .gi files look to have the right information, and I trust
them only as part of the vala source, I shall use those - thanks for
pointing them out.

The fun will be when the same signal is called on different object
types; if the signal signature mostly matches, I'll probably look for a
common superclasses and change the argument to use that - often the user
won't care if it is a GtkButton or GtkToolButton that is pressed, so a
GtkBin can be the argument type.

Sam




* gege2061 wrote, On 26/06/08 15:39:
> The only information I have on the wiki :
> http://live.gnome.org/GObjectIntrospection and
> http://live.gnome.org/Vala/Bindings
>
> And un look rapidly the .gi files in vala sources :
>
> <signal name="clicked" when="FIRST">
>       <return-type type="void"/>
>       <parameters>
>               <parameter name="button" type="GtkButton*"/>
>       </parameters>
> </signal>
>
> Note the future format .gir (in vala 0.3.4) :
>
>       <callback name="clicked">
>         <return-value>
>           <type name="none" c:type="void"/>
>         </return-value>
>         <parameters>
>           <parameter name="button">
>             <type name="GtkButton*" c:type="GtkButton*"/>
>           </parameter>
>         </parameters>
>       </callback>
>
>
> 2008/6/26 Sam Liddicott <[EMAIL PROTECTED]>:
>   
>> * gege2061 wrote, On 26/06/08 13:03:
>>
>> Good :)
>>
>> But it's not a simple feature :(
>>
>> You can use the files (created by gobject introspection) instead
>> create a vapi-xml convertor. But is it a good idea to add dependancies
>> with this files (which aren't installed with vala, unlike the vapi
>> files)?
>>
>>
>> I haven't found any instructions on vala introspection yet. Do you have any?
>>
>> Sam
>>
>> 2008/6/25 Sam Liddicott <[EMAIL PROTECTED]>:
>>
>>
>> Thanks; silly me, it's obvious now.
>>
>> It makes perfect sense.
>>
>> I'm thinking about the prototype problem.
>> I guess the vapi files know, so it will involve libvala no doubt.
>>
>> It will either be a vapi-xml convertor or rewrite the xslt to vala or C
>> using libvala.
>>
>> Sam
>>
>> -----Original Message-----
>> From: gege2061 <[EMAIL PROTECTED]>
>> Sent: 25 June 2008 20:38
>> To: Sam Liddicott <[EMAIL PROTECTED]>
>> Cc: [email protected]
>> Subject: Re: gtk widget bindings complete
>>
>> Complete GladeValaDemo class with :
>>
>> public abstract void on_button1_clicked(Gtk.Widget widget);
>> public abstract void on_GladeValaDemo_destroy (Gtk.Widget widget);
>>
>> The problem is to determine the prototype of callback :/
>>
>> 2008/6/25 Sam Liddicott <[EMAIL PROTECTED]>:
>>
>>
>> I fear I don't understand the second suggestion. Please could you provide a
>> small example.
>>
>> Thanks
>>
>> Sam
>>
>> -----Original Message-----
>> From: gege2061 <[EMAIL PROTECTED]>
>> Sent: 25 June 2008 18:39
>> To: Sam Liddicott <[EMAIL PROTECTED]>
>> Cc: [email protected]
>> Subject: Re: gtk widget bindings complete
>>
>>
>>
>> After analyzing the generated code, I have some proposals :
>>   * Use abstract class,
>>
>>
>> you're probably right. It's just sugar, but sugar is important.
>>
>>
>> Of course, it's just a proposal, for v2...
>>
>>
>>
>>   * Create abstrat method for signal,
>>
>>
>> I considered this. I'm not certain of the benefits.
>> There are lots of signals, most of which exist of exist for each widget.
>>
>> Often there is a different signal handler for the same signal for different
>> widgets.
>>
>> So what would these abstract methods be? Dispatchers? Based on what info?
>>
>> Only the developer knows what signals he wants to catch and how, so I left
>> these to be done in the subclass, but at least the developer only has to get
>> the name right and the rest happens automatically.
>>
>>
>> Sorry I wanted to say : signal callback, defined in XML, to force
>> developers to implement it in sub-classe (hence my first proposal).
>>
>>
>>
>>   * Use verbatim string for XML (see my example).
>>
>>
>> I don't like this because the xml may actually contain """ and there is no
>> way to escape it.
>> I did have it set to close the string on \n and start a new line and open
>> the string again, but vala doesn't support const string concatenation yet
>>
>>
>> --
>> Nicolas Joseph
>>
>> Responsable de la rubrique GTK+ de developpez.com /
>> In charge of the GTK+ section on developpez.com
>>
>> http://nicolasj.developpez.com
>>
>>
>>
>>
>>
>>
>>     
>
>
>
>   

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to