You are right ... there is something wrong with the connection.

What I have done is the following;

IBOutlet NSButton *launchOption;

I have connected this Outlet with the NSButton by ctrl+dragging from the NSObject to the CheckBox in the window.

Then I control+dragged from the NSButton to the NSObject and connected a method to the NSButton / check box (which works fine)...


Is there something fundamentally wrong ...?




Am 09.06.2009 um 00:41 schrieb Steve Bird:


On Jun 8, 2009, at 6:33 PM, Martin Batholdy wrote:

Use [launchOption state] == NSOnState or [launchOption state] == NSOffState


I have tried this before,
but that does not change the behavior.

I have checked the connection in IB again ... but that seems also ok.


Is there another mistake that can be made concerning the issue ...?

--- Try testing if (launchOption == nil). Maybe there's something wrong with the connection that you can't tell by looking.

WHEN are you looking at the state?








Am 08.06.2009 um 23:58 schrieb KK:

Use [launchOption state] == NSOnState or [launchOption state] == NSOffState

Keita

On Mon, Jun 8, 2009 at 5:52 PM, Martin Batholdy <batho...@googlemail.com > wrote:
Hi,

I have added a NSButton Check Box to a window.

Now I want to grab the state of this check box.

I added an IBOutlet to my header file and connected it with the check box in Interface Builder;

IBOutlet NSButton *launchOption;



Now I want to test the state via;

if([launchOption state] == 0) { NSLog(@"A");    }
else if([launchOption state] == 1) {    NSLog(@"B");    }

The answer of this if / else statement is always A and I don't understand why.




Can someone help me?
thanks!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/kthemank %40gmail.com

This email sent to kthem...@gmail.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/sbird %40culverson.com

This email sent to sb...@culverson.com

----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com                     (toll free) 1-877-676-8175



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to