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

problem connecting signals (gir/gtk3) #38

Open
dg14 opened this issue Mar 5, 2013 · 3 comments
Open

problem connecting signals (gir/gtk3) #38

dg14 opened this issue Mar 5, 2013 · 3 comments

Comments

@dg14
Copy link

dg14 commented Mar 5, 2013

hi

i've some problems to understand where i fall, because it seems that when i try to connect a callback to a menuitem, when i click on that, it repeats the launching of the callback a number of times equals to the number of elements in that menu.

probably the function that link callbacks needs some work.

example:

var menu1=new gtk.Menu();
var menu1label=new gtk.MenuItem({label: "File"});
var openlabel=new gtk.MenuItem({label:"Open"});
var quitlabel=new gtk.MenuItem({label:"Quit"});
quitlabel.on("select", function() { console.log("quit"); } );
openlabel.on("select", function() { console.log("open"); });
menubar.append(menu1label);  

menu1label.set_submenu(menu1);
menu1.append(openlabel);
menu1.append(quitlabel);
menu1label.show_all();
@piotras
Copy link
Collaborator

piotras commented Mar 5, 2013

Yeah, callback repeat is equal to number of callbacks IIRC. I didn't have time to check details. Any input appreciated.

@dg14
Copy link
Author

dg14 commented Mar 5, 2013

so, what's the starting point? i don't know v8 engine, only where i have to start?

@piotras
Copy link
Collaborator

piotras commented Mar 5, 2013

object.cc and signals related routines are good places to visit :)

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