The code sample in that section:
("Passing data using events") works for me without compiler or runtime error.
It is accessed that way that:
- PopUpManager creates overlying window (component) which is casted to ArrayEntryFormEvents class.
- because in ArrayEntryFormEvents instances of components in .mxml are named - including "cancelButton" they could be directly accessed via dot based syntax e.g. that way with re-assign:
var cancelButton:Button = pop1.cancelButton;
or directly as in sample:
The main application is owner of pop1 instance so it has no problem with accessing "cancelButton" - as it is available directly for dot based syntax being public variable of ArrayEntryFormEvents,
thanks for your response.
This is my code in the main app mxml
private function showAddAuthorWindow():void
authorPopup = new AddAuthorWindow;
PopUpManager.addPopUp(authorPopup, this, true);
private function buttonClicked():void
Maybe my problem is that this is not a default button, but one that I added to the popup. Could that be it?
I'm trying to control all the actions of the titlewindow from the main application. I am loading data into a list box in the custom component, etc, etc. I figured I had a lot of code in the titlewindow.mxml that shouldn't be localized there. And I'm way too new at this stuff to be utilizing long winded class files just yet.
Can I load data into a custom control, select, delete, and update data in a custom control through code written primarily in the mainApp.as file?