Re: [SOLVED] NSButton alternate image problem - not redrawing
Re: [SOLVED] NSButton alternate image problem - not redrawing
- Subject: Re: [SOLVED] NSButton alternate image problem - not redrawing
- From: P Teeson <email@hidden>
- Date: Fri, 18 Jul 2008 12:37:38 -0400
I solved it - thanks for not replying so I had to find out for myself.
Seriously I appreciate it because I read more in Cocoa Drawing Guide
and learned quite bit.
respect....
Peter
On 17-Jul-08, at 1:19 PM, P Teeson wrote:
I posted about this issue but so far only one response.
For the full details please see earlier in this thread.
This is a summary:
Initially the button has blank icons for both image and alternate
image.
User clicks on button, action method is called, in that method a
different alternate image is set by,
[sender setAlternateImage:theXiconImage];
then the button is disabled by,
[sender setEnabled:NO];
the action method is exited, and button is redrawn showing the new
image.
However after doing this when the game is over:
[cell0 setAlternateImage:theBlankImage]; // send messages via IBOutlet
[cell0 setImage:theBlankImage]; // Added this line
[cell0 setEnabled:YES];
to restore the button to it's original state, clicking on the
button is
not guaranteed to result in drawing the alternate image as before
even though
going through same action method.
Sometimes it does; sometimes it doesn't -just draws blank image.
Why this unexpected behavour? Does this imply no dynamic setting of
alternate image?
But it works when first loaded from nib. Why not when button state
is reset programmatically?
I'd appreciate some help on debugging this.
Thanks...
Peter
_______________________________________________
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