Hockey13
12-25-2008, 11:13 PM
Hello everyone. I suspect this is a relatively simple problem, but I can't figure out what is going on. Here's the scenario:
- I have a simple TabNavigator with three tabs: Home, Transactions, Positions
- Home is empty, Transactions and Positions each have a ModuleLoader that call separate modules. Each module is relatively complex and contains multiple components, custom components, and functions, both public and private.
- When a tab is clicked, this code is run:
private function loadTranModule():void {
if (mainnavigator.selectedIndex == 1) {
if (tranloader.url != "modules/MainTransactionsModule.swf") {
tranloader.url = "modules/MainTransactionsModule.swf";
tranloader.loadModule();
return;
} else {
return;
}
} else if (mainnavigator.selectedIndex == 2) {
if (posloader.url != "modules/MainPositionsModule.swf") {
posloader.url = "modules/MainPositionsModule.swf";
posloader.loadModule();
return;
} else {
return;
}
}
}
Now here's the problem:
When I load the transactions module, it works fine. However, if I load the positions module after the transactions module is already loaded, many of the functions simply do not work. If I load the positions module first, all functions work perfectly, but then if I load the transactions module after that, many of the functions in the transactions module don't work.
For example, I have a pie chart in the positions module. If I load the positions module first, you can hover over individual slices and it pops up the DataTips. If I open the transactions module first and the positions module second, you can only see the DataTips if you click the slices of the pie.
Another example: if I load the positions module first and then the transactions module, a function I have that calls an HTTPService object doesn't fire.
Can somebody please help? :confused:
EDIT:
Other examples that may help you in your quest to help me:
- ComboBoxes don't drop down when clicked in the second-loaded module.
- DateChoosers don't pop up with the calendar when selected in a DateField.
- Individual rows in DataGrids are selectable, but selecting the column headers does nothing (normally sorts by that column)
- Mouse hover events seem not to be firing, though click events seem to be firing at times.
- States aren't changing properly.
For reference, all of these things function perfectly when the module is loaded first in the application, but fail when it is loaded second.
- I have a simple TabNavigator with three tabs: Home, Transactions, Positions
- Home is empty, Transactions and Positions each have a ModuleLoader that call separate modules. Each module is relatively complex and contains multiple components, custom components, and functions, both public and private.
- When a tab is clicked, this code is run:
private function loadTranModule():void {
if (mainnavigator.selectedIndex == 1) {
if (tranloader.url != "modules/MainTransactionsModule.swf") {
tranloader.url = "modules/MainTransactionsModule.swf";
tranloader.loadModule();
return;
} else {
return;
}
} else if (mainnavigator.selectedIndex == 2) {
if (posloader.url != "modules/MainPositionsModule.swf") {
posloader.url = "modules/MainPositionsModule.swf";
posloader.loadModule();
return;
} else {
return;
}
}
}
Now here's the problem:
When I load the transactions module, it works fine. However, if I load the positions module after the transactions module is already loaded, many of the functions simply do not work. If I load the positions module first, all functions work perfectly, but then if I load the transactions module after that, many of the functions in the transactions module don't work.
For example, I have a pie chart in the positions module. If I load the positions module first, you can hover over individual slices and it pops up the DataTips. If I open the transactions module first and the positions module second, you can only see the DataTips if you click the slices of the pie.
Another example: if I load the positions module first and then the transactions module, a function I have that calls an HTTPService object doesn't fire.
Can somebody please help? :confused:
EDIT:
Other examples that may help you in your quest to help me:
- ComboBoxes don't drop down when clicked in the second-loaded module.
- DateChoosers don't pop up with the calendar when selected in a DateField.
- Individual rows in DataGrids are selectable, but selecting the column headers does nothing (normally sorts by that column)
- Mouse hover events seem not to be firing, though click events seem to be firing at times.
- States aren't changing properly.
For reference, all of these things function perfectly when the module is loaded first in the application, but fail when it is loaded second.