koala

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Apr 30 13:40:05 UTC 2002


On Tuesday 30 April 2002 12:14 pm, Bernd Gehrmann wrote:
> On Monday 29 April 2002 18:32, Richard Dale wrote:
> > Please find QPopupMenu.java attached as an example of how a zillion
> > insertItem()'s look in java. This involved some hand editing, but it
> > could (and should) have been generated automatically.
>
> Looks straightforward in Java, but you are also producing code
> for Objective-C and whatever else, don't you?
Ahh... Objective-C. Yes, we're talking about a serious language binding 
nightmare here :). I almost wish I hadn't started..

I've attached the Objective-C QMenuData interface so you can see what a 
zillion insertItem()'s look like in that.

- (int) insertTextItem: (NSString *)text receiver: (QObject *)receiver slot: 
(NSString *)member accel: (QKeySequence*)accel identifier: (int)identifier 
index: (int)index;
...

No method overloading, so the 'insertItem:' part of the method name must be 
changed to 'insert<arg type>Item:' and so on.

-- Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QMenuData.h
Type: text/x-chdr
Size: 6944 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20020430/12b66b77/attachment.h>


More information about the KDevelop-devel mailing list