Sunday, January 21, 2018

#1 2010-07-01 11:34:53 am

Penna_ha
Member
Registered: 2009-10-02
Posts: 29

Nested tab views

So I had a tab view functioning well, accessing a text field like this:

Applescript:


set string value of text field "showPath" of box "box" of tab view item "Tab1" of tab view "myTab" of window "main" to whatever

and I decided to create another tab view and put all of my stuff inside that. so I name my new tab view "myOuterTab" and the tab view item to "OuterTab1"

my logic tells me I should now be able to access my text field like tis:

Applescript:


set string value of text field "showPath" of box "box" of tab view item "Tab1" of tab view "myTab" of tab view item "OuterTab1" of tab view "myOuterTab" of window "main" to whatever

but all I get when trying to run this is

"Applescript error: The specified object is a property, not an element"


Any thoughts? i'm lost here :'(

Last edited by Penna_ha (2010-07-01 11:36:45 am)

Offline

 

#2 2010-07-27 10:51:47 am

ief2
Member
Registered: 2010-07-23
Posts: 66
Website

Re: Nested tab views

Hello,
first reply since I got banned. Hope it's helpful.

There is indeed a little bug in ASS. Nested tab views have to be referenced with there superviews. So you have to tell the tab view item of tab view 1 to tell the view of it to tell the new tab view something

Example:

Applescript:

on clicked theObject
   set string value of text field 1 of ¬
       tab view item 1 of tab view 1 of ¬
       view 1 of tab view item 1 of tab view 1 of ¬
       window 1 to "Hello World"
   
   -- set string value of TEXT FIELD of ¬
   -- TAB VIEW 2 of ¬
   -- TAB VIEW 1 of ¬
   -- MAIN WINDOW
end clicked

Hope it helps,
ief2


Find your magical software at www.wizardsoftware.tk.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)