none
New SB-IDE RRS feed

  • General discussion

  • Here is first pass (beta) of a new SB IDE inspired by gungan37's SB++.

    EDIT : Now pretty stable (past beta testing ready for use).

    https://gallery.technet.microsoft.com/Small-Basic-IDE-10-42648328

    Note to gungan37,

    Your code SB++ was totally inspirational, especially since you did it at school!

    I did this for my own entertainment mainly, but hopefully useful.

    Main features:

    • I did it in WPF
    • Scintilla is great
    • Should work with any inistalled version of SB, using reflection rather than included references to access compiler and other SB features
    • Only tested a bit on my win 10 PC
    • Comments, bugs, requests welcome
    • I will make it OpenSource on github if it gets past beta

    And a screenshot:



    Saturday, October 28, 2017 5:43 PM
    Moderator

All replies

  • WHOOOOW!! So grandiose!!

    And Tryhest look, there's your dark theme, ... and a lot of additional goodies.  Forget SB.exe, that's it.

    Thanks a lot LitDev (and gungan).



    Saturday, October 28, 2017 6:56 PM
    Answerer
  • (translated by Google translator)

    Wow! This is a real celebration!

    Thanks to the people who gave it to us. :)

    Saturday, October 28, 2017 8:59 PM
  • Any plans to support plugins at the IDE level (something like the plugin system for Notepad++ or the like)?
    Sunday, October 29, 2017 4:20 PM
  • The text engine used in SB-IDE is scintilla taylored to SB syntax (same as used in notepad++).

    What would a plug do, what sort of features are we talking about?

    Interesting idea - it would probably be possible to have a folder called plugin with dlls that have specific interfaces to do certain things - but it sort of depends on what they want to, i.e what they want to access from SB-IDE.

    Sunday, October 29, 2017 8:41 PM
    Moderator
  • Litdev , Wonderful!

      This is a very helpful program.
    Textsearcher and FileSearcher are amazing!These are functions I wanted.

    From now on I will use this.


    Sunday, October 29, 2017 11:50 PM
    Answerer
  • I was thinking of possibly adding an additional graduation option, such as graduating to C# or the like. Another idea I had was possibly documenting code flow (how subroutines interact and call each other).


    • Edited by a65001 Monday, October 30, 2017 1:06 AM
    Monday, October 30, 2017 1:01 AM
  • Can you download NLR588 and BCV978??  bug??

    Original small basic can download above programs. and run them.

    But after downloading NLR588 using original small basic and named it "Tryhestworldmapgame.sb",

    can't load it in new SB-IDE.

     


    Monday, October 30, 2017 4:00 AM
    Answerer
  •  (in TXJ416)   font color error? 

    darkblue does'nt have right double quataion.

    next text is shown with red color.

    Monday, October 30, 2017 4:21 AM
    Answerer
  • @ NaochanON

    Looks like one of Tryhest files, where the training quotes are not given for strings - The lexer only closes the string when the next " is found.  Then it is done again at 3Dpicmap.  I will see how to fix, but it is an undocumented/unsupported quirk of SB that this is allowed at all (I would make it fail to compile) - it is a bad habit to get into doing this.  The file should still run.

    I will check this and other issues later when I can test them in.  Thank you for reporting them and any other you find.

    Thanks.

    @ a65001

    I like the idea of a flow map.  I suggest you write the code (.Net 4.5), as input it should take the program text(just a string).

    At some point I will write a stub plug in - my guess is that there will be a few standard methods to fill in, perhaps something like:

    string GetPluginName()

    Bitmap GetPluginImage()

    string GetPluginToolTip()

     bool RunPlugin(string programText)

    These would all be inside an appropriately adorned public static class in a defined namespace which can be accessed by reflection.

    Then it would appear as anew item on the ribbon.

    So the hard work is for you writing the plugin!


    Monday, October 30, 2017 1:55 PM
    Moderator
  • @NaochanON,

    Fixed TXJ416.

    For me I can import NLR588 and BCV978 fine, perhaps some network issue?

    Updated SBE-IDE upload

    Monday, October 30, 2017 8:32 PM
    Moderator
  • @ a65001

    I have added plugin functionality and just uploaded a new SB-IDE version with this.

    On the gallery download site there is a link to a VS 2017 sample project to get you going.


    Monday, October 30, 2017 11:07 PM
    Moderator
  • @NaochanON,

    Fixed TXJ416.

    For me I can import NLR588 and BCV978 fine, perhaps some network issue?

    Updated SBE-IDE upload

    Thanks!

    it works well.

    Tuesday, October 31, 2017 12:03 AM
    Answerer
  • @LitDev

    I don't see the Plugins tab on the latest version of SB-IDE? In the meantime I went ahead and setup a standalone version of a flowchart program here. You must pass it a sb file as an argument currently. If you want you can bundle it directly with your new IDE. 

    Another question is how to access the current document's text? (API call? Would it be something like SB-IDE.Document.GetDocumentText() or something?



    • Edited by a65001 Tuesday, October 31, 2017 2:16 AM
    Tuesday, October 31, 2017 2:10 AM
  • Dang! That is a lot of work. Well done!

    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

    Tuesday, October 31, 2017 4:46 AM
    Answerer
  • @LitDev

    I don't see the Plugins tab on the latest version of SB-IDE? In the meantime I went ahead and setup a standalone version of a flowchart program here. You must pass it a sb file as an argument currently. If you want you can bundle it directly with your new IDE. 

    Another question is how to access the current document's text? (API call? Would it be something like SB-IDE.Document.GetDocumentText() or something?



    The plugins tab is dynamic and only appears when a valid plugin dll is found in a sub directory called "plugins" of where SB-IDE is.

    The plugin dll is much like a Small Basic extension.  In this case SB-IDE finds the dll, checks it has the right attribute on a plugin class, then calls methods in the dll to get details (name, bitmap, tooltip) to dynamically create the publish group and button.  When the ribbon button is pressed, another method inside the plugin dll is called and the current SB document text is passed to this method.

    Rather than putting links all over the place which will die at some point, I put a link to a sample VS plugin project on the Gallery page where SB-IDE is downloaded from (in the Updates section).  This is the sample project I created to test the plugin and the one shown on the screen shot.  This link contains the compiled project, so has a valid dll in the Release folder already.

    Look forward to see the plugin!

    Tuesday, October 31, 2017 9:01 AM
    Moderator
  • Image 1

    Image 2 IDE

    Image 3 Windows Explorer

    I put the sample plugin in \plugins\plugin.dll as shown above however I still don't see the plugin tab come up on the IDE? The sample plugin hasn't been changed all that much yet.

    Tuesday, October 31, 2017 11:01 AM
  • I can't see the images, but:

    1. Assume you got latest version of SB-IDE
    2. You copied SBSamplePlugin.dll to plugins
    3. Check for warning messages in SB-IDE (bottom window)

    Probably the dlls need to be unblocked - easiest to unblock the downloaded zip files - right click, properties, check unblock

    https://blogs.msdn.microsoft.com/delay/p/unblockingdownloadedfile/

    I just downloaded, SB, SB-IDE, plugin and did it on a clean PC and it worked after unblocking zips before extracting.

    Tuesday, October 31, 2017 12:13 PM
    Moderator
  • For me it works and can see/use the plugin.

    BUT: The SB-IDE.exe i'm using is the one from the Technet latest download .../9/SB-IDE.zip (mod date 30.Oct.17 23:58  round midnite)

     and the SBSamplePlugin.dll  from the SBSamplePlugin.zip (the SB-IDE.exe in there is an older one, without plugin support)

    Tuesday, October 31, 2017 1:55 PM
    Answerer
  • For me it works and can see/use the plugin.

    BUT: The SB-IDE.exe i'm using is the one from the Technet latest download .../9/SB-IDE.zip (mod date 30.Oct.17 23:58  round midnite)

     and the SBSamplePlugin.dll  from the SBSamplePlugin.zip (the SB-IDE.exe in there is an older one, without plugin support)

    The SB-IDE in the sample plugin is just copied there by the compiler because it was referenced when I built it.  Only the SBSamplePlugin.dll created is actually needed (+ SB-IDE from Gallery - most recent is best).  The sample plugin VS solution is to show how to do it, not as way to supply a created plugin dll.

    This is all exactly the same as standard SB extensions, except I am not limiting which dll versions can interact, it may be that plugins have to be rebuilt if I make significant change to SB-IDE but I would try to avoid this.

    Tuesday, October 31, 2017 2:18 PM
    Moderator
  • So i did a quick SBColorPicker.dll plugin in Notepad3 with a simple Process.Start and works great,

    but i would like to have some more buttons for external tools like PixelMeasurer, ColorSamples, Babel-/Charmap, Calc, HSLSlider etc. and dont' see an option (in renamed to SBColorPicker.cs) to use 1.)smaller buttons for them?

    And 2.) do i have to build an extra ...Plugin.dll (with hardcoded exePath) for each one of them?

    Other suggestion: Snippets collection

    Tuesday, October 31, 2017 3:02 PM
    Answerer
  • I think each class you create inside the same dll that is correctly formed will get its own button - we will quickly run out of space and think how to manage a bit better

    Perhaps more options in the plugin to control a new ribbon tag, small or large icon, or even generate the ribbon bits in the dll and pass it, all possible. 

    I will probably also change the plugin so it doesn't have to reference SB-IDE.exe (this will cause problems in the future).

    Maybe also extend what the plugins can influence (passive really at the moment).

    Tuesday, October 31, 2017 3:47 PM
    Moderator
  • I got it working, thanks for the help. You could basically make the SB-IDE just a plugin manager and put the core parts of the program as a plugin. 
    Tuesday, October 31, 2017 7:54 PM
  • UIx Report : The program fails to open a file path passed to it via argument. IE if you pin a file to SB-IDE and use it to launch SB-IDE will fail to open said file. In SB you can access files passed this way via Program.GetArguments or the like.
    Tuesday, October 31, 2017 8:01 PM
  • UIx Report : The program fails to open a file path passed to it via argument. IE if you pin a file to SB-IDE and use it to launch SB-IDE will fail to open said file. In SB you can access files passed this way via Program.GetArguments or the like.

    No idea, I don't pass a file name, I pass the actual text of the current program?

    Perhaps give some more details of what you are tryng to do or a code snippet.

    EDIT

    I update SB-IDE and how plugins work so a new sample VS solution to go with it.  The change is to not require reference to SB-IDE which will mean plugins will work as SB-IDE version changes - also the plugin will be more extensible.


    Tuesday, October 31, 2017 8:10 PM
    Moderator
  • 1) Pin SB IDE to the Windows Taskbar

    2) Pin a sb file under the SB IDE

    3) Attempt to open the pined  file from the Windows Taskbar

    Current Results: Opens SB-IDE with Untitled 1

    Expected UIx Results : Opens SB-IDE with the text of the file. 

    I haven't tested this on the new version of SB-IDE but under the last build the above would occur.

    Wednesday, November 1, 2017 2:34 AM
  • 1) Pin SB IDE to the Windows Taskbar

    2) Pin a sb file under the SB IDE

    3) Attempt to open the pined  file from the Windows Taskbar

    Current Results: Opens SB-IDE with Untitled 1

    Expected UIx Results : Opens SB-IDE with the text of the file. 

    I haven't tested this on the new version of SB-IDE but under the last build the above would occur.

    Fixed - required command line file to open

    Also updated plugin capability to allow possible access to most of the internals of SB-IDE (can break things in unexpected ways if misused, basically unsupported)

    Wednesday, November 1, 2017 7:56 PM
    Moderator
  • I made a C# compiler plugin. (use SB-IDE as c# editor)

     changed Litdev's sampleplugin as below.  (Thank you Litdev)

    public static bool Run(string text)
            {   // In this case a simple form displaying the document text
                // Form1 form1 = new Form1(text);
                // form1.ShowDialog();
                System.IO.Directory.SetCurrentDirectory(@"E:\CSCTest\");// change current directory
                string cscpath = @"E:\CSCTest\csc.exe"; 
                string filePath = @"E:\CSCTest\test.cs";
                System.IO.File.WriteAllText(filePath, text); // save text contents
                string target = "";
                if (text.IndexOf("Microsoft.SmallBasic.Library") > 0)
                { target = " /target:winexe /reference:SmallBasicLibrary.dll "; }
                else
                { target = " /target:winexe "; }
                if (text.IndexOf("[SmallBasicType]") > 0)
                { target = " /target:library /reference:SmallBasicLibrary.dll "; }
                System.Diagnostics.Process.Start(cscpath , target+ filePath); 
                return true;
            }


    Wednesday, November 1, 2017 11:58 PM
    Answerer
  • Intellisense bug.  it  doesn't show below commands. Please fix them.

    <Array>
    GetValue,RemoveValue,SetValue
    <File>
    GetSettingsFilePath,GetTemporalyFilePath
    <Flicker>
    GetPictureofMoment
    <GraphicsWindow>
    Clear,GetRandomcolor,Hide,Show
    <Mouse>
    HideCursor,ShowCursor
    <Program>
    End
    <Sound>
    PlayBellRing,PlayBellRingAndWait,PlayChime,PlayChimeAndWait,
    PlayChimes,PlayChimesAndWait,PlayClick,,PlayClickAndWait
    <text>
    Append, ConvertToLowerCase, ConvertToUpperCase, EndsWith,
    GetCharacter, GetCharacterCode, GetIndexOf, GetLength,
    GetSubText, GetSubTextToEnd, IsSubText, StartsWith
    <TextWindow>
    Clear,Hide,Pause,PauseifVisible,PauseWithoutMessage,Read,
    ReadKey,ReadNumber,Show
    <Timer>
    Pause,Resume
    <Turtle>
    Hide,PenDown,PenUp,Show,TurnLeft,TurnRight

    Friday, November 3, 2017 8:10 AM
    Answerer
  • Hmm, good to see that this appears for others too. First thought about a malformed xml, and began to make changes there. For me (latest release, using ....De.xml (Advanced-Language Code: de), SB12 not in default path but set via SB-IDE.settings to 'C:\..Microsoft\Small Basic12')  eg. Text object appears as

         Array. GetValue,RemoveValue,SetValue and TextWindow.ReadKey  are [HideFromIntellisense] attrib in SBLib.dll, but for other classes like File (same as NaochanON). Did'nt examine much further but i also can create a list (what's missing), if that helps.

    PS: Perhaps it would also be possible to trim whitespaces (spc/tab) from left side of intellisense view, like marked in the 2nd right pic above.

    Friday, November 3, 2017 2:13 PM
    Answerer
  • Thanks for reporting this NaochanON and Pappa.

    I think this a simple bug for methods with no arguments, when parsing the xml and dll - will fix later today, but will upload when finished and tested some other debugger stuff (which is my main reason for the project).

    The indent formatting stuff I spotted.  Is not really top priority, but will have a look at too.

    Friday, November 3, 2017 2:59 PM
    Moderator
  • @NaochanOn, Pappa

    The methods with [HideFromIntellisense] are depreciated and I still don't show them; the issue with the others with no arguments was simply that the xml for these leaves off the trailing () and confused my parser that matches the xml details with methods found in corresponding dll.

    Fixes uploaded with the debugging stuff I've been working on (conditional breakpoints and enhanced event subroutine handling).  A few quirks, but I'm fairly happy I can debug quite efficiently now - WriteLine no more.

    Friday, November 3, 2017 8:19 PM
    Moderator
  • Intellisense bug.  it  doesn't show below commands. Please fix them.


    <text>
    Append, ConvertToLowerCase, ConvertToUpperCase, EndsWith,
    GetCharacter, GetCharacterCode, GetIndexOf, GetLength,
    GetSubText, GetSubTextToEnd, IsSubText, StartsWith

    Litdev, text's commands still not appear (I tested Small Basic IDE 1.0.7)

    other commands OK. 

    Sunday, November 5, 2017 11:36 PM
    Answerer
  • @ NaochanON,

    Fixed and uploaded - Parsing Text and TextWindow getting confused when fond in different orders in xml and dll.  Thanks for reporting.  Think should be OK now - perhaps some extensions with badly (differently or hand built) formed xml may still have issues.

    PS

    I actually updated again to handle valid methods that have no xml intellisense, but still sonme issues I'm working on.

    Hopefully sorted - turned out to be a bit of a rewrite!

    Monday, November 6, 2017 7:13 PM
    Moderator
  • @ NaochanON,

    Fixed and uploaded - Parsing Text and TextWindow getting confused when fond in different orders in xml and dll.  Thanks for reporting.  Think 

     Thankyou Litdev.   Text commands appear well.

    Tuesday, November 7, 2017 1:58 AM
    Answerer
  • Hey, this is amazing ! It single handedly solves every problem I had with the original ui !

    A problem? I noticed however is that this ide has a cpu usage that increases with the size of the program. Is this a bug or a limitation ? It is a bit severe for users with low end hardware such as me (running on intel n3050). For example a 600 line program uses 15-17% of my cpu, and it increases quickly when adding more content (tested by adding a few thousand comment lines on a new project). Can you look into it, litDev ? 



    • Edited by Lord_Archon Tuesday, November 28, 2017 9:08 PM
    Tuesday, November 28, 2017 9:00 PM
  • Memory (RAM) usage is partly the text lexer ScintillaNet that does the text coloring, folding etc.  It stores quite a lot to do this smoothly, and is really out of my control since I just use the dll, set up with SmallBasic syntax which I define for it.

    Also other .Net asseblies used for wpf windowing also take memory, as well as my storing SmallBasicLibary and extension data for intellisense etc.  I don't see any specific memory leaks (that garbage collection doesn't handle).

    With regard to cpu usage I don't see an issue, mine sits at about 2% (600 lines) and 8% (7000 lines) with a large file loaded (not doing anything), and 0% when minimised or out of focus.  This is mainly a few events I presume looking for input etc.

    Apart from the task manage cpu usage, does this cause noticable effect on PC performance - the OS should handle it when you do something else as long as you don't run out of RAM?

    ps

    I tried it on an old windows 7 pc Intel Core Duo T2050 @ 1.60GHz with marginally worse perfomance than your Intel Celeron N3050 @ 1.60GHz.

    I was able to run and edit large files without any obvious performance lags - startup was slow but that was all really.

    Tuesday, November 28, 2017 9:21 PM
    Moderator
  • Oh there is absolutely no problem with the ram - no leaks or anything like that !

    I guess my cpu is very weak after all - just 3000 lines of code push it to 50-55% cpu usage (while that tab is open - i can switch to an empty tab for no cpu overhead -putting the program out of focus does not reduce cpu usage at all for me-). While windows can handle the cpu usage very well, the cpu cost is noticeable - the ide becomes unusable (in my hardware) after about 6000 lines of written code (i have no ram problems at all, it just starts to become very unresponsive to write in after it reaches about 70-75% cpu - and that limit is reached at around 5000 lines for me).

    For reference my specs are: Windows 10 - CPU: N3050 - RAM: 4GB - Program runs alone (little other overhead)

    Anyway, it's just something that might cause usability problems for low hardware users - or maybe it is just me ? if someone has low specs please do try this - just putting it out there ! For example the default standard -official- smallbasic ide has about the same ~5-10% cpu usage for me (does not depend on program size).

    Thanks for looking into it ! For now I will surely be using it for small programs, and will for sure use it for large programs if you manage to lower the cpu usage for many lines of code in a release! It is still amazing !



    • Edited by Lord_Archon Tuesday, November 28, 2017 10:39 PM
    Tuesday, November 28, 2017 10:35 PM
  • thanks for the info - on my old win 7 I can see 50% + cpu on 7000 lines (which is a lot for SB really).  Its a bit sluggish so I can reproduce and will see if there are any scintilla options that can be optionally removed to aid performance, probably at some functionality loss - but may be an option.
    Tuesday, November 28, 2017 10:58 PM
    Moderator
  • Hi Lord_Archon,

    I think I found the cpu culprit - an error on my part so thanks again for reporting it.

    I uploaded a new version that should fix it.

    Wednesday, November 29, 2017 8:37 PM
    Moderator
  • Hi Lord_Archon,

    I think I found the cpu culprit - an error on my part so thanks again for reporting it.

    I uploaded a new version that should fix it.

    It's perfect ! This makes the default ide obsolete ! Thanks for fixing it !

    Out of curiosity, why is there a need to be connected for doing step-by-step debugging ? It works even without an internet connection, as long as there is a router connection. When wifi is disabled this doesn't work. Not a problem, just curious !

    Thursday, November 30, 2017 7:48 AM
  • There is no need to be internet connect for debugging.

    I assume you mean the open of a port requirement that requests UAC permission first time debugging is done.  This is actually an internal port, not a network port.

    This is to allow the SB-IDE to communicate with the running compiled small basic exe.  To debug it needs to be paused, started, pass data back and forth.  I do this using sockets, which use ports to communicate between different processes, but still entirely on you machine.  MS rightly asks you to allow this as a you don't want a program to arbitrarily interfere with other running programs unless it needs to, such as this case.

    However, I see it does seem to want the machine to be connected to some network - it seems that the router connection finds a LAN port connection (192.168.x.x:port) - I will modify later to just use a loopback port (127.0.0.1:port) which wont need a router attached.

    These usability issues are hard to spot but potentially very useful.



    Thursday, November 30, 2017 12:39 PM
    Moderator
  • Hi, uploaded a new version that doesn't require network or router LAN to use the debugging.

    https://gallery.technet.microsoft.com/Small-Basic-IDE-10-42648328

    Thursday, November 30, 2017 6:31 PM
    Moderator
  • Hi,

    Nice IDE. Useful for Debugging.

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic and Visual Basic

    Wednesday, December 6, 2017 2:43 PM
  • First stable version 1.1.3, tested with no known issues uploaded.

    https://gallery.technet.microsoft.com/Small-Basic-IDE-10-42648328

    Saturday, December 9, 2017 12:36 AM
    Moderator
  • Hi,

    Plugins aren't working for me.

    1) I unblocked SB-IDE.zip before extracting it.

    2) Then I extracted it and added 'plugins' folder

    3) Then I downloaded the SBSamplePlugin.zip and unblocked it.

    3) Then I extracted it then I copied the following files from the SBSamplePlugin folder to SB-IDE\plugins

    4) Then I ran SB-IDE.exe as Administrator but still Plugins does not appear

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic, Visual Basic and C#

    Sunday, December 17, 2017 4:48 PM
  • Hi,

    You don't need to be administrator and is not a good idea to run anything as administrator unless you are certain it is needed and you know why!

    Only copy SBSamplePlugin.dll - this is the only file in plugins folder.  In particular SBPlugins.dll is already present in SB-IDE and conflicts if a copy is also present in plugins folder.

    This is just like if you put SmallBasicLibarary.dll in the lib folder for extensions you get problems.


    Sunday, December 17, 2017 5:50 PM
    Moderator
  • Hi,

    You don't need to be administrator and is not a good idea to run anything as administrator unless you are certain it is needed and you know why!

    Only copy SBSamplePlugin.dll - this is the only file in plugins folder.  In particular SBPlugins.dll is already present in SB-IDE and conflicts if a copy is also present in plugins folder.

    This is just like if you put SmallBasicLibarary.dll in the lib folder for extensions you get problems.


    Hi,

    Thank you, Plugins tab now appears for me.

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic, Visual Basic and C#

    Monday, December 18, 2017 2:08 AM
  • Hi,

    Does this IDE have the feature of removing unwanted lines (lines with just blank spaces).

    In this picture lines 2 and 3 are unwanted lines

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic, Visual Basic and C#

    Sunday, December 24, 2017 7:53 AM
  • Hi,

    No it doesn't have this at the moment - sometime people want blank lines to make it easier to read, sometime people are just not very careful and it might be good to tidy the code up.

    EDIT

    Or you could write a plugin to do it - wouldn't be hard but you would have to work out how scintilla works and how it is implemented in IDE.  Writing plugins isn't really something I'm going support much i.e. not write it for you or debug them - the full source code to IDE is open source.


    Sunday, December 24, 2017 11:25 AM
    Moderator
  • You can write a small Small Basic program to read a file and write only the non-empty lines to another file.

    Jan [ WhTurner ] The Netherlands

    Sunday, December 24, 2017 12:11 PM
    Answerer
  • This program removes empty lines (uses LitDev extension)

    '' empty.sb 171224 WhTurner
    TextWindow.WriteLine("Removing empty lines")
    TextWindow.Write("Give the name of the file (without extension):  ")
    FI=TextWindow.Read()
    TextWindow.WriteLine("")
    FO=Program.Directory+"\"+FI+"C.sb"
    FI=Program.Directory+"\"+FI+".sb"
    TextWindow.WriteLine("From "+FI)
    TextWindow.WriteLine(" To  "+FO+"  << Clean File")
    buf=LDFile.ReadToArray(FI)
    For lin=1 to Array.GetItemCount(buf)
      line=LDText.Trim(buf[lin])
      If line<>"" Then
        File.AppendContents(FO,line)
       '' TextWindow.WriteLine(line)    '' for testing
        lc=lc+1
      EndIf
    EndFor
    TextWindow.WriteLine("From "+Array.GetItemCount(buf)+" to "+lc+" lines")
    Edit: Do not run twice on the same file, or first remove the first clean file!


    Jan [ WhTurner ] The Netherlands


    Sunday, December 24, 2017 1:56 PM
    Answerer
  • and it works almost fine)) even debugger!

    great work!

    Monday, February 19, 2018 5:55 PM
  • @ Tryhest - you can change most colors in Advanced->IDE Colors for a better dark theme.

    New version (1.1.4.0) with flow chart visualisation (beta) added.


    Wednesday, March 14, 2018 11:06 PM
    Moderator
  • (translated by Google translator)

    The flowchart is great!..
    Many people will be grateful to you for this ability.

    Do you plan to create an inverse function? Will the Editor be able to translate the flowchart into program code, like Raptor, for example?..

    Thank you.

    Thursday, March 15, 2018 8:25 PM
  • Hi,

    I did think of that or more likely using it to display path during a debug session after any bugs have been worked through.

    However entering all the data would be hard - the statement lines still needs to be typed and then need intellisense etc so probably easier still by hand in main text editor, using the flowchart to check logic.

    Thursday, March 15, 2018 8:35 PM
    Moderator
  • (translated by Google translator)

    Yes ... Perhaps you are right.

    Thank you again :)

    Friday, March 16, 2018 6:03 AM
  • Litdev,

    Nice flowchart.

    I found that the zoom-in and zoom-out in a long program doesn't zoom about the center of the window as I would expect, but jumps to another point in the flowchart. Zoom in then out and again in, returns to the origanal point.

    Can you do something about that?


    Jan [ WhTurner ] The Netherlands

    Friday, March 16, 2018 10:56 AM
    Answerer
  • @Jan

    Thanks for reporting.  This was something I was tinkering with late last night - its actually a bit tricky the way the scroll bar interacts with zooming window contents.  I ended up uploading a few versions that turned out to have issues like you describe.  However the last one looks reasonable to me (the current version uploaded).

    I am going to tinker a bit further, in particular linking to debug (partly already in current uploaded version).

    All bugs/suggestions welcome, and I will post when I have something I think is fully stable and works smoothly with the functionality I wanted.

    The reason to upload at an early stage is to get some initial suggestions/feedback.


    Friday, March 16, 2018 1:04 PM
    Moderator
  • Pretty stable Flow Chart now.
    Saturday, March 17, 2018 11:07 PM
    Moderator
  • (translated by Google translator)

    Dear litdev,

    I understand that I am not an expert in the field of computer science. But, I do not know any other person who would have done so much for Small Basic. Thanks to your work, Small Basic has turned from a children's toy into an excellent general use tool.

    Many thanks to you from all common users, like me.

    Sunday, March 18, 2018 11:11 AM
  • Thanks,

    I enjoy tinkering and learning new stuff and SB gives me nice little projects - all the better if they are useful too.

    Coding is fun which is at the heart of SB.

    Sunday, March 18, 2018 2:06 PM
    Moderator
  • Added a shapes and controls editor to help position and size controls or create more complex pictures from shapes.

    Fairly stable I hope, but I may tinker further.

    Sunday, April 1, 2018 4:45 PM
    Moderator
  • (translated by Google translator)

    I can not belive it...

    It's very, very good.

    Thank you again...

    Sunday, April 1, 2018 5:31 PM
  • Great job, no joke...

    Sunday, April 1, 2018 6:24 PM
    Answerer
  • I was thinking of possibly adding an additional graduation option, such as graduating to C# or the like. Another idea I had was possibly documenting code flow (how subroutines interact and call each other).



    Wow, that would be amazing.

    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Tuesday, April 24, 2018 9:04 AM
    Owner
  • Renamed SB-Prime
    Tuesday, April 24, 2018 9:22 PM
    Moderator
  • (Translated by Google translator)

    Wow!.. It looks very respectable :)

    I like it.

    Wednesday, April 25, 2018 5:24 PM
  • i miss the F3 search again key, can it be added?
    Tuesday, May 29, 2018 3:30 AM
  • Perhaps other hotkeys from the "old" IDE also. I miss e.g.  ctrl-L to delete a whole line, quicker then selecting a line and then delete.

    Jan [ WhTurner ] The Netherlands

    Tuesday, May 29, 2018 9:24 AM
    Answerer
  • @ Tryhest and WHTurner,

    F3 and Shift F3 are present, but only work if the focus is inside a document.  When Control+F is pressed the focus moves to the find textbox, so F3 doesn't work until you click back in the document.

    I have hopefully fixed this bug.

    Control+L is currently used by the lexer to change selected text to lower case (Control+U) for upper case.  I didn't know it deletes a line in SB! Do you have a list of standard SB hotkeys, which I can maybe add - not quite sure what to do with ctrl-L.

    Tuesday, May 29, 2018 8:00 PM
    Moderator
  • There's a shortcuts list at Small Basic Shortcuts for Keyboard

     (but incomplete i think (eg. Ctrl+Shift+O .. Import  missing and others)

    Found them in SB.exe:

    SB\Resources\Microsoft.SmallBasic.Exports.EditorCommandKeyBindings.xcml

    and

    SB\Resources\SB.g.resources\mainwindow.baml


    Tuesday, May 29, 2018 9:13 PM
    Answerer
  • Thanks, I will go through these sometime and try to reproduce - some may require focus in editor window


    Tuesday, May 29, 2018 9:19 PM
    Moderator
  • Update - Most Hotkeys updated (a few slight minor differences remain that are hard to fix).
    Thursday, May 31, 2018 5:40 PM
    Moderator
  • Hi all,

    Small Basic Prime is nice IDE. But I have one doubt , How to update a program like ZLK943-0 or ZLK943-1 using Small Basic Prime? For example, If I write code and publish like ZLK943, How can I create updates like ZLK943-0?

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Wednesday, October 24, 2018 10:51 AM
  • The last time I needed that, I used the standard Small Basic ...

    Jan [ WhTurner ] The Netherlands

    Wednesday, October 24, 2018 2:08 PM
    Answerer
  • The last time I needed that, I used the standard Small Basic ...

    Jan [ WhTurner ] The Netherlands


    Probably the best way - not sure exactly how SB does that.
    Wednesday, October 24, 2018 6:27 PM
    Moderator
  • Hi all,

    Small Basic Prime is nice IDE. But I have one doubt , How to update a program like ZLK943-0 or ZLK943-1 using Small Basic Prime? For example, If I write code and publish like ZLK943, How can I create updates like ZLK943-0?

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Roshan,

    I think I worked it out and fixed - upgrade to lastest SB-Prime for this feature.  Thanks for reporting.

    Wednesday, October 24, 2018 7:48 PM
    Moderator
  • Hi LitDev,

    I think have found an another bug (I am sorry if I am disturbing you) but I'm not sure whether it's my PC's problem or SB-Prime's problem. The problem is : When I try to use the File Browser and search for all the *.sb files in C:\, SB-Prime hangs and closes.

    

    My PC specs

    AMD Ryzen 7 Processor.

    Installed Memory (RAM) : 32 (16.00 GB usable)

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Friday, October 26, 2018 2:38 PM
  • You are not bothering me. I do this for fun and welcome bugs!

    This is probably because under C: there are thousands of folders and there are probably millions of files.  I reproduced and put a fix in so it doesn't crash but will still fail gracefully if there is a file path it can't handle.  In your case it isn't a crash, just busy, which is the message you see.   While it is working the interface is unresponsive - blue wait circle.  Depending on your PC it could take hours or crash (fixed and uploaded) if some system file isn't available or other issue.

    Try making the root for your search where you store SB files.  I use a sub folder of MyDocuments.

    If this still fails then post back.



    Friday, October 26, 2018 5:37 PM
    Moderator
  • You are not bothering me. I do this for fun and welcome bugs!

    This is probably because under C: there are thousands of folders and there are probably millions of files.  I reproduced and put a fix in so it doesn't crash but will still fail gracefully if there is a file path it can't handle.  In your case it isn't a crash, just busy, which is the message you see.   While it is working the interface is unresponsive - blue wait circle.  Depending on your PC it could take hours or crash (fixed and uploaded) if some system file isn't available or other issue.

    Try making the root for your search where you store SB files.  I use a sub folder of MyDocuments.

    If this still fails then post back.



    Hi LitDev,

    I tried your recent upload. When I search for all files in C:\ , First SB-Prime hangs for about 5 seconds and then  it doesn't show the files (even though *.sb files are there). This time SB-Prime didn't crash.

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Saturday, October 27, 2018 12:33 PM
  • It didn't crash due to the fix I added.  However it still fails with C: - there should be a message in the bottom output tab.  The solution is to not search all of C:, some system folders and files can't be accessed, so use a location where you keep *.sb files.

    Do you keep your Sb files directly in C:?  If you do then this is not a good idea - move then to a folder in MyDocuments.

    Saturday, October 27, 2018 12:37 PM
    Moderator
  • It didn't crash due to the fix I added.  However it still fails with C: - there should be a message in the bottom output tab.  The solution is to not search all of C:, some system folders and files can't be accessed, so use a location where you keep *.sb files.

    Do you keep your Sb files directly in C:?  If you do then this is not a good idea - move then to a folder in MyDocuments.

    I keep all my files on C:\Small Basic Codes. I will switch it to C:\My Documents. Thanks for your help

    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Saturday, October 27, 2018 12:45 PM
  • You should be able to use "C:\Small Basic Codes" as your search location

    Saturday, October 27, 2018 12:47 PM
    Moderator
  • After downloading the new version of SB Prime (20181027):

    The FileSearcher works fine and the systemfolder are better handled

    My previous assumption that the ListView is not always updated persists.

    It is only updated when a scrollbar or Apply is pressed.
    An exception occurred in these tests.

    Saturday, October 27, 2018 1:49 PM
  • mmm - tried to rework this - maybe I over-complicated it and may cause other problems, but uploaded a change.

    Let me know if it fails.

    EDIT

    Modiied a bit and now I think handles all bad folders and files

    Saturday, October 27, 2018 9:07 PM
    Moderator
  • Very good work!

    The FileSearcher is now like the complete IDE a SUPER TOOL.

    I like the Progress-Window(and speed) for feedback.

    The FileSearcher finds everything, even in the recycler.

    All drives are handled (C:,D:, USB-Stick, LAN,...)!

    When I see the breathtaking speed of file selection, I have a dream for the future:

    Another tool for searching file contents similar to a virus scanner.

    Sunday, October 28, 2018 3:14 PM
  • Congratulations for 1000 downloads !

    I'm afraid there will be more...   

    Bug-Report:   The program crashes after starting the import function

    Thursday, November 1, 2018 8:50 AM
  • Hi backtothestart,

    I confirm that SB-Prime crashes when the import button is clicked. In my case, After when import button is clicked my system hangs for around 10 seconds and I get "SB-Prime is not responding" and then it automatically closes SB-Prime.

    It was working well before the last update.

    In case the problem is with my PC, Here's my specs.

    • OS : Windows 10 Home Edition
    • Processor : AMD Ryzen 7 YD270XBGAFBOX 4.3GHz Socket AM4 Processor
    • RAM : 32 GB (16 GB usable)

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Thursday, November 1, 2018 10:29 AM
  • Hi, this is an oversight of mine - will fix later today.

    The workaround for now is to copy the download ID to the clipboard before using import - it is auto pasted.

    The bug is handling empty clipboard correctly.  Since I always copy ID first (not type it) I never saw the issue.

    Thanks again for reporting

    EDIT

    Fixed and uploaded - I keep the Gallery and auto update feature in sync so a one click Advanced->Update should do the trick.

    Thursday, November 1, 2018 1:29 PM
    Moderator
  • Hi,

    Any plans to create a Reflector for Small Basic (like ILSpy but ILSpy doesn't have Small Basic option)? I am asking this because, It would be useful someone lost their *.sb file but having the *.exe.

    Thanks..


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Saturday, November 3, 2018 3:38 AM
  • I had no plans.

    Basically I try not to add stuff that is already done better elsewhere, like no C# syntax highlighting/editor or C# compiler in SB-Prime - just use Visual Studio.

    It is rare to have exe but no source in SB and in this case you can convert SB exe to C# in ILSpy then a bit of find/replace to convert to SB.  I sort of feel that at some point SB users should be experimenting themselves with VB, C#, ILSpy, VS etc.

    By the way, using ILSpy to convert SB exe to VB or C# is a great way to transition from SB to these languages, works better than the Graduate option in many cases.

    Saturday, November 3, 2018 9:07 AM
    Moderator
  • It would be interesting to integrate ILSpy out of the box somehow to Small Basic. 

    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Tuesday, November 6, 2018 12:02 AM
    Owner
  • Had a go at an ILSpy inspire deompiler (in Advanced tab).

    Tried to make sufficient project settings changes to run SB created exe files directly, other assemblies may need more work, especially resources.  But you still get the source code.

    PS: to update, just click Advanced tab -> Update .

    Thursday, November 8, 2018 9:48 PM
    Moderator
  • Hi,

    Amazing work, LitDev. Keep it up!

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Sunday, November 11, 2018 8:33 AM
  • Hi litdev,

    I have just started with the basics of ScintillaNET Text Box. I learned Syntax-Highlighting , Code Completion , Character completion and Intelisense. They are the basics of ScintillaNET. 

    ScintillaNET has support for about 100 languages, But there is no Small Basic lexer.

    My question is : How to create Intelisense and Syntax-highlighting using ScintillaNET for Small Basic like in Small Basic Prime IDE?

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#

    Wednesday, November 28, 2018 11:43 AM
  • Hi Roshan,

    SB-Prime is open source (https://github.com/litdev1/SB-IDE).

    I would recommend starting a small project from samples, while looking at what I did in SBDocument.cs and SBLexer.cs once you have a feel for using Scintilla.

    I wrote a simple test program first to understand it - bit by bit learning functionality to it before trying do everything for SB.

    The development process is to understand how to do what you want it to do, e.g. color a single word, capture a specific event.  Don't try to write anything with lots of detail (e.g. all keywords) untill you know how it all can be done.  Then it will be easy to add all the details.  Otherwise your prototype code will be cluttered with all sorts of details that are irrelevent to the task of learning how it works which is the only important thing when learning something new.

    Wednesday, November 28, 2018 7:13 PM
    Moderator
  • Hi Roshan,

    SB-Prime is open source (https://github.com/litdev1/SB-IDE).

    I would recommend starting a small project from samples, while looking at what I did in SBDocument.cs and SBLexer.cs once you have a feel for using Scintilla.

    I wrote a simple test program first to understand it - bit by bit learning functionality to it before trying do everything for SB.

    The development process is to understand how to do what you want it to do, e.g. color a single word, capture a specific event.  Don't try to write anything with lots of detail (e.g. all keywords) untill you know how it all can be done.  Then it will be easy to add all the details.  Otherwise your prototype code will be cluttered with all sorts of details that are irrelevent to the task of learning how it works which is the only important thing when learning something new.

    Hi There,

    Downloaded the zip, Will look into it soon. Thanks for your support and an wonderful Open-Source IDE, LitDev. BTW, I am new to ScintillaNET so It will take a couple of hours to complete understanding your code. But I don't think that the default IDE uses ScintillaNET (.NET implementation of Scintilla).

    Thanks.


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#


    Thursday, November 29, 2018 3:31 PM
  • Hi ,

    Any plans to create a Refactor (Rename function (like in Visual Studio)) such that we can change the Variables and Subroutines names and every where we used the variables and subroutines.

    See this link in case if you don't understand the uses of Refactor.

    https://docs.microsoft.com/en-us/visualstudio/ide/reference/rename?view=vs-2017

    Thanjs


    Roshan - 8th Grade Student (Age 12) - Learning Small Basic, Visual Basic and C#


    Sunday, December 2, 2018 12:28 PM
  • I use Find and Replace which works well in SB since it is a single file.
    Sunday, December 2, 2018 12:41 PM
    Moderator
  • Hi,

    Could you please add a 'Toggle Line Numbers' feature that can view/hide the line numbers if the feature is not there? It could save some space in the SB-Prime IDE.

    Thanks.


    Roshan - 8th Grade Student (Age 13) - Learning Learning Python, Machine Learning and C#


    • Edited by [Roshan_Kumar] Wednesday, January 30, 2019 2:48 PM typo mistake
    Wednesday, January 30, 2019 11:43 AM
  • Hi,

    Could you please add a 'Toggle Line Numbers' feature that can view/hide the line numbers if the feature is not there? It could save some space in the SB-Prime IDE.

    Thanks.


    Roshan - 8th Grade Student (Age 13) - Learning Learning Python, Machine Learning and C#



    Added as toggle option in Advanced tab.
    Wednesday, January 30, 2019 7:46 PM
    Moderator