Hello once again,
I'm writing a simple prototype Mapnik map editor in Shoes, which as-of-yet
has no Ruby bindings so I'm shelling out to re-render a map and re-loading
the redrawn image into Shoes (perhaps I will popen to Python some day soon).

Alas, Shoes seems to cache so eagerly! and without even checking the last
modified time_t, Shoes does a hash st_lookup, lazily so, and refuses to pick
up a new version of my image (oh no).

Some.other.day I would have patched the C code, but for the moment, my
workaround is thusly so:

class Image
  def reload
    self.path = "./" + path # reload hack, cache begone!
    self.hide.show
  end
end

For whatever reason, this still doesn't work without the self.hide.show on
my OS X Leopard build from git trunk, but with it, one can simply call
@img.reload for some Image @img and things will seem to work merrily (Take
that "Lift Off" Suzanne :) and yet hackily. (I suppose Shoes could also
expose a manual expire method, but tis late and I'll let others ponder such
thoughts.)

~L

Reply via email to