Re: Background processes
Re: Background processes
- Subject: Re: Background processes
- From: Benjamin Kent <email@hidden>
- Date: Tue, 16 Oct 2007 17:58:34 +0100
Hi Paul,
The displayIfNeeded/display functions do definitely make it do
something, but it appears to be getting stuck in a loop - the stack
trace in the debugger when breaking looks as so:
#0 0x90009cd7 in mach_msg_trap ()
#1 0x90009c38 in mach_msg ()
#2 0x90399b96 in _CGSSynchronizeWindowBackingStore ()
#3 0x9032be69 in _CGSLockWindow ()
#4 0x9033b98a in CGSDeviceLock ()
#5 0x9430c6a6 in ripd_Lock ()
#6 0x9430bf57 in ripl_BltShape ()
#7 0x94310f79 in ripc_Render ()
#8 0x9431039c in ripc_DrawRects ()
#9 0x90340c1b in __CGContextDrawRects ()
#10 0x90340aad in CGContextFillRects ()
#11 0x90340a34 in CGContextFillRect ()
#12 0x932d9425 in NSRectFill ()
#13 0x933113b1 in -[NSView _drawRect:clip:] ()
#14 0x9330f893 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#15 0x933ee7a3 in -[NSNextStepFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#16 0x9330e362 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
#17 0x9330dc8e in -[NSView displayIfNeeded] ()
Any ideas?
Thanks
Ben
Paul Schneider wrote:
Hi, Ben,
the progress bar should redraw itself the next time we process
events. If that doesn't come around soon enough, you can send it a
-displayIfNeeded (or just -display) message to force it to draw right
away.
As Darrin says, you might also need to call -setNeedsDisplay to
invalidate the control. I think that changing the value will do that,
but it might not.
The "cancel" button you asked about isn't a standard button type,
although it's used in various Apple applications. It's just an
NSButton whose icon has been set to that image. I don't think we
currently export that image from any system framework; poking around
in the app bundles of some of the programs who use it (Safari), it
seems that each app currently includes its own copy. You can include
a copy in your plugin's bundle and load it yourself, like this:
[button setImage: [NSImage imageNamed: @"MyCancelButton"];
Or if you are building your custom UI in Interface Builder, you can
set up the icon right there. It's possible that we expose this icon
in a system framework; if we do, hopefully someone will correct me.
- Paul
On Oct 16, 2007, at 12:16 PM, Benjamin Kent wrote:
Hi Paul,
I've made a custom UI widget which is an NSProgressIndicator, and
periodically during my analysis I'm calling setDoubleValue on this
progress bar (every second or so). Unfortunately, the UI doesn't seem
to update until the end of my processing (which is disappointing for
a progress bar :)). I've even tried making sure it's on the main
thread using performSelectorOnMainThread, however this doesn't seem
to make any difference.
Any way round this?
Thanks
Ben
Paul Schneider wrote:
Hi, Ben,
there isn't a public way to do that. You might have some luck with
starting a thread or process from within your plugin, and displaying
your own progress UI (perhaps in a custom UI widget in the
parameters list - see kFxParameterFlag_CUSTOM_UI). But we don't
have a way for you to add items to Final Cut's Background Processes
window today.
- Paul
On Sep 18, 2007, at 8:14 AM, Benjamin Kent wrote:
Hi,
Does anyone know how to spawn a background process in an FxPlug
plug-in on FCP, in the same way that the SmoothCam node does it
when it is applied to an effect?
Thanks
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden
<mailto:email@hidden>)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden <mailto:email@hidden>
_______________________________________________
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