Hi Stefan,

have you tried to save an other image as dummy? Like this:

--snip--
// Create a button
var button1 = new qx.ui.form.Button("Change Image");
var image = new
qx.ui.basic.Image("http://www.catify.com/demo/images/ftp.png";);


// Document is the application root
var doc = this.getRoot();

// Add button to document at fixed coordinates
doc.add(button1,
{
  left : 100,
  top  : 50
});

doc.add(image,
        {
          left : 200,
          top : 50
        });

// Add an event listener
button1.addListener("execute", function(e) {
  
  if(image.getSource()==null){
    image.resetSource();
    image.setSource("http://www.catify.com/demo/images/ftp.png";);
    this.debug("image source was null and is --> " + image.getSource());
  } else {
    image.resetSource();
    image.setSource("http://www.catify.com/demo/images/dummy.png";);
    this.debug("image source was not null and is --> " +
image.getSource());
    image.resetSource();
  }
}, this);
--snip--

Best regards - Claus

Am Mittwoch, den 08.09.2010, 12:53 +0200 schrieb Stefan Andersson:
> // Create a button
> var button1 = new qx.ui.form.Button("Change Image");
> var image = new
>     qx.ui.basic.Image();
> 
> 
> // Document is the application root
> var doc = this.getRoot();
> 
> // Add button to document at fixed coordinates
> doc.add(button1,
> {
>   left : 100,
>   top  : 50
> });
> 
> doc.add(image,
>         {
>           left : 200,
>           top : 50
>         });
> 
> // Add an event listener
> button1.addListener("execute", function(e) {
>   image.resetSource();
>   // Same source URL, but delivering DIFFERENT images!!!
>   image.setSource("http://www.qooxdoo.org/image.png";);
> }, this);
> 
> 
> -----------
> Look at the code above, 
> 
> Stefan
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
> 
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________ qooxdoo-devel mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to