On 20/Oct/2012, at 8:51 PM, [email protected] wrote: >> I need to make a "video capture" plugin to allow any Real Studio >> desktop-type application to drag my control into its window and show live >> video. > >> It's going to be a Mac OS X only plugin and I have already the code >> that shows the live video in an NSView object. > >> How can I integrate the NSView into a Real Studio control ? > >> The closest thing I could find to get me started was the >> SDK example "Eyes Control" but I'd like to hear your suggestions on >> how to go about it. > >> Thanks. > > > NSView *xx = REALGetControlHandle(instance); > > myView *bt; > > Rect r; > > NSRect bb; > > REALGetControlBounds(inst, &r); > > int height = r.bottom-r.top, width = r.right-r.left; > > bb = NSMakeRect(0,0,width,height); > > bt = [[myView alloc] initWithFrame:bb]; > > [xx addSubview:bt];
If I place this code in the openFunction (REALcontrolBehaviour callback) I cannot even start the Real Studio IDE as it will crash. If I comment out the last line I can run my application that contains the plugin. The plugin's redrawFunction (REALcontrolBehaviour callback) gets called a couple of times, but drawRect in my NSView subclass will never be called. Note that in the openFunction REALGetControlHandle() returns 0. Any suggestions ? _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
