Page 10 of 10 FirstFirst ... 8910
Results 91 to 96 of 96

Thread: thinBasic 2.x direction

  1. #91
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    68
    Posts
    3,865
    Rep Power
    405

    Re: thinBasic 2.x direction Radical Idea

    Well here is a very radical idea for thinBasic 2.x direction.

    As you might know or not know, google has a very nice BASIC for Android. Unfortunately, development on it has not been updated. It is a great oop Basic waiting for someone with Eros's passion to take it over. They are looking for developers. This could be perhaps where Eros's passion and productivity could really take off on the future platform for most users. I know I have been saying this, but think about it. 2 years ago, most of us were on desktops. Now I am sure many are using notebooks or netbooks as much or more than desktops. Smartphones are used by my friends who are not computer freaks, they just use facebook, email and surf, their main devices now are smartphones. Tablets will be next. The future is small full day use portable devices with lots of power. I think the Eros, Charles, Petr, Mike could all add to this BASIC that needs attention.

    I think with a nice foundation already there, no recoding of all that has been done is necessary. Just pick up with what is there and make it awesome as it deserves!

    http://code.google.com/p/simple/

    http://code.google.com/p/simple/wiki...butingToSimple

    It has been a year since any updates, so I am sure this is ripe to take over and bring on the BASIC revolution to these devices!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  2. #92
    Member
    Join Date
    Jan 2010
    Location
    Montreal, Canada
    Posts
    40
    Rep Power
    19
    If I could put in two cents on behalf of the audience of non-programmers. I am an electrical engineer who has spent the vast majority of his 40+ year career designing electronic hardware and managing hardware designers. I have never studied software design, and would not call myself even a casual programmer. Early on I used FORTRAN and BASIC, and when the need has arisen over the years I have gone back to BASIC, usually QUICKBASIC under DOS. After a gap of many years the need to do some programming returned, and QUICKBASIC was gone. I could not get my head around Visual Basic, found ThinBasic on a Google search, and fell in love.

    For those of us in the audience who match my profile, I would beg you to retain the current functionality in v1.9 and if you choose to go the OOP route (which remains a total mystery to me), please restrict it to 2.x as a new branch. I think that there is more than enough functionality available now to meet the vast majority of the needs of people like me, and if there remained sufficient bandwidth to handle maintenance and the occasional upgrade request, that would be great. If the whole product changed into simply another language using objects and classes I would be lost.

    I would also like to see this thread go back to what Eros originally requested - ideas and suggestions rather than detailed code examples and arguments (sometimes less than civil) about the relative merits of different development environments and compilers. Irrelevant to the present discussion.

    One suggestion I would put forward is to have the bundle extract the dll's to disk the first time it is run and to leave them there. It would subsequently extract and start much faster, especially if the executable then extracted directly to memory as others have suggested. I would also vote for the ability to include custom icons - nice touch.

    Finally, I would like to take the opportunity to issue an enormous thank you to Eros and to the others responsible for making ThinBasic available to users like me - a language of great power and elegance that is simple and accessible.

    Rick

  3. #93
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Thanks a lot Rick.

    What I can say for sure is that whatever direction we will get, I will not break syntax compatibility with previous thinBasic version. All new features will not change anything in what is the current syntax.
    In version 1.8.8.0 I started to add what we call "module classes" that will start a sort of OOP syntax (dotted notation) and not OOP language. Just syntax. But this will not break any current syntax.

    Regarding Bundle Exe, that is an area in which I would like thinBasic to improve a lot.
    Bundling area was in charge of another person. For those of you who followed thinbasic born, you may remember his name: Roberto Bianchi.
    Roberto did a tremendous job but now that job seems having to reached its boundaries in terms of options and flexibility.
    During summer I will work a lot on bundling exe trying to simplify it allowing more opportunities and functionalities.

    Instead what will be stopped in version 2.x will be compatibility with old Windows versions.

    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

  4. #94
    If the interest is there, a thinBasic to OxygenBasic translator would be a great open source project. IMHO
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  5. #95

    GUI tools

    I need to spend some more time with thinbasic, but I do have some ideas to add to it.

    I need to see if the module building feature will allow me to create a GUI engine module similiar to my EZGUI.

    I was thinking of possibly porting over an early version of EZGUI (say 1.0, 2.0 or even maybe 3.0) to a thinbasic module, so building user interfaces would be easy even for novices.

    Also I build Visual designers possibly if I could build an EZGUI module, then I could port over a visual designer so it could generate code for thinbasic using the module.

    Just an idea !

    Tell me if this is possible for a thinbasic module:

    The ability to call a function which would be similiar to WinMain in PowerBasic and let a module take control. The function would be pased three code pointers which it would need to call when it requests the app to do something. In PowerBasic I simply call back to these subroutines in the app using CALL DWORD, but because thinbasic is a scripting language I would assume I can't call back to an actual subroutine like I do with PowerBasic. I would have to call a thinbasic internal routine which would in turn forward the call to the appropriate section of script, rather than machine code like with PowerBasic.

    An EZGUI module would make thinbasic far more usable by novices, because it does not use any API functions or API constants at all.

    To give you an idea of how EZGUI code normally looks, which is what a thinbasic EZGUI module would hopefulyl be able to support via thinbasic scripting, here is a simple example of all the code for a one form app with the different controls supported by EZGUI 3.0:

     
    ' *************************************************************************************
    '                         Application Constants and Declares
    ' *************************************************************************************
    '       add any custom constants here
    '       add any custom declares here
    DECLARE SUB Form1_Display(BYVAL Parent$)
    DECLARE SUB Form1_Design()
    DECLARE SUB Form1_Events(CID&, CMsg&, CVal&, Cancel&)
    ' ------------------------------------------------
    
    ' ----------------------------------------------------------
    %FORM1_FILE                                   = 4000
    ' ----------------------------------------------------------
    %FORM1_NEWFILE                                = 4005
    %FORM1_OPENFILE                               = 4010
    %FORM1_SAVEFILE                               = 4015
    %FORM1_SAVEAS                                 = 4020
    %FORM1_SEPARATOR_4025                         = 4025
    %FORM1_EXIT                                   = 4030
    ' ----------------------------------------------------------
    %FORM1_EDIT                                   = 4100
    ' ----------------------------------------------------------
    %FORM1_CUT                                    = 4105
    %FORM1_COPY                                   = 4110
    %FORM1_PASTE                                  = 4115
    ' ----------------------------------------------------------
    %FORM1_HELP                                   = 4200
    ' ----------------------------------------------------------
    %FORM1_HELP1                                  = 4205
    %FORM1_BUTTON1            = 100
    %FORM1_CHECK1             = 105
    %FORM1_RADIO1             = 110
    %FORM1_TEXT1              = 115
    %FORM1_LISTBOX1           = 120
    %FORM1_COMBOBOX1          = 125
    %FORM1_VSCROLL1           = 130
    %FORM1_HSCROLL1           = 135
    %FORM1_LABEL1             = 140
    %FORM1_PROGRESS1          = 145
    %FORM1_UPDOWN1            = 150
    %FORM1_RICHTEXTONE1       = 155
    %FORM1_LISTVIEW1          = 160
    %FORM1_TREEVIEW1          = 165
    %FORM1_HTRACKBAR1         = 170
    %FORM1_DATETIME1          = 175
    %FORM1_FRAME1             = 180
    %FORM1_TAB1               = 185
    ' ------------------------------------------------
    DECLARE SUB FORM1_FILE_Select()
    DECLARE SUB FORM1_NEWFILE_Select()
    DECLARE SUB FORM1_OPENFILE_Select()
    DECLARE SUB FORM1_SAVEFILE_Select()
    DECLARE SUB FORM1_SAVEAS_Select()
    DECLARE SUB FORM1_EXIT_Select()
    DECLARE SUB FORM1_EDIT_Select()
    DECLARE SUB FORM1_CUT_Select()
    DECLARE SUB FORM1_COPY_Select()
    DECLARE SUB FORM1_PASTE_Select()
    DECLARE SUB FORM1_HELP_Select()
    DECLARE SUB FORM1_HELP1_Select()
    DECLARE SUB FORM1_BUTTON1_Click()
    DECLARE SUB FORM1_CHECK1_Click()
    DECLARE SUB FORM1_RADIO1_Click()
    DECLARE SUB FORM1_TEXT1_Change()
    DECLARE SUB FORM1_LISTBOX1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_COMBOBOX1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_VSCROLL1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_HSCROLL1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_UPDOWN1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_RICHTEXTONE1_Load(BYVAL Mode&, BYVAL D$)
    DECLARE SUB FORM1_RICHTEXTONE1_Change()
    DECLARE SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
    DECLARE SUB FORM1_LISTVIEW1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_LISTVIEW1_Select(BYVAL CVal&)
    DECLARE SUB FORM1_TREEVIEW1_Fill(BYVAL Mode&)
    DECLARE SUB FORM1_TREEVIEW1_Select(BYVAL CVal&)
    DECLARE SUB FORM1_HTRACKBAR1_Change(BYVAL CVal&)
    DECLARE SUB FORM1_DATETIME1_Change()
    DECLARE SUB FORM1_TAB1_Change(BYVAL CVal&)
     
    ' *************************************************************************************
    '                         Application Global Variables and Types
    ' *************************************************************************************
    '       add any globals here
    ' Global Handles for menus
    GLOBAL FORM1_hMenu0&
    GLOBAL FORM1_hMenu1&
    GLOBAL FORM1_hMenu2&
    GLOBAL FORM1_hMenu3&
     
    '    Note:     Do NOT change the names of the EZGUI Callback Procedures !
    ' --------------------
    #INCLUDE "C:\ezgui30\includes\ezwmain.inc"                          ' EZGUI Include file for WinMain
    ' --------------------
    ' *************************************************************************************
    '                               EZGUI Program Control Functions
    ' *************************************************************************************
    SUB EZ_Main(VerNum&)
        ' VerNum&   =   Version number (ie. 101 =   Version 1.01)
        EZ_Reg 0, 0     ' use your Customer ID Number and Registration Number here.
        EZ_DefFont 6, "Arial", 10, "V"
        EZ_DefFont 7, "Courier New", 10, "F"
        EZ_DefFont 8, "Times New Roman", 10, "V"
        EZ_DefFont 9, "Modern", 10, "V"
        Form1_Display ""
    END SUB
    ' -------------------------------------------------------------------------------------
    SUB EZ_DesignWindow(FormName$)
        '      - NOTE:   EZGUI passes back Form Name in uppercase letters
        SELECT CASE FormName$
            CASE "FORM1"
                Form1_Design
            CASE "{ABORT}"
                ' add controls to Print Abort Dialog here
            CASE ELSE
        END SELECT
    END SUB
    ' -------------------------------------------------------------------------------------
    SUB EZ_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)
        ' =============================================================================
        '   CID&      =     Control ID or %EZ_Window (0) if Window event
        '   CMsg&     =     Control Event Message (Type)
        '   CVal&     =     Value:  (ie. Scrollbar value)
        '   Cancel&   =     is for Closing a Window. Set Cancel& to -1 (True) to stop close
        ' =============================================================================
        '      - NOTE:   EZGUI passes back Form Name in uppercase letters
        ' =============================================================================
        '      - NOTE:   EZGUI passes back Form Name in uppercase letters
        SELECT CASE FormName$
            CASE "FORM1"
                Form1_Events CID&, CMsg&, CVal&, Cancel&
            CASE "{ABORT}"
            CASE "{APP}"
                IF CMsg&=%EZ_Terminate THEN
                END IF
            CASE ELSE
        END SELECT
    END SUB
    ' -------------------------------------------------------------------------------------
     
    '     add any Library procedures/functions here
     
    ' *************************************************************************************
    '                                 Put Your Code Here
    ' *************************************************************************************
    SUB Form1_Display(BYVAL Parent$)
        FORM1_hMenu0&=EZ_DefMainMenu( %FORM1_FILE, "&File", "")
        EZ_Color -1, -1
        EZ_Form "FORM1", Parent$, "Your Dialog", 0, 0, 122, 30, "CK"
    END SUB
    ' ------------------------------------------------
    GLOBAL Form1_FF&
    SUB Form1_Design()
        LOCAL FF&
        '---------------------------------------------------------------
        FF& =  9              '          -  Offset for Font Numbers
        Form1_FF& = FF&          ' Global for ODButtons Draw code
        '---------------------------------------------------------------
        EZ_AddMenuItem FORM1_hMenu0&, %FORM1_EDIT, 0, "&Edit", ""
        EZ_AddMenuItem FORM1_hMenu0&, %FORM1_HELP, 0, "&Help", ""
        FORM1_hMenu1&=EZ_DefSubMenu( %FORM1_NEWFILE, "&New File", "")
        EZ_SetSubMenu FORM1_hMenu0& , %FORM1_FILE, FORM1_hMenu1&
        EZ_AddMenuItem FORM1_hMenu1&, %FORM1_OPENFILE, 0, "&Open File", ""
        EZ_AddMenuItem FORM1_hMenu1&, %FORM1_SAVEFILE, 0, "&Save File", ""
        EZ_AddMenuItem FORM1_hMenu1&, %FORM1_SAVEAS, 0, "Save File &As", ""
        EZ_AddMenuItem FORM1_hMenu1&, %FORM1_SEPARATOR_4025, 0, "-", ""
        EZ_AddMenuItem FORM1_hMenu1&, %FORM1_EXIT, 0, "E&xit", ""
        FORM1_hMenu2&=EZ_DefSubMenu( %FORM1_CUT, "Cu&t", "")
        EZ_SetSubMenu FORM1_hMenu0& , %FORM1_EDIT, FORM1_hMenu2&
        EZ_AddMenuItem FORM1_hMenu2&, %FORM1_COPY, 0, "&Copy", ""
        EZ_AddMenuItem FORM1_hMenu2&, %FORM1_PASTE, 0, "&Paste", ""
        FORM1_hMenu3&=EZ_DefSubMenu( %FORM1_HELP1, "&Contents", "")
        EZ_SetSubMenu FORM1_hMenu0& , %FORM1_HELP, FORM1_hMenu3&
        ' ------------------------------------------------
        EZ_Color-1,-1
        EZ_UseFont -1
        EZ_UseFont 4
        EZ_Button %FORM1_BUTTON1, 4, 1, 13, 3, "Button  1", "T"
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_CheckBox %FORM1_CHECK1, 25, 1, 17, 2, "Check  1", "T"
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_Radio %FORM1_RADIO1, 42, 1, 17, 2, "Radio  1", "T"
        ' --------------------------------------------------------------
        EZ_Color 1, 25
        EZ_UseFont 4
        EZ_Text %FORM1_TEXT1, 5, 5, 15, 2, "", "EST"
        ' --------------------------------------------------------------
        EZ_Color-1,-1
        EZ_UseFont 4
        EZ_ListBox %FORM1_LISTBOX1, 4, 8, 14, 4, "Item 1|Item 2|Item 3|Item 4|Item 5|", "SAVT"
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_ComboBox %FORM1_COMBOBOX1, 4, 13, 16, 5.25, "Item 1|Item 2|Item 3|Item 4|Item 5|", "SAVT"
        EZ_SelectItem "Form1", %FORM1_COMBOBOX1, 0
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_VScroll %FORM1_VSCROLL1, 4, 16, 3, 7, ""
        EZ_SetVScroll "Form1", %FORM1_VSCROLL1, 0, 100, 50, 1
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_HScroll %FORM1_HSCROLL1, 4, 24, 18, 2, ""
        EZ_SetHScroll "Form1", %FORM1_HSCROLL1, 0, 100, 50, 1
        ' --------------------------------------------------------------
        EZ_Color 9, 15
        EZ_UseFont 4
        EZ_Label %FORM1_LABEL1, 11, 16, 14, 2, "Label  1", "C"
        ' --------------------------------------------------------------
        EZ_Color-1,-1
        EZ_UseFont 4
        EZ_ProgressBar %FORM1_PROGRESS1, 30, 21, 20, 2, ""
        EZ_SetPBar "Form1", %FORM1_PROGRESS1, 0, 100, 50
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_UpDown %FORM1_UPDOWN1, 31, 24, 2.375, 2, ""
        EZ_SetUpDown "Form1", %FORM1_UPDOWN1, 0, 100, 50
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_RichText1 %FORM1_RICHTEXTONE1, 59, 4, 24, 5, "STVB"
        FORM1_RICHTEXTONE1_Load -1, ""
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_ListView %FORM1_LISTVIEW1, 59, 11, 27, 5, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
        FORM1_LISTVIEW1_Fill -1
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_TreeView %FORM1_TREEVIEW1, 61, 17, 28, 5, "SVT+-"
        FORM1_TREEVIEW1_Fill -1
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_HTrackBar %FORM1_HTRACKBAR1, 43, 24, 27, 2, ""
        EZ_SetTBar "Form1", %FORM1_HTRACKBAR1, 0, 100, 50
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_DateTime %FORM1_DATETIME1, 91, 3, 19, 2, "T"
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_Frame %FORM1_FRAME1, 29, 7, 11, 5, "Frame  1", ""
        ' --------------------------------------------------------------
        EZ_UseFont 4
        EZ_TabControl %FORM1_TAB1, 30, 14, 21, 6, "Tab 1|Tab 2|Tab 3", ""
        ' --------------------------------------------------------------
    END SUB
    ' ------------------------------------------------
    SUB Form1_Events(CID&, CMsg&, CVal&, Cancel&)
        SELECT CASE CID&
            CASE %EZ_Window
                IF CMsg&=%EZ_Close THEN
                END IF
            CASE %FORM1_FILE
                FORM1_FILE_Select
            CASE %FORM1_NEWFILE
                FORM1_NEWFILE_Select
            CASE %FORM1_OPENFILE
                FORM1_OPENFILE_Select
            CASE %FORM1_SAVEFILE
                FORM1_SAVEFILE_Select
            CASE %FORM1_SAVEAS
                FORM1_SAVEAS_Select
            CASE %FORM1_SEPARATOR_4025
            CASE %FORM1_EXIT
                FORM1_EXIT_Select
            CASE %FORM1_EDIT
                FORM1_EDIT_Select
            CASE %FORM1_CUT
                FORM1_CUT_Select
            CASE %FORM1_COPY
                FORM1_COPY_Select
            CASE %FORM1_PASTE
                FORM1_PASTE_Select
            CASE %FORM1_HELP
                FORM1_HELP_Select
            CASE %FORM1_HELP1
                FORM1_HELP1_Select
            CASE  %FORM1_BUTTON1
                IF CMsg&=%EZ_Click THEN
                    FORM1_BUTTON1_Click
                END IF
            CASE  %FORM1_CHECK1
                IF CMsg&=%EZ_Click THEN
                    FORM1_CHECK1_Click
                END IF
            CASE  %FORM1_RADIO1
                IF CMsg&=%EZ_Click THEN
                    FORM1_RADIO1_Click
                END IF
            CASE  %FORM1_TEXT1
                IF CMsg&=%EZ_Change THEN
                    FORM1_TEXT1_Change
                END IF
            CASE  %FORM1_LISTBOX1
                IF CMsg&=%EZ_Change THEN
                    FORM1_LISTBOX1_Change CVal&
                END IF
            CASE  %FORM1_COMBOBOX1
                IF CMsg&=%EZ_Change THEN
                    FORM1_COMBOBOX1_Change CVal&
                END IF
            CASE  %FORM1_VSCROLL1
                IF CMsg&=%EZ_Change THEN
                    FORM1_VSCROLL1_Change CVal&
                END IF
            CASE  %FORM1_HSCROLL1
                IF CMsg&=%EZ_Change THEN
                    FORM1_HSCROLL1_Change CVal&
                END IF
            CASE  %FORM1_UPDOWN1
                IF CMsg&=%EZ_Change THEN
                    FORM1_UPDOWN1_Change CVal&
                END IF
            CASE  %FORM1_RICHTEXTONE1
                IF CMsg&=%EZ_Change THEN
                    FORM1_RICHTEXTONE1_Change
                END IF
            CASE  %FORM1_LISTVIEW1
                IF CMsg&=%EZ_Change THEN
                    FORM1_LISTVIEW1_Change CVal&
                END IF
                IF CMsg&=%EZ_Selected THEN
                    FORM1_LISTVIEW1_Select CVal&
                END IF
            CASE  %FORM1_TREEVIEW1
                IF CMsg&=%EZ_Selected THEN
                    FORM1_TREEVIEW1_Select CVal&
                END IF
            CASE  %FORM1_HTRACKBAR1
                IF CMsg&=%EZ_Change THEN
                    FORM1_HTRACKBAR1_Change CVal&
                END IF
            CASE  %FORM1_DATETIME1
                IF CMsg&=%EZ_Change THEN
                    FORM1_DATETIME1_Change
                END IF
            CASE  %FORM1_TAB1
                IF CMsg&=%EZ_Change THEN
                    FORM1_TAB1_Change CVal&
                END IF
            CASE ELSE
        END SELECT
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_FILE_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_NEWFILE_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_OPENFILE_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_SAVEFILE_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_SAVEAS_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_EXIT_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_EDIT_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_CUT_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_COPY_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_PASTE_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_HELP_Select()
    END SUB
    ' ------------------------------------------------
    ' ------------------------------------------------
    SUB FORM1_HELP1_Select()
    END SUB
    ' ------------------------------------------------
    
    ' ------------------------------------------------
    SUB FORM1_BUTTON1_Click()
    END SUB
    ' ------------------------------------------------
    SUB FORM1_CHECK1_Click()
    END SUB
    ' ------------------------------------------------
    SUB FORM1_RADIO1_Click()
    END SUB
    ' ------------------------------------------------
    SUB FORM1_TEXT1_Change()
    END SUB
    ' ------------------------------------------------
    SUB FORM1_LISTBOX1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_COMBOBOX1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_VSCROLL1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_HSCROLL1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_UPDOWN1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_RICHTEXTONE1_Load(BYVAL Mode&, BYVAL D$)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_RICHTEXTONE1_Change()
    END SUB
    ' ------------------------------------------------
    SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
        LOCAL R&, C&, Tmp$
        IF Mode&=-1 THEN    ' Initial Data
            FOR R&=0 TO 50    ' Rows
                FOR C&=0 TO 5    ' Columns
                    Tmp$="Item "+RIGHT$("00"+LTRIM$(STR$(R&)),2)+","+STR$(C&)
                    EZ_AddLVItem "Form1", %FORM1_LISTVIEW1, Tmp$, 0, R&, C&, ""
                NEXT C&
            NEXT R&
        END IF
    END SUB
    ' ------------------------------------------------
    SUB FORM1_LISTVIEW1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_LISTVIEW1_Select(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_TREEVIEW1_Fill(BYVAL Mode&)
        LOCAL N1&, N2&, hParent&, Prop$, hAfter&, P&
        LOCAL TreeHandles&()
        IF Mode&=-1 THEN    ' Initial Data
                DIM TreeHandles&(1 TO 3, 1 TO 3)
                FOR N1&=1 TO 3
                    FOR N2&=1 TO 3
                        P&=1
                        hParent&=0
                        Prop$="{T}{S}+"
                        IF N2&>1 THEN
                            hParent&=TreeHandles&(N1&,1)
                            Prop$="{T}{S}+"
                            P&=2
                        END IF
                        IF N2&>2 THEN
                            hParent&=Treehandles&(N1&,2)
                            Prop$="{T}{S}"
                            P&=2
                        END IF
                        hAfter&=0
                        TreeHandles&(N1&,N2&)=EZ_AddTVItem("Form1", %FORM1_TREEVIEW1, hParent& , hAfter&, "Item"+STR$(N1&)+","+STR$(N2&),P&,0,Prop$)
                    NEXT N2&
                NEXT N1&
        END IF
    END SUB
    ' ------------------------------------------------
    SUB FORM1_TREEVIEW1_Select(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_HTRACKBAR1_Change(BYVAL CVal&)
    END SUB
    ' ------------------------------------------------
    SUB FORM1_DATETIME1_Change()
    END SUB
    ' ------------------------------------------------
    SUB FORM1_TAB1_Change(BYVAL CVal&)
        EZ_DisplayLayer "Form1", CVal&, 0 OR %EZ_DECtrls
    END SUB
    
    EZGUI is event based and it would be nice to be able to do this in a thinbasic module.

    EZGUI uses indexes for colors, just like DOS Basic does (colors 0 to 15 are predefined).
    It uses character base coordinates, so you don't have to use pixels or dialog units. Character units though are floating point, so you can define down to the pixel using them.

    Form creation is very easy with a simple command EZ_Form. When EZ_Form is called the form is created, but hidden and then EZGUI calls the EZ_DesignWindow routine passing the forms name and that is where you add controls and menus.

    EZGUI handles the message loop and is in control. When a control has an event (ie. user clicks control) an event is generated and forwarded to the EZ_Events routine.

    Forms have names (strings) and not handles like using he Windows API.

    Controls have ID numbers.

    Properties are passed using a very simple string, with one character representing a property. For example to have a textbox which can be edited, one would use the property string:

    "EST"

    E for editable
    S for sunken edge border
    T for tabstop

    No API constants being OR'ed together. As "easy as pie", perfect for a novice.

    The idea would be to create a freeware EZGUI thinbasic module for building user interfaces.

    So for this to work, a thinbasic module would have to allow me to do the following:

    (1) Call a startup function in the module and control would remain in the module

    (2) The module would have to be able to generate a call to the EZ_Main routine in the thinbasic script and then you can call EZGUI module commands there.
    One EZ_Form (or a subroutine called which contains it) command needs to be called in this part of the script to create the first form.


    (3) Before EZ_Main in the script returns, the EZ_Form call will generate another callback from the module to EZ_DesignWindow which would require thinbasic to forward the call to the EZ_DesignWindow routine in the thinbasic script, where control creation commands will be called in the script.

    (4) When EZ_DesignWindow finishes, then EZ_Main will be able to finish and once again the EZGUI module would be in control.

    (5) When the EZGUI modules needs to generate an event, it would have to forward a call to the thinbasic script routine EZ_Events.

    My GUI engine is not just a set of wrappers. It literally takes control and handles the message loop and all event processing.

    Would the current state of thinbasic allow such a module, which require this kind of callback arrangement ?

  6. #96
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Chris,

    consider that apart thinBasic Core Engine (thinCore.dll) all other part of thinBasic are build as module.
    It means that all I've developed as module you also can develop the same.

    In particular thinBasic_UI.dll module (thinBasic User Interface module) is in charge to simulate Power Basic DDT and it does calling user script interpreted functions from inside the Module using special thinBasic SDK functions.

    To understand thinBasic SDK for PowerBasic, I suggest to start simple and create a little experimental module maybe not UI related but just for experimenting.
    Having done that, than we can talk about advanced situations like the one you mentioned in your post.
    Also remember that the control must be in the hands of the Core Engine and not into the module because thinBasic in more a parser than a real interpreted and Core engine must continue to parse script source code.
    If you pass control over to module, it is just calling an external program giving it full control, and this is not the case of thinBasic.

    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

Page 10 of 10 FirstFirst ... 8910

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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