Jump to content

Which mode do you use?


Jon
 Share

Which mode do you use?  

34 members have voted

  1. 1. Which mode do you use?

    • MessageLoop (GUIGetMsg)
      19
    • OnEvent (GUICtrlSetOnEvent)
      15


Recommended Posts

  • Administrators

I'm just curious as to which mode people are writing GUIs in. MessageLoop/GUIGetMsg or the OnEvent mode?

I've tended to use GUIGetMsg mostly, but I know a couple of devs like the OnEvent mode better.

Link to comment
Share on other sites

Just wondering (I have some strange questions sometimes) if it could be possible to use the OnEvent mode and "meld" the missing features like mouse stuff into the OnEvent. I know it would be very strange since some function would be called every 10/100 of a second or so, but onevent seems to be lacking in the area of the mousemove messages.

Edited by this-is-me
Who else would I be?
Link to comment
Share on other sites

Mainly message mode, possibly this is just (bad) habit. But I tried OnEvent mode in couple projects.

<{POST_SNAPBACK}>

Me too.

MessageLoop/GUIGetMsg mode: Small projects, Mouse interactions, etc.

OnEvent mode: Some windows with less interaction.

Both, depending of the project... :lmao:

Link to comment
Share on other sites

I use both but for bigger projects I'd tend to use the OnEvent mode, which is similar to what other languages use for GUI stuff and it is more clear to me also.

I think that using the message loop can easily derive into a very long switch or else/if block for big projects.

OnEvent also seems to encourage encapsulating your code more, which can only be good. However, for small GUI's it is probably not woth the extra hassle of creating a function per GUI event.

That is why I was asking to be able to call any code (not only functions) from the GuiSetOnEvent function, so that I could always use the OnEvent mode. :">

Angel

Link to comment
Share on other sites

i use the msg one because thats how i learned it

thats how i learned it

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

  • Administrators

Just wondering (I have some strange questions sometimes) if it could be possible to use the OnEvent mode and "meld" the missing features like mouse stuff into the OnEvent. I know it would be very strange since some function would be called every 10/100 of a second or so, but onevent seems to be lacking in the area of the mousemove messages.

What missing mouse features? All the events are working aren't they?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...