haxeui / haxeui-openfl

The OpenFL backend of the HaxeUI framework -
http://haxeui.org
MIT License
42 stars 14 forks source link

App event exited #63

Closed Shallowmallow closed 1 year ago

Shallowmallow commented 1 year ago

Adding app event exited :)

ianharrigan commented 1 year ago

There wasnt already an event for this? Let me check what wxWidgets does

ianharrigan commented 1 year ago

Alright, i understand, you renamed app_closed to app_exited? And implemented it for openfl?

Shallowmallow commented 1 year ago

Yeah, I planned to do an Closed event at first, but as it was onExit in openfl, It was more coherent to be be an exited event. (Plus I'm not sure of the difference between the two, for me instinctively, "close" is a user event, and "exit" is an app event, like if the app crashed , it should dispatch an exit and not a close event)

Le mer. 14 juin 2023 à 11:13, Ian Harrigan @.***> a écrit :

Alright, i understand, you renamed app_closed to app_exited? And implemented it for openfl?

— Reply to this email directly, view it on GitHub https://github.com/haxeui/haxeui-openfl/pull/63#issuecomment-1590809664, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBNBIQMFLDE3EOGKV5IEWDXLF6BZANCNFSM6AAAAAAZF7HOFA . You are receiving this because you authored the thread.Message ID: @.***>

ianharrigan commented 1 year ago

I think thanks fair... this change will break haxeui-hxwidgets though... (which uses the close event)... do you want to make the change? Or shall I?

Shallowmallow commented 1 year ago

Seems hxwidgets uses both APP_CLOSED when there is an EventType.CLOSE_WINDOW on the main windowand APP_EXITED once the app has run.

Why would it need a change ?

Le mer. 14 juin 2023 à 12:04, Ian Harrigan @.***> a écrit :

I think thanks fair... this change will break haxeui-hxwidgets though... (which uses the close event)... do you want to make the change? Or shall I?

— Reply to this email directly, view it on GitHub https://github.com/haxeui/haxeui-openfl/pull/63#issuecomment-1590890534, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBNBIURXIXZ4XQ3WS47TDLXLGEBDANCNFSM6AAAAAAZF7HOFA . You are receiving this because you authored the thread.Message ID: @.***>

ianharrigan commented 1 year ago

oh, my bad, i read the code completely wrong... i thought you renamed app_closed to app_exited... i didnt realise both already existed...