We’re live!

NS Basic/App Studio 1.0.0 has been released!

Here’s the announcement:
http://www.nsbasic.com/app/PR/pr.101201.htm

You can order it here:
http://www.nsbasic.com/order.shtml

Introductory price is $99.95 – regular price is $149.95 for a Single Developer. As always, there are no royalties of distribution charges.

I’d like to thank the team who developed this product in record time. I’d also like to thank the testers who got us through 10 rounds of beta in just 11 days. We received literally hundreds of comments which led to tons of improvements and fixes.

Tip: Images in a Grid

Ever want to put an image in a grid control?

a="<img src='mario.jpg'>"
Grid1.setValue(1,1,a)

The cells in a grid will render HTML as their values. We’re just creating a simple html tag that goes into the cell.

Tip: Using Japanese (or other extended alphabets)

Japanese and other extended alphabets are working pretty well with NS Basic/App Studio now, with one exception: the characters show up on the Design Screen as rectangles. It’s because the Design Screen does not  know what font to use.

The solution is to specify the font in the style property of the
control. Put this string into the style property:

font-family: 'MS UI Gothic';

and it will display properly. For other languages, you will need to change the font name to something that is appropriate.

New stuff in iOS 4.2

It looks like Apple has added some goodies for us in iOS 4.2:
http://www.mobilexweb.com/blog/safari-ios-accelerometer-websockets-html5

These include:

  • Accelerometer support through the DeviceOrientation API
  • WebSockets API from HTML5
  • Updated HTML5 Form Support
  • Partial XHR-2 Support
  • Print Support
  • New JavaScript data types
  • New DOM events
  • Enhanced SVG and Canvas support

Full docs have not been posted, but these features should be usable on any iOS 4.2 device.

Tip: Delay when refreshing app on device

Did you notice that the first time you hit refresh on the device, you don’t seem to see the updated app?

Here is what is going on:

First, there is a pause while the files are moved into place on nsbapp.com.

The next time you run the program (or refresh), the device runs its current version from memory while it gets the latest manifest from the server. It compares them: if the manifest has changed, it then downloads the whole application again and saves it to the device. Once this is complete, the new version of the app will run next time you do a refresh.

There are properties you can check to see if the download is complete.

Tip: Including JavaScript Libraries

Here’s a tip that came up in an email conversation with a beta tester:

>>>Wishes of New Functions:
>>>- Factorial, Combinations and Permutations
>>
>>Here’s a really nice part about NS Basic/App Studio: it is easily
>>extensible. If you find a JavaScript library with these functions, it
>>can be used in your program.
>
>Is there possibility to have universal library with Factorial etc. and
>add this library to code (LoadLibrary, uses, include etc)?

Yes. Here’s how to do it:

HTML
  <script src="somelibrary.js" type="text/javascript"></script>
End HTML

The code in someLibrary.js will become part of your program, and you will be able to call the functions in someLibrary just like you would function in your own program.

Tip: Accelerator Keys

If your system is not showing Accelerator keys on the menus, press the Alt key – they will show up. You can then press your selection, such as F to see the File menu.

Tip: Getting rid of URL bar on Android

1. Add this line of code to Main(). It forces the screen to
reposition, moving the URL bar off the top.

Sub Main()
  setTimeout(window.scrollTo(0,window.innerHeight),100)
End Sub

2. Put this code in your program. It makes the contents of the screen full size.

HTML
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
  <p><br>
End HTML

We will be developing a more elegant solution, but this should work for now.