Dashcode -- How to use a static list as a menu


i writing iphone website , navigation menu want use static list. have searched everywhere , cant find on topic. have attached outline of website.

recap:

(1) want use static menu navigation menu.
(2) each entry should link view of stack layout.

dont care if dynamic or static static seemed obvious choice.


in advance,
adam
 

attached files:

just found way

hello adam!

i'm newcomer dashcode, , had same problem today.
well, did little hit , miss job through debug, ended following code:

code:
 function showoption(event){     // menu points static list comprises menu.     var menu  = dashcode.getdatasource("listmenu");       // idx points current rowindex (disabled multi selection).     var idx     = menu.__selectionindexes[0];     // "theoption" object array holds key/value pair (label/value).     // value set name of layer.     var theoption = menu.__content[idx][1];          newtransition = new transition(transition.none, 0.0, transition.ease_timing);     //change foreground of stack according theoption     document.getelementbyid("stacklayout").object.setcurrentviewwithtransition(theoption, newtransition, false); } 
for uglyness of code, feel not correct/best solution, had not time investigate "valueforkey' approach but, nonetheless, worked. set "onclick" method on listrowtemplate1 object.



hope helps!

best regards,

zago
 


Forums Macs Mac Apps and Mac App Store


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments