In article <uce-880A16.15415213052008@[EMAIL PROTECTED]
>,
Gregory Weston <uce@[EMAIL PROTECTED]
> wrote:
> In article <C9udnUxkxp0jQrTVnZ2dnUVZ_rvinZ2d@[EMAIL PROTECTED]
>,
> Don Bruder <dakidd@[EMAIL PROTECTED]
> wrote:
>
> > > Are you getting any warnings? Particularly at the point where this
is
> > > invoked, rather that in this method itself?
> >
> > No. None whatsoever. The build process is 100% error- and warning-free
> > for all compilation units. Even after a "Clean All Targets" then
rebuild
> > from scratch process.
>
> That's very odd. I just took a stab at creating a test project to
> exercise your code and got two errors out of it.
>
> NSString>>getCString: doesn't return a char* (or anything, for that
> matter). Two of your printf() statements should be DOA.
Erk!!! You're right! It doesn't return anything! D'OH!!!
Having noticed that, though, that shouldn't render the printf()s DOA -
That's a logical error, not a syntax error. At worst, it should make the
non-literal part of the output garbage, but at least print out the
literal stuff correctly. Or at least, so I would expect based on the
behavior I've observed in various C compilers over the years.
I'm not getting even that much. And it still doesn't cover the fact that
not even the "Entering findNSString" one is showing up - That one is
perfectly fine, both logically and syntactically, so when the method
gets called, I should at least see that message. And I SHOULD be able to
set a breakpoint in findNSString and have the debugger stop there.
But...
Lemme prune out the suspect printf()s and see what happens.
No joy... the "bad" printf()s are gone, but the situation remains
unchanged.
> Removing those, I can't get it to work. I get the debugging printf()s,
> but not any successful invocation on a simple testcase. I believe the
> reason I can't get it to work is that stringWithCharacters:length:
> expects the first argument to be an array of unichar. I have a hunch
> that (the strings within) your data are in some single-byte encoding.
Ouch... That's a REALLY likely scenario, now that you bring it up...
"Buffer" (The NSMutableData instance variable of the caller) is getting
loaded from a web page, so it's almost certainly 8-bit ASCII, and I
didn't read close enough to notice that stringWithCharacters wants a
unichar array rather than a "plain char" array.
Testing that theory, though, shows it's not "THE" problem, just "A"
problem. Changed the "TempString =" line to "TempString = [NSString
stringWithCString:"Testing!"];" and the situation remains the same:
Can't step into findNSString, no printf() output, no stop at breakpoint,
and zero in the caller's return variable.
There's something "more basic" wrong with what I'm doing, I'm thinking,
but I'm just too green in Objective C to spot whatever it is.
--
Don Bruder - dakidd@[EMAIL PROTECTED]
- If your "From:" address isn't on my
whitelist,
or the subject of the message doesn't contain the exact text
"PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without
my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd>
for more
info


|