Re: NSShadow
Re: NSShadow
- Subject: Re: NSShadow
- From: "Ken Ferry" <email@hidden>
- Date: Wed, 19 Nov 2008 23:06:23 -0800
Hi Gary,
Try making a new shadow rather than mutating the one you get from the
view. When you set it back, the view does not realize the shadow has
changed, and so does not update the CoreAnimation layer tree.
Please file a bug for this.
-Ken
On Tue, Nov 18, 2008 at 1:19 AM, M Pulis <email@hidden> wrote:
> Folks,
>
> I have an NSControl, in IB i've set a shadow and a color (green). it has an
> IBOutlet and is "hooked" up to my controller. When my app is run, the
> checkbox has a lovely green shadow. Go baby go....
>
> During runtime I want to change the shadow color - but am failing to do so.
> So, to simplify the logic...
>
> In awake from nib I see the control (mCheckbox) is not nil, so I try to set
> the shadow color to black :
>
> IBOutlet NSControl *mCheckBox;
>
> /* awakefromnib */
> NSShadow *aShadow = [mCheckbox shadow];
> [aShadow setShadowColor:[[NSColor blackColor] colorWithAlphaComponent:1.0]];
> [mCheckbox setShadow:aShadow];
>
> No change. No errors. Nothing nil.
>
> Looks like it makes sense to me... but... it does not work, so, I'm missing
> something... somewhere... should be obvious.... just not to me.
>
> Been searching docs and sample code bits (have not found an example of
> changing a shadow on a control) - trying foolish things - stuck. This has to
> be simpler than the two hours spent getting this far.
>
> Thanks!
>
> Gary
> _______________________________________________
>
> 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
>
_______________________________________________
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
References: | |
| >NSShadow (From: M Pulis <email@hidden>) |