Re: [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 ]

Re: [fltk/fltk] fl_choice() doesn't tell you if the dialog was closed (#282) rempas 13:08 Oct 15 top right image

Another option would be to use a new function name like fl_choice2 that returns e.g. -1 for Escape and -2 for window close (or vice versa). Both new return values would be negative to simplify handling so you can use ret <= 0 to check if one of these occurred.

That's the option that makes more sense and would be easier and more enjoyable to use but why creating a new function? Just change the existing one. This will make backwards compatibility but something has to break always with the new version of the library. I suppose a lot of things will change anyway. In any case If you decide to create a new function, I would recommend giving the new function the name "fl_choice2" or "fl_choice_alt" and keep "fl_choice" for the new function and just add a note for code that used this function to convert if the want the previous behavior.

Tho again, I really think that the code base and the library should be as small and simple as possible but that's just my opinion and you have the final word

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 ]
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]

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