Opened 13 years ago

Closed 13 years ago

#586 closed defect (fixed)

qt-light egg: qt:stop function doesn't work on a qt-timer object

Reported by: ewfalor Owned by: felix winkelmann
Priority: major Milestone:
Component: extensions Version: 4.6.x
Keywords: qt-light Cc:
Estimated difficulty:

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.

Attachments (2)

timer.scm (2.7 KB) - added by ewfalor 13 years ago.
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.
qt-light.timer-stop.patch (513 bytes) - added by ewfalor 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by ewfalor

Attachment: timer.scm added

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.

comment:1 Changed 13 years ago by felix winkelmann

Milestone: 4.7.0
Owner: set to felix winkelmann
Status: newassigned

comment:2 Changed 13 years ago by felix winkelmann

Thanks for reporting this. I can't try this out right now, but will do so as soon as possible.

comment:3 Changed 13 years ago by ewfalor

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.

Changed 13 years ago by ewfalor

Attachment: qt-light.timer-stop.patch added

comment:4 Changed 13 years ago by felix winkelmann

Resolution: fixed
Status: assignedclosed

Thanks a lot! Patch applied (0.97).

Note: See TracTickets for help on using tickets.