| Summary: | Need methods in internal Cocoa classes | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Prakash Rangaraj <prakash> |
| Component: | SWT | Assignee: | Scott Kovatch <skovatch> |
| Status: | RESOLVED FIXED | QA Contact: | Silenio Quarti <Silenio_Quarti> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | lshanmug, skovatch |
| Version: | 3.7 | ||
| Target Milestone: | 3.7 M3 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Prakash Rangaraj
Can't you just use OS.sel_registerName() to define them for yourself? They're just selectors. I guess they would be more convenient if they were callable from Java. setRepresentedFileName is a feature I know folks have been looking for, so that's no problem at all. arrangeInFront implies you're adding a Window menu, or going to make one available. What are you adding there? (In reply to comment #1) > Can't you just use OS.sel_registerName() to define them for yourself? They're > just selectors. I guess they would be more convenient if they were callable > from Java. For both the methods, I'm currently doing that. // on the class level private static final long sel_setRepresentedFilename = OS .sel_registerName("setRepresentedFilename:"); //elsewhere in a method NSWindow nsWindow = window.getShell().view.window(); NSString filePathString = NSString.stringWith(path); OS.objc_msgSend(nsWindow.id, sel_setRepresentedFilename, filePathString.id); This is currently working fine for me. I'm on Cocoa 64 bit and not sure whether this will work fine in 32 bit, (where its int all over the methods instead of long). > setRepresentedFileName is a feature I know folks have been looking for, so > that's no problem at all. arrangeInFront implies you're adding a Window menu, > or going to make one available. What are you adding there? If you haven't noticed, Minimize & Zoom added to the Window menu in the recent Cocoa nightly builds. The last missing standard mac menu item in the Windows menu is 'Bring All to Front' one. (and a fix for Bug# 187052) Added arrangeInFront:, setRepresentedFilename: and setRepresentedURL:. One might be easier to use than the other. I forgot about 32 vs 64 bit. It will be easier to call these from Java, since the SWT hides that from you. Fixed > 20101012. Thanks Scott! Remind me of the beer when we meet :-) |