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];
I placed this code in the constructor method that is listed in the REALGetControlHandle structure The problem now is that REALGetControlHandle() is always returning 0 Is it better if I make my plugin a "class" like in the "Complete Class" sample, or a "control" like the "Eye Control" sample ? Is there any reason that the former has an Xcode sample project and the latter doesn't ? Thanks again. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
