Re: Funny Panther issue with [NSArray -componentsJoinedByString]
Re: Funny Panther issue with [NSArray -componentsJoinedByString]
- Subject: Re: Funny Panther issue with [NSArray -componentsJoinedByString]
- From: Matt Neuburg <email@hidden>
- Date: Fri, 18 Aug 2006 17:57:56 -0700
- Thread-topic: Funny Panther issue with [NSArray -componentsJoinedByString]
On Sat, 19 Aug 2006 01:47:24 +0200, Claudio Procida <email@hidden>
said:
>I'm having a really funny surprise with Panther for two lines of code :(
>Somehow, my TVProgram objects seem not to receive -description for a
>while.
>
> From the docs I see that -componentsJoinedByString: is a 10.0 API
>and should work
>
>The code:
>
>// NSArrayController *programsController
>[programsController commitEditing];
>NSLog(@"%@", [[programsController content]
>componentsJoinedByString:@"\n"]);
>
>The output:
>
>---[Tiger]--->8---
>
>Night Visions
>Tg La7
>Polizia: Squadra soccorso
>...
>CNN
>Ken il Guerriero: La città stregata
>Highlander
>Grand Prix Moto
>3 minuti con Media shopping
>Shopping By Night
>...
>---[/Tiger]--->8---
>
>---[Panther]--->8---
>// What the ?
><TVProgram: 0x31a9b0>
><TVProgram: 0x3d10a0>
>... // Random length
><TVProgram: 0x3fc2d20>
><TVProgram: 0x3b31a0>
>// From now on all OK
>Highlander
>Grand Prix Moto
>3 minuti con Media shopping
>Shopping By Night
>...
>---[/Panther]--->8---
>
>Is this a known issue?
This is a totally wild guess, but it sounds like a combination of
isa-swizzling (which annoyingly overrrides your custom "description") and
not allowing the event cycle to complete. So either ask explicitly for some
aspect of the objects (i.e. don't use "description") or wait longer (i.e.
use delayed performance), or both, and see if that helps...? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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