Results 1 to 10 of 19

Thread: Next thinBasic: template dialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Next thinBasic: template dialog

    I'm few weeks I'm working on next thinBasic version: 1.9

    Among other many enhancements, one of the things I'm working on is a new template dialog, the dialog used to create a new thinBasic script (see image)
    So far I've almost completely re-coded it keeping as possible inspiration the new project dialog present in Microsoft Visual Studio

    There will be 4 areas in the dialog (see image):
    1. the repository tree structure used to store thinBasic script templates
    2. the list of templates present in a certain directory
    3. general info about templates like: author, date, version, ...
    4. a preview of the template


    I'm now working on area 3 and 4
    • In area 3 I'm trying to find a way to add that info inside template source code in order to get them during preview
    • In area 4 I'm working on adding Scintilla Text Editor as possible editor making experience with it in order to consider as possible future thinAir editor control.


    What I need?
    1. I need some advice on what you think about this new dialog layout
    2. I need some possible ideas to enhance this dialog
    3. I need idea on how to insert into template source code the template info: author, description short, description long, version, ...
      Maybe we can think to use XML as template structure. In this way it will be very easy to implement additional specifications
    4. I need some new templates from general one to complex one in order to present thinBasic programmers a quite rich set of templates to start from


    Any help will be very much appreciated.

    Ciao
    Eros
    Attached Images Attached Images
    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. #2
    Hi, in vb6 i am using it sometimes for a hurry calc, i draw quickly textbox and a button then dblclick on the button to write textbox1=some operation, i prefer this than console or msgbox. so a template for textbox with a button for a hurry calc will be useful, because it is not easy to remember the complex syntax of the related windows api functions. such a template can make use of the attached example i have found on my hard disk made by one of the users, i have edited it slightly.
    i suggest also a simple template for a form with a canvas, with a one instruction to draw an ellipse,circle, line, pixel.
    Attached Files Attached Files

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Quote Originally Posted by zak View Post
    Hi, in vb6 i am using it sometimes for a hurry calc, i draw quickly textbox and a button then dblclick on the button to write textbox1=some operation, i prefer this than console or msgbox. so a template for textbox with a button for a hurry calc will be useful, because it is not easy to remember the complex syntax of the related windows api functions. such a template can make use of the attached example i have found on my hard disk made by one of the users, i have edited it slightly.
    i suggest also a simple template for a form with a canvas, with a one instruction to draw an ellipse,circle, line, pixel.
    Thanks zak.

    All templates I will receive will be valuated for the next version.
    I want to create a rich set of templates because I have the doubt that the many thinBasic script examples are not much visible to users while if we will create them as templates I think they will be much more visible.

    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. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Eros,

    few ideas from my side:

    Template file format
    I would move the template file format completely to XML, having the following structure:

    <ThinAIRTemplate version="1.0">
    // Version of template file format
    <Header>
    <DescriptionShort>Simple dialog</DescriptionShort> // Name to be displayed in the templates listing instead of filename of this template
    <DescriptionLong>This template generates code for single modal dialog with button and callback</DescriptionLong> // Description to be displayed
    <Author>Petr Schreiber</Author> // Person responsible for the template
    <Contact>Drop user "Petr Schreiber" a personal message on ThinBASIC forumor email me at...</Contact> // Contact information in case of trouble, link to source of latest version and such
    <Version>1.1<Version> // Version of this particular template
    </Header>
    <Files count="1"> // In future it could be multifile, for projects and such
    <File>
    <Name>Dialog_</Name> // Gets pre-filled in the name for new file in New thinBasic script dialog, can be left empty, to give user more freedom
    <Extension>tBasic</Extension> // This is quite important, it could be tBasic, tBasicC, tBasicI, tBasicU, Txt
    <Code>

    uses "UI"

    ... here goes thinBasic code of the file ...

    </Code>
    </File>
    </Files>
    </ThinAIRTemplate>
    I am sorry, but I didn't managed to display it indented

    "New" dialog
    I like the new layout, but have few "highlevelization" ideas to make the dialog more intuitive to users:

    Area 1
    I am not sure what is the experience of other users, but I personally do not nest the template directories. There could be simple list of directories under Templates/ instead of treeview.

    The list of templates could get more human readable format, like in Visual Studio. It could be realised with WebControl, having a look of "Listbox on steroids" realised via HTML one column table:

    • each template would have his name in bold
    • author, version and other minor metadata would be listed below
    • description in italics below
    • tooltip would tell the file name for anyone interested, but most users won't need to know it I guess

    So one item would look like:
    Simple modal dialog
    author: Petr Schreiber, version: 1.1

    This template creates code for single modal dialog, with button and callback predefined
    It is a bit of space waste, but from my experience I do not use more than 6 templates in total, so this number would still fit on the screen.
    It could erase the need for Area 3.


    The gray area above is look to far future, it would take a lot of time.


    Petr
    Last edited by Petr Schreiber; 22-01-2012 at 18:04.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    The XML template idea still valid, for the dialog layout I have new idea, more realisable.

    For a newcomer, I think it would be good to add some visual guides, because what he will see will be 3 window areas - where he should click first?
    On the other side the code listing will be not needed for the ol' coders knowing the template well. This leads to new layout in the attachement.

    It has visual guides for new comer and expandable area with code listing.


    Petr
    Attached Images Attached Images
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

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

    as usual great ideas! Thanks.

    What is field "File name" used for?

    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. #7
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Thanks

    Currently, the file is always created as Untitled?.tBasic after pressing Use button.

    The file name field could be used to name the file since the beginning somehow, and the extension would be detected from the template XML File.Extension tag.

    The file name could be prefilled based on value in File.Name tag, but filling this tag in would be optional (could be left empty).

    What is this good for? For example in case of code units. As I use frequently the TBGL actor template, the new XML version of it would:
    • force tBasicU extension, as it is not standalone
    • the name would be suggested to start "actor_" to keep clear what the file is about


    Of course user can ignore this suggestion and name it as he wants.


    Petr

    Quote Originally Posted by ErosOlmi View Post
    Petr,

    as usual great ideas! Thanks.

    What is field "File name" used for?

    Eros
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  8. #8
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    I think is a great solution.

    I just need to change thinAir internal identification of new files never saved in order to ask user to save them
    At the moment "untitled" is used to identify them.
    Anyway quite simple change
    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

Similar Threads

  1. Replies: 5
    Last Post: 18-03-2010, 08:28
  2. Christmas template :D
    By ErosOlmi in forum Web and Forum
    Replies: 3
    Last Post: 04-12-2008, 23:46
  3. Confusion with DIALOG GET/SET CLIENT, DESKTOP GET SIZE and DIALOG SET LOC
    By Michael Hartlef in forum UI (User Interface)
    Replies: 3
    Last Post: 03-10-2008, 19:23

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
  •