| Odd ... I shuffled the code all around (in fact making my plugin a separate NSView that contains a QCView so I could wait till the main view was fully initialized and onscreen before setting up the QCView). My stub NSView draws (just fills red), but as soon as I click the button to add the QCView, it fails with the invalid drawable error. Incidentally all of these methods work fine in Safari-proper, so there must just be something funny about the way Dashboard works wrt OpenGL subviews. No biggie -- this was just a "for fun" project. If you're interesting in seeing the failing code (it's pretty small), let me know, though from what I can tell, this is Dashboard's fault, not QC's, so feel free to ignore it too :)
ms On Apr 30, 2005, at 4:49 PM, Pierre-Olivier Latour wrote: Ah yes, in the spirit of confusing docs, the Dashboard Programming Guide Widget "Property List" section doesn't list the key, but the Dashboard Reference "Info.plist keys" list does -- "AllowInternetPlugins" is its name. Oddly, once I set that to true, I get and "invalid drawable" error on my console log, though the composer file and QCView definitely loaded (I can tell because I can access input keys from the dashboard widget) so I'll have to investigate that one further.
The obscure "Invalid drawable" error means that OpenGL is trying to draw to a surface on screen that is not available. Basically, the QCView is trying to render while its window is not on screen (yet). You probably need to turn off "autostart rendering" and call -startRendering manually once the widget is on screen (maybe from the widget _javascript_ code?).
________________________________________________________ Quartz Composer Architect Graphic & Imaging Team
|