[swx] Problem saving swx returned object
Nederflash (Folkert Hielema)
info at nederflash.nl
Thu Apr 24 11:16:37 PDT 2008
Two things. First i do not see: _root.templateArrayTest defined
somewhere, while that is what you give the non working
updateTemplate(_root.templateArrayTest);
Maybe it's not there or a typo from othere tests or somekind.
Second, is swxContent a SWX actionscript api thing ? if not the
arguments you give: [args] should be JSON format.
If the last is the case you look at the archive from this list ;)
Hope i scanned your code well and it helps,
Folkert
http://nederflash.nl (With Dutch SWX documentation and articles).
Rob Slegtenhorst wrote:
> 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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
>
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.23.4/1395 - Release Date: 24-4-2008 7:24
More information about the swx
mailing list