Smart Mobile Studio
  • News
  • Forums
  • Download
  • Store
  • Showcases
    • Featured demos
    • The Smart Contest 2013, Round 1 – Graphics
  • Documentation
    • Get the book
    • System requirements
    • Prerequisites
    • Getting started
      • Introduction
      • Application architecture
      • The application object
      • Forms and navigation
      • Message dialogs
      • Themes and styles
    • Project types
      • Visual project
      • Game project
      • Console project
    • Layout manager
    • Networking
      • TW3HttpRequest
      • TW3JSONP
      • Loading files
  • About

Category Archives: Developers log

Development updates

Posted on 25.11.2018 by Jarto Tarpio Posted in Developers log, News

Developing Smart Mobile Studio was a lot of fun last week. We solved two pet peeves in the IDE and improved the Object Inspector. Ever wondered why we couldn’t use the Delete-button in the Search dialog? Or why the Internal Debugger always had to be closed before clicking Execute again? Well, no need to wonder any more – they are fixed now.

In the RTL my all time most frustrating bug in Smart Mobile Studio was also fixed: The way TDateTime worked. As most of you know, TDateTime is a float where the integer part represents the day and fractions the time of the day. So, when you do a EncodeDate(2018,12,1) in Delphi, you get a simple integer: 43435. However, in Smart Mobile Studio, you got a value anywhere between 43434.5 to 43435.5. When you built a time with EncodeTime(8,0,0,0) and wrote it out with TimeToStr(), you didn’t get 8:00:00. Where I live, I got 12:00:00. That’s because the underlying javascript date functions, that the compiler used, built the date in UTC but viewed the time from the time zone where you ran the program. If you Google for date handling in javascript, you’ll find countless pages where js programmers are struggling with these as well.

When I joined the development team more than a year ago, I wanted this fixed yesterday, but it wasn’t simple. I was told that we’d need to upgrade to a newer version of DWScript, which was not an easy task. However, it turned out that the upgrade was not necessary. So last week I went through all the date and time handling functions in DWScript and fixed this for good.

To get all the latest fixes and updates, do follow this forum post. We opened up the DEVELOPMENT-channel in SmartUpdate, so all our users can get fresh updates right away.

SPNG: Be informed when values change

Posted on 08.04.2017 by Jon Lennart Posted in Developers log, News, News and articles 2 Comments

There are many new and powerful features in the upcoming release of Smart Mobile Studio (also refered to as Smart Pascal, Next Generation: SPNG in short): One of the most powerful is the ability to be notified when a value or object changes with a single line of code.

So far TVariant has just been a helper class for dealing with typical tasks. Well, perhaps not just typical because under Smart Pascal, variants can map directly to a javascript object (of any type) and allows you direct access to its prototype. The Handle property that all visual controls have is an example of this. The type TControlHandle is actually a reference to the visual element inside the DOM (document object mode). So by accessing that directly in your code, you can change styles, attributes and properties of that element. You are not bounds to only use our pre-fabricated solutions.

In the next update TVariant have a lot of new members. Two that stands out as important: watch() and unwatch().

As their name imply they will warch something for you. In this case you wil be notified whenever a single property, a whole object or indeed – a property deep within an object is altered. It may sound trivial but it’s actually one of those features that lays the foundation for responsive, data-aware controls.

But you can use it for many other things as well. For example you can now attach an event directly to a string. And whenever that string changes (either by your code, the user, or some other script) you can act on it directly. That is pretty cool and very helpful!

  // create an empty javascript object
  var MyValue: Variant := TVariant.CreateObject();

  // Set a default value
  MyValue.NewProperty := 12; // add a property and set a value

  // We want to know when the object changes
  TVariant.Watch(MyValue, "NewProperty", procedure ()
    begin
      showmessage("You changed the value!");
    end);

In this snippet we setup a javascript object and place a named-property inside that object. We then listen for changes to that property (by name even). So if you change that value further down in the code, or by calling some procedure elsewhere – the event will fire and show the message dialog.

This is of-cource just a tiny fragment of the new code that has been added, not to mention the changes and fixes. Some of these features are presently in alpha stage and is being tested. We will post more and more news in the days and weeks ahead – and we are sure you will be pleased with some the fantastic new things you can now code!

Here is an example of the new desktop and windowing applications you can write (picture below): The smart desktop!

The Smart desktop

We decided to update the uartex Media Desktop, an example initially made for touch based embedded environments – and turned it into a fully functional desktop environment!

Both the desktop itself, the filesystem, the IO drivers and windowing toolkit is written in Smart Pascal. You can create kiosk software designed to run on embedded devices, advanced applications designed to run on your intranet – or full cloud systems. So it can run a Smart application inside each Window if you like. But you have full control over windows, file access, directly listings, menu items and can sculpt both the desktop and applications to suit your needs.

The desktop can be coupled with a node.js backend that handles multi-user login and file access. It gives your users access to designated home-folders (again under your control). So each user can have their own work files just like a thin client, and each user can run different applications from a fully working desktop environment.

Below you are seeing Quake II compiled from C/C++ to LLVM bitcode. This is in turn compiled to JavaScript via asm.js. This means the browser will compile the javascript into machine code after loading. So Quake II runs at native speed, all JavaScript, inside our desktop window.

