Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSMatrix & Plists

NSMatrix & Plists
Thread Tools
Junior Member
Join Date: Jul 2002
Location: Australia
Status: Offline
Reply With Quote
Aug 24, 2002, 10:04 PM
 
Hi All, I've been recently working with Plists and I have a NSMatrix (2 radio buttons). I have set the integer or the row that was selected but I don't know how to assign that number to the NSMatrix as the row selected....

well this is what I have..

Code:
NSDictionary *myPlist; NSMatrix *myMatrix; NSNumber *selectedRow; selectedRow = [NSNumber numberWithInt:[myMatrix selectedRow]]; [myPlist setObject:selectedRow forKey:@"SelectedRow"];
Now to retrive the value and assign it I'm totally stuck on... I tried to do something like this but it doesn't work..

Code:
[myMatrix selectCellWithTag:[prefs objectForKey:@"SelectedRow"]];
Can anyone please helpe me?
     
Mac Enthusiast
Join Date: Nov 2001
Status: Offline
Reply With Quote
Aug 24, 2002, 11:28 PM
 
Hey. This is quite funny. I was the one who posted that code on CocoaDev . Anyways, here's what you need to do:
Code:
NSNumber *selectedRow; selectedRow = [myPlist objectForKey:@"SelectedRow"]; [myMatrix selectCellAtRow:[selectedRow intValue] column:0];
Hope this helps.
     
Syphor  (op)
Junior Member
Join Date: Jul 2002
Location: Australia
Status: Offline
Reply With Quote
Aug 25, 2002, 02:47 AM
 
Thanks alot... I posted this question on a few other places... it seems we are on deifferent time locations and i don't get answered until the next day

But thank you anyway this has helped alot
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:12 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2