|
|
StatusBar ala PTHClock?
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Hey guys... I want to make an NSStatusBar to the right of the date/time and volume control items. I assume this has something do with the _fPriority of the NSStatusIem, but I don't know what to do (I tried setting _fPriority, but no value seemed to work).
There's this +statusItemWithLength:withPriority: hidden in the AppKit binary, but no mention of it in the headers. When I run my app, it complains that that method doesn't exist.
Help!
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status:
Offline
|
|
to be honest, i don't quite completely understand your problem. what's always worked nicely for me was to write an app that does nothing else but to put a menu up there.
i found that global menu demo was a good starting point. i could post examples if you want me to.
|
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Sorry, I wrote that when I was extremely tired (whoops, I'm about to sleep now too, but hey, I'll try again ).
What I meant was that the menu should be to the right of the date status item, not to the left. The factory NSStatusBar method places it to the left.
[fixed typo...]
[ 03-29-2002: Message edited by: parallax ]
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
There is no public API to do what you want, AFAIK.
|
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Originally posted by Angus_D:
<STRONG>There is no public API to do what you want, AFAIK.</STRONG>
Nope, no public API. But there are other ways than public methinks...
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by parallax:
<STRONG>Nope, no public API. But there are other ways than public methinks... </STRONG>
You'll probably need to be a Menu Extra, see how ASM accomplishes it (source code from http://asm.vercruesse.de). I wouldn't be surprised if Apple breaks this for 10.2, though
Edit: UBB's URL detection code is crap.
[ 03-30-2002: Message edited by: Angus_D ]
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
By the way, to use methods that aren't declared in public headers, just declare them in a category or something. Like:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>@interface @interface NSStatusItem(PrivateStuffInAppKit)
+ _itemInStatusBar:fp12 withLength float)fp36 withPriority int)fp20;
@end</font>[/code]
|
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Haha, I accidentally typed priority: in the code instead of withPriority:... Oh well, that explains it.
I'm fairly certain that PTHClock doesn't use a MenuExtra, because it's launched from an app, unlike ASM which is somewhat "installed" as a MenuExtra (I think)...
Digging through the binary of PTHClock produced a reference to the :withPriority: method, but no value seems to work correctly for me.
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
NEVERMIND.
Disassembling PTHClock produced 0xbfff.
Okay, you all should know how to do this so I'll post it in another thread.
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|