CloseGadgetList()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

CloseGadgetList()

Post by IdeasVacuum »

I find the GadgetList functions uncomfortable to use, the culprit being CloseGadgetList(). I think this is better syntax:

Code: Select all

OpenGadgetList(#ContainerID)
;....some gadgets
CloseGadgetList(#ContainerID)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
TI-994A
Addict
Addict
Posts: 2705
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: CloseGadgetList()

Post by TI-994A »

Hi IdeasVacuum. You're right; it would add a level of clarity. But since it only responds to its corresponding OpenGadgetList(), adding the gadget/window number as a requirement would only add verbosity to code.

When working in curly-bracket languages, I usually add a comment at the closing bracket to identify which scope it is closing. Perhaps this might be sufficient.

Code: Select all

CloseGadgetList() ;#MainWindow
Just a suggestion. :)
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: CloseGadgetList()

Post by IdeasVacuum »

yup, already do that, but............
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply