I am trying to save settings to an XML File and setting the relevant data if the check box is checked or not.
private static function createXMLData():void
{
prefsXML = <preferences/>;
prefsXML.application.@windowsstart = Application.application.SettingsPage.settingWindowsStart.selected;
prefsXML.application.@mintosystray = Application.application.SettingsPage.settingMinToSysTray.selected;
//prefsXML.windowState.@x = stage.nativeWindow.x;
//prefsXML.windowState.@y = stage.nativeWindow.y;
prefsXML.saveDate = new Date().toString();
}
However when i run it, there is no values set on the check boxes due to the first time running and therefore i get an error.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
well i assume that is what the error means, it cannot get details of something that is not set yet.. so how would i get it to check and if nothing then it is obviously a "false".
Thank you.