For Events we have #PB_Event_FirstCustomValue, is there any like #PB_EventType_FirstCustomValue?
Code: Select all
PostEvent(#PB_Event_Gadget, Window, Gadget, #MyEventTypeForUpdate)
Code: Select all
PostEvent(#PB_Event_Gadget, Window, Gadget, #MyEventTypeForUpdate)
I may not understand your question... but:STARGÅTE wrote:I want to send with PostEvent() a custom EventType(), how is the private range for custom event types?
For Events we have #PB_Event_FirstCustomValue, is there any like #PB_EventType_FirstCustomValue?Code: Select all
PostEvent(#PB_Event_Gadget, Window, Gadget, #MyEventTypeForUpdate)
Code: Select all
Enumeration #PB_Event_FirstCustomValue
#MyEventTypeForUpdate
#MyOtherEventType
.. etc ..
EndEnumeration
I had suggested setting aside a block for user-defined... but using a high value didn't occur to me;Mostly because it seems using #'s out of sequence for everything else is 'bad form' and 'wastes space' -- I can't find the reference that suggested it was inefficient to skip a whole bunch of gadget #'s; but I swear I read it.. somewherefreak wrote:The highest event type we currently have is 65549 iirc (a canvas event). If you use the range 1048576 ($100000 in hex) and up you should be safe.
We should probably add a constant for that as well.
thxfreak wrote:The highest event type we currently have is 65549 iirc (a canvas event). If you use the range 1048576 ($100000 in hex) and up you should be safe.
We should probably add a constant for that as well.
In this case is different, these are just constants used to identify a message, only problem here can be a conflict in the numbering.jassing wrote:Mostly because it seems using #'s out of sequence for everything else is 'bad form' and 'wastes space' -- I can't find the reference that suggested it was inefficient to skip a whole bunch of gadget #'s; but I swear I read it.. somewhere![]()
I've read a lot -- thanks. it's still ingrained in thinking -- My request was to 'block off' a few hundred so we could know they'd "always be private". Even with the huge # - we dont' know, since PB sometimes relies on host os's constants.... but thanks.luis wrote:times in the forum but it's mentioned the manual too, maybe you have read it here ->