Shared Objects Problem on handheld device
I'm wrapping a project for our maintenance department that will allow them to collect information about tasks performed (mowing, watering, etc) on a handheld device. When reconnected at a PC, the application uploads an xml object (saved as a shared object) to our webserver for processing.
Everything works great when the application is tested with the handheld connected to the PC. However, calls to write to a shared object while the handheld is disconnected are ignored or don't run (no error or anything appears in the flash movie). Is this is a limitation of the sharedObject function, or is it related to the device(dell axim x51/30) itself?
Here is the code that I use to save an entry to the object:
uploadXML = SharedObject.getLocal("uploadXML");//from file on pda
uploadXML_xml = uploadXML.data.uploadXML_xml;
savedWork = uploadXML_xml.createElement("savedTask");
uploadXML_xml.firstChild.appendChild(savedWork);
uploadXML_xml.firstChild.lastChild.attributes.work Date = taskDate;
uploadXML_xml.firstChild.lastChild.attributes.star tTime = startTime;
uploadXML_xml.firstChild.lastChild.attributes.endT ime = endTime;
uploadXML_xml.firstChild.lastChild.attributes.task Completed = taskCompleted;
uploadXML_xml.firstChild.lastChild.attributes.trav elTime = travelTime;
uploadXML_xml.firstChild.lastChild.attributes.task ID = jobID;
uploadXML_xml.firstChild.lastChild.attributes.rout eNumber = routeNumber;
uploadXML_xml.firstChild.lastChild.attributes.prop ID = propNum;
uploadXML_xml.firstChild.lastChild.attributes.empn um = empID;
uploadXML.data.uploadXML_xml = uploadXML_xml;
uploadXML.flush();
Again, this works without a hitch if the handheld is connected to the PC, so I'm at a loss as to why no connection=no writing to object. Any help would be greatly appreciated!
Ethan
|