• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

14. Real-World Application > 14.6. Testing and Debugging

Testing and Debugging

With the first stages of the project completed and all parts in working order, the application should be tested. In the case of our ScriptRepository.as file, some built-in methods of the application and the objects used in the application make our life easier. We have defined toString( ) methods of the two main objects, and also a test( ) method to make sure that the object coming back from remote services has been cast to the correct datatype.

To use the toString( ) method, simply sprinkle the code with the following, substituting the object name:

trace(myObject.toString( ));

This can even be used in the init( ) method of your constructor to make sure your objects are being instantiated properly and at the right times:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint