You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed you extended the examples, so I went on to test things. :D
Unfortunately it fails to me as superuser:
ruby draw_text.rb
The error I get is:
/root/.gem/gems/libui-0.0.12/lib/libui/ffi.rb:22:in `call': no implicit conversion of String into Integer (TypeError)
from /root/.gem/gems/libui-0.0.12/lib/libui/ffi.rb:22:in `uiOpenTypeFeaturesAdd'
from /root/.gem/gems/libui-0.0.12/lib/libui/libui_base.rb:39:in `public_send'
from /root/.gem/gems/libui-0.0.12/lib/libui/libui_base.rb:39:in `block (2 levels) in <module:LibUIBase>'
from draw_text.rb:66:in `make_attribute_string'
from draw_text.rb:132:in `<main>'
I am not entirely sure where the error is (I find it not so easy to discover ffi-related errors in general) but I wanted to mention this nonetheless. Please disregard this message if it works for you (I use libui gem 0.0.12, but I used the git clone of the repository here, so not sure if that has anything to do with it or not; I mention it just in case). Thanks for reading!
The text was updated successfully, but these errors were encountered:
In C, there is a difference between the char type and the string type. In Fiddle, char is uint8.
So when you pass a char to a function, you need to make it unit8. This is the same as the Crystal language. See the note on the following page.
Heya kojix2,
I noticed you extended the examples, so I went on to test things. :D
Unfortunately it fails to me as superuser:
The error I get is:
I am not entirely sure where the error is (I find it not so easy to discover ffi-related errors in general) but I wanted to mention this nonetheless. Please disregard this message if it works for you (I use libui gem 0.0.12, but I used the git clone of the repository here, so not sure if that has anything to do with it or not; I mention it just in case). Thanks for reading!
The text was updated successfully, but these errors were encountered: