• Das kreative Thema des Monats Oktober wird vor allem diejenigen unter Euch besonders ansprechen, denen Do-it-yourself quasi im Blut liegt. Zeigt uns Eure Improvisationskünste oder fotografiert, was andere Leute sich so im Alltag zusammengestrickt haben. --> Zum Mitmachen bitte hier klicken

Status Bar Programm (onklick icon)

Mini-Leopard

Rhode Island Greening
Registriert
20.03.08
Beiträge
476
Liebe Community!

Ich programmiere gerade an einem Status Bar Programm.
An sich funktioniert das ganz gut.

Jetzt versuche ich allerdings nicht die Funktionalität einzubauen, dass eine bestimmte Aktion ausgeführt wird, wenn ich auf das Icon vom Programm klicke.
Folgendes habe ich schon ausprobiert:
Code:
[COLOR=#3f217c][COLOR=#4b8186]statusItem[/COLOR][COLOR=#000000] = [[[[/COLOR][COLOR=#7340a3]NSStatusBar[/COLOR][COLOR=#000000] [/COLOR]systemStatusBar[COLOR=#000000]] [/COLOR]statusItemWithLength[COLOR=#000000]:[/COLOR][COLOR=#7a482f]NSVariableStatusItemLength[/COLOR][COLOR=#000000]] [/COLOR]retain[COLOR=#000000]];[/COLOR][/COLOR]
[COLOR=#3f217c][COLOR=#000000][[/COLOR][COLOR=#4b8186]statusItem[/COLOR][COLOR=#000000] [/COLOR]setHighlightMode[COLOR=#000000]:[/COLOR][COLOR=#bf2e9d]YES[/COLOR][COLOR=#000000]];[/COLOR][/COLOR]
[COLOR=#4b8186][COLOR=#000000][[/COLOR]statusItem[COLOR=#000000] [/COLOR][COLOR=#3f217c]setMenu[/COLOR][COLOR=#000000]:[/COLOR]theMenu[COLOR=#000000]];[/COLOR][/COLOR]
[[COLOR=#4b8186]theMenu[/COLOR] [COLOR=#3f217c]setAction[/COLOR]:[COLOR=#bf2e9d]@selector[/COLOR](update:)];

Leider wird die Aktion einfach nicht ausgeführt!!

Kann mir da vielleicht jemand helfen?
Vielen Dank
LG
…