FLTK logo

[fltk/fltk] fl_choice() doesn't tell you if the dialog was closed (#282)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] fl_choice() doesn't tell you if the dialog was closed (#282) "Pierre Ossman (Work account)" Oct 14, 2021  
 

Right now the return value of 0 from fl_choice() is a bit ambiguous as it can mean two different things:

  • The first button was pressed
  • The dialog was closed (e.g. using Escape)

Essentially this forces you to have the first button be the default "cancel" operation, which can be a bit inflexible.

Not sure how to solve this without breaking backwards compatibility, but ideally I'd like different return codes for these two cases. E.g. -1 if the window is closed.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.