• 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
Re: Iterate a NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iterate a NSMatrix


  • Subject: Re: Iterate a NSMatrix
  • From: Ricky Sharp <email@hidden>
  • Date: Sun, 31 Oct 2004 13:32:37 -0600

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:

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

  • Prev by Date: Re: Where to include header files - relates to last question on variable scope
  • Next by Date: Re: Variable Scope (again)
  • Previous by thread: Iterate a NSMatrix
  • Next by thread: NSCell spanning columns
  • Index(es):
    • Date
    • Thread