Toolbox event codes
Malcolm Hussain-Gambles (1596) 811 posts |
Is there a list for event codes in the toolbox. |
GavinWraith (26) 1563 posts |
Golly. Well if you come across any that are not mentioned in User Interface Toolbox, published by Acorn Computers Ltd, 1994, ISBN 1 85250 165 0, part of the C/C++ package, please let us know. |
Rick Murray (539) 13840 posts |
PWNED! (^_^) |
Colin (478) 2433 posts |
You don’t need to know them. Just use your own instead of the default in ResEd. To see what codes are sent by default use ResTest. I find it easier to define your own events then you can give a button and a menu item the same event number and your code needn’t care what caused the event. |
Chris Johnson (125) 825 posts |
In addition, you will find details in the StrongHelp oslib manual, in the constants section for each of the toolbox objects. |
Malcolm Hussain-Gambles (1596) 811 posts |
@Gavin – Ah that will be the massive pdf that is near enough unusable on RISC OS, I wonder why I didn’t look in there ;-) But seriously, I suppose converting it to html and making it searchable online is difficult due to copyright implications? The stronghelp is often really useful, really helped me out with the structures, but for the event_codes it just shows its an int and that’s it… I ended up with a for loop and then trapping all the event codes from 1 to 9999 and working it out from there. Defining custom events is OK for static icons and I’m doing that, but my programs will have dynamically created icons. |
Colin (478) 2433 posts |
There is no difference between custom events and default events other than the value. So creating the icons dynamically or statically has no bearing in the decision whether or not to use them. Custom events are the best reason to use the toolbox. |
Malcolm Hussain-Gambles (1596) 811 posts |
@Colin: It’s specifically keeping track hundreds of different events, why I didn’t use them for dynamically created icons in my case – there didn’t seem much point, using the default event seemed to make more sense. |