Thanks Christopher, unfortunately it did not work. My execute just never gets 
called.

@Tom, I haven't noticed any performance problems yet. I was just wondering if 
there was a 'proper' way of doing it (analogous to NSView [self 
setNeedsDisplay:YES]). If the proper way is to keep it looping in idle and 
check the flag, then I can do that, no problem.

Cheers,

Memo.





        
29 Ironworks. Dace Rd. London E3 2NX, UK
mob : +44 (0) 7958 783 832
tel : +44 (0) 20 8123 9986
fax : +44 (0) 20 8986 5496

work: www.msavisuals.com
play: www.memo.tv


On 23 Nov 2009, at 16:10, Christopher Wright wrote:

>> To cut a long story short, I have one custom QCPatch to send data
>> [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationName 
>> object:sentObject];
>> and another custom QCPatch to receive data in another composition.
> 
>> In the example posted, the receiver patch timeMode is set to 
>> kQCPlugInTimeModeNone
>> As expected the plugin.execute:atTime:withArguments doesn't get called when 
>> the notification is received. It only gets called when I move the patch 
>> around in QC.
>> I can fix this by setting the timeMode to kQCPlugInTimeModeIdle. It's easy 
>> to set a flag in the notificationCallback and in execute check that and only 
>> write to output when there is actually new data, but I was wondering if 
>> there is a way to keep the timeMode to none, and from the 
>> notificationCallback force an execute so the receiver execute isn't 
>> unnecessarily running and constantly checking the flag to see if there is 
>> new data?
> 
> 
> I haven't tried this myself (as the official-api has lots of lameness like 
> this), but here's a test:
> 
> [[self patch] setNeedsExecution];
> 
> where self is your QCPlugIn subclass.  if you want definitions (for warning 
> suppression etc):
> -(id)patch;
> -(void)setNeedsExection;
> 
> (if this works at all, it should work on both 10.5 and 10.6)
> 
> This is how the threaded patches in QC do this (effectively -- they actually 
> don't have the QCPlugIn abstraction as a hobble.
> 
> Please let me know if this works -- it's a ridiculously common design pattern 
> that should be exposed in QC.
> 
> --
> [ christopher wright ]
> [email protected]
> http://kineme.net/
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to