jassing wrote:This works fine -- UNTIL (for example) a dll is modified with an updated purebasic version. It then stands the chance of having #PB_Event_FirstCustomValue be a different value; requiring an entire project to be rebuilt.
If there was a reserved block of 100 or 200 or other "Custom Event" #; it would help in the long run.
Perhaps:
#PB_Event_CustomReserve1... #PB_Event_CustomReserve200
and then have #PB_Event_FirstCustomValue remain available for more custom events and to not break current projects that use it.
Why request, say, 200 reserved events, and that #PB_Event_FirstCustomValue remain immutable?
Fred has already said that event numbers greater than 65536 (#PB_Event_FirstCustomValue) are reserved for custom events. So it seems to me that PB already has what you need.
And as for #PB_Event_FirstCustomValue changing in the future, the same argument could be made for any constant or feature already in PB -- including the fixed range that you request.
As I said, don't fret about it. I suspect that you'll need to recompile your programs because of your own upgrades, long before you need to recompile them because of changes to PB constants.
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan