Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
juvenille •->

Anmeldedatum: 27.04.2006 Beiträge: 3
|
Verfasst am: 13.07.2006 - 10:04 Titel: Syntax does not work |
|
|
I hope you can help me? I have a problem since 2 days with a syntax that does not work. I will describe you my problem.
I have a definition bar (NSView (name=box#)) which contains different objects (2 NSPopUpButtons and 1 NSTextField). This definition bar is a component of the NSTabViewItem (name=bletab_delete) which is in turn a component of the NSTabView (name=bletab). Now, when I address one of these objects (here PopUpButton) inside the NSView I use the following syntax e.g.:
set showProperty to title of popup button "Property" of view "box1" of tab view item "bletab_delete" of tab view "bletab" of window "main"
When I run the code, the following error message appears. I know it's not so much information:
NSReceiverEvaluationScriptError: 4 (1)
The problem seems to be the addressing of the view "box1". I can address PopUpButtons in NSTabView's without problems as long as their aren't part of a NSView (box#). Concurrently I can address NSView's which aren't a component (inside of) of a NSTabView.
Wer das Problem erkennt, bitte bitte antworten!! Könnt auch auf Deutsch antworten. |
|
Nach oben |
|
 |
ShooTerKo •--->


Anmeldedatum: 21.03.2006 Beiträge: 221 Wohnort: Hamburg
|
Verfasst am: 13.07.2006 - 17:34 Titel: |
|
|
Hm!
Wirklich ganz schön holprig, an den Wert heranzukommen
Habe mir da eben ein bisschen was gebastelt, um an die Namen der Items heranzukommen. Dafür habe ich neben dem Popupbutton einen ganz normalen Button gesetzt. Gut für die Standortbestimmung dieses Buttons ist im clicked-Handler ein Das Ergebnis konnte ich jedoch nicht direkt ins Script kopieren . Es funzte nicht! Also folgendes probiert: Code: | on clicked theObject
-- ? im Browser durch das Ungleichzeichen ersetzen!
set allWindows to (get name of every window)
log "Windows:"
log allWindows
repeat with aWindow in allWindows
if aWindow ? missing value then
set allTabViews to (get name of every tab view of window aWindow)
log "Tab Views:"
log allTabViews
repeat with aTabView in allTabViews
if aTabView ? missing value then
set allTabViewItems to (get name of every tab view item of tab view aTabView of window aWindow)
log "Tab View Items:"
log allTabViewItems
repeat with aTabViewItem in allTabViewItems
if aTabViewItem ? missing value then
set allBoxes to (get name of every box of tab view item aTabViewItem of tab view aTabView of window aWindow)
log "Boxes:"
log allBoxes
repeat with aBox in allBoxes
if aBox ? missing value then
set allPopUpButtons to (get name of every popup button of box aBox of tab view item aTabViewItem of tab view aTabView of window aWindow)
log "Popupbuttons:"
log allPopUpButtons
repeat with aPopupButton in allPopUpButtons
if aPopupButton ? missing value then
log "Popuptitles:"
log (get title of popup button aPopupButton of box aBox of tab view item aTabViewItem of tab view aTabView of window aWindow)
end if
end repeat
end if
end repeat
end if
end repeat
end if
end repeat
end if
end repeat
end clicked | Das geht dann einfach die komplette Hierarchie durch und schreibt die gefundenen Namen ins Log. Damit ging es dann.
Lange Rede, schwacher Sinn: Es läuft bei mir auf diese Zeile hinaus: Code: | set showProperty to (get title of popup button "Property" of box "Box1" of tab view item "bletab_delete" of tab view "bletab" of window "main")
|
Viele Grüße,
ShooTerKo |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche Übersetzung von phpBB.de
|
|
|