Smart Mobile Studio 2.1 (beta)

From Smart Mobile Studio
Jump to: navigation, search



  • Constant arrays of records are now supported, the ‘[ ]‘ and Delphi-like ‘( )’ syntax (Delphi-like syntax should be reserved for constant initialization like in Delphi).
  • Added StrMatches() function and .Matches() helper, it allows simple filtering (using * and ? wildcards). When the filter is constant, it’s compiled to a regexp.
  • Improved procedure type matching so that inline type declarations will match against named types, for example “procedure” vs “TProc”.
  • Added missing support for accessing open-array elements.
  • Fixed edge cases for unused variable hinting, with regard to overloaded procedures and var parameters.
  • Selected time conversion functions can now be optimized at compile time.
  • “In array” operator will now perform basic (safe) auto-casts (integer in float_array, etc.).
  • Compilation fails if resource file linked with $R directive cannot be found.
  • Added support for new special includes
    • %MAINFILE%
    • %LINENUM% current line as a number (%LINE% includes it as a string, this is FreePascal compatible)
  • Supports “empty” units (would previously report incorrect errors in other units).
  • Initial support for “with”, as sugar for a type-inferenced local variable, not that this is not yet Delphi compatible for arrays and records.
    • with p := something do begin
      // do anything with p
  • More internal includes are possible now, beside {$I app:name} to insert the project’s name it’s now also possible to use {$I app:author}, {$I app:company}, {$I app:description}, {$I app:notes} & {$I app:keywords} to get access to the (meta) information found in the project’s options.
  • Symbol DWSCRIPT is defined.
  • Static calls to non-abstract class methods of an abstract class are now possible.
  • Improved array constructor to support heterogeneous metatypes.
  • Fixed internal compiler error when empty unit was being compiled.
  • Fixed internal compiler error when a property was invoked on an “as” cast, like in “(foo as TBar).Prop”.
  • Fixed support of MidStr() by the codegen.
  • Added peephole optimization for string character access with a fixed offset like someString[whatever+1]
  • Added peephole optimization for Copy/MidStr calls of the form “Copy(stringVariable, whatever, Length(stringVariable))”.
  • Improved “case of” performance for integer & string constants.
  • Supports nested arrays with () boundaries when type is known.
  • ‘$ names’ (for example, $scope) can be use in ‘asm’ sections.
  • Fixed some minor leaks in the compiler for some “set of” syntax errors.
  • Fixed support of nil meta parameters.
  • Fixed codegen of string character assignments.
  • Fixed special case in overload resolution.
  • Fixed JS codegen for open array High.
  • Minor compiler fixes.


  • Panels are now using docking. Multiple layouts can be stored and quickly accessed.
  • Simplified form creation – forms can be auto-created when the program starts. No manual registration is required. (link to an article describing this function)
  • Keyboard shortcuts can be configured.
  • Editor tabs can be rearranged with mouse.
  • Built-in browser uses Chromium CEF3 instead of CEF1.
  • Added Search, Find in Files.
  • Symbol under the cursor is used for initial search term on Ctrl+F (Search).
  • Redesigned toolbars.
  • Improved project generator API.
  • Welcome page can be closed. Added View, Welcome page.
  • Added combo box containing open unit names.
  • Added shortcuts for Search&Replace dialog.
  • Renamed Preferences to IDE Settings and Options to Project options.
  • Fixed: Search dialog option Whole words was not persistent.
  • Fixed: Underscore was not allowed in a component name.
  • Fixed command-line compiler crashes.
  • Better compilation error messages in some obscure cases.
  • Compiler messages are updated during the compilation.
  • Files containing an ampersand in the path can be opened through the ‘recent items’ menu.
  • Right-click activates tab. This fixes a problem when action was selected from right-click menu on a non-active tab but was executed on the active tab.
  • Ctrl+Home/End behave same as Home/End in the Messages window.
  • Fixed exception when user Ctrl-clicked on a whitespace.


  • Added Split View mode (editor and designer side by side).
  • Added icons for ‘Move back in history’ (negates effects of Ctrl+Click) and ‘Move forward in history’ (negates the the ‘Move back’ command) to the editor toolbar.
  • Improved Ctrl+Click behaviour.
  • Fixed: It is no longer possible to create two components with a same name.
  • Fixed: Initial TPanel color was ignored.
  • Fixed: Properties Left and Top were not updated when component was dragged.
  • Fixed line moving with Ctrl+Shift+Up/Down.
  • Fixes for highlighter, in the case of multi-line strings whose ending quote/double-quote is the first character of a new line.


  • RTL was split into multiple namespaces (for example System, SmartCL, Espruino …). Proxy units (W3xxx) are provided for backward compatibility.
  • Added WebCL API.
  • Updated Espruino RTL.
  • Updated WebAudio API.
  • Added System.Encoding unit.
  • Added string constants sLineBreak (#13#10) and sHtmlLineBreak (< br >) to W3System.
  • Added AllowAllUp, Down, and GroupIndex properties to toolbar buttons.
  • Fixed TW3CSSClassStyleNames.RemoveByName


  • Added WebAudio ABX Test demo.
  • Updated Sine generator demo.
  • Structured and commented Particles demo.
  • Fixed Box2D demo.

Known issues

  • The background compiler crashes occasionally (no debugging possible in this case)
  • Command-line compiler crashes for a project file input (but works for pure pascal files!)
  • Boolean properties in the property inspector are displayed as -1 (which equals to True)

We are aware of the known issues and have/will fix these until the final release.