Events

BlitzMax Forums/MaxGUI Module/Events

ziggy(Posted 2006) [#1]
I need all the possible information about the TEvent object.
There's no information of what data type the field Data has, and what is it for. It happens the same with the field Extra, and the field Mods. I supose the field ID has the integer with the constant value of the event type. but it is not documented.


tonyg(Posted 2006) [#2]
As there's be no reponses you could see if this helps for starters.
Assari touches on events in this tutorial.


Dreamora(Posted 2006) [#3]
ziggy: Those data are documented.

Each type of event that can happen has a short note in the help files that tells what fields it fills with what information. All other fields aren't used. This means that in the end, most fields are normally unused. Extra for example isn't used at all, this seems to be mainly for your self created events to attach objects.
Mods from what I can remember is only used on HotKeyEvent for the modifier_key constant.

ID, as you assume, is the constant for the EVENT, so EVENT_MOUSEDOWN or whatever.

There is no more information on that in the docs ... After all, I don't think more is needed, as something that has no usefull data does not need 10 lines to describe that it has no usefull data, does it? ^^


ziggy(Posted 2006) [#4]
The main thing, for me, is that TEvent is not coded in SuperStrict, so there are some fields without data definition (The Field Data, as instance has no datatype in its declaration, so I assumed it's an integer). This kind of things gives me some insecurity while I'm coding. I'm never sure if I'm missing something...

I don't think more is needed, as something that has no usefull data does not need 10 lines to describe that it has no usefull data, does it? ^^


Yes, it's needed when the general documentation has missing information, becouse then you don't know if really it has no usefull data, or if the usefull data is missing... that's what was happening to me :D
Anyway, thanks a lot to everyone. :D


H&K(Posted 2006) [#5]
Errr, isnt it always an Int if its not declared as anything else?

I agree about the documentation


Dreamora(Posted 2006) [#6]
OK thats a valid point.

BM is programmed on strict standard, which means no declaration => Integer.
While I myself program only strict as well, I clearly declare stuff (no, $ # ! are NO DECLARATIONS!! They only mean you are even too lazy to write :int or :string) to prevent such problems at a later date. I do this especially on functions / methods to already state there that there is a return or not.

I should mention: I'm using HotDocs instead of BRL own documentation so I have the full type declaration in front of me when I run into such questions and it makes quite a difference as stuff is defined there :) (beside int = no type declaration)