Re: [AD] set_window_close_button_callback_hook_button() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Huh !? Is that not a runtime breakage of the API ? With the same code, you
> would have got a close button that kills your program in the first case,
> and no close button at all in the second case.
The close button that killed the program was already broken.
> > > These functions are not orthogonal. Only one function for one
> > > functionality.
> >
> > Which is why we have draw_sprite() and masked_blit().
>
> Unfair comparison IMHO because you don't need to call *both* functions in
> order to achieve your goal. With your interdependent functions, we would
> end up with 4 combinations:
[snip]
> set_window_close_button(TRUE);
> set_window_close_hook(my_callback); button activated
>
> The table clearly shows that the two functions can be factored into only
> one function, namely set_close_button_callback().
The first need not be called, since it would be "enabled" by default (but
greyed out because there's no callback). This would be consistent with the
older versions where it was enabled and had broken functionality.
> For example, doing
>
> set_window_close_button(TRUE);
>
> would cause the window to have a close button that kills it in the first
> case, and no close button in the second case. Haven't we broken a program
> that needs to have a close button for some reasons ?
The program was already broken.
Ben