Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[laszlo-dev] Expressions/Strings Conversion

All,

Nice to meet you. Long time listener, first time emailer. I'm no Laszlo expert, so apologies in advance if my solution is obvious. I'm working on some click/menu change functionality, where I have a level of primary navigation and secondary navigation that is dependent on what is clicked in the primary navigation. I'm trying to seperate it to the point where I'm not relaying on hardcoding view paths. So what I want to do is:

var secondaryNavPath = canvas.bottom_button_wrapper;

and then pass in an argument into a method

<method name="handleClick" args="pActive, pClicked">

so that I can simply call

var cellActive = pActive.name;
secondaryNavPath.cellActive.setAttribute("visible", false);


However, this currently does not work because the pCell attribute is currently a string, and can only be parsed into that statement (I'm assuming here) if it is an _expression_. My idea is to pass in both the current active cell and the cell that was clicked as arguments, and then handle the rollover and show the necessary secondary navigation. The ;ogic is that I don't want to have to hardcode any paths into the code. Anyone have any insight, or some code to convert string variables to expressions?

Nik

Back to the top