Re: Can't cram an NSRange into an NSArray?
Re: Can't cram an NSRange into an NSArray?
- Subject: Re: Can't cram an NSRange into an NSArray?
- From: "James Winetke" <email@hidden>
- Date: Tue, 02 Jul 2002 02:05:07 +0000
I have a followup question. CFStringCreateArrayWithFindResults() returns
a CFArray filled with CFRange structures, which works great; I can see
the ranges in the debugger and they're perfect.
I can't figure out how to get the ranges out of the array. The compiler
balks with "incompatible types in assignment" when I try things like
this:
CFRange myRange;
CFArrayRef thisArray
thisArray = CFStringCreateArrayWithFindResults(...);
myRange = CFArrayGetValueAtIndex(thisArray, (CFIndex) 0);
Ditto for the NSEnumerator approach, where I'm assigning [en nextObject]
to a CFRange (or NSRange). What darn data type does it want?
It's so frustrating to waste hours on an error like "incompatible types
in assignment" -- if the compiler _knows_ they're incompatible, it should
tell me what they fricking _are_ when it complains.
I tried extracting the mystery object into a variable with gdb, but the
only return type that the array would give it up to was id, which
resisted all inspection except for its address in memory.
Jim
_________________________________________________________________
Send and receive Hotmail on your mobile device:
http://mobile.msn.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.