View Full Version : [Beta] thinBasic Beta 1.9.7.0
ErosOlmi
09-06-2013, 23:26
thinBasic Beta 1.9.7.0
Download from: http://www.thinbasic.biz/projects/thinbasic/thinBasic_1.9.7.0.zip
This is a real Beta in the sense there is a lot of new features all (more or less) to be finished and fully documented.
So, please use this version only for testing and not for real production scripts.
Have a look and please report any impression/problem/likes always remembering it is a beta!!!!!
This is an emergency update over previous thinBasic Beta 1.9.6.0
Fixed some bugs
Added latest TBGL module from Petr Schreiber
...
List of changes can be found in Help file distributed with the product.
Known bugs:
among others (I hope not so many) I know there is a bug in this version when creating bundled exe. Some process can sometimes fail due to incorrect TOC inside Exe. I'm working on solving this problem asap.
Ciao.
Eros
ReneMiner
10-06-2013, 08:13
Thanks a lot Eros, always happy to be up-to-date and to be able to use the latest improved version of our worlds best basic language - as happy as I am about you having this passion to create a way for us to tell our computers in readable words what we expect them to do. :)
about TBGL-Help: TBGL_PrintFont2D-method is not documented (but it bolds when I type it in) - so I'm not sure about the current (changed?) syntax since Petr intended to change it.
ErosOlmi
10-06-2013, 08:38
Thanks Rene.
Regarding TBGL help, wait for Petr reply.
Ciao
Eros
ReneMiner
10-06-2013, 17:30
OK, while browsing the help for new stuff I stumbled across a few things:
ParseSet$ - is that new? And what string does it return? Complete or just the inserted one?
thinBasic Modules (http://www.thinbasic.com/community/modules.htm) > Core (thinBasic Core Engine) (http://www.thinbasic.com/community/core.htm) > String functions (http://www.thinbasic.com/community/stringhandling.htm) > ProgID$ ? What does it do?
Edit:
" thinBasic language (http://www.thinbasic.com/community/thinbasiclanguage.htm) > Operators (http://www.thinbasic.com/community/operatorsoperators.htm) > Arithmetic (http://www.thinbasic.com/community/arithmetic.htm) > Exponentiation (^)
Syntax
result = number^exponent
The * operator syntax has these parts:"
guess it has to be ^ instead of *
ErosOlmi
10-06-2013, 22:19
Thanks a lot Rene.
^ operator help fixed
ParseSet$ is not new. It is used to change a string element into a delimited string. See help.
ProgId$ is the contrary of ClsId$. Sorry they are still not documented because they were developed in order to start native COM handling inside thinCore.
ClsId$ returns a 16-byte GUID string (128-bit GUID format string) containing a CLSID associated with a unique ProgramID string of a COM object or component.
ProgId$ gets a GUID string giving back the ProgramId
Example: s = ClsId$("")
Uses "Console"
Dim sClassName As String = "MSScriptControl.ScriptControl"
Dim sClassId As String = CLSID$(sClassName)
PrintL "Class name ", sClassName
PrintL "Class ID ", sClassId
PrintL "Class ID in human format", GuidTxt$(sClassId)
PrintL "Prod ID from Class ID ", PROGID$(sClassId)
WaitKey
Petr Schreiber
11-06-2013, 11:43
Hi Rene,
the TBGL_PrintFont2D is still in developement. I am working on the more complex syntax, but there are some obstacles in the way. This is why it is not documented yet.
Additions in TBGL since 1.9.6.0:
tbgl_GetTextureData
tbgl_EntityGetTexture
Fixes in TBGL since 1.9.6.0:
%TBGL_TEX_ANISO, %TBGL_TEX_CRISPANISO presume level 2 of anisotropy in case programmer does not specify it.
improvements in help file
Petr
Petr Schreiber
11-06-2013, 11:59
Hi Eros,
thanks a lot for the new release! Everything seems to work okay.
What is the purpose of Nop? :)
Petr
ErosOlmi
11-06-2013, 12:57
What is the purpose of Nop? :)
Nop has been developed to do ... (drum rolls) ... just nothing :D
http://www.thinbasic.com/community/project.php?issueid=406
means: No Operation.
In machine code is it a Byte place holder.
Petr Schreiber
11-06-2013, 22:16
Hehe,
okay then, thanks for the explanations.
In the meantime I (hopefully) finished the TBGL_PrintFont2D, it will be available in next thinBasic version. Everybody interested can download updated TBGL here as usually (http://www.thinbasic.com/community/showthread.php?t=10909). I need to test it a bit more, but it is documented.
Petr
ReneMiner
25-06-2013, 09:43
Collect some stuff for the help-file here:
Undocumented great feature...
I recently learned by a coincidence from Petr that a Type can be squeezed into another Type just as this:
Type Vector2d
X as Double
Y as Double
End Type
Type Vector3d
Vector2d
Z as Double
End Type
dim foo as Vector3d
foo.X = 1.23
foo.Y = 2.34
foo.Z = 3.45
Help says, there can be another Type in some Type - but it should tell explicitely that it can be done this way too.
____________________________________________________
Still missing:
Navigation: thinBasic Modules (http://www.thinbasic.com/community/modules.htm) > Core (thinBasic Core Engine) (http://www.thinbasic.com/community/core.htm) > String functions (http://www.thinbasic.com/community/stringhandling.htm) > MKx (http://www.thinbasic.com/community/mkx.htm) ...
see also: CVx
Navigation: thinBasic Modules (http://www.thinbasic.com/community/modules.htm) > Core (thinBasic Core Engine) (http://www.thinbasic.com/community/core.htm) > Numeric functions (http://www.thinbasic.com/community/numerichandling.htm) > CVx (http://www.thinbasic.com/community/cvx.htm) ...
see also: MKx
____________________________________________________
Edit: Just saw that the ^-Exponent has been fixed already but I forgot to mention that also in \ and / operators-text is a *
Rene,
For me, all your links in this topic get a '404 Not Found' error???
Bill
ReneMiner
27-06-2013, 07:49
Hi Bill, these are no links - I just copied & pasted the top line of the help-topics page from offline manual - so this lines appear colored here. You'll have to open the (offline) help yourself. The online documentation is still version 1.8.something (latest stable release) while this is about Beta 1.9.7
ReneMiner
05-07-2013, 20:21
add one more to help:
the |-operator seems to be undocumented.
the one I use for example if I open a window like this:
...%WS_Border | %WS_...
ReneMiner
27-08-2013, 11:40
One more help-file-typo:
Navigation: thinBasic Modules (http://www.thinbasic.com/community/modules.htm) > UI (User Interface) (http://www.thinbasic.com/community/ui.htm) > Additional Controls and Functions (http://www.thinbasic.com/community/dedicated_control_functions.htm) > PropertyList Control (http://www.thinbasic.com/community/propertylist_control.htm) > PropertyRoot_Free
Description
Free a list of property items.
Syntax
PropertyRoot_Create(pRoot) <<< ???
porcelain_tree
01-09-2013, 01:44
I've been writing an audio program using TBASS that runs just fine on 1.9.6.0, but crashes immediately on 1.9.7.0. It goes directly to the Windows "thinbasic.exe has stopped working" message. I'm running Win 8.1 Preview, but get the same in Win 8.0.
My question: is there a way to generate a log so that you can diagnose the problem? I seem to recall seeing mention of that feature, but can't find it. Or is there a way to create a useful memory dump?
ReneMiner
01-09-2013, 06:32
At least you could run it stepping through with F8-key in Debug-Mode to find out what triggers the problem - sorry that I don't have any better advice than that.
I experienced also strange crashes lately that were caused by omitted parenthesis on functions that take optional parameters. If not all parameters are used and parenthesis were omitted, in some case the line-continuation leads to pick just the first expression on the next line - whatever it is- as next optional parameter - whether it makes sense or not - so functions get called using wrong or invalid optional values.
ReneMiner
01-09-2013, 09:53
To give an example:
Check out shipped sample script found in
c:\thinBasic\SampleScripts\UI\Canvas\Bezier\Canvas_Bezier.tBasic:
run in version 1.9.7. and try to drag a corner of the shown figure...crash... it tells the "Exit For" would be an invalid argument type - seems it tries to "add" it to the last parameter in the line above - thereafter "thinBasic stopped working"...
check the codeline above Exit For (around 286) in Sub MouseMove, the one that reads:
RoundPolygon hDC, nRound, %BLUE, tLine, Punts, iStyle, showVertex
' change to
RoundPolygon( hDC, nRound, %BLUE, tLine, Punts, iStyle, showVertex )
now runs fine again.
porcelain_tree
04-09-2013, 05:27
Good idea. My program crashes quickly, so hopefully it won't take long to F8 to the error. I'll post again with my results, maybe tomorrow. Thanks for the help.
ReneMiner
04-09-2013, 08:37
You could be a "victim" of one of these issues:
Issue #1
(http://www.thinbasic.com/community/project.php?issueid=439)Issue #2 (http://www.thinbasic.com/community/project.php?issueid=438)
but the described samples don't make tB crash - they just don't run/ don't play music/ fail to load data or fail to return a correct result.
I also made some games using TBASS-module in a tB-version previous 1.9.7. - and these still run and have sound. As said above I experienced crashes on scripts which run in 1.9.6 without any problems - all caused by calls without parenthesis to subs/functions that have optional parameters and the fix is: use parenthesis in such calls.
Perhaps the problem is caused by some (undocumented?) fix of THIS (http://www.thinbasic.com/community/project.php?issueid=418) - the problem described there is not reproduceable any more...
porcelain_tree
05-09-2013, 01:43
Thanks for the extra info.
I haven't gotten to the crash code yet. The crash happens much later than I expected, so I set a breakpoint at what seems to be the guilty function, which I call Play(). It handles init of a channel and starts playback. BUT ...
I'm dealing with another issue: the debug module is enforcing assignment of the error code to a variable in the INI_SETKEY command. That is, it throws an "expecting a =" error. I assume that means I have to reform those lines to
local succeed as dword
succeed = INI_SETKEY(blah blah blah)
Only debug in 1.9.7.0 enforces this. I know that it's good practice to check these sorts of actions, but I think this requirement is excessive.
But anyway, I'll fix it and eventually get to my crash condition.
Michael Hartlef
05-09-2013, 08:49
John,
please stay on topic and and only that.
Michael
porcelain_tree
06-09-2013, 03:00
John, no offense, but I don't understand any part of your comment.
My issues only appear in Beta 1.9.7.0, so naturally I thought this was the place to discuss them. But in any case, Rene told me enough to help me.
ReneMiner
06-09-2013, 15:04
...
I'm dealing with another issue: the debug module is enforcing assignment of the error code to a variable in the INI_SETKEY command. That is, it throws an "expecting a =" error....
Only debug in 1.9.7.0 enforces this..
INI_SetKey takes an optional default-value-parameter - if this line in your code already has parenthesis around the parameters you might check the codeline directly above this - I can imagine there's another call to some function that takes an optional parameter so the line you want to change is not the one that causes the error- but the line above...
Where are my manners? Welcome and Happy Coding!
Petr Schreiber
06-09-2013, 15:12
If the code is not private, you could upload it here and I could check the possible cause of error.
Petr
porcelain_tree
18-02-2015, 01:24
Sorry guys, a lot has happened in my life and I forgot about this thread.
I finally found the cause. I was calling a function and assigning its value like this:
x = my_function
when the proper syntax is:
call my_function to x
After I changed my code, my program runs fine in all of the more recent versions of thinBasic. For some reason the older version accepted and used my original syntax without any errors.
Thanks for the help.
ErosOlmi
18-02-2015, 07:53
x = my_function should be absolutely valid.
Can you please post a little bit more of your not working code?
Or create a little script reproducing the problem?
I need to see how my_function is declared.
Thanks a lot
Eros
porcelain_tree
19-02-2015, 08:34
Ah, interesting. Man, I hope I didn't change hundreds of function calls for no good reason. :D (My media player is over 12,000 lines of code.)
Okay, thanks, I'll find a section that I can use for a sample script and post it here. It might take a day or so.
porcelain_tree
20-02-2015, 09:49
I apologize, Eros, I can't replicate the crashes. I'm completely baffled. I must have fixed the real problem without realizing it. :confused:
porcelain_tree
21-02-2015, 01:37
To clarify, older versions of my program still crash in all of the betas. It's not something I imagined. :o
To try to replicate the crashes, I used a newer version and changed the function calls back to "x = my_function." It's this version that doesn't seem to crash on the function calls. I changed something to fix that issue, apparently.