Re: Translate into ObjectiveC
Re: Translate into ObjectiveC
- Subject: Re: Translate into ObjectiveC
- From: Seth Willits <email@hidden>
- Date: Thu, 10 Feb 2005 17:22:49 -0800
On Feb 10, 2005, at 4:34 PM, Shawn Erickson wrote:
std::list<std::string> listOfNames;
This is a list of names in C++.
Whats the quickest way to pass this into an objective C method?
I assume it needs to be converted to an NSObject of some time... but
what?
There's no easy way to do it, but it's not hard either.
Create an NSMutableArray, iterate through listOfNames and add them to
the array.
Or just use Objective-C++ and fire a point to that thing into you
objective-c method, etc. assuming it is your own method and not some
framework method expecting a certain type of Cocoa object.
Right. I was thinking along the lines of needing to pass it to a
standard Cocoa API function.
Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic
"All is not gold that glitters."
-- Miguel de Cervantes
------------------------------------------------------------------------
---
_______________________________________________
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