locked
Why do none of the *.sb sample programs show output ? RRS feed

  • Question

  • Hello & Thanks ;

    Why do none of the *.sb in "C:\Program Files (x86)\Microsoft\Small Basic\Samples" 

    show output ? They seem to run but no visible output ? 

    Same for 'other-samples' , 'physics-samples' , etc. , etc. .

    Very frustrating .

    Thanks for your help  :)


    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 5:11 PM

Answers

  • Hello vmmars316,

    Try next command (perhaps it's not the question ?)

    textwindow.writeline(Program.directory)

    If you find some "strange directory" probably ending with "Temp" it's because the output file is located in this temperary directory or folder. When I am writing a program and want to do some testing using an "UNTITLED" screen  the output is NOT going to the working or program directory ... the easiest way is to "SAVE" your untitled program or to use the full file name to direct the output to YOUR output directory.   

    Saturday, August 1, 2020 7:19 AM

All replies

  • Which version of SM are you using, the other and physics samples require desktop SB with LitDev extension installed.
    Friday, July 31, 2020 5:18 PM
  • Thanks ,

    [Which version of SM are you using, the other and physics samples require desktop SB with LitDev extension installed.

    Desktop and win 10 .

    I don't know what SM is . Do you mean SB . 

    SB I don't know , no Help or About option .

    Yes , LitDev extension installed . 


    "All things in moderation, except for love and forgiveness."...vm

    Friday, July 31, 2020 6:49 PM
  • ver.is written on sb mainscreen:

    same for sb prime:

    • Edited by Tryhest Saturday, August 1, 2020 5:04 AM
    Saturday, August 1, 2020 5:02 AM
  • Hello vmmars316,

    Try next command (perhaps it's not the question ?)

    textwindow.writeline(Program.directory)

    If you find some "strange directory" probably ending with "Temp" it's because the output file is located in this temperary directory or folder. When I am writing a program and want to do some testing using an "UNTITLED" screen  the output is NOT going to the working or program directory ... the easiest way is to "SAVE" your untitled program or to use the full file name to direct the output to YOUR output directory.   

    Saturday, August 1, 2020 7:19 AM
  • Thanks ;

    SB Prine Version 1.1.7.0 


    "All things in moderation, except for love and forgiveness."...vm

    Sunday, August 2, 2020 1:12 AM
  • Thanks ;

    Yes , it looks normal :

    C:\ppBrowser\Small-Basic 


    "All things in moderation, except for love and forgiveness."...vm

    Sunday, August 2, 2020 1:13 AM
  • All extensions must be the same version as SB.  So you want the current Small Basic (1.2) and LitDev extension.  This is true if you use SB Prime - this is just an IDE using same compiler and dlls etc.

    So:

    1] Make sure you have version 1.2 of SB installed and the latest LitDev extension (1.2.23.0).

    2] The the simple program below and report what the error messages are

    browser = LDControls.AddBrowser(600, 600, "https://social.msdn.microsoft.com/Forums/en-US/home?forum=smallbasic")

    Sunday, August 2, 2020 9:32 AM
  • Hello & Thanks ;
     Ok , 
    I reinstaller Sb-1.2  
    and I am now running Sb-1.2 and LitDev-1.2 
    from here: C:\Program Files (x86)\Microsoft\Small Basic\Lib

    I Installed SB-Prime-1.1 and LitDev-1.1 
    and I am now running Sb-1.1 and LitDev-1.1 
    from here: C:\ppBrowser\Small-Basic\SB-Prime 

    # Generated on 2020-08-02 12:32:32 by Directory Lister v0.9.1
    Name                                               Size           Date       Time  Attri
    ----------------------------------------------------------------------------------------
    c:\Program Files (x86)\Microsoft\Small Basic\Lib\      14 843 211 2020-08-02 11:29 -----
    ----------------------------------------------------------------------------------------
    LitDev.dll                                              9 500 160 2020-08-02 11:16 -a---
    Microsoft.Kinect.dll                                      242 672 2015-07-10 14:32 -a---
    Microsoft.Kinect.Face.dll                               1 650 160 2015-07-10 14:32 -a---
    Microsoft.Kinect.SmallBasic.dll                            73 984 2015-09-13 22:26 -a---
    Microsoft.Kinect.VisualGestureBuilder.dll                 148 464 2015-07-10 14:32 -a---
    Microsoft.Kinect.Wpf.Controls.dll                         463 344 2015-07-10 14:32 -a---
    SBDebugger.dll                                             11 776 2020-08-02 11:29 -a---
    LitDev.De.rtf                                             676 145 2020-08-02 11:16 -a---
    LitDev.rtf                                                538 646 2020-08-02 11:16 -a---
    ReadMe.txt                                                    972 2020-08-02 11:16 -a---
    [Content_Types].xml                                           353 2020-08-02 11:16 -a---
    LitDev.De.xml                                             671 761 2020-08-02 11:16 -a---
    LitDev.xml                                                640 526 2020-08-02 11:16 -a---
    Microsoft.Kinect.SmallBasic.xml                           102 581 2015-09-02 13:10 -a---
    SmallBasicLibrary.De.xml                      
                121 667 2020-08-02 11:16 -a---

    ==================================================================================


    But neither of them work with LitDev . 
    Just get error msgs "Cannot find LDControls" .

    # Generated on 2020-08-02 12:36:25 by Directory Lister v0.9.1
    Name                                               Size           Date       Time  Attri
    ----------------------------------------------------------------------------------------
    c:\ppBrowser\Small-Basic\SB-Prime\                30 564 607 2020-08-02 12:06 -----
    ----------------------------------------------------------------------------------------
    ExtensionManagerLibrary.dll                               452 096 2020-06-01 20:01 -a---
    Humanizer.dll                                             212 008 2020-06-01 20:01 -a---
    ICSharpCode.Decompiler.dll                              1 597 440 2020-06-01 20:01 -a---
    Ionic.Zip.dll                                             462 336 2020-08-02 11:29 -a---
    LitDev.dll                                              6 605 824 2020-08-02 12:06 -a---
    SBPlugins.dll                                               4 096 2020-06-01 20:01 -a---
    ScintillaNET.dll                                        1 368 064 2020-06-01 20:01 -a---
    System.Collections.Immutable.dll                          358 536 2020-06-01 20:01 -a---
    System.Reflection.Metadata.dll                            584 848 2020-06-01 20:01 -a---
    System.ValueTuple.dll                                      77 672 2020-06-01 20:01 -a---
    System.Windows.Controls.Ribbon.dll                        421 624 2020-06-01 20:01 -a---
    SB-Prime.exe                                            2 848 768 2020-06-01 20:01 -a---
    Update.exe                                                 97 280 2020-06-01 20:01 -a---
    SB-Prime.exe.lnk                                            1 307 2020-08-02 11:33 -a---
    SB-Prime.exe.manifest                                      12 168 2020-06-01 20:01 -a---
    Physics-GettingStartedGuide.pdf                         1 448 153 2020-08-02 12:06 -a---
    LitDev.De.rtf                                             462 396 2020-08-02 12:06 -a---
    LitDev.rtf                                                379 109 2020-08-02 12:06 -a---
    ReadMe.txt                                                    503 2020-08-02 12:06 -a---
    [Content_Types].xml                                           755 2020-08-02 12:06 -a---
    LitDev.De.xml                                             454 899 2020-08-02 12:06 -a---
    LitDev.xml                                                475 679 2020-08-02 12:06 -a---
    SmallBasicLibrary.De.xml                                  109 226 2020-08-02 12:06 -a---
    LitDev_v1.2.zip                                         6 664 263 2020-08-02 10:42 -a---
    SB-Prime.zip                                            5 455 417 2020-07-31 17:04 -a---

    DirectoryLister program from here: https://www.portablefreeware.com/index.php?id=1157 

    What can I do next ? 

    • Edited by vmars316 Sunday, August 2, 2020 5:43 PM
    Sunday, August 2, 2020 5:40 PM
  • Hello vmars316,
    please use a short example to show us the specific, complete error message.

    for example:

    x = LDControls.AddCheckBox("Checky")
    Controls.Move(x,10,20)

    Compile : Errors were found
    Compile : (row=1,col=1)  Objekt 'LDControl' konnte nicht gefunden werden.
    Run : Cannot run case since exe has not been successfully compiled
    Compile : 0 Errors
    Run : Successfully started run with process 8212

    Sunday, August 2, 2020 7:32 PM
  • Hello & Thanks ;

    SmallBasic 2.1

    'Entries for listbox ListBox.sb
    list[1] = "Mark"
    list[2] = "Fred"
    list[3] = "Jane"
    list[4] = "William"
    'Sort the list, add to listbox and hook up event
    list = LDSort.ByValue(list) 'Optional sort
    listBox = LDControls.AddListBox(list,200,200)
    Shapes.Move(listBox,50,50)
    LDControls.ListBoxItemChanged = OnListBoxItemChanged

    Sub OnListBoxItemChanged
      GraphicsWindow.ShowMessage("Listbox item "+list[LDControls.LastListBoxIndex]+" selected","Information")
    EndSub

    =========================================

    Sorry, we found some errors.„
    7,8: Cannot find object 'LDSort'.
    8,1 1: Cannot find object 'LDControls'.
    10, 1: Cannot find object 'LDControls'.
    13,51: Cannot find object 'LDControls'.

    ===================================

    SB Prime 1.1

    Compile : (row—10,col=1) Cannot find object 'LDControls'.
    Compile : (row 13,col=51) Cannot find object 'LDControls'.
    Compile : Empty file name is not legal.
    Parameter name: sourceFileName
    Run : Cannot run case since exe has not been successfully compiled

    Thanks


    "All things in moderation, except for love and forgiveness."...vm


    • Edited by vmars316 Sunday, August 2, 2020 9:11 PM
    Sunday, August 2, 2020 9:07 PM
  • It cannot find LitDev extension methods - there are some possible reasons for this.  Note that changing down versions to 1.1 will not solve the issue and just confuse that possible issue that you do have.

    1] Install the most recent version of Small Basic 1.2 and LitDev extension 1.2.X.X

    2] Ensure the downloaded LitDev extension is Unblocked on download - this is a MS protection that can prevent the use of downloaded dlls from the internet.  See description of this here.

    3] Remove all other files (dlls and all others) from the Lib folder apart from unblocked LitDev.dll and LitDev.xlm and the Microsoft.Kinect.* dlls installed with SB and SBDebugger.dll used by SB Prime.  Expecially any occurence of SmallBasicLibrary.dll from the Lib folder.  Do not remove or change anything from the main SB installation folder.

    4] Test the original SB 1.2 with one of its sample programs (no extensions)

    5] Test LitDev extension with a short test code - we are not testing your code logic - just the compile and link capability (dll compatibility).

    Good Luck - it will work when we find the issue for you.


    • Edited by litdev Monday, August 3, 2020 9:08 AM
    Monday, August 3, 2020 6:30 AM
  • Thanks ;

    Ok it is working for LDControls .

    The only thing \lib is missing is SBDebugger.Dll  .

    Do I need it , Where to get it ?

    Now that things are working , can I run the Extensions Manager ? 

    Which Extensions can I install , which will work now ? 

    I suppose I could apply them one at a time then see if things work ?

    Thanks you for your Help !


    "All things in moderation, except for love and forgiveness."...vm


    • Edited by vmars316 Monday, August 3, 2020 5:23 PM
    Monday, August 3, 2020 5:01 PM
  • Great.

    SBDebugger.Dll is used by SBPrime when using the Debug option.  It will be created automatically for you when you use debugging.

    Yes, you can use Extension Manager now to get other extensions - only those that install are presented as options - they may not all work perfectly since they are user created, but they are all safe and generaly do work well.

    To install using Extension Manager from SBPrime, you need may need to:

    1] Advanced->Options - Untick 'Load extension dlls on startup'.  Extensions cannot be updated or removed when they are loaded.

    2] Restart SBPrime

    3] Use Advanced->Extension Manager to install any extension you want

    4] Retick 'Load extension dlls on startup'

    5] Restart SBPrime and use the extensions - see some of their commands in Tools->Search Extensions

    Monday, August 3, 2020 6:24 PM
  • Thanks 

    for this code: 

    browser = LDControls.AddBrowser(600, 600, "https://social.msdn.microsoft.com/Forums/en-US/home?forum=smallbasic")

    It gets me started to , hopefully , build a simple but KidSafeBrowser .


    "All things in moderation, except for love and forgiveness."...vm

    Tuesday, August 4, 2020 12:30 AM