This content has been marked as final. Show 16 replies
If this helps, i ran in debug mode and the error is stemming from the ActionScript file and this particular line:
if (obj.data.elements("error").length() > 0)
toret.isError = true;
toret.data = obj.data;
If i run the php manually, it returns data so I know it can access the database. Not good coding by the way as anyone could then delete entries from my database or update without permission. Adobe should fix this.
ok, I might have the reason but not the solution. It appears to be returning malformed xml:
Notice no open <date> but only a <date/>
Something wrong in the flex3 code it seems. Does this make sense or am i missing something?
Odd thing is that the same xml works find when run locally on my local machine.
The thing here could be that you have entered in the Host URL: text field localhost therefor when running the application on the online server the mysql server isn't found. Try using the IP address instead of localhost.
Thanks for the suggestion but I have already tried the ip address, domain name and localhost. https://devel.gardenfreshcorp.com/test/Grid.php?orderField=category&orderValue=ASC&method =FindAll
that is the script that it uses and it works.
XML data which has been pasted was that the copy from console of flex builder in debug mode??
I too had such situation .. Flex Builder truncates the display .. So dont believe that ..
While working with embedded databases i too encountered property name not found .
The problem is coz its a event based architetcure , until creation complete event is fired u should not use the object ..
So one has to properly place the codes in the eventHandlers ,,
for example here in ur example i am finding fill() being called but no guarantee the previous event has completed ..
When i went through this i found out that flash does not support multithreading ..
So here what i think is when pgm called addeventlistener listener was added ..
n control returned n fill() takes the control .. n the event may never fire !!
SO just try putting some buttons n structure the code within the handlers of these .. i think that should work
hello I just made a data accessor project and then when I try to make another one there is an error on flex builder and ask for leave the builder and when I say NO nothing happens.... May I create only one data accessor? I have tested this on mac and windows beta versions
mreine -- are you still experiencing problems? Can you give us the specific exception that's being thrown by the AS code?
Looking at some the specifics in your posts...
1. If the problem is coming from the line 'if (obj.data.elements("error").length() > 0)', this suggests there was an error on the server. A proxy tool may be helpful in debugging this, to see if the request being sent it correct, etc.
2. <date/> is valid XML; it means the same thing as <date></date>
3. You mention some security concerns about the generated PHP. The basic generated code does not include user authentication -- it's just a scaffolding for you to build upon. You'd have to add authentication to your web app on your own. I will see if we can add a comment into the generated code to remind people of this.
Thanks for the feedback, and I hope you're having better luck now!
metaclark -- what did the error message say? Can you file a bug about this problem? Please attach your Eclipse log file (found at [your workspace]/.metadata/.log) to help us understand your problem.
Could you verify and make sure that the test machine has access to your mysql server? and try again to reproduce the problem?
I can connect to mysql find on this machine. I have several other flex apps that I created and they use the same database, same login, same pass and they work fine on this same machine.
Only the auto generated code from flex3 does not work. It works when connecting to the database remotely but not when I copy the code to the machine. I can run the php pages and they connect and generate xml correctly. Error is here:
one of the php pages it is running is here:
Tryit and see. You can see that the database connection is working and the xml data is being returned.
The application works fine on my local system which is the strange thing and all of my flex2 apps work fine.
The mysql server is on the test machine and yes, my other flex2 apps work fine with same username, pass, database, data.
Error message can be seen here:
ReferenceError: Error #1069: Property data not found on String and there is no default value.
at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::resultHandler()
http://localhost/xampp/test3/bin/grid.html I can run the app locally but connect to the remote mysql server fine.
https://devel.gardenfreshcorp.com/test/screenshot.jpg (running locally but connecting to devel mysql)
https://devel.gardenfreshcorp.com/test/screenshot1.jpg (error box when running on devel server)
https://devel.gardenfreshcorp.com/test/screenshot2.jpg (app running on devel server but after error message and no data pulled in)
https://devel.gardenfreshcorp.com/test/screenshot3.jpg (php page on devel that flex3 app uses and it returns correct xml and connects to mysql fine)
The error seems to indicate that you're getting a malformed response back from the server. There are two ways you can try to debug what that response is:
1. Launch the SWF in Debug mode using Flex Builder. The first line of deserialize() -- "trace(ObjectUtil.toString(obj));" -- should print the server's response to the console.
2. Use a proxy tool such as Fiddler ( http://www.fiddlertool.com) to monitor all the traffic between your SWF and the server. This way you can also examine the HTTP request for problems.
Let us know if this helps at all.