 |
 |
Making Docklings
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Ok, I wrote a little java program that I want to turn into a dockling. All it needs to do is run a single method when i click it then display the text that comes out in a menu. How would I do this, or where should I look to find out?
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
You cannot write docklings in Java. The API is only available in C. Java is too much bloat and overhead with its evil VM to be loaded into the DocklingServer (or SystemUIServer or whatever it's called in 10.1).
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status:
Offline
|
|
would a java application be ok? they do support dock menus.
ok, it wouldn't be very elegant to always have a (windowless) app in the background, but it would work...
but have a look at obj-c, it's real fun to use.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Areas 51 thru 55 :P
Status:
Offline
|
|
Originally posted by nonhuman:
<STRONG>Ok, I wrote a little java program that I want to turn into a dockling. All it needs to do is run a single method when i click it then display the text that comes out in a menu. How would I do this, or where should I look to find out?</STRONG>
Note: I do not know if this works in Java, but you can add your own content to the Dock Menu of your running application by becoming an NSApplication delegate. In Obj-C this would look like:
- (NSMenu *)applicationDockMenu  NSApplication *)sender {
NSMenu* dockMenu = [[NSMenu alloc] init];
[dockMenu addItem:[favorites menuItem]];
return dockMenu;
}
Then set your app to run hidden at login (although I don't think I'd want to wait for the JVM to load at login).
|
|
Well, let's just say, 'if your VCR is still blinking 12:00,you don't want Linux'
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Originally posted by seb2:
<STRONG>would a java application be ok? they do support dock menus.
ok, it wouldn't be very elegant to always have a (windowless) app in the background, but it would work...
but have a look at obj-c, it's real fun to use.</STRONG>
A dock menu for it as an application would work fine. How would I go about doing that?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Originally posted by nonhuman:
<STRONG>
A dock menu for it as an application would work fine. How would I go about doing that?</STRONG>
It's actually really easy. The way I did it was subclass NSMenu and attatched it to the dockMenu outlet in your NSApplication instance (usually called File Ownder) in Interface Builder. Then the rest is the same as dealing with the NSMenu in the apple menu bar.
HTH,
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Ok, at the risk of sounding very newbieish, how do I get to my java classes through Interface Builder? I just can't seem to figure it out.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Thanks a bunch. Hopefully this should do it.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|