Using a popup as a template

I am trying to create a mechanism for clicking on different templates on a overall layout to trigger an event to open ONE popup window and pass some property of the template to the popup window so that the popup window template path behavior can be linked to the actual template that pulled up the popup.
I would also like to know how to make this work as the templates are all different sizes and I would like them to autoscale inside of the popup window.

I don’t get it - what does the template size have to do with opening a popup window?

Well… I’m not even there yet…I’m still trying to figure out how to indirectly link my template path to a property of my template.

For Event Handler…
The pass parameters option allows me to do what exactly?? I couldn’t find any info on this option. I think this is what I want to do

I would research the users manual. I’m not totally clear as to what your trying to do, but looking into the “indirect bindings” and “parameterized windows” will probably help you out. … ndings.htm … indows.htm

You were able to post before me :smiley: . Check out the second link in my previous post, it explains how passing parameters work, there is a brief example as well.

I figured out the event handler parameters pass… I need to make sure that the window I pass to and from both have a parameter with the same name, right?
Now, I can’t get the template path to work indirectly…I’ve tried this;

If I have my templates in a folder,
How can I link the path indirectly to the template parameter name?

Does this only work for templates that are in the root template directory?
can we pass folder/indirectpath?

Bear with us. We have been working on this, trying to see if there is a solution to what you are trying to do.

So you can try putting a script like this on your master template:

[code]comp = event.source.getParent()
path =
while(comp.getParent().name != “Root Container” and comp.getParent() is not None):
comp = comp.getParent()
path = + “.” + path

path = “Root Container.” + path
parentWindow = system.gui.getParentWindow(event).name

system.nav.openWindow(“popup”, {“comp_path”:path,“window_path”:parentWindow})[/code]

Then from your popup window you would do something like this once you know what you want to write back to the template property:

value = event.source.parent.getComponent('Numeric Text Field').intValue window = system.gui.getWindow(event.source.parent.window_path) window.getComponentForPath(event.source.parent.comp_path).my_property = value

The first script would go on your mouseClicked event of your master template.
It builds the path to the template instance by traversing back up the component tree and then
passes this path along with the containing window path to the popup window.
The second script would go on your “Accept” button in your popup window. It takes the value
selected in the popup window and then sets the appropriate template property on the appropriate
template instance.

Let me know if you need any more clarification.