• 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
Accessors for 2D Arrays - thanks for help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessors for 2D Arrays - thanks for help


  • Subject: Accessors for 2D Arrays - thanks for help
  • From: "jz" <email@hidden>
  • Date: Wed, 2 Nov 2005 11:52:56 -0500 (EST)

Greg, thanks for help I'll try your suggestions. I'm new to Obj-C.
You're right about out of bounds error. It wasn't part of my code. Only in my post.

Ian, I tried to set individual array elements from different classes without changing other elements, based on example in the book "Programming in Obj-C". So, I declared the array as global at the beginning of the program
int gM[4][4] = {{0, 0, 0, 0,}, {0, 0, 0, 0,}, {0, 0, 0, 0,}, {0, 0, 0, 0,}};
The statement:
gM[0][1] = 100;
assigned new value of 100, but without retaining other item values.
So, I attempted to write accessors (given in the original post) which didn't work.




_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


 _______________________________________________
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

  • Prev by Date: Re: NSOutlineView: expand all items. How?
  • Next by Date: Re: NSOutlineView: expand all items. How?
  • Previous by thread: Re: NSOutlineView: expand all items. How?
  • Next by thread: Two questions on CoreData
  • Index(es):
    • Date
    • Thread