• 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
Re: TM character blows array out of water
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TM character blows array out of water


  • Subject: Re: TM character blows array out of water
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 3 Sep 2002 09:25:13 -0700

On Mon, 2 Sep 2002 18:43:54 -0700, Matt Neuburg <email@hidden> said:

In fact, I read elsewhere that po calls something called
NSPrintForDebugger(). I cannot find any documentation of this. But if it's
true, then this is where the breakage is. m.

>At 3:16 AM +0200 9/3/02, thus spake Ondra Cada:
>
>>On Tuesday, September 3, 2002, at 02:08 , Matt Neuburg wrote:
>>
>>> I am trying to construct an array of NSStrings one of which contains the
>>> TM
>>> character. Here's the code; it's rather long-winded because I had to pull
>>> it apart in order to debug:
>>>
>>> - (void) awakeFromNib {
>>> NSArray* arr2;
>>> unichar TM = 8482;
>>> NSString* TMStr = [NSString stringWithCharacters: &TM length:1];
>>> NSString* NAV = [NSString stringWithFormat: @"NAV%@ 6.0 QuickScan",
>>> TMStr];
>>> NSMutableArray* arr = [NSMutableArray arrayWithObjects:
>>> @"AppleShare PDS", @"Desktop DB", nil];
>>> [arr addObject: NAV]; // ***
>>> arr2 = [NSArray arrayWithArray: arr];
>>> }
>>>
>>> I can see in the debugger that up to the starred line everything is fine;
>>> the array arr has been created, and the string NAV looks the way I want.
>>>
>>> But after the starred line - that is, as soon as I try to add this string
>>> to this array - everything goes haywire....
>>
>>Don't see any problem here:
>> [snip, same as my code]
>> arr2 = [NSArray arrayWithArray: arr];
>> NSLog(@"%@",arr2);
>
>You're right, Ondra - that works for me too. Perhaps this is a bug in GDB.
>Put a breakpoint at the NSLog and try
>
> po arr
> po arr2
>
>I get nothing at all; this is what was leading me to believe the arrays had
>vanished. - Yes, I see; these work:
>
> po [arr description]
> po [add2 description]
>
>So it does seem to be a GDB bug. What a pain, I'm going to have to attach
>"description" to everything...
>
>m.
>
>
>--
>
>matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
>pantes anthropoi tou eidenai oregontai phusei
>Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
>
>--__--__--
>
>Message: 2

--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.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.

  • Prev by Date: Re: cString deprecated!
  • Next by Date: Re: The macs serial number (clearer)
  • Previous by thread: Re: TM character blows array out of water
  • Next by thread: Variable Sized Subview
  • Index(es):
    • Date
    • Thread