Can anyone tell me how to prevent a QCView from re-initialising when the window is minimised and then re-opened (or hidden and then unhidden)?

I'm building a pretty complex paint tool using QC, but it's not at all helpful if when the window is minimised and then opened again, the composition restarts and the artist loses their work!


I ran into this with QuartzCrystal (never fully resolved it, since it's just the preview window that does this) -- I think what you have to do is take the QCView off of the window, and replace it when the window is re-instantiated. However, the you run into some annoying default behaviours with QCView itself when attempting to do this; here's a comment I pulled up when looking at what came of this for me:

/* Ideally, we should be able to move the QCView off the window and have it preserve state. However, QCView is hard-coded to stop rendering whenever it is removed from a superview, or when its controlling superview is miniaturized to the Dock. we can override methods in CompositionDropView to handle this, but that's a lot of code and debugging. This suffices for now (docking will restart the composition)*/

"CompositionDropView" is a QCView subclass. I'm not sure which methods to override to accomplish this though, since it wasn't too important for what I was doing.

Alternatively, you can use a QCRenderer+CVDisplayLink, which won't do this sort of thing... that might actually be easier

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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