Create windowed applications with Smart Desktop

Create windowed applications with Smart Desktop

You will also be happy to head that x86 Linux and ARM kiosk distros have been created. So once happy with your desktop you can in fact boot straight into it in fullscreen. No Linux desktop or shell — just your desktop running. Both Firefox and Chrome can be used as presenter.

Have a great easter!

announcement code demo HTML5 javascript Object Pascal OP4JS release Smart Mobile Studio Upcoming features

Partial classes, the smart way

Posted on 25.10.2016 by Jon Lennart Posted in Developers log, Documentation, News

Smart Mobile Studio have had support for partial classes for quite some time. It’s already an integral part of our run-time library and brings invaluable features to how we extend and work with the base system. But for those new to this concept, a short introduction is in order.

What is a partial class?

A partial class is, essentially, that you divide the implementation of a class into smaller pieces. These pieces can reside in the same unit or across multiple units of your codebase. When the compiler encounters a class marked as partial, it will wait until the compilation is complete before it seals the virtual method table for that class.

That sounds very technical, but it’s really super easy to use and you dont have to get into the nitty-gritty of things to take advantage of the fantastic new abilities it gives you.

You may ponder what on earth is the use for something like this? Well, first of all it allows you a finer grain of control when dealing with multi-platform support. Let’s say you have some code that you need to work on both visual (SmartCL namespace) client applications and server-side (node.js) as well. Naturally SmartCL depends on the document object model (DOM) being present, but under node.js there is no such thing. If you try to use the units prefixed with SmartCL.* under node.js, it will either crash the server or produce some spectacular access violations.

With partial classes you can solve this quite elegantly by putting the base-class in one unit, and then finish the class in separate units: one for browser-based code and the other for node.js based environments.

Extending functionality

But the power of partial classes is not really in organization. The above example could just as easily be solved with some clear-cut compiler defines. Not as elegant, but just as effective. The real power is in how partial classes can extend any class which is defined as partial. Like TW3CustomControl, which is the foundation for all visual controls.

Let’s say you want to add a function for fading out any control. Not just a single control, but all controls (since all visual control inherit from TW3CustomControl, any addition to that class affects all descendants equally). If you take a look at the class (which is found in SmartCL.Components.pas) you will notice that it’s marked as partial.

  TW3CustomControl = partial class(TW3MovableControl)
  ..
  ..
  end;

That means that we can extend the class at any time. So if we add the following code to one of our units:

type
  TW3CustomControl = partial class(TW3MovableControl)
  public
    procedure FadeOut;
  end;

procedure TW3CustomControl.FadeOut;
begin
  // Add code here
end;

Hit compile so the compiler picks up on this, and voila – the code suggestion will now show the new member FadeOut() for all controls. Every control that inherits from TW3CustomControl gets this new member. That is pretty cool! You could ofcourse do something similar with a class helper (which Smart Mobile Studio also supports), but the difference between a class-helper and a partial class is quite radical.

A class helper is not a true member of a class, it’s more (as the name implies) a helper that operates around an instance. But a partial class is the class itself, with full access to protected and private members. You have just told the compiler that “oh by the way, add this to TW3CustomControl”. Any class defined as partial will not have it’s VMT sealed until the very last moment.

Need to extend that websocket client you find lacking? Well, if it’s marked as partial you can extend the class as you see fit without messing about with the RTL. It’s also a good way to extend the copyrighted RTL with new features that can be sold and distributed as a package. You wont violate anything because you are using partial classes!

Incidentaly this is how Mono C# solved the problem of targeting Android and Apple iOS from the same codebase. We have done more or less the same in our upcoming RTL where we introduce 3 distinct namespaces. So there is a lot of goodies in the bag for x-mas 🙂

Effects

If you add the unit SmartCL.Effects.pas to your project you will notice something very cool! Namely that TW3CustomControl suddenly get’s around 30 new members. These are special effects methods that will help you write some truly amazing controls. Want a button to shake when the user touches it? No problem. Want a panel to fade out, or perhaps slide off to the right? Easy as apple pie. Just open up SmartCL.Effects.pas and have a look. You can even daisy-chain effects to each other (with callbacks and duration settings) and Smart will execute them in sequence (!)

Verdict

I hope this introduction to partial classes was helpful and that it enriches the way you write Smart solutions. Naturally there is more than one system for partial classes on the market. C# has a slightly different take on this technology. But personally and speaking from experience (I have worked quite a lot with Mono C#) I feel our variation on the theme is better. You have to type more in C# to achieve what Smart does in a couple of lines, and the level of control you have is just awesome.

And ofcourse: It makes it that much easier to deal with multi-platform code, which is what our next updates is all about.

NodeJS server programming

Posted on 26.09.2016 by Jon Lennart Posted in Developers log 3 Comments

Work is progressing at a steady pace, and one of the aspects of the new Smart Mobile Studio is how the RTL is cleverly organized into namespaces.

Now it’s to early to spill the beans on all the new stuff, but in short we reached the point where we had to make some radical changes in order for the product to grow and reach its full potential. So far our RTL has aimed at the much loved VCL/LCL component architecture. This is not going to change at all, but how things are organized just had to be dealt with at some point. The longer we wait, the harder it’s going to be to introduce new features.

