| From | Sent On | Attachments |
|---|---|---|
| Harald Kuhr | Feb 9, 2010 11:58 am | |
| Duncan McGregor | Feb 9, 2010 12:04 pm | |
| Harald Kuhr | Feb 9, 2010 12:27 pm | |
| Harald Kuhr | Feb 9, 2010 12:37 pm | .java |
| Duncan McGregor | Feb 10, 2010 12:37 am | |
| Harald Kuhr | Feb 10, 2010 2:39 am | .java |
| Harald Kuhr | Feb 17, 2010 7:25 am | |
| Duncan McGregor | Feb 18, 2010 1:56 am | |
| Andrew Thompson | Feb 18, 2010 6:52 pm | |
| Harald Kuhr | Feb 19, 2010 6:49 am | |
| Harald Kuhr | Feb 19, 2010 7:23 am | |
| Harald Kuhr | Feb 19, 2010 10:37 am | |
| Harald Kuhr | Feb 19, 2010 12:13 pm | |
| Duncan McGregor | Feb 19, 2010 2:04 pm | |
| Harald Kuhr | Feb 19, 2010 3:06 pm | |
| Andrew Thompson | Feb 20, 2010 8:02 am | |
| Harald Kuhr | Feb 20, 2010 1:12 pm | |
| Andrew Thompson | Feb 20, 2010 5:22 pm | |
| Duncan McGregor | Feb 21, 2010 2:55 am | |
| Harald Kuhr | Feb 21, 2010 8:14 am | |
| Duncan McGregor | Feb 21, 2010 8:40 am | |
| Duncan McGregor | Feb 21, 2010 9:01 am |
| Subject: | Re: BOOL mapping issues | |
|---|---|---|
| From: | Harald Kuhr (hara...@gmail.com) | |
| Date: | Feb 9, 2010 12:27:23 pm | |
| List: | net.java.dev.rococoa.users | |
Hi Duncan,
Hmm... There are plenty other methods on NSView that has the exact same void
foo(BOOL b) signature.. And they all work as expected. That probably explains
why no one noticed this before.. And makes the issue even stranger... I guess
updating test.m won't work then. :-(
Thanks for a very quick response, btw! :-)
-- Harald K
On 9. feb. 2010, at 21.05, Duncan McGregor wrote:
Odd, JNA is responsible for that marshalling. A failing test case would be good,
especially if it involved updating test.m so that didn't depend on NSView...
D
On 9 Feb 2010, at 19:58, Harald Kuhr wrote:
Hi guys,
I just came across some very odd mapping behavior... There seems to be a problem
mapping (ObjC) BOOL to (Java) boolean in method parameters.
Given:
@RunOnMainThread public interface NSView extends NSObject { void setHidden(boolean hidden); // What I want. void setHidden(int hidden); // My workaround... boolean isHidden();
// ... }
And the following code snippet:
NSView view;
view.setHidden(false); System.out.println(view.isHidden());
view.setHidden(0); System.out.println(view.isHidden());
view.setHidden(true); System.out.println(view.isHidden());
view.setHidden(1); System.out.println(view.isHidden());
The output is as follows:
false false false true
While the expected would be false, false, true, true... It would be trivial to
convert this code into a failing test case, if anyone's interested.
Has anyone else stumbled across this? Is this a known issue? Am I doing anything
wrong?
Best regards,
-- Harald K






.java