Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 12:32
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  V2 Components (Flash MX 2004 - Flash 8) (Moderators: vesa kortelainen, Ronald Wernecke, Jorge Solis, ..:: Mazhar Hasan ::.., papachan)
| | |-+  ACCESSING components inside a window!
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: ACCESSING components inside a window!  (Read 2705 times)
Aldo Herrera
Jr. Programmer
**
Posts: 96



View Profile WWW
« on: 07/26/04, 17:09 »

Hi all:

I opened a window using the next code:


searchced_listener = new Object();
searchced_listener.handleEvent = function(evt) {
   SearchWindow = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {title:"Busqueda de Estudiantes", contentPath:"mc_buscarced", closeButton:true});
   SearchWindow.setSize(500, 500);
   SearchWindow.addEventListener("click", winevtobj);
   SearchWindow.content.M12CAR.text = "[Escriba su busqueda aqui]"
};
searchced_btn.addEventListener("click", searchced_listener);



I would like that when i open the window, a textinput called M12CAR have the text of "[Escriba su busqueda aqui]"

Also?? how do i refer to the cell that i select in a datagrid called M12ARC inside the window??

i

Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 07/26/04, 17:31 »

Since you can acces a window using paths, is allways more simple to just build some MC, give a linkage name in the library and use as the content path of your window. Then you can script inside this MC all what you need instead of deal with longs path from outside.

Jorge
Logged

Aldo Herrera
Jr. Programmer
**
Posts: 96



View Profile WWW
« Reply #2 on: 07/26/04, 18:50 »

Yes, that's true:


But how do i pass for example a value that i select in a datagrid to the place where i call my window.

For example in a Search window? I have the datagrid with all the posible values to choose from. And i need to select one, and pass that value to a textimput in the place where i call the window!?
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #3 on: 07/27/04, 01:34 »

Usually you have a reference to your window, i.e:

myWindow = mx.managers.PopUpManager.createPopUp( .....

And then use to pass values. I.e capturing a cell value

[script]
listener = {}
listener.ref = this
listener.cellPress = function(evt){
 this.ref.myWindow.content.searchValue = myGrid.getItemAt(evt.itemIndex).searchValue
}
myGrid.addEventListener("cellPress", listener)
[/script]

Replace searchValue with the name of your column.

Jorge
Logged

Chaz W
Server what's that
*
Posts: 37



View Profile WWW Email
« Reply #4 on: 07/27/04, 07:50 »

Jorge,

Thanks for your reply on my thread about the column size.

I need help with my window component, I have the window component popup, I can assign selections to the comboboxes when I select a value from the comboboxes the value do not display, and I can not get the datagrid to display.

I have a sample of this if you would like to see it, how do I get it to you?

Thanks

Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #5 on: 07/27/04, 13:44 »

Open a new thread.

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything