Re: When does Cocoa fall apart? (Run loops)
Re: When does Cocoa fall apart? (Run loops)
- Subject: Re: When does Cocoa fall apart? (Run loops)
- From: dreamcat7 <email@hidden>
- Date: Wed, 22 Oct 2008 11:43:33 +0100
2 methods to try when a programmatic binding isnt working.
[self performSelector:@selector(finishInit:) withObject:self
afterDelay:0.0];
[[NSRunLoop currentRunLoop]
performSelector:@selector(finishAfterLooping:) target:self
argument:(id)nil order:0 modes:[NSArray arrayWithObject:[NSRunLoop
currentMode]]];
(Declared in NSRunLoop.h)
Usually this is sorts of problems arises on awakeForNib /
didFinishLoading, and / or binding thats initializing, perhaps bound
to multiple object. Best way to avoid such problems usually make sure
everythings all loaded-up / instantiated first. Clearly moving yer
stuff out of the init methods and iterating over the run loop first is
probably the best way to go... Well you could instead dig deeper into
the implementation specifics of Cocoa bindings.
(Sorry - i dont claim to know anything about toolbar buttons) But it
sounds like you are pointing to a difference inbetween two types of
buttons. In those cases it can help to compare the class hierachies
and "read between the lines" the documentation, and (usually more
helpful) the examples out on the web where other developers have used
these button types in their project. Perhaps even the Debugger can
give a hint to the way Apple has implemented them ?
On 22 Oct 2008, at 10:42, Raphael Sebbe wrote:
[objectController setContent:title];
<....>
I think I've noticed this once or twice in the past, that things
that don't
seem to work as they should, start working when you throw them on
the run
loop. In this case, the isEnabled bindings status of toolbar items
seems to
start working when I do certain things on the Run loop instead of
immediately.
Have people noticed these situations? What causes them, and when
should I
look out for it?
Re: Toolbar buttons and isEnabled binding
From: Chris Idou <email@hidden>
Subject: Toolbar buttons and isEnabled binding
To: email@hidden
Date: Tuesday, October 21, 2008, 7:04 AM
I seem to be getting erratic behaviour from toolbar button
isEnabled bindings. In some scenarios they don't seem to
work correctly.
I've tried putting the exact same binding criteria on
some regular buttons just to see what happens, and they seem
to work correctly when the toolbar buttons don't.
Has anyone else noticed this?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden