|
|
NS Basic/CE 1.10 Release Notes December 9, 1998 |
Welcome to NS Basic/CE 1.10!
This document has installation details and late breaking news that did not get a chance to make it into the NS Basic/CE Handbook. If you have the a Handbook dated before December, 1998, do not despair: all the new stuff is in this document as well. If you would like a copy of latest edition of the Handbook, it can be ordered from our website.
Please visit our web site for the latest version of this document.
Contents
What's New in 1.10
1. New Objects: We've added a number of useful and popular objects. These are an intrinsic part of NS Basic/CE, and are available at all times, unlike the ActiveX objects that need to have a module from the Goodies available. The intrinsic objects are checkBox, comboBox, commandButton, Label, listBox, optionButton and textBox. Documentation on these is in Appendex A. Sample code for each of the objects has been added to the BASIC Samples folder.
2. Program file encryption: The SAVEd version of the file is no longer readable outside the NS Basic/CE environment. 1.10 can read files saved under 1.00, but the reverse is not true. There is now an option in the Files menu which causes programs to be encryptyed when saved. An encrypted program is only readable by the copy of NS Basic/CE which created it, but can be run by any copy of NS Basic/CE 1.10.
3. BREAK "text for box","body of box" command. This new command allows you to temporarily halt the execution of a program, put up a message box, do some manipulation, then continue execution. Both argumentrs are optional. Great for debugging!
4. KEYPREVIEW: global setting. True/False. If set to true, all keystrokes are sent to the underlying Output object. The default is false, for better performance. When set to True, your program can receive the events Output_keyPress, Output_keyDown and Output_keyUp.
5. KILLFOCUS() - New function, sets focus to nothing. NSBCE 1.10 introduces the concept of focus, which is the currently active object. Intrinsic objects have a setfocus method which allows you to make it active. KILLFOCUS allows you to have no object active. The tab order of objects is the reverse of the creation of the objects, i.e. topmost first.
6. SETMENU - New feature. If you put a "-" (dash) as an item in the Setmenu list, it will draw a horizontal line in the pop up menu.
7. BYE and CHAIN: These have been made more reliable. They now take effect as soon as the current event finishes: i.e., after you have executed them and returned from any subroutines that were active. It's good practice to execute as little code as possible after issuing one of these statements.
8. The NS Basic/CE Runtime is now available. The installer for it is in the Downloads area of the NS Basic website. It may be freely distributed.
9. If you run a program directly from the shell by double clicking it will run immediately. To edit a program, you must start NS Basic/CE from the Start button.
Overview
NS BASIC/CE (or NSBCE) is a complete implementation of BASIC, with file I/O, communications and lots of other goodies. NSBCE is meant both as an easy to use tool for people with just a little programming experience and for experienced programmers who want to produce a serious application for their company.
The language itself is based on Microsoft's VBScript. Additional modules, called objects, can be added into your program with the AddObject statement. These provide additional functions, such as file I/O, ADO data base control, serial and Winsock communications and financial functions.
Running your first program is easy: start NSBCE and type in
print "Hello World!"
then tap the little running man in the menu bar.
For your second program, you'll want to have the same thing appear in a box that responds to being tapped. Type
AddObject "commandButton","Button",20,20,100,20
sub Button_click()
print "That tickles!"
end sub
There are two windows to NSBCE: the BASIC Editor and the Output Window. When you first start NSBCE, you will be in the BASIC. Once you start the program, another tab will appear with the name of the program, showing the Output Window. You can refer to the Output Window from within your program: it's a PictureBox object with the name "Output". (There's a Tech Note about PictureBox.)
Any time a program is started and is waiting for input, you can tap on the Editor tab and look at the code. Use the Show Variable menu item to look at the value of any active variable. Execute code lets you run some additional code that's not part of the program: for example, you could change the value of a variable. Continue will bring up a list of all the subroutines and functions in your program. Choose one, and it will be copied into the Execute window so you can add any needed parameters, then start it up.
If you get an error while running a program, returning to the BASIC Editor will display the line with error, highlighted.
Installation
The enclosed install files will install NS Basic/CE on any MIPS or SH3 based HandHeld PC or Handheld PC Pro. Windows CE 2.0 or later is required. If you have another kind of device, please contact NS BASIC Corporation for more information.
Simple Install Instructions:
1. Install Basic Setup.exe from diskette 1.
2. Install Goodies Setup.exe from diskette 1.
3. Install Scripting Engine.exe from diskette 2.
4. Install System Files.exe from diskette 3.
5. Use BASIC Installer in the \My Handheld PC folder to enter your serial number.
Warning
: Install all modules to the default directory. Windows CE requires most of the files to be in the \Windows folder: not much space could be saved by installing to a card.If you get "Failed to create engine ..."
when starting a sample program or running the BASIC Installer":This seems to happen to Velo 500 owners, as well as units where there has been a previous installation of this or similar software: After Step 4, you need to do the following:
Type Windows+R, then regsvr.exe \windows\vbscript.dll. You'll get Success...Error=0000000.
Type Windows+R, then regsvr.exe \windows\pvbrt.dll. You'll get Success...Error=0000000.
Special note for owners of Non-English units
NS Basic/CE looks for its Prefs file in using the path \Progam Files\NS Basic\BASIC Prefs. On non-english units, "Program Files" may actually have another name, such as "Programme".
The workaround is create a Program Files folder with an NS Basic folder in it, then move the BASIC Prefs file into that.
How to run a sample program
1. From Basic, tap File...Open...BASIC Samples...benchmark.
2. Tap on the Running Man icon.
3. In ten seconds, the benchmark will complete.
4. Tap <b icon>Benchmark.nsb to view and modify the source code.
A directory called BASIC Samples will also get installed in "My Handheld Computer". You can tap on these programs to start BASIC and run them.
Uninstalling
To uninstall NS Basic/CE, do [Start]...[Controls]...[Remove software]. Everything installed by the installer, including the BASIC Samples folder, will be removed. Programs you create will not be removed.
Documentation
The primary source of documention is the NS Basic/CE Handbook. It is shipped with each copy of NS Basic/CE. It is approximately 175 pages and details all commands, functions and statement, with example for each of them.
The On line help contains a summary of all statements, functions, objects and constants.
Detailed information on a number of topics is posted in a series of Tech Notes, posted on our web site.
Support
We're committed to delivering the best possible support. The following resources are available:
1. The NS Basic/CE BBS. Post questions and comments, and get answers in a public forum. Visit the NS BASIC Website to surf to this.
2. Email Support: Send your questions to support@nsbasic.com
3. Fax Support: Send faxes to 416 264-5888.
4. Tech Notes: The Tech Notes posted on our web site give additional and specialized information on a wide variety of topics.
5. Microsoft On Line Help: Since NSBCE uses the Windows CE VBScript Engine, your issue might be something that Microsoft has addressed in its Support Online section. If you enter "VBCE" as your question, you'll see a complete list of VBScript for CE issues.
Appendix A. New Objects, Properties, Methods and Events
The following new objects have been added. Unless otherwise noted, all of these objects can use the properties, methods and events shown below.
Objects
|
|
Simple checkbox with a title. Can be left or right. |
|
Pop up box with optional input |
|
Button with text. Enhanced from NSBCE 1.00. |
|
Simple label |
|
Pop up box |
|
Radio button |
|
Text input. Enhanced from NSBCE 1.00. |
Properties
Each object has a number of properties. Some properties are the same for all objects; others are specific and exist for only a few objects. If column 2 is empty in the table below, the property applies to all objects.
|
|
|
0=left, 1=right, 2=center |
|
|
|
|
|
|
|
commandButton, checkbox, optionButton |
|
|
|
boolean. Get/set bold property of font |
|
|
boolean. Get/Set italic property of font |
|
|
get/set point size of font. Integer only. |
|
|
boolean. |
|
|
boolean. Get/Set underline property of font. |
|
|
number. Weight of the font. 400=normal, 700=bold. Anything more than 550 is converted to 700, and everything else is converted to 400 |
|
|
|
|
|
|
|
Combobox, listbox |
default=true |
|
|
|
|
ComboBox, Listbox |
Element i of list. Can used to set or get. |
|
Combobox, listbox |
Number of elements in list |
|
combobox, listbox |
|
|
textBox |
|
|
textBox |
Boolean |
|
listbox, combobox |
Actual insert location. If you leave index off, the item will be added in sorted order for sorted lists and at the end for unsorted lists. |
|
|
|
|
multiline textBox, listbox |
0,1,2,3 |
|
listbox, combobox |
(boolean) get/set whether items should be sorted. Set immediately after control creation |
|
|
Get/Set |
|
combobox |
0=user can type input or choose from list |
|
|
|
|
Textbox, ComboBox |
|
|
|
|
|
OptionButton,Checkbox |
TRUE/FALSE (optionButton) |
|
|
|
|
|
|
Methods
Each object has a number of methods. Some methods are the same for all objects; others are specific and exist for only a few objects. If column 2 is empty in the table below, the method applies to all objects.
|
|
|
|
|
listbox, combobox |
string is item to add, index is integer index at which item should be added. Do not provide index for sorted boxes. |
|
combobox, listbox |
|
|
|
|
|
|
|
|
combobox, listbox |
|
|
|
|
Events
Each object has a number of events. Some events are the same for all objects; others are specific and exist for only a few objects. If column 2 is empty in the table below, the method applies to all events.
|
|
|
|
|
textbox, combobox, listbox |
|
|
listbox, textbox |
Will only occur if the change and click events are not being trapped. |
|
combobox |
|
|
|
|
|
Output |
|
|
Output |
|
|
Output |
|
Appendix B: Documentation that missed the 1.00 Handbook
These two commands missed the first printing of the Handbook:
SETMENU
<item>,<array>Sets the menu on the top of the screen. <Item> is the menu item to be set. If the value is "TitleBar" then <array> contains the names the of menu items across the top of the Output Object. Otherwise, <item> must be one of the names the of menu items across the top of the Output Object, and <array> contains the names of the menu items to be popped up (down?) when a selection is made from the titlebar. When an item is chosen, a call such as open_click() is sent to your program, where open is an item under one of the headings on the titlebar.
Example:
SetMenu "titlebar",array("File","Edit","View","Help")
SetMenu "File",array("Open","Save","Delete","Exit")
If you want to have the text shown on the menu to have a different name, separate the two with "||". This is especially handy when dealing with special characters found in non-English character sets.
Example:
SetMenu "titlebar","German||English"
This will show the word "German" on the titlebar, but call the subroutine English_click().
CHAIN
<programname>[,True|False]Stop current program and start executing <programName>. If second argument is TRUE, then clear the current workspace, clear the screen, and start executing the new program. If the second argument is FALSE, then keep the current workspace and screen, and start executing the new program. When it finishes, return to the next statement in the current program. If no second argument is supplied, the action is the same as FALSE. Note that Windows CE does not have a concept of a current pathname, so you'll need to specify the entire path to programname.