

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in net.java.dev.jna.usersRe: NSOpenPanel/NSSavePanel| From | Sent On | Attachments |
|---|---|---|
| Duncan McGregor | Apr 24, 2008 10:22 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: NSOpenPanel/NSSavePanel | Actions... |
|---|---|---|
| From: | Duncan McGregor (dun...@oneeyedmen.com) | |
| Date: | Apr 24, 2008 10:22:57 am | |
| List: | net.java.dev.jna.users | |
I'm back, and have a solution to the string encoding issue, which I hope to tidy up and commit tomorrow.
After that I'll have a look at the callbacks.
I'm fine with the abstract classes - the factory methods were my motivation for using cglib. I've struggled with whether to add Java methods, and think that perhaps the middle-way is an interface mapping one to one with the Cococoa class, and then extend that with a Java class implementing the interface and adding convenience methods. It's your call though. I propose that we create a contrib package and place donations in that, so the core quality can be maintained, but people don't have to reinvent the wheel.
Duncan
On 17 Apr 2008, at 19:07, Harald Kuhr wrote:
Hi Duncan,
Hope you are enjoying your holidays! I finally had the time to re- configure my project setup. I've added a bunch of classes (mostly AppKit stuff), made some test cases and some functional tests. I'll add more when time allows me.
I can zip it all down and send it to you if you want.
I've mainly created abstract classes though, to allow factory methods for the initializers. You may or may not like that, but I see you have the same in some of your NS* classes. I've also started another practice of adding overloaded methods, instead of the somewhat long (and un-java-like) selector names. Will make the library far more convenient to use, but also more code to implement/ maintain...
Like this (from NSOpenPanel):
public final int runModal(final File directory, final File file, final List<String> fileTypes) { return runModalForDirectory_file_types( directory != null ? directory.getAbsolutePath() : null, file != null ? file.getName() : null, toNSArray(fileTypes) ); } protected abstract int runModalForDirectory_file_types(String absoluteDirectoryPath, String filename, NSArray fileTypes);
public final int runModal(final List<String> fileTypes) { return runModalForTypes(toNSArray(fileTypes)); } protected abstract int runModalForTypes(NSArray fileTypes);
I'm still stuck with the delegates/callbacks, would really appreciate some help there!
Regards,
-- Harald K
On 9. apr. 2008, at 20.08, Duncan McGregor wrote:
Hi Harald
Just to let you know that I'm on the case. I'm going on holiday with my family for a week, but hope to fix this and the string







