Re: [Pyobjc-dev] Question about animation proxy objects
Brought to you by:
ronaldoussoren
|
From: Mani G. <ma...@tu...> - 2008-12-03 23:08:55
|
Hi all,
I have continued to tinker with this, and have the following to report:
I can invoke "setAlphaValue:" by using the performSelector: message, i.e.
---
anim = window.animator()
anim.performSelector_('setAlphaValue:')
---
This will make the window go fully transparent, since I can't pass in
any values and I guess it's just assuming nil or 0. But at least it
does so smoothly. :)
(Yes, I know about performSelector_withObject_ but the parameter for
setAlphaValue: is not an NSObject so it doesn't work).
This still doesn't answer the original question, but hopefully it
sheds some light. I'm sure this has to do with KVC stuff, which I am
admittedly quite unfamiliar with. Is my only option to start digging
into NSInvocation and figure out a different way to invoke the
setAlphaValue method?
Thanks in advance.
Regards,
Mani
On Wed, Dec 3, 2008 at 10:29 AM, Mani Ghasemlou <ma...@tu...> wrote:
> Hi all,
>
> Attempting to use proxy animations
> (http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/NSAnimatablePropertyContainer_protocol/Introduction/Introduction.html)
> on an NSWindow object causes a segmentation fault in my application.
> I've read the documentation over and over, and I must still be missing
> something!
>
> Here's how I'm trying to do it (this is a code snippet of my app
> delegate's instance method):
>
> [CODE]
> def fadeOut(self, window):
> window.animator().setAlphaValue_(0.0)
> window.orderOut_(self)
> [/CODE]
>
> calling fadeOut with an NSWindow instance as input, causes the
> application to crash. I tried the same code, without the animation
> proxy:
>
> [CODE]
> def fadeOut(self, window):
> window.setAlphaValue_(0.0)
> window.orderOut_(self)
> [/CODE]
>
> ... and it works just fine.
>
> Any ideas what I might be doing wrong here? (Fingers crossed that it's
> not something embarrassingly obvious...)
>
> Kind regards,
> Mani
>
|