GTK+ binding generator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

GTK+ binding generator

MrGwen
Hi Paolo,

with the last version of gst I've this bug:

Object: nil error: did not understand #methodsFor:
Smalltalk.MessageNotUnderstood(Smalltalk.Exception)>>signal (ExcHandling.st:254)
Smalltalk.UndefinedObject(Smalltalk.Object)>>doesNotUnderstand:
#methodsFor: (SysExcept.st:1407)
Smalltalk.UndefinedObject>>executeStatements
(GTK.star#VFS.ZipFile/Funcs.st:4729)
/usr/local/share/smalltalk/GTK.star#VFS.ZipFile/Funcs.st:4731: expected object

and I couldn't launch the git version of VisualGST.

I think it is time to finish GObjectIntrospection binding.

Gwen

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GTK+ binding generator

Holger Freyther
On 10/18/2010 06:28 PM, Gwenaël Casaccio wrote:

> Hi Paolo,
>
> with the last version of gst I've this bug:
>
> Object: nil error: did not understand #methodsFor:
> Smalltalk.MessageNotUnderstood(Smalltalk.Exception)>>signal (ExcHandling.st:254)
> Smalltalk.UndefinedObject(Smalltalk.Object)>>doesNotUnderstand:
> #methodsFor: (SysExcept.st:1407)
> Smalltalk.UndefinedObject>>executeStatements
> (GTK.star#VFS.ZipFile/Funcs.st:4729)
> /usr/local/share/smalltalk/GTK.star#VFS.ZipFile/Funcs.st:4731: expected object


The problem is that... the function is called

g_bus_something, so the awk script asssumes the Object is called GBus but in
that case it is GDBus(Connection) or such...



>
> and I couldn't launch the git version of VisualGST.

you might need to recompile due binary incompatible changes in the development
version of GTK+ or such.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GTK+ binding generator

MrGwen
On Mon, Oct 18, 2010 at 6:33 PM, Holger Hans Peter Freyther
<[hidden email]> wrote:

> On 10/18/2010 06:28 PM, Gwenaël Casaccio wrote:
>> Hi Paolo,
>>
>> with the last version of gst I've this bug:
>>
>> Object: nil error: did not understand #methodsFor:
>> Smalltalk.MessageNotUnderstood(Smalltalk.Exception)>>signal (ExcHandling.st:254)
>> Smalltalk.UndefinedObject(Smalltalk.Object)>>doesNotUnderstand:
>> #methodsFor: (SysExcept.st:1407)
>> Smalltalk.UndefinedObject>>executeStatements
>> (GTK.star#VFS.ZipFile/Funcs.st:4729)
>> /usr/local/share/smalltalk/GTK.star#VFS.ZipFile/Funcs.st:4731: expected object
>
>
> The problem is that... the function is called
>
> g_bus_something, so the awk script asssumes the Object is called GBus but in
> that case it is GDBus(Connection) or such...
>
>
>
>>
>> and I couldn't launch the git version of VisualGST.
>
> you might need to recompile due binary incompatible changes in the development
> version of GTK+ or such.
>
>

I've recompiled gst but I will retry

> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
>

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GTK+ binding generator

Paolo Bonzini-2
In reply to this post by Holger Freyther
On 10/18/2010 06:33 PM, Holger Hans Peter Freyther wrote:
> The problem is that... the function is called
>
> g_bus_something, so the awk script asssumes the Object is called GBus but in
> that case it is GDBus(Connection) or such...

Thanks for the help, try this:

--- a/packages/gtk/funcs.awk
+++ b/packages/gtk/funcs.awk
@@ -100,10 +100,12 @@ BEGIN {
     ptr_type["#cObject"] = "#cObject"
 
     # Fix asymmetry
-    method_regexp = "^g_param_values?_|^g_param_type_|^gtk_file_chooser_|^gdk_window_"
+    method_regexp = "^g_bus_|^g_param_values?_|^g_param_type_|^gtk_file_chooser_|^gdk_window_"
+    prefix_class["g_bus_"] = "GDBusConnection"
     prefix_class["g_param_value_"] = "GParamSpec"
     prefix_class["g_param_values_"] = "GParamSpec"
     prefix_class["g_param_type_"] = "GParamSpec"
+    self_class["g_bus_"] = "GDBusConnection"
     self_class["g_param_value_"] = "GParamSpec"
     self_class["g_param_values_"] = "GParamSpec"
     self_class["g_param_type_"] = "GParamSpec"

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GTK+ binding generator

MrGwen
Hi,

I still have the warnings

Gwen

On Mon, Oct 18, 2010 at 7:18 PM, Paolo Bonzini <[hidden email]> wrote:

> On 10/18/2010 06:33 PM, Holger Hans Peter Freyther wrote:
>> The problem is that... the function is called
>>
>> g_bus_something, so the awk script asssumes the Object is called GBus but in
>> that case it is GDBus(Connection) or such...
>
> Thanks for the help, try this:
>
> --- a/packages/gtk/funcs.awk
> +++ b/packages/gtk/funcs.awk
> @@ -100,10 +100,12 @@ BEGIN {
>     ptr_type["#cObject"] = "#cObject"
>
>     # Fix asymmetry
> -    method_regexp = "^g_param_values?_|^g_param_type_|^gtk_file_chooser_|^gdk_window_"
> +    method_regexp = "^g_bus_|^g_param_values?_|^g_param_type_|^gtk_file_chooser_|^gdk_window_"
> +    prefix_class["g_bus_"] = "GDBusConnection"
>     prefix_class["g_param_value_"] = "GParamSpec"
>     prefix_class["g_param_values_"] = "GParamSpec"
>     prefix_class["g_param_type_"] = "GParamSpec"
> +    self_class["g_bus_"] = "GDBusConnection"
>     self_class["g_param_value_"] = "GParamSpec"
>     self_class["g_param_values_"] = "GParamSpec"
>     self_class["g_param_type_"] = "GParamSpec"
>
> Paolo
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
>

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re : [Help-smalltalk] GTK+ binding generator

Mathieu Suen-2
Hi,

talking of awk it  seems to me that you should add this:

_______________
old mode 100644
new mode 100755
index 7e65823..66ab6fc
--- a/packages/gtk/funcs.awk
+++ b/packages/gtk/funcs.awk
@@ -353,7 +355,10 @@ function ctype( the_type, name )
 
   pointer = ((name ~ /^\*/) || (name ~ /\[[0-9]*\]/))
 
-  res = type[the_type]
+  if (the_type in type)
+    res = type[the_type]
+  else
+    res = ""
 
   if (!pointer || res == "__skip_this__")
     {
@@ -373,7 +378,10 @@ function returned( var )
 {
   pointer = var ~ /\*$/
   var = strip(var)
-  res = type[var]
+  if (var in type)
+    res = type[var]
+  else
+    res = ""
 
   if (!pointer || res == "__skip_this__")
     {
@@ -381,7 +389,11 @@ function returned( var )
         res = "#int"
     }
   else {
-    res = ptr_type[res]
+    if (res in ptr_type)
+      res = ptr_type[res]
+    else
+      res = ""
+
     if (res == "")
       res = "#{" var "}"
   }
_______________

This is because the statement : "type[var]" is going to make (var in type) true
even if before var was not in type.

That make the following test pass :
 if (first_line[2] == "get_type" && (prefixClassName in
type))                                                  

     next

I don't know if that is the intention here but at least you can try.
Paolo, maybe you can tell.

Thanks






----- Message d'origine ----

> De : Gwenaël Casaccio <[hidden email]>
> À : Paolo Bonzini <[hidden email]>
> Cc : [hidden email]
> Envoyé le : Mar 19 octobre 2010, 14h 45min 09s
> Objet : Re: [Help-smalltalk] GTK+ binding generator
>
> Hi,
>
> I still have the warnings
>
> Gwen
>
> On Mon, Oct 18, 2010 at  7:18 PM, Paolo Bonzini <[hidden email]> wrote:
> > On  10/18/2010 06:33 PM, Holger Hans Peter Freyther wrote:
> >> The problem  is that... the function is called
> >>
> >> g_bus_something, so  the awk script asssumes the Object is called GBus but
>in
> >> that case  it is GDBus(Connection) or such...
> >
> > Thanks for the help, try  this:
> >
> > --- a/packages/gtk/funcs.awk
> > +++  b/packages/gtk/funcs.awk
> > @@ -100,10 +100,12 @@ BEGIN {
> >      ptr_type["#cObject"] = "#cObject"
> >
> >     # Fix asymmetry
> > -     method_regexp =  
>"^g_param_values?_|^g_param_type_|^gtk_file_chooser_|^gdk_window_"
> > +     method_regexp =  
>"^g_bus_|^g_param_values?_|^g_param_type_|^gtk_file_chooser_|^gdk_window_"
> >  +    prefix_class["g_bus_"] = "GDBusConnection"
> >      prefix_class["g_param_value_"] = "GParamSpec"
> >      prefix_class["g_param_values_"] = "GParamSpec"
> >      prefix_class["g_param_type_"] = "GParamSpec"
> > +    self_class["g_bus_"] =  "GDBusConnection"
> >     self_class["g_param_value_"] =  "GParamSpec"
> >     self_class["g_param_values_"] = "GParamSpec"
> >      self_class["g_param_type_"] = "GParamSpec"
> >
> >  Paolo
> >
> > _______________________________________________
> >  help-smalltalk mailing list
> > [hidden email]
> > http://lists.gnu.org/mailman/listinfo/help-smalltalk
> >
>
> _______________________________________________
> help-smalltalk  mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
>




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re : [Help-smalltalk] GTK+ binding generator

Paolo Bonzini-2
On 10/19/2010 03:03 PM, Mathieu Suen wrote:
> I don't know if that is the intention here but at least you can try.
> Paolo, maybe you can tell.

Ok, I understand now.  Yes, it looks correct.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk