 |
 |
OADockStatusItem
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Status:
Offline
|
|
Does anyone have any code laying around which implements OADockStatusItem? I've looked at the header but got little help. I think I need to initialize it with a badge icon, a number, and a text color but don't know how.
|
3R1C
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Status:
Offline
|
|
Where is the Rickster when you need him? Just kidding. 
|
3R1C
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
In San Jose, and running an operating system that OmniAppKit currently won't build on. Will get to this question when I return...
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Location: Glasgow
Status:
Offline
|
|
I don't know about text colour, but to get a count and icon you could do something like this:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
OADockStatusItem *dockItem = [[OADockStatusItem alloc] initWithIcon: [NSImage imageNamed: <font color = orange>@"iconBadge"</font>]];
[dockItem setCount: <font color = blue>10</font>];
[dockItem show];
</font>[/code]
Currently, I find it annoying that you can't put an arbitrary string in the badge as I want to put a string like "2:10" in the badge, but hey.
HTH,
Fraser
|
|
PowerBook G4 17"
Power Mac G4/800, 1Gb RAM, 80Gb HDD, Superdrive, GeForce 4MX, Gateway 21" CRT, Apple Pro Speakers, iSub - Running Mac OS X Server 10.2
iBook 500, 192MbRAM - Running Mac OS X 10.2
iPod 5Gb
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
Okay, looks like Fraser answered for me. Good.
The current version of OADockStatusItem was (re)written with a very specific purpose in mind... we didn't want to have generalized (and thus untested code) begin added close to the OmniWeb 4.1 release. Of course, you're quite welcome to extend it yourself and submit changes back to us... 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Status:
Offline
|
|
I've managed to get OADockStatusItem to work. I've also replaced the left center and right tiffs of the badge background in the framework to use a 'Mail.app like' red badge. My only two think left I'd like to modify, are the text color of the number and the icons position. I'd like the text to be white and the badge to centered. I guess I could modify the framework to reflect these changes, as I did the badge, but this seems to be 'cheating' sort of. How does one go about telling OADockStatusItem to use MY tiffs and MY text color and MY badge position? I have no doubt this is probably a very easy thing to do, I just have no idea how to do it.
|
3R1C
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Location: Glasgow
Status:
Offline
|
|
Originally posted by Rickster:
<STRONG>Okay, looks like Fraser answered for me. Good.
The current version of OADockStatusItem was (re)written with a very specific purpose in mind... we didn't want to have generalized (and thus untested code) begin added close to the OmniWeb 4.1 release. Of course, you're quite welcome to extend it yourself and submit changes back to us...  </STRONG>
I was having a look at this today, but it seems that OmniAppKit won't compile with the new Proejct Builder release:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>#define NSSTRINGIFY(name) @ ## '<font color = red>"' ## name ## '"</font>'
</font>[/code]
seems to barf:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
Widgets.subproj/OAAquaButton.m:<font color = blue>167</font>: illegal expression, found `@'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
Widgets.subproj/OAAquaButton.m:<font color = blue>167</font>: invalid identifier `@'
Widgets.subproj/OAAquaButton.m:<font color = blue>167</font>: `@' undeclared here (not in a function)
Widgets.subproj/OAAquaButton.m:<font color = blue>167</font>: parse error before character constant
</font>[/code]
|
|
PowerBook G4 17"
Power Mac G4/800, 1Gb RAM, 80Gb HDD, Superdrive, GeForce 4MX, Gateway 21" CRT, Apple Pro Speakers, iSub - Running Mac OS X Server 10.2
iBook 500, 192MbRAM - Running Mac OS X 10.2
iPod 5Gb
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
The NSSTRINGIFY problem only occurs if you're using the gcc3 compiler. Switch back to gcc 2.95 and you'll be fine.
Remember, you should only use the beta gcc3 compiler in the April tools for evaluation purposes, not for shipping code -- it's not just a good idea, it's stipulated by the License Agreement on the Developer Tools.
You can pretty easily work around the problem to get the Omni frameworks to build, though... just manually expand the NSSTRINGIFY macro in all the files that use it.
[edit: corrected myself about code releases to fix the problem]
[ 05-17-2002: Message edited by: Rickster ]
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Location: Glasgow
Status:
Offline
|
|
Hmmm...I thought you had to explicitly choose GCC3 in a build setting, which I didn't do. I wasn't intending to use GCC3, so I'll check that again.....
Fraser
|
|
PowerBook G4 17"
Power Mac G4/800, 1Gb RAM, 80Gb HDD, Superdrive, GeForce 4MX, Gateway 21" CRT, Apple Pro Speakers, iSub - Running Mac OS X Server 10.2
iBook 500, 192MbRAM - Running Mac OS X 10.2
iPod 5Gb
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|