Ns basic programs




















AppStudio was released in December, It consists of an IDE , a programming language and a deploy module. Virtually the entire VBscript syntax is implemented. Programming can be done in Basic or JavaScript. The programs produced by AppStudio are Web apps.

Apps install themselves as PWA offline web or native applications. The use of Nodejs modules is supported. It runs entirely on Newton OS devices. The first screen Open allows you to start a new project or open an existing project. Click on Recent; select HelloPgm. The project will load into the IDE. Revision: Add Code at Program Startup This change will add a message box that's displayed when the program first starts. Press F5 Start to download and test the change. When the program starts the message box is displayed and waits until the user taps the OK button Revision: Add Code at Form Display Time This change will add a label which shows the time-of-day.

Another button will be added to update the label with the latest time. Add a field where the Time of Day will be shown: Select label object in the Toolbox "A" icon Place it on the form and select it In the Properties window, change the Name to "lblTimeField" In the Properties window, change the Caption to "Time Of Day" Resize the label as needed to hold the time Add a button to refresh the Time of Day field: Select the CommandButton object in the Toolbox blank rectangle box Place it on the form and select it In the Properties window, change the Name to "cmdRefreshTime" In the Properties window, change the Caption to "Refresh Time" Resize and reposition the button on the form Note: You can press F5 Start after you added or changed a visual design and before you add the code to support the visual changes.

Push Button Rectangular shaped with text inside. When selected the button turns black and the text inside turns white.

Checkbox Small square rectangle with a text string beside it. When the box is set, it has a checkmark in it. Popup Trigger Text box with a pull down list of items. Label Text strings that can be displayed on the screen. Selector Box that is usually used to select the date or time. Repeater Like a regular button but code gets executed over and over if you hold the stylus down on it.

Field An area where the user can enter data. Bitmap Image. Gadget User defined object that is invisible. You can use this to make a bitmap seem like a button. Shift Indicator An up arrow that will be displayed if the Graffiti input mode is in uppercase mode. List A list of text strings. Scrollbar Vertical bar that has arrows at each end. After I created the layout that I wanted, I then started naming all my screen objects.

You can right click on an object and then select its properties. A property box will popup that you can edit. You can name the object, move it to an exact spot, change the font, and change other aspects of it depending on what type of object it is. After changing the objects properties, I was then ready to start the actual coding. Each object in the screen layout can have code associated with it. For example, when you click on a button, the code for that button is executed. So, I created code for the buttons in my layout.

This was pretty easy. Right clicking on an object will allow you to select the show code feature. This will popup a window with the code for that object. My program was pretty simple. I had 2 text boxes that I could enter a number into. One for Fahrenheit and one for Celsius.

Then I could either convert Fahrenheit to Celsius by pressing one button, or Celsius to Fahrenheit by pressing another. I also created a button that would clear both values causing them to be blank.



0コメント

  • 1000 / 1000