Namespaces

In the new model we have a clear distinction between visual and non-visual units. Visual units (or code in general) depends on the document object model (DOM) being present. As you probably know, non-visual environments like Node.js and IO.js doesnt have a document object model. These are primarily designed to run server code. They are also used to write actual system services (specially on Linux where turning a script into a background service is easy) or command line scripts.

Add to that technologies like Cordova Phonegap and Espruino (micro controller); then hybrid systems like nodewebkit, and you probably understand how important a clear separation of concepts and code is. But im not going into the nitty gritty of this now.

NodeJS and server side programming

Smart Mobile Studio have shipped with a node.js project type for some time. It throws you in at the deep-end of JavaScript programming, with nothing but the low-level header files to work with. This is fine if you are a JavaScript guru and know node intimately. But working on the level of headers and external declarations is not really user friendly. When you need to finish a server by next week, one that scales and can be clustered (which is just so powerful that I find it hard to describe just how cool this is) – you dont want to fiddle around with header files.

Well, soon you wont have to! In fact, as of writing I’m testing the first server type (http) and it’s performing brilliantly. Its a pleasure to write this part of the RTL !

Nodejs rocks! And with Smart Pascal, it rocks even more!

Nodejs rocks! And with Smart Pascal, it rocks even more!

A simple Node.js server

So, what does the most basic node.js web service look like? It’s almost to easy:

  var server := TNJHTTPServer.Create;
  Server.Port:=80;
  Server.OnAfterServerStarted:= procedure (sender: TObject)
    begin
      console.log("Server has started, listening on port:" + TNJHTTPServer(Sender).Port.toString);
    end;

  Server.OnRequest := procedure (Sender: TObject;
      const Request: TNJHttpRequest;
      const Response: TNJHttpResponse)
    begin
      console.log("-------------");
      console.log("Handling request:");
      console.log(request.Method);
      console.log(request.Url);
      console.log(request.Socket.remoteAddress);
      console.log("Listing headers:");
      for var x:=1 to request.headers.count do
      begin
        console.log(request.headers.Items[x-1]);
      end;
      console.log("-- OK");
      var LText:= "Your headers are:" + #13
        + Request.Headers.ToJSON() + #13
        + "All done.";
      response.end(Ltext);
    end;

  server.Start;

And that’s just one type of server. The really exciting stuff is when you dig into websocket and use socket.io to design your protocols (and clustering!). You can even setup events on both sides that trigger on spesific message types. Forget about heavy duty threading models — all of that is done for you. All you have to do is write the actual service.

Benefits of Node.js

Hosting node services costs next to nothing. Hosting providers are a dime a dozen and you can forget about those nifty prices you normally pay for pure executables (like under Delphi or Lazarus). So there is a huge financial aspect to take into consideration here as well, not just technical jargon. Node services can be moved, they are platform independent and couldnt care less if you use Linux or Windows, Amazon or Azure: as long as node is installed your good to go!

And last but not least: inter-communicating with existing services that are modern, and delivering solutions to your customers that talk JavaScript, Delphi, C++, C# or whatever their preference may be.

So good times ahead!

Cordova HTML5 javascript node.js nodejs rtl Smart Mobile Studio socket.io

That installer thing

Posted on 23.09.2016 by Jon Lennart Posted in Developers log

Smart Mobile Studio can be downloaded as a traditional installer-file for Microsoft Windows. This works quite well, especially when doing a clean install, and it would be very odd not to provide an installer in 2016.

However, we do get feedback from people that experience problems with this. Not the installer itself, but rather when they update their system by just installing on-top of an older installation, things become problematic. In short: depending on just how old that installation is, it can be plain sailing or a frustrating experience.

In newer versions of SMS you dont need to download a new installer

In newer versions of SMS you dont need to download a new installer

A while back we introduced the concept of “live updates”. In short Smart Mobile Studio ships with an automatic update application that makes sure you have the latest executables, the latest RTL and that your libraries are always fresh off the mint. Each version of Smart has its own channel inside the update program. The value of such a system is naturally that you dont have to keep on downloading installers, punch in the serial number – or that we accidentally overwrite or delete your own library files. The updater will only deal with the files known to it’s RTL, and leave your work in peace.

File IO is not just write and forget

Windows abound

Windows abound

Windows is not what it used to be. I personally think Windows has embraced the concept of users, access rights and credentials quite well (although Windows Vista made me leave the platform for Ubuntu Linux for a while). But all in all, Windows 7, 8 and 10 are a joy to use.

However, writing an installer that should be compatible with the majority of Windows systems (as many as possible) is not actually straight forward.  There are still things like credentials, roaming and non-roaming profiles, read/write rights, elevated users and functionality requiring admin notification (not to mention access bits on the filesystem itself); So a Windows box in Indonesia is not nessacarily identical to a Windows box in north America.

Microsoft have clear cut rules established for what paths to use when installing software. Smart Mobile Studio follows those rules always, but just because you follow the rules, doesnt mean that the user’s credentials (which propagate into everything he/she does) allows you to write all the files. This is where elevation comes in; Something that is finally easier to deal with in Delphi, the compiler we use to make Smart Mobile Studio.

