• 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
Initializing Radio buttons in an NSMatrix problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Initializing Radio buttons in an NSMatrix problem


  • Subject: Initializing Radio buttons in an NSMatrix problem
  • From: John James <email@hidden>
  • Date: Mon, 01 Aug 2011 08:47:23 -0400

Using Lion: I have a NSMatrix 1 row 3 cols.
at Startup I can not get the first radio button to show an indication; works fine if user clicks on any one.
Relavent code (called from awakeFromNib):
(framesPersec is an outlet for the NSMatrix with tags 1,2,3 respectively)

- (void) initFramespersec
{
    if (framesPersec!=NULL) {
        [framesPersec setAllowsEmptySelection: NO];
        indexSelectedItem = 2;  <========================== I change this to 1 or 2
        if (indexSelectedItem==1)
            [self setMyFramesPerSec: 24];
        else if (indexSelectedItem==2)
            [self setMyFramesPerSec: 29.97];
        else
            [ self setMyFramesPerSec: 30];
        secPerFrame = 1./myFramesPerSec;
        [self updateInterBeatNumbers];
        NSCell* mycell = [framesPersec cellWithTag: indexSelectedItem];
        [mycell setState:NSOnState];
        }
}

If indexSelectedItem == 1

If indexSelectedItem == 2


Any feedback would be appreciated
John_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Initializing Radio buttons in an NSMatrix problem
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: CALayer memory management [was: Tracking down CALayer problem in iTunes plug-in]
  • Next by Date: Re: Initializing Radio buttons in an NSMatrix problem
  • Previous by thread: Re: NSAttributedString -initWithPath RTFD crash on Lion
  • Next by thread: Re: Initializing Radio buttons in an NSMatrix problem
  • Index(es):
    • Date
    • Thread