Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libui-ng related methods: how to use it? #59

Closed
rubyFeedback opened this issue Mar 29, 2022 · 1 comment
Closed

libui-ng related methods: how to use it? #59

rubyFeedback opened this issue Mar 29, 2022 · 1 comment

Comments

@rubyFeedback
Copy link
Collaborator

rubyFeedback commented Mar 29, 2022

Hey there kojix2,

I saw the changelog - for instance in ffi.rb:

try_extern 'void uiComboboxClear(uiCombobox *c)'

So I was thinking I could use .clear() on a combobox. But when I tested in irb,
the method name was not showing up (or perhaps I made a mistake).

IF it is possible to clear a combo box, could a simple example be added that
shows how this could be done? Or perhaps what the name of the method
may be.

I tried via irb but I could only see these methods:

LibUI.combobox_append 
LibUI.combobox_on_selected
LibUI.combobox_selected    
LibUI.combobox_set_selected

Does one have to do something special to tap into that ffi.rb related functionality?

@kojix2
Copy link
Owner

kojix2 commented Apr 3, 2022

I have not yet prepared an easy way to use libui-ng with Ruby's LibUI.
Still, it is great that you want to try libui-ng.

I just tried to see if I could reproduce the problem, but I could not. ( ui_combobox_clear showed up in irb )

Perhaps you are using the latest RubyGem? Or are you using andlabs branch?
If that is the case, the libui-ng methods will not show up. You need to use the main branch on Github.

I wrote previously that I wanted to use libui-ng in 0.0.15, but it did not happen and 0.0.15 simply supports M1 Mac. Sorry if this caused any confusion.

As you may already know, here is the link again on how to specify libui.so using the LIBUIDIR environment variable. if you use libui-ng, you must specify the location of libui.so yourself. (Alternatively, you can copy it into the vendor directory.)

#46

@kojix2 kojix2 closed this as completed May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants