[swx] Problem saving swx returned object

Rob Slegtenhorst rob_slegtenhorst at hotmail.com
Thu Apr 24 08:53:10 PDT 2008


Hey guys,

 

I have a weird little problem.. I'm trying to save an object returned from
swx, but getting nowhere.. below the AS and PHP, any help is greatly
appreciated.

 

(second mail btw.. sent the last one with the wrong mail account)

 

 

// AS 

 

_root.templateArray = new Object;

_root.templateArray2 = new Object;

 

function loadTemplate(template_id:String):Void {

                var saveTemplateCallDetails:Object = {

                               serviceClass:"TemplateController",

                               method:"getTemplateDetails",

                               args:[template_id],

                               progress:[this, progressHandler], 

                               fault:[this, faultHandler], 

                               timeout:[this, timeoutHandler], 

                               result:[this, loadTemplateResultHandler]

                };

                swxContent.call(saveTemplateCallDetails);

}

 

function loadTemplateResultHandler(resultObj:Object):Void {

                _root.templateArray = resultObj.result;

                updateTemplate(_root.templateArrayTest);

}

 

// everything up to here works, and I get a nice object entered in
_root.templateArray. Below is where the problem occurs.

//

// the object looks like this:

//

// _root.templateArray

//            _root.templateArray.month_font

//                           _root.templateArray.month_font.id

//                           _root.templateArray.month_font.font

//                           _root.templateArray.month_font.size

//            _root.templateArray.week_font

//                           _root.templateArray.month_font.id

//                           _root.templateArray.month_font.font

//                           _root.templateArray.month_font.size

//

// etc.

 

function updateTemplate(post:Object):Void {

                var saveTemplateCallDetails:Object = {

                               serviceClass:"TemplateController",

                               method:"saveTemplateDetails",

                               args:[post],

                               progress:[this, progressHandler], 

                               fault:[this, faultHandler], 

                               timeout:[this, timeoutHandler], 

                               result:[this, updateTemplateResultHandler]

                };

                swxContent.call(saveTemplateCallDetails);

}

 

function updateTemplateResultHandler(resultObj:Object):Void {

                templateArray2 = resultObj.result;

}

 

php:

 

nothing spectacular here, just return the object.

 

                Function saveTemplateDetails($aTemplate)      {

                               

                               return $aTemplate;

                               

                }

 

this functions returns null...

 

thanks again for any help.

 

Rob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20080424/24178976/attachment.html 


More information about the swx mailing list