Flash / Flex Error # 1063 While fetching SharedObject

I have a parts app that is built on Flex 3 and I have a parts list problem. The parts list uses two objects:

  • Part
  • ArrayOfPart

I am caching the parts list locally in a SharedObject. This works great for a couple of months . I added a new Boolean property to the Part class and re-imported the web services (which did not affect anything) and now I can save the SharedObject ArrayOfPart, but when I try to get the SharedObject I get "ArgumentError: Error # 1063: Argument Count Mismatch on ArrayOfPart Expected 1, got 0 And then it completely deletes my SOL file.

(I used RegisterClass for Part and ArrayOfPart, so both are serializable for SharedObjects)

Here are the steps I followed to get the error:

Save Shared Object:

so = SharedObject.getLocal("PartsList");
so.data.AllParts = AllParts;
so.flush();

      

Check SharedObject:

  • SharedObject PartsList.sol exists where it should
  • I opened the SharedObject file and the ArrayOfPart data appears to be valid.

Restart the application and get the parts list from the SharedObject. This is the line that throws error # 1063 and causes the sol file to be deleted:

so = SharedObject.getLocal("PartsList");

      

Seems like the data cannot be well formed when stored in a SharedObject? Is it possible?

0


source to share


3 answers


I solved my problem.

ArrayOfPart had a constructor with a parameter. When I removed the constructor, the error was gone.



By the way, it was Flash 9.

+1


source


It looks hard.

I don't think this is a shaping or serialization issue. Maybe something else in your code writes to the shared object?

Is there a way to share my source? This would have helped as I personally did not have enough information to diagnose what was happening without looking at the rest of the code :(

Also....

Is there something else that writes or changes this shared object?



All my objects are created in AS3 or some of them in MXML (I noticed that the Flex compiler is not always good at MXML).

What version of Flash do I have?

Should its Flash 10 perform the same problem in Flash 9?

Does this happen in all browsers and all platforms?

0


source


Just a guess, but since I installed Flash Player 10, I see a lot of errors with shared objects when browsing. Could this be related to recently introduced sandbox / security restrictions?

0


source







All Articles