FROM : [nexUmoja] Fabian Jäger
DATE : Tue Nov 20 23:59:38 2007
Unfortunately it does not work for me. I checked with a completely
new project and my code from below... again I only get kind of local
coordinates and not screen coordinates :-(
Do I need any additional includes?
Fabian
nexUmoja.org
On 20.11.2007, at 23:34, Joachim Deelen wrote:
> As far as I can see the only difference between your and my code is
> that I'm using a fixed length of the StatusItem instead of the
> NSVariableStatusItemLength.
>
> --
> Joachim
>
> Am 20.11.2007 um 23:03 schrieb [nexUmoja] Fabian Jäger:
>
>> Now I use this code:
>>
>> // instantiate statusbar-icon
>> NSStatusBar *systemBar = [NSStatusBar systemStatusBar];
>> theItem = [systemBar statusItemWithLength:
>> NSVariableStatusItemLength];
>> [theItem retain];
>>
>> NSView *tmpView = [[NSView alloc] initWithFrame:NSMakeRect(0.0,
>> 0.0, [theItem length], [[theItem statusBar] thickness])];
>> [theItem setView:tmpView];
>>
>> NSRect globalOrigin = [[[theItem view] window] frame];
>> NSLog(@"%f/%f", globalOrigin.origin.x, globalOrigin.origin.y);
>>
>> [theItem setView:nil];
>> [tmpView release];
>>
>> The output is: "0.000000/0.000000" ... don't really know what's
>> wrong with the code :-(
>>
>> Fabian
>> nexUmoja.org
DATE : Tue Nov 20 23:59:38 2007
Unfortunately it does not work for me. I checked with a completely
new project and my code from below... again I only get kind of local
coordinates and not screen coordinates :-(
Do I need any additional includes?
Fabian
nexUmoja.org
On 20.11.2007, at 23:34, Joachim Deelen wrote:
> As far as I can see the only difference between your and my code is
> that I'm using a fixed length of the StatusItem instead of the
> NSVariableStatusItemLength.
>
> --
> Joachim
>
> Am 20.11.2007 um 23:03 schrieb [nexUmoja] Fabian Jäger:
>
>> Now I use this code:
>>
>> // instantiate statusbar-icon
>> NSStatusBar *systemBar = [NSStatusBar systemStatusBar];
>> theItem = [systemBar statusItemWithLength:
>> NSVariableStatusItemLength];
>> [theItem retain];
>>
>> NSView *tmpView = [[NSView alloc] initWithFrame:NSMakeRect(0.0,
>> 0.0, [theItem length], [[theItem statusBar] thickness])];
>> [theItem setView:tmpView];
>>
>> NSRect globalOrigin = [[[theItem view] window] frame];
>> NSLog(@"%f/%f", globalOrigin.origin.x, globalOrigin.origin.y);
>>
>> [theItem setView:nil];
>> [tmpView release];
>>
>> The output is: "0.000000/0.000000" ... don't really know what's
>> wrong with the code :-(
>>
>> Fabian
>> nexUmoja.org
| Related mails | Author | Date |
|---|---|---|
| [nexUmoja] Fabian… | Nov 19, 23:14 | |
| Joachim Deelen | Nov 20, 22:11 | |
| Joachim Deelen | Nov 20, 22:57 | |
| [nexUmoja] Fabian… | Nov 20, 23:03 | |
| Joachim Deelen | Nov 20, 23:34 | |
| [nexUmoja] Fabian… | Nov 20, 23:59 | |
| Peter Maurer | Nov 22, 09:09 | |
| [nexUmoja] Fabian… | Nov 22, 11:37 | |
| Joachim Deelen | Nov 23, 23:26 | |
| [nexUmoja] Fabian… | Nov 24, 03:18 |






Cocoa mail archive

