shannah / Java-Objective-C-Bridge

A thin bridge that allows for two-way communication from Java to Objective-C.
123 stars 25 forks source link

NSStrings and regular Strings not handled well sometimes #10

Closed mojo2012 closed 5 years ago

mojo2012 commented 5 years ago

Hi there,

I have the following NSToolbarDelegate selector implemented:

@Msg(selector = "toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:", signature = "@:@:@:B")
    public Proxy toolbarItemForItemIdentifierwillBeInsertedIntoToolbar(Long toolbar, Proxy itemIdentifier, Long index, Boolean willBeInsertedIntoToolbar) {
...
}

The itemIdentifier should be a NSString (aka Proxy object) but sometimes it is a real java String. This happens at other places too, but I haven't detected a pattern. I would prefer if every instance of NSString - even something like the NSImageName subclasses/aliases - would be just regular Strings.

Any idea how to fix this?

mojo2012 commented 5 years ago

Solved in the latest master branch