[visionegg] Re: falling out of a go() loop which is set torun_forever so that a second go() loop can be allowed to run

  • From: Mark Tovey <getmark@xxxxxxxxxxxx>
  • To: "visionegg@xxxxxxxxxxxxx" <visionegg@xxxxxxxxxxxxx>
  • Date: Fri, 25 Jul 2003 13:00:15 -0400

Hi Andrew,

If you have a quick answer to the following, that would be great (it looks
like a lot of text, but it's a simple question).  I've got access to the
magnet room this afternoon, and I'd love to be able to test this.

The basic question is: do I need to reset or delete something if I want do
do:

button_down.set_presentation_instance(p)
p.go()

a second time?

--

In detail:

This works great -- I'm wondering if there's something I need to reset if I
want to run the same presentation again, as in:

button_down.set_presentation_instance(p)
p.go()

button_down.set_presentation_instance(q)
q.go()

button_down.set_presentation_instance(p)
p.go() # this is where the error happens
        # as you can see we're running p a second time here

When I try this right now, I get:

Traceback (most recent call last):
  File "/Users/mark/VisionEgg/myscripts/runprotocol9.py", line 228, in ?
    a.go() # this is where the error happens
  File 
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packag
es/VisionEgg/Core.py", line 1354, in go
    real_time_since_go = real_time_now - self._real_time_go_start
UnboundLocalError: local variable 'real_time_now' referenced before
assignment
warning: use func(*args, **kwargs) instead of apply(func, args, kwargs)

(I'm using a's and b's in the test programme, but it's the same thing).

Thanks so much!

Mark


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: