Re: FxPlug: Find out version of host
Re: FxPlug: Find out version of host
- Subject: Re: FxPlug: Find out version of host
- From: email@hidden
- Date: Fri, 6 Jul 2007 16:46:29 -0700
On 7/6/07,
Christoph Vonrhein <
email@hidden> wrote:
Hi,
I need to know the version of the host application in my current FxPlug plugin. I've tried to get this info in the
-initWithAPIManager
method by doing this:
Class theClass = NSClassFromString(
@"FxHostCapabilities" );
id hostCaps = [[theClass alloc] initWithAPIManager:_apiManager];
UInt32 versionOfHost = [hostCaps hostVersionNumber];
Even though the header file says that this should not be done, it should be working. So on my MBP and a MacPro (both with FCS2) everything works fins. On another Mac with FCS1 (Motion
2.1.2) installed, the above code causes the plugin not to work. The plugin "crashes" and Motion does not even let me drag the plugin from the plugin list to the Layers. When I remove those few lines, the plugin works.
Why is the above code crashing ? (Mac Pro, OSX 10.4.8, Motion 2.1.2, FxPlug 1.1)
you could ask the object if it responds to the selector before messaging it:
if (![hostCaps respondsToSelector:@selector(hostVersionNumber)])
// unavailable
else
UInt32 version = [hostCaps hostVersionNumber];
was -[NSObject hostVersionNumber] added to the FxPlug API post
1.1?
cheers,
jean-pierre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden