If you always create a new object nothing should be left in any
registry ;)

--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";);
var wrapper = new qx.ui.container.Composite();
wrapper.setLayout(new qx.ui.layout.HBox());
wrapper.add(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(wrapper,
{
  left : 200,
  top : 50
});

// Add an event listener
button1.addListener("execute", function(e) {
  
  if(image==null){
    image = new
qx.ui.basic.Image("http://www.catify.com/demo/images/ftp.png";);
    wrapper.add(image);
  } else {
    wrapper.remove(image);
    image = null;    
  }
}, this);
--snip--

Am Mittwoch, den 08.09.2010, 13:14 +0200 schrieb Stefan Andersson:
> It seems that the image registry knows about the image already and
> uses that!
> 
> Why doesn't resetResource() then work? Or does reset here mean that it
> fails back in cases to the last successfully loaded image?
> 
> There is not a function called zeroResource()
> but using:
> 
> setSource("");
> or
> setSource(null)
> 
> has no effect....
> image registry seems to know the image from before....i.e. it is
> buffered!
> 
> How can I clean it out of the image registry or force the resource
> loader to pull a new image, though it is the same name and path?
> 
> 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


-- 
claus straube

phone   +49-89-1265-3103
mobile  +49-176-49673717
skype   clausstraube
web     http://www.catify.com
office  room 1.122, heßstr. 89, 80797 munich


------------------------------------------------------------------------------
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