PDA

View Full Version : thinBasic Beta 1.9.4.0



ErosOlmi
18-03-2013, 02:40
thinBasic Beta 1.9.4.0

Download from: http://www.thinbasic.biz/projects/thinbasic/thinBasic_1.9.4.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.3.0 (http://www.thinbasic.com/community/showthread.php?12003)
Fixed some weird bugs

Starting of a new module called WinMM. WinMM will contains functions handling Windows MulteMedia: http://msdn.microsoft.com/en-us/library/windows/desktop/dd743883(v=vs.85).aspx
See few example in \thinBasic\SampleScripts\WinMM\
Documentation still to be developed



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
18-03-2013, 11:23
Instantly downloaded and tried out, if my current project runs...

There's a strange Bug which I can repeat to occur but I can not write something to make it occur on purpose.

I have a in the meantime really large project that consists of 10 Units - and even if I'm up to release the sourcecode to all users for their personal use i won't load up my whole project here since it's undone. The Bug is in the following Sub:



Sub GADGET_ClickMessage(ByVal Index As Long)
sDebug = "Click Message " + Str$(Index)
' next line causes Error 18
GAGDET_Collapse(Index)

End Sub


The Sub Gadget_Collapse(Byval Index as Long) exists, Name is written in the same manner - even checked for U+L-Case-
my program crashes now if I click on my (self created) MsgBox and complains the Subs name as an unknown keyword.
But the sub Gadget_Collapse() exists and works perfect when called from other parts of script. I also tried to replace the line with the following



Call GAGDET_Collapse(Index)
' and also
Call_IfExists GAGDET_Collapse(Index)


So it makes me wonder especially for the last Version - it should not throw Error 18 (Unknown Keyword). So the curios is: the calling sub is inside the same Unit-File as the called one.
I could send you my project for study if you wish since I can not continue on this part until I got the problem solved. In the meantime nothing will occur if someone clicks my Msgbox and User has explicitely to use the yes/no/Ok/cancel etc. Buttons or just to click into the screen to close the box now since it can not close itself :D:D

ErosOlmi
18-03-2013, 13:21
Hi René,

yes please send me the project ( support at thinbasic.com ) giving steps on how to reproduce it.
Under which previous thinBasic version was your project working? 1.9.3, 1.9.2, ...

I will have a look this evening when back to home from work.
There is a looooooot of snow today here in Milan. Will be a long journey to go back to home this evening :(

ReneMiner
18-03-2013, 13:42
very strange. I did not change anything in the code - but just re-started thinAir to create a package and add a description for you...
Now no more Error 18 - all works fine as it's supposed to. I feel somehow stupid now :oops:

ErosOlmi
18-03-2013, 13:58
The only stupid questions are the one NOT asked.

So post/send me anything you are in trouble.

Charles Pegge
19-03-2013, 14:48
Hi Eros,

ThinBasic_Oxygen has advanced quite a bit since the version included in the thinBasic package, and I was wondering whether it would be a good idea to split the modular shell from the OxygenBasic core. So you would distribute a small thinBasic_Oxygen.dll plus a generic OxygenBasic.dll. I think this would offer better logistics, especially for those who use both systems, separately or together.

What do you think?

Charles

ErosOlmi
19-03-2013, 15:46
I think that I will do what you think is better ;)
So, just let me know, update SVN, tell me what top get for distribution and I will do.

Ciao
Eros

Charles Pegge
19-03-2013, 23:01
Okay thanks Eros, its on my list. Might use PB or Oxygen instead of Freebasic to build the module this time.

ErosOlmi
19-03-2013, 23:26
Okay thanks Eros, its on my list. Might use PB or Oxygen instead of Freebasic to build the module this time.
That would be great. Thank you.

John Spikowski
19-03-2013, 23:46
I think that I will do what you think is better.

This sounds like something you would hear in a beauty shop where the stylist is suggesting a makeover. :)

rchockxm
23-03-2013, 09:44
Hi Eros,

Thanks for update.

ReneMiner
26-03-2013, 16:11
Something is wrong when using With/End With and IIF -

but just today - the functions were fine yesterday:
Could it be some change in the new thinCore.dll which I downloaded from the other thread?

Example:

Type bar
foo as Any
End type

With bar
.foo = IIF( .foo, False, True)

End With

Produces strange Error, mostly missing parenthesis or expected something
"Token found" is always some variable near these IIF-Lines.

Strange also: It runs through the sub/functions a few dozen times without any complain and all of a sudden: Error!
It stops making these Errors when I remove "With/End With" and use full "Variable.Subset"

EDIT:
Also I experience lots of strange crashes today - Windows tells "thinBasic does not work any more" - and ends the script.

Petr Schreiber
26-03-2013, 17:27
Hi Rene,

could you please create complete minimal crashing example and post it here? I tried this:


Type tType
foo As Long
End Type

Dim v As tType

With v
.foo = IIf( .foo, FALSE, TRUE)
End With


...and no problem was indicated, even with the latest core.


Petr

ReneMiner
26-03-2013, 18:29
' Empty thinBasic CONSOLE file template

Uses "Console"

Type t_x
A As Long
B As Long
C As Long
D As Long
End Type


Dim foo() As t_x
ReDim foo(1)
Dim nFoos As Long


While TRUE
PrintL "Press key"

WaitKey
PrintL "foo(" + TStr$(New_Foo()) +") created"

Wend


Function New_Foo() As Long
nFoos += 1

ReDim Preserve foo(nFoos)

Randomize

With foo(nFoos)
.A = Rnd(1000)
PrintL ".A =" + Str$(.A)
.B = Rnd(1000)
PrintL ".B =" + Str$(.B)
.C = .A - .B
PrintL ".C =" + Str$(.C)
.D = IIf(.C > 0, .A, .B)
PrintL ".D =" + Str$(.D)
End With

Return nFoos

End Function



Run a few times, i.e. press key until it happens...
Edit: seems to me the IIF breaks WITH - the End With gets ignored thereafter

ErosOlmi
26-03-2013, 18:36
Yes, I confirm there is something wrong from the second time on.
Something seems not resetting.

ReneMiner
26-03-2013, 18:45
Once again: seems to me the IIF(.C>0...) breaks WITH - the End With gets ignored thereafter

It gets more weired if you change line 41 to this

foo(nFoos).D = IIf(foo(nFoos).C > 0, foo(nFoos).A, foo(nFoos).B)

And does not happen if you remove the whole With-End With

Edit: Can be possible that the bug was already present before thinCore.dll-update - I might have tested my affected Functions just once per run before