Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: thinBasic 1.11.7.0

  1. #11
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    2022.12.23 18:00 CET
    Update thinBasic 1.11.7.0


    Some fixes
    Many new features
    New thinAir theme Nord

    Among other new features we added Evaluate(), Evaluate$() and $() interpolate functions.
    See help and sample scripts under \thinBasic\SampleScripts\ path



    Download from: https://www.thinbasic.com/downloads.html#downloads
    Features: https://help.thinbasic.com/index.htm...n_1_11_7_0.htm

    Developed under Windows 10
    Tested under all Windows versions from Window 7 to Window 11

    Still a lot of work to do especially to document new features
    Will continue next weeks/months
    Last edited by ErosOlmi; 24-12-2022 at 10:42.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #12
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170

    it has been a while...

    somehow i am lucky able to log in again

    Some about tokenizer module class: The functions

    <classvar>.Token(index).GetPosStart
    <classvar>.Token(index).GetPosEnd
    <classvar>.Token(index).GetLen
    <classvar>.Token(index).GetLine

    seems are not introduced by loadLocalSymbols - help file lists them but runtime experience is
    Error 5100: A method or property was not found in class.
    Another - concerning
    Uses "Console noAlloc"
    
    how to achieve? How can i detect from my module if such a "switch" is present?
    All i've found was the optional string parameter to Function LoadLocalSymbols contains the module-path - but nowhere is any hint about the parameter in "USES" - do i have to load and parse the script for that?

    And by mentioning load and parse: i've fallen in love with thinbasic-core-functions
    Function_GetBodyCode
    Function_GetSourceCode
    
    which brought me to some weird ideas - working already with support of an include-file: the interpreter can interpret script-changes in real-time ("console interactive-mode")
    i use it for visual design of windows by typing in and instant display the changes at a window-prototype on screen and store the typed-in data as thinbasic-code when i type "cf" or "confirm" and you will not even come to the idea that the same moment the console-content is saved and a new (embedded) "script-process" is started - it's so incredible fast when the (already previously registered window-class) new changed window appears on the same location while the previous one runs out by a timer just 1/10 seconds later you would not notice a thing. Only if the changed windows position does not exactly cover the previous one the illusion of a constantly running program is disturbed...

    On the run...a general UI-makeover, direction THINBASIC V 2.0


    i use a lot of illusion, and often i read in one of your "OOP"-script-samples the sentence it were not easy to create something as "ME" in a callback. So let me share an idea that is proven to work very well:

    Don't forget:
    We create the illusion of something in a way that users feel it were real - even it's not - they will not bother or complain if it appears logical and is correct in its context.

    i let the user create a local variable of an udt
    (which ensures the variable is valid and available) -
    use a pretty simple hack which works from modules as well as from thinbasic-script:

    '######################################################################################################################
    '###  GetLastName - use from module-class-constructors to obtain the name of the dimensioned class variable         ###
    '######################################################################################################################
    FUNCTION GetLastName(BYVAL sList AS STRING) AS STRING
    ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    
      ' pass 
    //   Thinbasic_VariableGetList( ,";") 
      ' to parameter sList
    '....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!
    
    
        FUNCTION = RIGHT$( sList, LEN(sList) - INSTR(-1, sList, ";") )
    '......................................................................................................................
    END FUNCTION
    
    (this is the module-version - in thinbasic you must watch for the stack-level - passing Function_GetStackLevel as parameter to the function is not recommended - since it evaluates to the stacklevel of the called function on its entrance - but stacklevel is required if using Thinbasic_VariableGetList from a script. )

    I urge the user to exclude creation of objects outside of the TBMain-function in a way that
    TBMain must be entered first,
    from there a dedicated StartUp-function has to be called that returns True if StartUp was succesful.
    (It will never return False but rather stops the execution in case of a problem)

    my excuse is always:

    Do not create local variables in TBMain because these variables are kind of special:

    Such are
    persistant for duration of the scripts execution and theirs lifetime does not end before the script ends
    .
    (Actually I intend to spread the idea that TBMain should not have "local" variables nor a "local scope" at all )

    So i force to create an udt-variable local in a separate "Init + launch-procedure" and the user thinks,

    his line:
    Dim dlg_xyz As NewDialogOnDesktop
    
    would really create the complete dialog - but what happens is:
    Type tAnyDialogs_sharedAncestorType
        hWnd As DWord ' (this just to have any property at all)
    End Type 
    
    Type NewDialogOnDesktop _ 
           Extends _
           tAnyDialogs_sharedAncestorType
        
    '....................................................................
        UDT_Method _Create()
          ' here happens some real "MAGIC" !
        End UDT_Method 
    '.....................................................................
    End Type
    

    abracadabra....


    inside of udt-method NewDialogOnDesktop._create()

    - it checks for the name of the users local variable ( "dlg_xyz")

    - then app_inifile is checked for a section [dlg_xyz]
    you can imagine what happens there...

    - anyway the clue is: in NewDialogOnDesktop._create()
    a new dialog named as the local user-variable in StartUp() is created.

    - without the users knowledge i create a Hash-Table and
    - store the hash-handle to the UI-object by
    DIALOG SET USER 1, pHash
    
    internally you should think of another place to hide it e.g. Api-function

    setProp( hDlg, "secretPropertyname", mkDwd$(pHash) )

    Always remember: if exit from function Startup the variable of type NewDialogOnDesktop will be destroyed.

    What remains is a Dialog that
    *** HAS THE SAME NAME ***
    as the user named the local variable to create it.
    (Remember this when you see *** again)

    until here its already all doable, now...

    The user will probably (for sure) store the "so important hDlg"

    ...

    suggest 3+ New UI-module-functions:

    DIALOG PROPERTY SET hDlg, <propertyname> As DataType [ = <initial_value>]
    DIALOG PROPERTY LET hDlg, <propertyname> { = | , } <new_value>
    DIALOG PROPERTY GET hDlg, <propertyname>
    - where
    <propertyname> is nothing but the key to a bucket of pHash

    and SET creates it and tells you how to treat its content. LET to change and GET to obtain the value.


    The very same functions should be accessible over the dialogs class using

    <Dialogname>.Set <propertyname> As DataType

    etc.
    -since the "major-key" to the hash-table is attached to the class already-

    And soon users can define their own properties to any dialog so very simple thanks to the hash-tables

    Controls - i would consider - are dialogs major properties
    theirs IDs in a hexadecimal format ($NUL can not be a hash-key)

    ... think that thought to your own end...


    ...simsalabim...

    Anyway thinbasic should control the IDs (detect if a block "BEGIN CONTROLID- END CONTROLID" is present when USES "UI" = if none then thinbasic should allow the

    <Dialogname>.Add<controlname> As <controlclassname>

    check APP_Inifile or new UI_Inifile for a section matching

    [<Dialogname>.<Controlname>]

    and let the visual designer load and save this format = happy users...


    if beginning a line with [ can have a meaning to UI-module? Maybe as a new Begin?
    Begin UI
     
    [<dialogname>]
    Class=Dialog
    Parent=DESKTOP    ; or <Parentname>
    Scaling=PIXELS
    FontNames="Segoe UI","SpaceMono","Tahoma","Tahoma"
    FontHeights=9, 10, 9, 11
    FontStyles=0,0,0,1
    Size=0.5, 0.4
    Loc=0.25, 0.3
    MinClientSize=240,160
    ShowState=%SW_Normal 
    Style=%WS_DLGFRAME|%WS_CAPTION|%WS_SYSMENU|%WS_OVERLAPPEDWINDOW|%WS_CLIPCHILDREN|%WS_CLIPSIBLINGS 
    GradientType=<none>
    GradientStart=0,0,0
    GradientEnd=255,255,255
    BGColor=0x20 0x40 0x80
    FGColor=0xF0 0xB0 0x00
    ImageFile=example.PNG
    ImagePath=Media\Images\
    ImageMode=Stretch
    Caption="Am just a one-line-caption"
          
    [<Dialogname>.<controlname>]
    
    Class=Textbox
    Text "Hello i am Text. I can be multiline"
    Tooltip "Click on this object to experience something special"
    Loc=4,4
    Size=-8,-8
    Resize=1,1,1,1
    UseFont=2
    
    End UI
    
    relative meaning for sizes:
    if a decimal dot (float value) is used the value is to multiply with the available client of the parent.

    Size=0.5,0.4 means half of parents client width, 40% of parents client height.
    thinkable: objects inside of other objects (viewports/tab-pages) can have multiple times theirs parents size. to prevent misunderstanding, if i set minsize 30,20 to something previously its units or pixels
    but then i apply a size of 25,14.35 to this object its obviously no decimal point in the 25 but the minsize
    of 30 clarifies: i want it 25 times the available client-size of the parent.

    Size=-8, -8 negative sizes?
    impossible to display this value - but to subtract it from parents available client size makes sense
    same goes for locations...

    This can be ini-file as well as thinbasic-ui-file



    Callback-functions names

    *** WILL CONTAIN THE SAME NAME ***

    in their first part as for example

    callback function dlg_xyz_OnCallback()

    However you did achieve that a callback-function has Callback-variables as CBHNDL, CBCTL etc.
    (or as Type-functions would refer to ME)
    you can create on entry of a callback a local layover to an udt

    Type DialogInCallback _
           Extends _
           tAnyDialogs_sharedAncestorType
    
         '..........................................................................................
         UDT_Method _Create( byval pHash As Dword )
    
         ' creation-parameter is the handle of the hash-table that stored and 
         ' contains the mostly user-defined properties and settings of the dialog 
         ' that was created as NewDialogOnDesktop
    
        End UDT_Method
    End Type
    
    when you manage to create this variable on entry of a callback-function and grab (by CBHNDL)

    Dword pHash = getProp(CBHNDL, "secretpropertyname")


    the pointer to the hash-table to pass as creation-parameter of the udt-variable that you can simply
    name ME - since the functions name (required - unnamed - other - functions can not work!) already tells
    the name.
    It's not the same "Me" as in an udt but who will notice it? How?

    Anyway the user can create a local variable from anywhere but tbMain and from a callback where you provide it already and avoid the usage of the global objects name in a local variable again by ME -
    even for the case the user wants to exchange controls on a dialog - except making it a non-mdi which was mdi previously there are no limits.

    i just hope the idea became visible as imagination
    Last edited by ReneMiner; 30-03-2023 at 02:15.
    I think there are missing some Forum-sections as beta-testing and support

  3. #13
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    i forgot:
    Setting a Minsize / MinClientSize to a Dialog that contains a value of zero leads to
    thinbasic no more responding.
    there's no way to turn off the minsize-setting but setting it like "1,1"
    which is not really "OFF" but just very small

    the thought to turn it like

    DIALOG SET MINSIZE hDlg, OFF, OFF

    were much more logic

    and to tokenizer again:

    <varname>.Token(index).Data

    ( the only working - and most important one - of the <...>.Token(...).-methods )
    is not even mentioned in the help-file

    Very much annoying:
    right-click in thinAir code window creates a line ----- not even commented
    Last edited by ReneMiner; 30-03-2023 at 03:09.
    I think there are missing some Forum-sections as beta-testing and support

  4. #14
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    René you are like a river in flood! In a good way I mean.

    A flood of ideas to evaluate and analyze.
    I have already fixed some errors in the help.
    I have to find the time to read your other evaluations, understand them and see what can be done.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #15
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170

    could you please fix thinbasic.exe?

    I don't know if not anyone uses it and nobody but me does have the problem with tb 1.11.7 from end of december 2022

    I use a previous version because thinbasic refuses to run 4 of 5 scripts and always gives me an error-message: Missing quote!

    I counted, examined, replaced, exchanged but:
    Not a single nor double quote but 200 lines and above - i am going crazy

    Error - missing quote!

    Its not caused by thinAir for sure.
    But its causing me getting angry- bit by bit... Ain't there a newer version available?
    I think there are missing some Forum-sections as beta-testing and support

  6. #16
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Ciao René

    please download and install latest version I'm working on from this url: https://www.thinbasic.com/public/__ForRene__/

    Let me know it it solve your problem.
    Otherwise, please send me a minimum example having the problem you mentioned.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  7. #17
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    I've found already a previous thincore from january attached to another thread here. My problem was due to login did not work correct i could not access the download attached to it. I've found it 2 days ago and there was no message of a missing quote yet.

    Now i will try the new posted one, just to make sure.

    Some misbehaviour comes up in thinAir - caused by the auto-focus-changing of windows 11. When mousepointer hovers somewhere where is no code. but i type until the text caret passes by at the mousepointer that now points something that i just typed. And a codetip appears taking focus away from codewindow. While i type i concentrate , look at the keyboard, type 200 chars until i have finished my line but: thinAir did not receive my input. Instead the mouspointer points a codetip ... couldn't the codetips content be shown alternatively in one of the former boxes below coding-area or a make the statusbar multiline to display those? Or another alternative if still possible (Balloon-Tips in WinXp appearing in the taskbar-corner where is now "Action-Center" with "Notifications" - or let one of those many panels re-appear and make it dockable and hover without focus in a corner where i can decide it shall dislay it's wisdom. Maybe with a HOT-KEY binding - some that will not be used to type in ( like escape ,Scroll or the context-menu-key that acts like right mouse click and will set focus on the souffleur...

    I mean i do not want the information to be hidden nor to cover the area while i type, moving the mousepointer out of thinAir is changing to another desktop or open window- so in order to type i must position the mouse over the control where i want to type in.

    Now i will check out the new one...
    I think there are missing some Forum-sections as beta-testing and support

  8. #18
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    The missing quote bug is definetely gone.
    But what annoys me very much is thinAir - since - a few years , half a decade at least the horizontal scroll of thinair is a burden that makes life not easier.
    And the Real-time check for bugs suffers a weak regex and is the reason for thinair to get killed by the os.
    Some of the parsers run themselves into the abyss and took my code there twice today.
    1. do not start parsing for highlighting or bugs detection while i am typing. What happens is:

    thinair fades to gray, the caption says "Not responding" - aint there someone not answering the callback?

    In any case thinair never recovers, never returns to duty and becomes responsive again and after a while the os kills the task since it explodes the used ram to 930 MB - almost 1GB.

    i did not test much more than typing and launching a few scripts. I feel typing itself reacts much faster than the previous versions

    and for completeness my almost overwritten thinbasic_Start_End_Autoclose.
    Btw. almost overwritten: if thinbasic installation would create a user-folder named as the current user where it places personal settings etc. it would never come to the problem of accidently overwriting data
    Therefore - and for a couple more ideas how to improve (definetely AUTOSAVE when thinair loses focus!)

    have a look at this thread :
    https://www.thinbasic.com/community/...6396#post96396

    ;------------------------------------------------------------------------------------
    ;--- HELP ---
    ;    SearchFor       = [mandatory] Text to be searched at the beginning of line
    ;    AutoCloseWith   = [mandatory] Text to be inserted in editor
    ;------------------------------------------------------------------------------------
    ;    $SPC     will be substituted with space
    ;    $CRLF    will be substituted with carriage return and line feed
    ;    $TAB     will be substituted with tab
    ;    $Cursor  will move cursor at position
    ;------------------------------------------------------------------------------------
    ;
    ;[Example]
    ;SearchFor=MyKey$SPC
    ;AutoCloseWith=$TAB$Cursor$CRLFEnd MyKey
    
    
    [Callback]
    SearchFor=callback$SPC
    AutoCloseWith=$TAB$Cursor$CRLFEnd Function$CRLF
    [BeginConst]
    SearchFor=Begin$SPCconst
    AutoCloseWith=$TAB$Cursor$CRLFEnd Const$CRLF
    [BeginControlid]
    SearchFor=Begin$SPCcontrolid
    AutoCloseWith=$TAB%IDC_$Cursor$CRLFEnd ControlID$CRLF
    [IDC]
    SearchFor=$TAB%IDC_
    AutoCloseWith=$TAB%IDC_$Cursor$CRLF
    [IDM]
    SearchFor=$TAB%IDM_
    AutoCloseWith=$TAB%IDM_$Cursor$CRLF    
    [Union]
    SearchFor=union$SPC
    AutoCloseWith=$TAB$Cursor$CRLFEnd Union$CRLF
    [With]
    SearchFor=With$SPC
    AutoCloseWith=$TAB%.$Cursor$CRLFEnd With$CRLF
    
    I think there are missing some Forum-sections as beta-testing and support

  9. #19
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    2024.01.01 23:00 CET

    by the end o Jan 2024 thinBasic version 1.12 will be out, I'm finalizing some parts I've developed and documenting them.

    In the meantime have a look at this preview: https://www.thinbasic.com/projects/t...0_20231228.zip
    There are many new feature and many bug fixed: https://help.thinbasic.com/index.htm...n_1_12_0_0.htm
    Last edited by ErosOlmi; 03-01-2024 at 07:14.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  10. #20
    Member
    Join Date
    Feb 2023
    Location
    London, Ontario, Canada
    Posts
    32
    Rep Power
    5
    I am getting "Error 404 - Not Found" on both links.

    Joe

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. thinBasic Beta Testing 1.11.7.0
    By ReneMiner in forum thinBasic Beta testing
    Replies: 6
    Last Post: 05-04-2022, 15:34
  2. thinBasic 1.10.5 help on testing a new feature
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 11
    Last Post: 30-11-2017, 00:00
  3. Test Driven Development & Unit Testing for thinBASIC
    By Petr Schreiber in forum User files and/or user projects
    Replies: 11
    Last Post: 19-01-2014, 01:13
  4. OpenB3D Engine Wrapper for ThinBasic (open testing)
    By Artemka in forum TBGL Scripts and Projects
    Replies: 4
    Last Post: 12-03-2013, 23:38
  5. thinBasic Beta 1.8.1.x
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 21
    Last Post: 17-06-2010, 18:24

Members who have read this thread: 9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •