|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Since I have different kinds of return values from my remoting objects, in order to fully utilize the values, I decide to use Global variables to handle the returned result but....
_global.getName = ""; function getName_result(theResult) { _global.getName = theResult; } categoryMgr.getName(-1); trace(_global.getName); My NetDebugger has detected that I had received the value "ABC" by the method getName. But _global.getName does not contain any variable at last; What is the problem?
__________________
------------------------------------------ Perl Kids Kiss Perl Stanley ------------------------------------------ |
|
#2
|
|||
|
|||
|
I think that after declaring a variable in the _global scope, you need only call it by name after that
Code:
_global.getName = "";
function getName_result(theResult)
{
getName = theResult;
}
categoryMgr.getName(-1);
trace(getName);
? |
|
#3
|
||||
|
||||
|
Thanks for your response.
No, your suggestion does not work. Let me show another case so that we can understand this problem more; _global.getListByParent = new Array(); function getListByParent_result(theResult) { _global.getListByParent = new Array(); for (var idx in theResult) { _global.getListByParent.push(theResult[idx]); } trace("Inside Function Length: " + _global.getListByParent.length); } categoryMgr.getListByParent(-1); trace("Outside Function Length: " + _global.getListByParent.length); Output: Inside Function Length: 2 Outside Function Length: 0 Can you recognize the problem? Please advise. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Global Variable for AMFPHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|