• 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: How to add my custom structure to NSMutable Array??Pls help.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add my custom structure to NSMutable Array??Pls help.


  • Subject: Re: How to add my custom structure to NSMutable Array??Pls help.
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 11 Jul 2003 15:41:10 -0500

On Friday, July 11, 2003, at 09:26 AM, Poornima Ranganath wrote:
I have a struct called myStruct, this struct needs to
be added to an NSMutableArray.

This is your problem, in a nutshell. You have a structure and you're trying to add it to an NSMutableArray.

You can only add an object.

The easy thing to do is wrap your structure in an NSValue and add that.

The better thing to do is to use real objects instead of a structures.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.

References: 
 >How to add my custom structure to NSMutable Array??Pls help. (From: Poornima Ranganath <email@hidden>)

  • Prev by Date: Re: Print Operation Name
  • Next by Date: Re: NSTextField, NSTextFieldCell, NSTextView... this is a mess, I need help
  • Previous by thread: Re: How to add my custom structure to NSMutable Array??Pls help.
  • Next by thread: Random number
  • Index(es):
    • Date
    • Thread