i looked once again into fb - after a while - many years ago i tried to use it as programming language - but it was no fun.
Now, after a lot of experimenting using powerbasic with all the headers of José Roca, the cWindow-class, his csed etc. and a look again into fb i was surprised. When it needed always very long until freebasic made some significant moves forward and i see now what José has contributed there - unbelievable! not only all the stuff that you know that was present in powerbasic but a lot more.
It's somehow as if powerbasic was integrated to freebasic (both very much derive from the same "basic" Basic languages that were there in the late 1980s.
But since powerbasic is no more improving and no more bugfixes nor updates are to await and since José ported all his works into fb - including anything you could think of (tools, templates, hundreds of samples, hundreds of headers, wrappers and workarounds to avoid running into faulty code of the OS - convince me to change the equipment and i would like to use fb to create one or the other thinbasic module...
But the thincore.bi is a bit ... overaged. And i remember there was some hassle using strings into both directions but since main-process and dll can share the same memory i would in any case prefer to pass the data just using pointers to heap or hash instead of fighting with fb's zStrings (seems global heap that is locked, using tb-heap-functions on fb-zstring crashed as far as i remember.
Now the PB-thincore.inc provides an arsenal of shared hash-functions which is probably solving all issues when it comes to strings and it has the advantage that we can use a continous row of keys as "key_0001", key_0002... and continue receive function-results by (ab)using a callback as invoker.
I would appreciate a few more examples that describe the use of some sdk-functions ,
for example there is a constructor and a destructor-method on module classes (_Create and _Destroy) i can declare new methods and emulate subs and functions even with a wild approach of passing keywords and parameters in a mixture that you would shake your head if yoi would see that.
But there are also properties that i can declare- so i never saw an example and i am not sure how properties are to create since i know from other languages these properties have Let, Get and Set to initialize, retrieve or alter the values of a property. if i have a property "Size" how is it initialized and how do i create the properties as up to 3 functions like
' within function LoadLocalSymbols :
thinBasic_Class_AddProperty(pClass,"_Let_Margin", %thinBasic_ReturnNone, CODEPTR(cDag_Let_Margin)
thinBasic_Class_AddProperty(pClass,"_Get_Margin", %thinBasic_ReturnCodeLong, CODEPTR(cDag_Get_Margin)
thinBasic_Class_AddProperty(pClass,"_Set_Margin", %thinBasic_ReturnNone, CODEPTR(cDag_Set_Margin))
or do i have toi use "Margin_SET", "Margin_LET", "Margin_GET" or is it all in one?
as just
thinBasic_Class_AddProperty(pClass,"_property_Column", %thinBasic_ReturnCodeLong, CODEPTR(cDag_property_Column))
And is a property here limited to ONE VALUE ONLY ? (width, separate height...) or can it be a whole virtual udt as
$enumProperty_Size="Int32(Width,Height;Current,Min,Max)"
lVal(2,3) As Long
And mentioning virtual - can i use thinBasic_AddVariable to create a variable inside of a tb-scriptfunction that is placed at some memory within the module?
If it can do this -will that work also placing an udt virtually upon some position or is there a function that can do something like that?
And can i declare the win32-api-heap-functions within the module to use the same heap as the script functions will do? if yes- is it process heap or private heap
what we use in the sscripts?
just one more:
thinBasic_DeclareFunction
is it to use for
Declare Function myModulefunction Lib "thismodule.dll" Alias "myModFunc" ([parameters])
or to wrap api-functions to make these available in thinBasic scripts?
Or to make a thinbasic corefunction available to the module?
Bookmarks