• 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
Newbie: basic array questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie: basic array questions


  • Subject: Newbie: basic array questions
  • From: "Philip D Riggs" <email@hidden>
  • Date: Mon, 28 Apr 2003 12:47:49 -0600

Forgive this posting of a basic Obj-C question, but I just am not getting
it, even after looking at Apple documentation and several Obj-C programming
books.

I am trying to understand how Obj-C collection classes work. Two examples I
have implemented in C are below, and I would appreciate any help on how I
would implement them in Obj-C.

1. I have a set of points, each with an ID, x-coord, y-coord, and a time
point. How can I set up a mutable array of this type and access each item
and any of their 4 attributes?

2. I have a 2-dimensional grid of cells, each with a relative location on a
grid and an idividual value. In C this was implemented as a two-dimensional
array (cell [x] [y]) with the value being stored at that x-y location. How
can I set up a 2-D array in Obj-C?

In each case, how would I implement this in Obj-C? What is the most
efficient way of accessing them if there are anywhere from 1 to 15,000 items
in each?

Thank you for any responses!
----------------------------------------------------------------------------
----
Philip D. Riggs
GIS Specialist / Laboratory Manager
Environmental Health Advanced Systems Laboratory
Colorado State University
Fort Collins, Colorado
http://ehasl.cvmbs.colostate.edu/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Newbie: basic array questions
      • From: Dustin Voss <email@hidden>
    • RE: Newbie: basic array questions
      • From: "Jonathan E. Jackel" <email@hidden>
    • Re: Newbie: basic array questions
      • From: zauhar <email@hidden>
  • Prev by Date: NSImage has a tough time with certain TIFF files in 10.2.5?
  • Next by Date: Re: Newbie: basic array questions
  • Previous by thread: NSImage has a tough time with certain TIFF files in 10.2.5?
  • Next by thread: Re: Newbie: basic array questions
  • Index(es):
    • Date
    • Thread