We have seen people try to install Smart Mobile on thin clients and chrome-books, on roaming profiles in a corporate environment to their old Windows 98 machine. To make a long story short: modern Windows can be configured to be just about anything, and when installing a development platform you really need a normal PC without those restrictions. A developer machine.

Older installations

One of the biggest problems we have had and something that is topping our “how to” question chart, is when they have an ancient version of Smart Mobile Studio on their harddisk (anything from the first beta through version 2.0). This was before we added the automatic update program, and more importantly — the preferences files and dll files have since been utterly re-designed.

So they install the new version thinking it will replace some 3-4 year old install. But fact is, the installer will not overwrite the preferences file, and in many cases its not allowed to delete/replace the dll files. The old software prior to the update program must be manually un-installed through Windows before you install a more modern version (!)

What typically happens is that the old preferences file is left lingering on the system, the new executable tries to read it but finds none of the values it expects. This causes conflicts inside SMS, the server in particular is sensitive to this (which will be made more robust). This is not critical stuff, but annoying.

Using an old preferences file on a new exe will cause problems

Using an old preferences file on a new exe will cause problems, this is a typical stacktrace

The secondly, more critical, is when the older DLL files for the webkit rendering engine is left to linger. That means the header-files we use to talk with the DLL files wont match, causing a serious and show-stopping exception.

Again, manually uninstall the older version first. Then go into your “program files” folder and make sure to delete it completely. Same goes for “program data” (or appdata local or roaming). And last but not least, “user data” where library units, the RTL and various other tidbits are stored.

Using the update program

If you have a newer version you really dont need to download and use the installer. Simply start the update program and it will download the latest files. But its vital to remember that if you have made manual changes to the RTL files (which technically you shouldnt, but we dont mind as long as you stick to the license agreement for copying) – the update program will overwrite those files.

The point of the update program is to make sure the RTL, libraries, shims and IDE executable is the latest. It wont touch files that doesnt belong to SMS.

HTML5 Installer Object Pascal OP4JS Smart Mobile Studio

Smart Mobile Studio 2.2 Hotfix 2

Posted on 18.04.2016 by gabr42 Posted in Announcements, Developers log, News

As it turned out, the recent Smart Mobile Studio 2.2 Hotfix 1 introduced a big problem. Because of a regression bug in the compiler, generated programs are sometimes incorrect and don’t execute. To fix that are pushing out Hotfix 2 which contains all the updates of Hotfix 1 except the DWScript compiler which was reverted back to version 2.2.

To update, you can rerun the SmartUpdate utility [more information] or download the installer from the following locations:

  • Smart Mobile Studio 2.2 installer
  • Free command-line compiler

Changes

  • Reverted compiler to version 2.2 to fix code generation problems.
announcement Hotfix release

Smart Mobile Studio 2.2 Hotfix 1

Posted on 15.04.2016 by gabr42 Posted in Announcements, Developers log, News

This is just a small update to Smart Mobile Studio 2.2. We have fixed the GUI problems (black rectangles under icons), updated DWScript to the latest version, and made small change to the Find in Files function.

To update, you can rerun the SmartUpdate utility [more information] or download the installer from the following locations:

  • Smart Mobile Studio 2.2 installer
  • Free command-line compiler

Changes

  • Fixed icon display problem (black background).
  • Updated compiler
    • Fixed critical issue with smart linking and lambda functions
    • Fixed missing dot in FormatDateTime.
    • Fixed range checking for dynamic arrays.
    • Improved compatibility with Google’s closure compiler.
  • Improved ‘Find in Files’ – current selection is used for search text.

Compiler options explained

Posted on 09.04.2016 by Smart Mobile Studio Team Posted in Developers log, News and articles 1 Comment

CompilerOptionsIn the forums there was a post about a detailed description of the compiler options. Since there are currently no in-depth information available this post tries to clarify the topic a bit.

Continue reading→

Compiler options

It’s finally here – Smart Mobile Studio 2.2

Posted on 07.04.2016 by Smart Mobile Studio Team Posted in Announcements, Developers log, News

Yes, it is true! Not a beta, not a release candidate – we have finally published The Real Thing!

For the impatient

Download and run the installer.

  • Smart Mobile Studio 2.2 installer
  • Free command-line compiler

Portable installation

Smart Mobile Studio 2.2 can also be downloaded with the SmartUpdate utility [more information]. To get the final release, you should download from the (default) Release channel.

SmartUpdate - Release channel

If you already have a SmartUpdate-installed Beta channel on your disk, you can simply upgrade it to a Release by running the SmartUpdate.exe with the /changechannel switch.

What’s new

In two words: A Lot. Version 2.2 started out as a small upgrade, but as we worked on it we added tons and tons of stuff. A long list of changes since the 2.1 release can be found below.

What about the future?

We are already working on two fronts. A version 2.3 with revamped RTL (much faster visual component library and other goodies), support for search paths in the compiler and more is already in the work. At the same time we are triaging the issue list to determine which feature and bug requests will be fixed in the 2.2.1 hotfix.

List of changes since release 2.1

