Summary
qt-light egg: qt:stop function doesn't work on a qt-timer object
Metadata
- Id: d0ec5d772299058e31eace34cc86f34d867d9082
- Trac id: 586
- Type: defect
- Reporter: ewfalor
- Owner: felix
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone:
- Version: 4.6.x
- Changetime: 2011-06-06 15:03:17 UTC
- Created: 2011-05-30 23:55:53 UTC
- Keywords: qt-light
Attachments
- d0ec5d772299058e31eace34cc86f34d867d9082/attachments/timer.scm
- d0ec5d772299058e31eace34cc86f34d867d9082/attachments/qt-light.timer-stop.patch
Description
The documentation (http://wiki.call-cc.org/eggref/4/qt-light#qtstop) indicates that calling (qt:stop TIMER) is a valid operation.
However, in practice, it raises the following error:
Error: Object has no such slot: #<qt-timer> stop
Attached is a simple program which demonstrates the crashing bug.
Changes and comments
[2011-05-30 23:56:54 UTC] ewfalor attached timer.scm (description=Clicking the start button demonstrates that you can begin a timer. Clicking the stop button or allowing time to run out demonstrates that the analogous qt:stop operation doesn't work.)
[2011-05-31 09:01:55 UTC] felix changed status from new to assigned
[2011-05-31 09:01:55 UTC] felix set owner to felix
[2011-05-31 09:01:55 UTC] felix removed milestone 4.7.0
[2011-06-01 09:09:01 UTC] felix wrote:
Thanks for reporting this. I can't try this out right now, but will do so as soon as possible.
[2011-06-01 21:33:30 UTC] ewfalor wrote:
After reading a little bit of the protobj documentation, I found that the problem is that the assignment of a method to the stop slot was incorrect: the name stop shouldn't be quoted:
-(! <qt-timer> 'stop +(! <qt-timer> stop
(lambda (self) (qt:stoptimer self)))
Although it's a two-byte change, I'll attach a patch. It's two bytes because I took the liberty of fixing the same problem with the stop method on a <qt-sound> object.
[2011-06-01 21:35:26 UTC] ewfalor attached qt-light.timer-stop.patch (description=#f)
[2011-06-06 15:03:17 UTC] felix wrote:
Thanks a lot! Patch applied (0.97).