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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to