PDA

View Full Version : [Beta] thinBasic Beta 1.9.5.0



ErosOlmi
07-04-2013, 22:08
thinBasic Beta 1.9.5.0

Download from: http://www.thinbasic.biz/projects/thinbasic/thinBasic_1.9.5.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 thinBasic Beta 1.9.4.0 (http://www.thinbasic.com/community/showthread.php?12047-thinBasic-Beta-1-9-4-0)
Fixed some weird bugs

Few new functions working on UDT and memory handling.
Some fixes and improvements



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

Petr Schreiber
08-04-2013, 09:14
Thanks for the new release!

I found a bit of typos in the help file:

UDT_ElementByte

In the Syntax, there should be lPos = UDT_ElementByte(UdtElement)
In See also, there should be link to UDT_ElementOffset
The Example should be:


Uses "Console"

Type tUDT
a As Byte
b As Integer
c As Long
End Type

Dim v As tUDT

v.a = 1
v.b = 2
v.c = 3

PrintL UDT_ElementByte(v.a), "(expected 1, as it is in the root)"
PrintL UDT_ElementByte(v.b), "(expected 2)"
PrintL UDT_ElementByte(v.c), "(expected 3)"

WaitKey


UDT_ElementOffset


In See also, there should be link to UDT_ElementByte
The Example should be:



Uses "Console"

Type tUDT
a As Byte
b As Integer
c As Long
End Type

Dim v As tUDT

v.a = 1
v.b = 2
v.c = 3

PrintL UDT_ElementOffset(v.a), "(expected 0, as it is in the root)"
PrintL UDT_ElementOffset(v.b), "(expected 1, because 0 + SizeOf(Byte) = 1)"
PrintL UDT_ElementOffset(v.c), "(expected 3, because 0 + SizeOf(Byte) + SizeOf(Integer) = 3)"
PrintL

PrintL "The following will print 1, 2, 3"
PrintL Peek(Byte , VarPtr(v) + UDT_ElementOffset(v.a))
PrintL Peek(Integer, VarPtr(v) + UDT_ElementOffset(v.b))
PrintL Peek(Long , VarPtr(v) + UDT_ElementOffset(v.c))
PrintL

WaitKey


Version 1.9.x.x


For clause inside ARRAY SCAN ... bug when insiede If/End If or For/Next or in Function/End Function.


Petr

ReneMiner
08-04-2013, 10:04
I got a few for the helpfile too:

UDT_ElementByte needs a "see also" to Array Scan + vice versa -
could be part of example in Array Scan (think we got enough examples in other thread)

UDT_ElementOffset would make sense for a "see also" to thinBasic language > Data types and variables > Type and in any case vice versa,
probably see also at Memory_Compare/Memory_Copy to UDT_ElementOffset ??? :oops: or which one is the right to use here ???
and "see also" to Peek/Poke and vice versa, maybe small example using Peek or Poke for usage here too.

Example:



Type t_Type
A as Long
B as Byte
End Type

Dim X as t_Type
Poke(Byte, Varptr(X) + UDT_ElementOffset(X.B) , 123)
' X.B will hold 123 now


is this valid too:
Poke(Byte, Varptr(X) + UDT_ElementOffset(t_Type.B) , 123) ???


and when we are already here for finetuning:

CVx (numeric Functions) -> "see also" MKx (string functions) and vice versa.

UDT_ELEMENTSDATAJOIN: Description says:
"Return the offset of an element inside an UDT (User Defined Type) variable" ??? That's why I was confused (see other thread)
and in fact the both UDT_ElementByte & UDT_ElementOffset show same example - so where's the difference? - user might ask.

And thank you very much again.

ErosOlmi
08-04-2013, 21:40
:oops: wow: I as really tired when I wrote such an help mess!
Will be fixed in next update.

ReneMiner
18-04-2013, 13:28
I have some strange behaviour when I select File\New from thinAir-Menu. No bug nor error, but strange

Check screenshots:
Above you see appearance of thinAir (Window-Borders/Caption) as it looks when I start. Looks as all other windows on my system.

Below see the changed appearance after I selected File\New. Seems to become another Window-Style and looks like some Tools-Dialog inside some other window thereafter

Edit:
Another thing I experienced when creating bundled exe -
there must be something with them filenames of the .tBasicU-Files : creation of bundle mostly fails if an include-file-name starts with a tB-Keyword - then I have troubles:
sometimes creation of bundle is successful as statusbar says, but .exe can not be started. Error-Messages about wrong header, invalid .exe or even unknown keyword f.e. "PrintL"

Edit: to the Helpfile

thinBasic Modules > UIAdv (Advanced User Interface module) > IMAGECTX Control >IMAGECTX_LoadImage
Description:
Set control background color

?

Sample-Scripts: Example RMChart\RMCHartDemo : End-Button does not work