• 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: understanding conversions between CF and NS datatypes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: understanding conversions between CF and NS datatypes


  • Subject: Re: understanding conversions between CF and NS datatypes
  • From: Randall Meadows <email@hidden>
  • Date: Fri, 29 Aug 2008 14:52:51 -0600

On Aug 29, 2008, at 2:28 PM, Allen Curtis wrote:

Based on the information in the "interchangable data types" document, Would it be possible to do the following?

  NSMutableArray serialPorts = [[NSMutableArray alloc] init];
  GetSerialPortPaths(serialServices, (CFMutableArrayRef)serialPorts);
  printf("Found %d serial ports\n", [serialPorts count]);

NSMutableArray *serialPorts...

It has to be a pointer.

This way I do not have multiple copies. The NSMutableArray is populated directly.

You didn't have multiple copies in the first place; that was your problem. You had *1* object that you were looking at from 2 different perspectives, but treating it as if it were 2 objects.


And to answer your question, yes, the above should work (with my correction applied).

--
randy

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >understanding conversions between CF and NS datatypes (From: "Allen Curtis" <email@hidden>)
 >Re: understanding conversions between CF and NS datatypes (From: Randall Meadows <email@hidden>)
 >Re: understanding conversions between CF and NS datatypes (From: "Allen Curtis" <email@hidden>)

  • Prev by Date: Re: File Extensions Problem
  • Next by Date: Re: NSPredicateEditorRowTemplates and preserving user input
  • Previous by thread: Re: understanding conversions between CF and NS datatypes
  • Next by thread: Re: understanding conversions between CF and NS datatypes
  • Index(es):
    • Date
    • Thread