New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Code conversion question


Thread Closed

 
Thread Tools
vishal.chauhan

 
Member Since: Dec 13, 2006
Posts: 13
vishal.chauhan is on a distinguished road

vishal.chauhan is offline
Dear All,

I want to convert from CFTypeRef to CFStringRef, I am using the following code -

Code:
CFStringRef myString = CFCopyDescription (value);
But is gives the string with expression but I want only its value.
If anybody knows how to do that then plz help me out.


Thanks.
Vishal
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
You are out of my common knowledge...

Assuming the value is an NSString then have you tried this;
CFStringRef myString = (CFStringRef) value;
I type cast to avoid a compiler warning; initialization from incompatible pointer type. I find that curious because as I understand the documentation, the types are suppose to be equivalent.

You may want to review the CFType Reference and CFString Reference documentation at Apple.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
dtravis7

 
dtravis7's Avatar
 
Member Since: Jan 04, 2005
Location: Modesto, Ca.
Posts: 27,769
dtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond reputedtravis7 has a reputation beyond repute
Mac Specs: iMac 2.4 C2D 10.10, iMac 2.16 C2d 10.6.8, Macbook2007 10.8.4, Mac Mini 10.8.4, iPhone 3GS Note 8!!

dtravis7 is offline
I closed this thread for now as spammers are constantly using it for their spam. If the OP needs any more help on this topic, let us know.

Thread Closed


« What hardware to buy? | Coming from .NET »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
XCode Debugging From Source Code deanrayj OS X - Development and Darwin 0 04-25-2008 09:33 PM
The QUESTION Game ToddG Schweb's Lounge 159 08-15-2007 05:25 PM
Ipod video conversion question bartleby iPod Hardware and Accessories 1 12-06-2006 01:30 PM
Ipod video conversion question. KoDorSean iPod Hardware and Accessories 4 12-05-2006 12:50 AM

All times are GMT -4. The time now is 11:48 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?