Re: [Pyobjc-dev] How to implement a protocol?
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2002-12-01 19:52:20
|
Subclass your delegate from a 'normal' objective-C class (like NSObject) and AppKit.NSToolbarDelegate to pick up the right method signatures. The declaration for the method you mention below is: def toolbaar_itemForItemIdentifier_willBeInsertedIntoToolbar_(self, toolbar, itemIdentifier, flag): pass You'll also have to define 'toolbarDefaultItemIdentifiers:' and 'toolbarAllowedItemIdentifiers:'. Ronald On Sunday, Dec 1, 2002, at 19:21 Europe/Amsterdam, Jiva DeVoe wrote: > I am trying to set up a toolbar for my app. So I am implementing the > delegate methods for that. One of the delegate methods I need to > implement is this: > > - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar > itemForItemIdentifier:(NSString *)itemIdentifier > willBeInsertedIntoToolbar:(BOOL)flag; > > How do I write this as a python method to implement this? Right now, > it's complaining that I haven't implemented all the methods for this. > I suspect this is the one it doesn't like. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |