• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Programmatically setting a radio button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Programmatically setting a radio button


  • Subject: Programmatically setting a radio button
  • From: Moray Taylor <email@hidden>
  • Date: Wed, 21 Jan 2004 20:50:22 +0000

Hi,

I have an NSMatrix of radio buttons which I need to set the state of programmatically, but cannot get the thing to work, I've done the same thing elsewhere in my program for an NSMatrix of Pushbuttons (radio behaviour, just looks different.)

I am using (in Java, but Obj-C advice is welcome.)

MyMatrix.cellAtLocation(1,0).setState(NSCell.OnState);

I think the problem is that the action of pushing the one of the radio buttons in the NSMatrix is the action that triggers the setting of the radio buttons (depending on the response from a modal dialog.) If I use the above code triggered by a seperate widget, it works fine.

I think the setting of the state is working fine, but Cocoa just set's it right back.

Any ideas?

Thanks very much in advance.

Moray
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Programmatically setting a radio button
      • From: "Louis C. Sacha" <email@hidden>
  • Prev by Date: Re: NSSearchField loses focus
  • Next by Date: Re: NSSearchField loses focus
  • Previous by thread: Best way to defy logic of NSTextField editing
  • Next by thread: Re: Programmatically setting a radio button
  • Index(es):
    • Date
    • Thread