• 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
Simple CFString ref question (take pity on ObjC dude)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple CFString ref question (take pity on ObjC dude)


  • Subject: Simple CFString ref question (take pity on ObjC dude)
  • From: Steve Cronin <email@hidden>
  • Date: Sat, 18 Mar 2006 17:33:45 -0600

Folks;

I've got my head around ObjC but I still get bamboozled by the C * stuff...

I've got a struct that currently gets populated like so:
....
      theParameters.p1      = CFSTR("String1");
      theParameters.p2      = CFSTR("TString2");

What I want to do is change it to something close to:
theParameters.p3 = [[NSString stringWithFormat:@"%@",newVal] cStringUsingEncoding:[NSString defaultCStringEncoding]];


But I get warnings on incompatible pointer type.

I know CFSTR returns a reference to a CFString object, I just can't get the syntax right for the NSString.

Help?
Steve


_______________________________________________ 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
  • Follow-Ups:
    • Re: Simple CFString ref question (take pity on ObjC dude)
      • From: Guy English <email@hidden>
    • Re: Simple CFString ref question (take pity on ObjC dude)
      • From: "Jordan Krushen" <email@hidden>
  • Prev by Date: NSTreeController: binding cascading entities
  • Next by Date: Re: create NSMutableString with no limit?
  • Previous by thread: NSTreeController: binding cascading entities
  • Next by thread: Re: Simple CFString ref question (take pity on ObjC dude)
  • Index(es):
    • Date
    • Thread