yuna
06-08-2007, 11:19 AM
HI there,
<canvas>
<view id="FirstView">
<view id="First_1"/>
<view id="First_2"/>
<view id="First_3"/>
....
</view>
<view id="SecondView">
....
</view>
<view id="ThirdView">
....
</view>
<view id="FourthView">
<view id="Fourth_1"/>
<view id="Fourth_2"/>
<view id="Fourth_3">
// execute functions and display subviews of fourth_3 view
</view>
....
</view>
<view id="FifthView">
....
</view>
.....
</canvas>
var f = "Fourth"
var s = "3"
var seachView_name = f+"_"+s;
var mySearchView = canvas.searchSubviews("id", seachView_name);
"f" and "s" variables are unknown until user input them, and need to find the view and display after user select them.
In this case, it seems like searchSubviews will be good option,
however, the application is pretty big and searching subview from the canvas could be related with speed issue.
I know the name of view I am going to search (e,g, "Fourth_3" view in this case")
Is there any way I can convert the string to view object without using searchSubviews so that I can just use (searchView_name).somefunction() ?
Thank you!
<canvas>
<view id="FirstView">
<view id="First_1"/>
<view id="First_2"/>
<view id="First_3"/>
....
</view>
<view id="SecondView">
....
</view>
<view id="ThirdView">
....
</view>
<view id="FourthView">
<view id="Fourth_1"/>
<view id="Fourth_2"/>
<view id="Fourth_3">
// execute functions and display subviews of fourth_3 view
</view>
....
</view>
<view id="FifthView">
....
</view>
.....
</canvas>
var f = "Fourth"
var s = "3"
var seachView_name = f+"_"+s;
var mySearchView = canvas.searchSubviews("id", seachView_name);
"f" and "s" variables are unknown until user input them, and need to find the view and display after user select them.
In this case, it seems like searchSubviews will be good option,
however, the application is pretty big and searching subview from the canvas could be related with speed issue.
I know the name of view I am going to search (e,g, "Fourth_3" view in this case")
Is there any way I can convert the string to view object without using searchSubviews so that I can just use (searchView_name).somefunction() ?
Thank you!