Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007194OCamlotherlibspublic2016-03-24 11:252017-02-17 16:02
ReporterMonsieurPi 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.3 
Target Version4.05.0 +dev/beta1/beta2/beta3/rc1Fixed in Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Summary0007194: OCaml Graphics bug with Key_pressed and Poll
DescriptionIf you put wait_next_event[Key_pressed; Poll; ...] and press a key, this key will never be dequeued although it's specifically written in the documentation :

val wait_next_event : event list -> status

Wait until one of the events specified in the given event list occurs, and return the status of the mouse and keyboard at that time. If Poll is given in the event list, return immediately with the current status. Keypresses are queued, and dequeued one by one when the Key_pressed event is specified.

I attached a test file.
TagsNo tags attached.
Attached Files? file icon test.ml [^] (524 bytes) 2016-03-24 11:25 [Show Content]

- Relationships

-  Notes
(0015608)
doligez (administrator)
2016-03-24 19:11

The documentation should be clearer, but this works as intended: the clause
> If Poll is given in the event list, return immediately with the current status.
takes precedence over the other two sentences.
(0015612)
MonsieurPi (reporter)
2016-03-25 08:05

Yes, I didn't know if I had to put it as a documentation problem or an otherlib one. ;-)

I understand why this is what was expected but, indead, it's not clear from the documentation.

Thanks
(0017307)
xleroy (administrator)
2017-02-17 16:02

Clarified the documentation. Release 4.05.

- Issue History
Date Modified Username Field Change
2016-03-24 11:25 MonsieurPi New Issue
2016-03-24 11:25 MonsieurPi File Added: test.ml
2016-03-24 19:11 doligez Note Added: 0015608
2016-03-24 19:11 doligez Status new => acknowledged
2016-03-24 19:11 doligez Target Version => 4.03.1+dev
2016-03-25 08:05 MonsieurPi Note Added: 0015612
2017-02-16 14:01 doligez Target Version 4.03.1+dev => undecided
2017-02-17 16:02 xleroy Note Added: 0017307
2017-02-17 16:02 xleroy Status acknowledged => resolved
2017-02-17 16:02 xleroy Resolution open => fixed
2017-02-17 16:02 xleroy Fixed in Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-02-17 16:02 xleroy Target Version undecided => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-02-23 16:42 doligez Category OCaml otherlibs => otherlibs


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker