Subject: Re: [ruby-ffi] :varargs sometimes works, sometimes don't |
From: Matijs van Zuijlen |
Date: 4/27/10 3:42 PM |
To: ruby-ffi@googlegroups.com |
- the second fails with a quite strange error message:
--------------------------------------------------------------
/opt/rubies/ruby-1.9.1-p378/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi/
types.rb:46:in `find_type': Unable to resolve type
'string' (TypeError)
from /opt/rubies/ruby-1.9.1-p378/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/
lib/ffi/variadic.rb:47:in `call'
from (eval):3:in `g_object_set'
from gtkbox.rb:66:in `show'
from gtkbox.rb:76:in `<main>'
-------------------------------------------------------------
What's the matter? As far as I know, :string as a regular type in
FFI.
And here's the (non-working) second:
-------------------------------------------------------------
[...]
enum :type, [ :gtk_message_info,
:gtk_message_warning,
:gtk_message_question,
:gtk_message_error,
:gtk_message_other
]
enum :buttons, [:gtk_buttons_none,
:gtk_button_ok,
:gtk_buttons_close,
:gtk_buttons_cancel,
:gtk_buttons_yes_no,
:gtk_buttons_ok_cancel
]