When I read this I wondered if it would be possible for the compiler to just look at the first already-open window ID and use that in the CreateGadgetList() command, rather than having the programmer supply it. Since it is the same list across all windows, it's a bit confusing to pass it a specific window ID. Plus it's more (unnecessary?) typing. Gadgets would automatically be assigned to the last opened window unless a UseGadgetList() was issued, just like happens now.Note: There is no separate administration of the gadget lists for every opened window in PureBasic. Therefore you should use ongoingly numbered 'GadgetID's also for several windows. Or use the new #PB_Any constant as 'GadgetID'.
Plus, if you did that, you could rename the command to InitGadgets() for conformity with InitSound(), InitSprite(), etc. What do you think?