Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best Practice for Library Building and Toolboxes
#4
(10-18-2023, 12:25 PM)SMcNeill Wrote:
(10-18-2023, 12:10 PM)bplus Wrote: I am big fan of copy / paste from toolbox to get just the routines I need into the app I am working so no extra library files needed. But I don't write giant programs either except GUI, oh Interpreter and FVal$ is getting there specially when finish adding String Math and Astring Functions.

Have you taken a look at my latest attempt to create a modern toolbox?  https://github.com/SteveMcNeill/QB64-Pho...on-Toolbox

The idea here is to have one simple toolbox that I can grab and paste into any QB64 folder and then just add an $INCLUDE pointing to the two files inside it.  After that, I can pick and choose what routines I want to add to my code, and exclude everything else.

For example, at the moment let's say I just want to make use of the ExtendedTimer function.  It's this simple in the newest setup:

Code: (Select All)
$LET INCLUDE_EXTENDEDTIMER = TRUE
$INCLUDE:'./Library Files/Toolbox.BI'

Print "My ExtendedTimer is currently: "; ExtendedTimer

$INCLUDE:'./Library Files/Toolbox.BM'

One $LET to declare what I want to use.  $INCLUDE the files from wherever they sit in relation to QB64 (in this case, inside the QB64PE folder, in their own Library Files subfolder.)  Then just use them as desired.  Smile

No need to constantly open a library file, copy out some partial content of it, paste it in another program...  Just use the $LET statement and declare what parts you want from it (or don't want from it, with something such as:  $LET INCLUDE_CONST = FALSE.) 

Wink

I see what you are saying but I am not a fan of github nor of carrying around a library file. Imagine having to post link to github or attaching SM_Toolbox.bi and SM_Toolbox.bm to code at forums, eh... zip files solves all that I guess!

BTW is it SM_Toolbox ? ;-))
b = b + ...
Reply


Messages In This Thread
RE: Best Practice for Library Building and Toolboxes - by bplus - 10-18-2023, 12:43 PM



Users browsing this thread: 1 Guest(s)