![]() |
|
![]() | ||
|
Subject:
Flash Actionscript Debugging Help
Category: Computers > Software Asked by: g8z-ga List Price: $5.00 |
Posted:
19 Jan 2003 11:38 PST
Expires: 11 Feb 2003 12:08 PST Question ID: 145592 |
Hi, I have a class that looks like this: Connection = function( myForm ) { this.phpUrl; this.fields; } Connection.prototype.getFieldList = function( table ) { sender = new LoadVars(); loader = new LoadVars(); sender.table = table; sender.sendAndLoad(this.phpUrl, loader); loader.onLoad = this.parseLoadResult; } Connection.prototype.parseLoadResult = function( success ) { if (success) { this.fields = unescape(this); trace( this.fields ); // gives me correct trace results } } And I'm using the class in this way: c = new Connection(); c.phpUrl = "http://www.somedomain.com/php/somescript.php"; c.getFieldList( "test_table" ); trace( c.fields ); // this gives "undefined" In other words, when I call trace( this.fields ) inside of the parseLoadResult function, I get the correct value. However, when I try to access the fields variable of the Connection object 'c' (c.fields), I get an incorrect result. I'm fairly experienced at Flash Actionscripting, but I have never used the sendAndLoad method. I have used loadVariables in the past. I suspect some scoping issue that I can't see. Could you guide me in the right direction? |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Flash Actionscript Debugging Help
From: functionifelse-ga on 11 Feb 2003 01:55 PST |
Classes are prehaps the MOST confuzing thing ever to me. I mean i've read and read and then again read about them but i just cant get it through.. especialy this one.. in the c++ book it made a little more sense but i never really needed to use then.. i have always been happy with the way i do things... anyways.. i think the problem is this.. ensted of trace( c.fields ); make it c.trace(fields); i dunno.. try that or just figure another way to do it.. i belive object oriented programing is the worst idea since... ummmm something bad.. anyways :-P maybe that will help you out some.. but i think that will work... how do i get money.. is this real money? |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |