Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iterate a NSMatrix



On Oct 31, 2004, at 12:20 PM, Peter Karlsson wrote:

I have a NSMatrix with 8 cells. I want to convert it's values to a NSString
like this:

@"10110100"

I have tried all day and can't get it to work. Can someone please show me
some example code?

You really should read the docs for NSMatrix.

Specifically, look at the cells method which returns a row-ordered NSArray of your cells. Would then be a simple matter of iterating that array to get the individual cell "values".

If you need things in column-order, just get the number of rows & columns with getNumberOfRows:columns:. To get the cell at a particular row & column you'd use cellAtRow:column:

___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Iterate a NSMatrix (From: "Peter Karlsson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.