Re: ogre bug

Yann LeCun <[email protected]> Thu, 30 Nov 2006 15:24:31 -0500
Newsgroups gmane.lisp.lush.devel
Organization Courant Institute, NYU
Message-ID <[email protected]>
That's not an ogre bug. You could call it a bug, but it's really
caused by the interaction of two somewhat incompatible mechanisms:
ogre and new-window (and a variable name capture due to Lush's dynamic
binding). There is an easy workaround.

(new window) sets the the value of the symbol "window" to the window
just created. In fact, new-window does nothing more than:
(setq window (x11-window))

Unfortunately, doing this within the scope of an ogre object
(your stdbutton) has the effect of overwriting the value of 
the slot "window" of the object. Boom!

The workaround is to simply do: (setq my-window (x11-window)) 
instead of (new-window).

  -- Yann


On Wednesday 29 November 2006 05:20 pm, Ralf Juengling wrote:
> The code below exhibits a bug: When a callback creates a new window
> then repaint operations may wrongly be carried out in that new window.
>
>
> (ogre)
>
> (defparameter i 0)
> (defun callback args
>    (new-window)
>    (incr i)
>    (when (= i 3)
>      (==> thiswindowobject delete)))
>
> (defun button-test ()
>    (setq :i 0)
>    (new AutoWindowObject () () () () "button test"
>         (new StdButton "hit me again" callback) ))
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Lush-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lush-devel




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV