Ask a Question related to Mac Programming, Design and Development.
-
Frank #1
newbie simple strings question
I got tired of typing CFSTR so I thought I would just pass a char string
and convert it to a CFString. The Mac OS X Programming book is very light
on explanation of strings (need book recommendations).
Why doesn't this work?
int tryText(char *psTxt)
{
CFMutableStringRef sTxt;
CFStringAppendCString( sTxt, psTxt, CFStringGetSystemEncoding() );
return 0;
}
Program received signal: "EXC_BAD_ACCESS".
TIA!
Frank Guest
-
[XML::Simple-2.12] problems parsing non ASCII strings
Jul wrote: Wahouh! Do you know how old this is? 5, 6 years old? What is the encoding of your file? My guess is that it is in either... -
Simple Newbie question
I am comtemplating learning flash, but since I will NEVER let ms windows near my harddrive again, I wanted to know if there is a way to write flash... -
Simple Question for a newbie
I have a flash animation with buttons, which will reside inside a web page. How do I call other pages within the website from each button? For... -
Simple Question: Converting lists to strings
Is there a way to use a list in a case statement? Can I substitute myList = in the case statement below? case(myVar) of 1, 4, 6, 9, 11:... -
Newbie with a simple question.
Why does one of my pages on my site flash on and off? What have I done? hahah. website: www.chameleonentertainment.com page: Meet the Band ... -
Doug Brown #2
Re: newbie simple strings question
In article <no-3009031947230001@eli-216-190-254-129.ev1.net>,
[email]no@spam.com[/email] (Frank) wrote:
sTxt = CFStringCreateMutable(kCFAllocatorDefault, 0);> int tryText(char *psTxt)
> {
> CFMutableStringRef sTxt;You haven't actually created a mutable string yet, you only defined a> CFStringAppendCString( sTxt, psTxt, CFStringGetSystemEncoding() );
> return 0;
> }
>
> Program received signal: "EXC_BAD_ACCESS".
space in memory for one. Add what I added above, and it should work fine
(I think! I haven't used CF much). You can replace 0 with a max length
for the string if you want.
Doug
--
Doug Brown - La Grande, OR - [url]http://www.ircandy.com/doug/[/url]
Idiot's Guide to Mac Cases - [url]http://www.ircandy.com/maccases/[/url]
If you want to reply by email, remove "pleasenospam." and ".invalid"
Doug Brown Guest



Reply With Quote