Compiler

  • Updated to latest DWScript.
  • Improved Date/Time handling.
    • DateTimeZone scoped enumeration (.Default, .Local, .UTC).
    • FormatSettings.ShortDateFormat, LongDateFormat, ShortTimeFormat, LongTimeFormat, Zone.
    • An extra “utc” parameter of DateTimeZone type on many DateTime functions.
    • A new ParseDateTime function, which acts as a reverse FormatDateTime
    • ISO8601 functions (were declared but missing from the codegen)
    • FormatSettings.Zone allows setting the default behavior between Local & UTC, and the utc parameter of DateTime functions allows to override that.
    • FormatSettings does not yet expose short/long day/month names, but these are used for Formatting & Parsing dates.
    • Fixed date/time rounding issues in the JS RTL.
    • JDateHelper was moved from W3C.Date to System.Date.
  • Added VarIsArray & VarIsClear.
  • Supports “export” qualifiers for functions (use in libraries).
  • Added support for ‘~’ in asm sections.
  • Added option to generate RTTI for objects in the implementation section.
  • Added missing error message for an invalid lambda syntax.
  • Added support for floating point modulus. (see https://www.delphitools.info/2015/10/29/floating-point-modulus)
  • Added support for sets in constant records.
  • Stricter enumerations type checks.
  • Integer operators are now more “strongly” typed, facilitates use of helpers over aliased integer types.
  • Case..of type matching is now more tolerant with variants.
  • Made code suggestions in a local scope more resilient to syntax errors in that local scope.
  • Compiler displays a hint about empty then/else blocks.
  • Compiler supports comparing Variant to nil with = and <> operators.
  • Conditional compilation symbols can be passed to the smsc compiler by using -defines=list.
  • Fixed: Source files with the UTF BOM header $FEFF are supported.
  • Fixed array add type-checks for classes & sub-classes.
  • Fixed array assignment typechecks.
  • Fixed an issue which caused a slight increases in memory usage after each compilation (a leak that was not strictly a leak).
  • Fixed “Invalid variant operation” error.
  • Fixed codegen for some class parameters.
  • Fixed codegen for StrBeginsWith.
  • Fixed method type detection bug.
  • Fixed issue with external class fields being assigned in an initialization section.
  • Fixed issues with incorrect array assignments.
  • Fixed handling of overloaded methods & override.
  • Fixes related to syntax errors in connectors (like Variant / JSON).
  • Fixed codegen bug with interfaces across inherited classes.
  • Fixed issue with nested contexts.
  • Fixed missing support for “set of” record fields.
  • Fixed bug with nested constant arrays.
  • Fixed obfuscation support.
  • Fixed some bugs and memory leaks.
  • Fixed compiler bug related to strict helpers.

RTL

  • Redesigned component management resulting in much faster redraw.
    • All visual elements now has a new procedure: ObjectReady() which you should override and use to adjust and set object values.
    • Added the property “ComponentState” as used by Delphi and FreePascal.
  • Added Indexed Database API W3C.IndexedDatabase (http://www.w3.org/TR/IndexedDB/).
  • Added System.Memory.
    • Marshaled pointer support, combined with support for Move, FillChar and all the other “memory” methods.
  • Added System.TypeCon containing data conversion classes.
  • Added System.DateUtils, capable of handling both local and UTC time.
  • Added System.Dataset unit containing in-memory database.
  • Added new system units: System.Streams, System.IO,  System.FileUtils, System.Messages.
  • Added Pixi.js library.
  • Added SmartCL.Legacy.pas containing Delphi-style TCanvas, TBitmap, and file path functions.
  • Added SmartCL.PageDiv unit, for managing a fixed buffer of abstract elements divided into pages. This is used by database navigators, thumnail viewers and anything which displays a fixed number of items out of a large whole.
  • Added simple label control SmartCL.Components.SimpleLabel.
  • Added TSimpleButton, a simple, rounded iOS standard button without gradients.
  • QTX Effects added to SmartCL.Effects.pas
  • Screen API wrapped in the TW3Screen class (accessible through the TApplication.Screen property).
    https://developer.mozilla.org/en-US/docs/Web/API/Screen
  • Improved TW3Image.
  • Defined ‘file’ input type for TEdit.
  • Added “Element” property (exposes the JXMLHttpRequest object) to TW3HttpRequest.
  • Added ResponseToMemory and ResponseToStream to TW3HttpRequest.
  • Added TW3WebSocket to SmartCL.Inet.
  • Added mousewheel support to scrollbars.
  • Added support for the Page Visibility API.
  • Added WebVR (Editors Draft) API.
  • Added font loading API (see http://www.w3.org/TR/css-font-loading/).
  • Added events OnActivate and OnDeactivate to TW3CustomForm.
  • Added cryptographic header translations (Cryptography API and “DRM” API).
  • Added neural network libraries Brain and Synaptic.
  • Added APIs:  W3C.Console, W3C.Push, W3C.ServiceWorkers, WHATWG.Fetch
  • Added AAC audio file support
  • Separated external objects defined by the JavaScript specification itself to a separate namespace ECMA. New units: ECMA.Date, ECMA.Json, ECMA.Math, ECMA.RegEx. RegEx class now lives in th ECMA.RegEx unit and global JSON object in the ECMA.Json unit.
  • Added System.Nullable containing nullable primitive types (see http://smartmobilestudio.com/2016/01/16/nullable-types/).
  • JEventHandler renamed to TEventHandler as it is not a native JS type. JEventHandler still exists, but is marked ‘deprecated’.
  • Completed overloads for the JJSON class.
  • Improved several of W3C APIs.
  • Updated Node.JS units.
  • Minor changes about accessing the audio tag from the Web Audio API.
  • Improved WebSocket support with binary and BLOB messages.
  • Redesigned REST API. REST API appends random number to the end by default (unless .NoRandomize is called).
  • Extended TypeScript header translation.
  • JUInt8ClampedArray was replaced with JUint8Array which has better browser support.
  • Fixed: touch events must not prevent default handler.
  • Fixed Scope confusion with CTRL + Click (namespace unit was opened instead of implementation unit).
  • Fixed modal dialog handling.
  • Fixed: Problem with ClientWidth & ClientHeight in document->body.
  • Fixed: Scrollbar math.
  • Fixed: Removed bug in ToggleSwitch where we used a “hack” to invoke a resize. This is no longer needed with the new system, so the bug and insertion of &nbsp; was removed.
  • Fixed “double free” bug in TW3Component.Destroy.
  • Fixed implementation of TMath.PI and TMath.E in Espruino.System.
  • Fixed System.Date/JDateHelper.SetAsDateTime and .SetAsLocalDateTime.
  • Fixed w3_getStyleAsFloat.
  • Fixed TW3Label positioning bug.
  • Fixed wrong declaration of JEventHandler (changed to ‘TEventHandler’ as it is rather a Pascal type declaration and not a JavaScript type).
  • Fixed TW3Dataset.Back.
  • Fixed Application.Document.ClientHeight.
  • Fixed TW3Slider component.
  • Fixed problems with TW3Label positioning.
  • Fixed TW3ScrollInfo.ScrollX and .ScrollY.

CSS

  • Added ‘None’ theme to allow CSS free simple demos using browser default.
  • New theme for Scrollbars.
  • Added CSS for TSimpleButton
  • Fixed: CSS3 form-background for Internet Explorer
  • Fixed: focus rectangle is now GONE for all themes.

IDE

  • Added: Metrics
  • Added: Project statistics
  • Added configuration option “Legacy support for IE9 (and below)”.
  • Added IDE setting to automatically save the project every N number of minutes (N is settable from 1 to 60).
  • Uses DCEF3 revision 2069 for built-in browser.
  • Improved UI with new (more) icons and a more consistent usage of fonts (now uses Segoe UI for all dialogs)
  • Improved JSON support.
    • JSON files can be added to the project.
    • Unit map shows JSON structure.
    • JSON files are available in the project generator API.
  • Improved Snippets management
    • Sort snippets after insertion
    • Renaming snippets
    • Snippets are not trimmed anymore (-> may contain leading spaces for indention)
    • (Incremental) search feature added
    • Doubleclick now pastes the snippets into the source code
  • Added: Close all tabs to the right
  • Added: Open file (tab) in explorer
  • Added: Only compile if necessary (when the project has been modified).
  • Added: Source code export tool.
  • Added: Search text highlighting.
  • Added SynEdit keystroke configuration to the IDE Settings/Keyboard page.
  • Added preferences page for internal browser configuration.
  • Added option controlling whether to add unit to the project’s uses section to the ‘new unit/form’ dialog.
  • Added unit name validation to the ‘new unit/form’ dialog.
  • Added option to have the internal browser log reversed (newest information at the top).
  • Added support for bulk deletion of several project files.
  • Added dialog to ask whether an unlinked external should be deleted upon making a project file all internal.
  • Added basic Cordova support.
  • New forms/units are external by default (on new installations).
  • Allows opening more than one file at once.
  • Introduced option for resource file path handling
  • Improved working with icons.
  • Implemented the sort project file feature.
  • Redesigned IDE Settings dialog.
  • Redesigned Project Options dialog.
  • Color is shown next to clXXX constants in the Code Insight window.
  • Implemented incremental searching in Project Manager.
  • Pressing Escape closes the Goto Line dialog.
  • Monitoring external files for changes can be turned off in IDE Settings.
  • The forms component list is now sorted
  • Welcome page can be closed.
  • Improved background compiler triggering and performance (ignores hidden designer implementation code)
  • Improved: [Enter] in project manager now opens file
  • Improved (IDE) compiler performance
  • Locate JS source code position in case of an error
  • Revived: Class browser, which now directly operates on the source code allowing to show even recent changes (in the editor).
  • Improved: Tightened XML files used by the IDE (less junk and empty tags) -> faster loading
  • Improved handling of open files that are not part of the project.
  • Improved ‘Normalize’ refactor.
  • Serial number is displayed in Help, License info.
  • Form name rename now calls rename refactoring.
  • ‘Mobile Manifest’ renamed to  ‘AppCache Manifest’.
  • Marked handled exceptions as expected so they don’t trigger EurekaLog dialog.
  • Fixed: ‘Asm’ highligher can be configured.
  • Fixed: Pressing Enter in Project Manager did not open selected unit.
  • Fixed: Search was not working for HTML source in the internal browser.
  • Fixed: If project was saved under a different name, it was not recompiled until it was modified in same other way.
  • Fixed: WriteLn messages were not always visible in logs.
  • Fixed: Switching from Project Manager to code could cause an access violation.
  • Fixed: Projects in the RTL/library folder won’t crash anymore
  • Fixed: Error in component name check (reserved words were possible)
  • Fixed: Extraction of units (in uses section) failed when comments were present within this section
  • Fixed: Automatic adding of new units now consider the right edge properly
  • Fixed: Unit scoping (namespaces) were not considered when adding new units to the uses section
  • Fixed: Node.js empty project generator created an invalid project (did not compile and needed manual tweaking of .sproj file)
  • Fixed: Messages window was visible when program was started
  • Fixed: Unit source is correctly displayed if new project or unit is created when no tabs are visible.
  • Fixed: When a new project is created, existing Unit1/Form1 files are no longer silently overwritten.
  • Fixed a problem when project files for a newly created project were not monitored for changes.
  • Fixed a problem when change was not detected if a form file (.sfm) was modified on disk.
  • Fixed issue where background compilation was performed twice on project load. The fix not only removes an internal exception, but also speeds up project loading as it only updates editor states once.
  • Fixed wrong icon for external resource files
  • Fixed: Double-clicking on a ‘folder’ icon crashed the program.
  • Fixed icon preview.
  • Fixed: Failed compilation didn’t always focus the editor.
  • Fixed issue with codegen which could crash on invalid source.
  • Fixed small issues with ‘Find in files’.
  • Fixed problems setting the linker output path.
  • Fixed ‘Open in browser’ button.
  • Fixed unnecessary limitations in ‘Keywords’ and ‘Homepage URL’ editors.

Editor/Designer

  • Updated CSS highlighter.
  • Syntax highlighting for JSON files.
  • Added visual designer guidelines.
  • Added simple ruler to the visual designer.
  • Added visual designer option to show the form’s bounds.
  • Added tool ‘Limit precision’ to the editor’s pop-up menu. This tool limits precision of numbers in the selected code.
  • Added ‘Wrap string’ feature to the editor to wrap a string which is longer than the right edge (Editor.RightEdge) to the next line(s).
  • Caret position change causes less workload (improved performance during source code navigation).
  • View state (editor/designer) is preserved in the <project>.dsk file.
  • Better live preview (less flickering).
  • Corrected ‘Show parameter’ (Shift + Ctrl + Space).
  • Improved Find&Replace dialog behaviour when executing ‘Replace all’.
  • Improved code completion.
  • Improved Ctrl+click behaviour.
  • Editor is refocused when internal browser window is closed.
  • Fixed source highlighting when double-quote was the first character in a line.
  • Fixed: Deletion of components in the designer did not mark the project as modified
  • Fixed DWS syntax highlighter for double quoted strings (did not highlight properly where delimiter was the very first character of a line).
  • Fixed: Form is marked as ‘modified’ when an event handler is created by double-clicking on a component.
  • Fixed: All controls on the form were duplicated when form was edited outside of the program while it was open in the editor.
  • Fixed event generation problem on secondary forms.
  • Fixed problems with Property Inspector and event generation (general crashes, “Invalid property value” exceptions).
  • Fixed the bug which occurred when several replacements were done in one line.
  • Fixed searching in RTL files (Find in Files, Include RTL/Library path).

Demos

  • Added DataSnap client/server demo.
  • Added DataSnap FishFacts demo.
  • Added DateTime demo.
  • Added HTML5 DOM demos.
  • Multiple demos corrected & adapted to the new RTL.
  • Added simple example for the Page Visibility API.
  • Added Splash Screen demo (http://smartmobilestudio.com/2015/09/27/writing-small-splash-screen-pre-loader-code).
  • Added a simple geolocation demo.
  • Added simple geolocation-based sunrise/sunset calculator.
  • Added a few examples to test certain cordova features (back button, audio playback [hooking its data for further processing]).
  • Improved Web Audio ABX Test demo.
  • Updated web audio examples and added new lessons.
  • Added third, manually created form to the `Multiple forms’ demo.
  • Added Layout Manager to the ‘Multiple forms’ demo to show how it is correctly used in a multiform application.
  • Updated REST demo.
  • Fixed Canvas Application demo.
  • Fixed: OnPrepare handler was not properly forwarded in SmartCL.Inet.REST.

Other

  • SmartUpdate program.
  • Unified installation for all editions.
  • Added support for “portable” installations that don’t require installation.
  • Cleaned-up default .spr file.
  • New icons.
  • Added a snippet that shows how to create a form in runtime.
finally release Version 2.2

Source map clean-up with Cordova

Posted on 05.04.2016 by Smart Mobile Studio Team Posted in Developers log, News and articles

Source maps are a very powerful way to support the debug process of HTML5-based web-apps. It actually maps the JS code to the higher level language (in this case Object Pascal). While this is very handy, especially in combination with obfuscation, it also reveals how the software is build internally. Thus you probably don’t want it to be shipped to customers.
Continue reading→

build script clean-up Cordova node.js Source maps

Smart Mobile Studio 2.2 Release Candidate 2

Posted on 30.03.2016 by gabr42 Posted in Announcements, Developers log, News

While the SmartMS 2.2 RC was generally well accepted, users found few critical bugs that should not make it into a released product. They are now fixed and we proudly present 2.2 Release Candidate 2!

As before, you have two installation options. A portable version can be installed with the SmartUpdate program from the Beta channel. Or you can download and run the installer – either for the full IDE or for the free command line compiler.

Changes since Release Candidate 1

  • RTL fixes regarding form activation and destruction.
  • Fixed: Wrong Form.Name when creating a new Form with dots in the name.
  • Fixed incorrect FHandle type in TW3TagObj.
  • Implemented TW3Dataset.Locate.
  • Fixed TW3Dataset.EOF.
  • Fixed TW3DataSet.Delete.
  • Fixed a bug in commandline compiler where wrong file could be used for compilation.
Stable release Version 2.2

Smart Mobile Studio 2.2 RC

Posted on 13.03.2016 by Smart Mobile Studio Team Posted in Announcements, Developers log, News

Smart 2.2 was long in the beta, but that can only mean it will be a great product, right? We believe we have fixed all important bugs and we proudly present the 2.2 Release Candidate!

This time you have two installation options. Firstly, you can download a portable version with the SmartUpdate program. If you are already running beta-5, you can just start SmartUpdate and it will fetch the new version. Otherwise, you should follow the detailed instructions outlined in the beta-1 announcement.

Secondly, you can install Smart with the setup program. Also available is an installer for the free command line compiler.

Changes since beta-5

  • Conditional compilation symbols can be passed to the smsc compiler by using -defines=list.
  • Added Pixi.js library.
  • Added DateTime demo.
  • Fixed compilation warnings in the RTL.
  • Added Layout Manager to the ‘Multiple forms’ to show how it is correctly used in a multiform application.
  • Added W3C.WebVR unit (http://mozvr.github.io/webvr-spec/).
  • Extended TypeScript header translation.
  • Editor is refocused when internal browser window is closed.
  • Fixed clipping for nested components.
  • Fixed searching in RTL files (Find in Files, Include RTL/Library path).
  • Fixed scrolling in console output.
  • Fixed TW3ScrollInfo.ScrollX and .ScrollY.
  • Fixed compiler bug related to strict helpers.
  • Fixed: OnPrepare handler was not properly forwarded in SmartCL.Inet.REST.
  • Removed old-style date functions from System.DateUtils and added `UTC` parameter to others.
Stable release Version 2.2

Smart Mobile Studio 2.2 (beta-5)

Posted on 24.01.2016 by Smart Mobile Studio Team Posted in Announcements, Developers log, News 8 Comments

Last October we thought that we have version 2.2 all but ready, but then users found some hard to fix problems and our schedule plan got heavily delayed into the 2016. Of course we spent all this time improving Smart in all its aspects and we added a ton of fixes and even some small new features. So now – when the original problems are fixed – we decided to release yet another beta. Hopefully this will be the last one.

If you are already running the beta-4, you can just start the SmartUpdate program and it will fetch the new version. Otherwise, you should follow the detailed instructions outlined in the beta-1 announcement.

Continue reading→

beta

Writing Node.js command-line tools

Posted on 23.01.2016 by Smart Mobile Studio Team Posted in Developers log, News and articles

NodeSmartIn the last article we have focused on how to use Cordova to build hybrid web applications with Smart Mobile Studio. In this article we focus about writing Node.js command-line tools (like Cordova) itself in Smart Mobile Studio.

Continue reading→

command-line node.js npm tool

Hybrid Web-Apps with Cordova

Posted on 19.01.2016 by Smart Mobile Studio Team Posted in Developers log, News and articles

CordovaAbout two years ago a detailed article about how to use Cordova has been published here. As times are changing quickly, an update for this becomes necessary. This article is about building hybrid web-apps with Cordova with Smart Mobile Studio.

Continue reading→

Android Chromium Cordova Hybrid Web-App icons node.js w3C

Pages

  • About
  • Feature Matrix
  • Forums
  • News
  • Release History
  • Download
  • Showcases
    • The Smart Contest 2013, Round 1 – Graphics
  • Store
  • Documentation
    • Creating your own controls
    • Debugging, exceptions and error handling
    • Differences between Delphi and Smart
    • Get the book
    • Getting started
      • Introduction
      • Local storage, session storage and global storage
      • Application architecture
      • The application object
      • Forms and navigation
      • Message dialogs
      • pmSmart Box Model
      • Themes and styles
    • Layout manager
    • Networking
      • Loading files
      • TW3HttpRequest
      • TW3JSONP
    • Prerequisites
    • Real data, talking to sqLite
    • System requirements
    • Project types
      • Visual project
      • Game project
      • Console project

Archives

  • December 2019
  • December 2018
  • November 2018
  • July 2018
  • June 2018
  • February 2018
  • September 2017
  • April 2017
  • November 2016
  • October 2016
  • September 2016
  • April 2016
  • March 2016
  • January 2016
  • October 2015
  • September 2015
  • July 2015
  • April 2015
  • January 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • November 2011
  • October 2011
  • September 2011

Categories

  • Announcements (25)
  • Developers log (119)
  • Documentation (26)
  • News (104)
  • News and articles (16)

WordPress

  • Register
  • Log in
  • WordPress

Subscribe

  • Entries (RSS)
  • Comments (RSS)
  • 1
  • 2
  • 3
  • …
  • 8
  • Next
© Optimale Systemer AS