Cocoa object handles question

Mac OSX specific forum
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Cocoa object handles question

Post by wilbert »

@Fred,
The ...ID() commands are the only way to get to the underlaying objects PB uses.
Most of them make sense like WindowID() returning a subclass of NSWindow, ToolBarID() returning a subclass of NSToolbar etc.
For MenuID() this is not the case, it returns NSMutableArray instead. Would it be possible to return a NSMenu instead ?
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Cocoa object handles question

Post by Fred »

Actually there is no menu which contains the menu titles, so we return the menu title array. Each item in this array is the top level menus (MenuTitles) which are NSMenu. So you can iterate the array and get the NSMenu from here.
Post Reply