Topic: swfupload-problem within classes

Hi there,

because of our framework-architecture I have to put all methods into a class.
I tried two different register-methods:

#1)
getObjectclass()->getXajax()->register(XAJAX_FUNCTION, array("uploader",      self::$instance, "uploader"), array("mode" => "'SWFupload'","SWFform" => "'upload_form'"));

or

getObjectclass()->getXajax()->register(XAJAX_FUNCTION, new xajaxUserFunction(array("uploader", &$this, "uploader")),array("mode" => "'SWFupload'","SWFform" => "'upload_form'"));



#2)
getObjectclass()->getXajax()->register(XAJAX_FUNCTION, array("uploader",      self::$instance, "uploader"));


#1 seems to be the right syntax for me and the scripts works well (upload-field dissapears, progressbar pops up and fades out after transfer is complete)... even the "uploader"-method is called and produces no errors.... BUT this line doesn't change anything on the screen: $objResponse->append("results","innerHTML",$html); ....this should inform the user about finished uploads....
The "$_FILES" object is OK, everything is transmitted.


#2 is an incorrect register-call but with this syntax the "$objResponse->append[...]"-call updates the DIV.... unfortunately the progressbar doesn't work and the $_FILES-object is empty....

Two ways, different problems... no solution :-(

Is the syntax of #1 correct? I also noticed several constructor calls... maybe the uploader-method runs within a different instance and can't access the DIV??

Thanx in advance

Kind regards
Marcus

Re: swfupload-problem within classes

Ok, problem solved via IRC....


If anyone else is experiencing such odd behaviour, make sure that you use the SVN rev provided with the SWFupload zip file. The plugin depends on the newest xajax core changes to work.