LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2011, 08:22 AM   #1
MetaMan
Member
 
Registered: Apr 2011
Distribution: Arch Linux :D
Posts: 50

Rep: Reputation: 0
Question Vala: GtkSwitch Signal


I've been trying out Vala lately and decided I would make a little app. So far I've managed to add a GtkLabel and GtkSwitch. I compiled it, and they show up just fine. Now, I want to link the switch to a function (silly me... they're called methods...) that runs whenever the switch state is changed, or, if possible, two separate methods, one for "switch on" and another for "switch off."

What signal should I connect to accomplish this? And how? The only thing I know about connecting signals is foo.signalname.connect(method), and from reading around, I get the idea that I have to do more than that.

Assume I'm a complete noob.

Thanks!
 
  


Reply

Tags
gtk, vala



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Vala - Compiler for the GObject type system LXer Syndicated Linux News 0 12-05-2009 01:00 PM
user-define signal handler & coredump for signal 11(SIGSEGV) Alexlun Linux - Software 2 05-24-2009 06:37 AM
LXer: Programming GNOME applications with Vala LXer Syndicated Linux News 0 12-10-2008 08:20 PM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 12:11 PM
LXer: Vala's Jürg Billeter on GNOME's Newest Development Platform LXer Syndicated Linux News 0 11-13-2007 01:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration