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: News

Smart Mobile Studio 3.9.1 is released

Posted on 20.12.2019 by Jarto Tarpio Posted in News

Smart Mobile Studio 3.9.1 is released

We are proud to release Smart Mobile Studio 3.9.1. This is the first Alpha release of the upcoming Smart Mobile Studio 4.0. The biggest improvement is the new WYSIWYG Designer, which takes developing visual applications in SMS to a new level. The compiler was updated with a new version of DWS (Delphi Web Script) and the IDE uses an updated Chromium component. On top of this, there are new components and improvements to the RTL.

We’ve attempted to keep this release as much backwards compatible as possible, so old projects should compile and run without changes.

The new Designer is written from scratch in Smart Mobile Studio itself and runs inside the IDE in an embedded Chromium browser. It uses Websockets to communicate with the IDE itself. As the Designer is an HTML4 application, it’s able to display accurately what all the components look like, instead of the dull old boxes in the old designer. You can set Align, Anchors, Angle, styles and any other properties and see exactly how they look like visually. You can also add a TW3TabControl and add and edit contents inside any tab.

The new Designer also supports non-visual components. Out of existing components in the RTL, TW3Timer, TW3HttpRequest and TW3WebSocket were added to the component palette in this release, but many more can also be added easily. This brings Smart Mobile Studio a lot closer to the way developers are used to work in Delphi.
The new Designer also has proper Undo-support and extensive copy-paste, even between multiple instances of SMS.

The RTL contains a new TW3PopupMenu-component along with a Menu Editor. The popup menu can be added to any component easily, by using any button as a Hamburger Menu or by using it as a traditional popup menu by right-clicking on a component. The designer itself uses the new TW3PopupMenu for any editing actions.

There is also a new TW3FormResizer-controller, which can be used to make any component resizable and draggable. It’s used in Designer’s Wizard forms.

The biggest changes in the RTL are related to constructing of forms when the application is starting. The code that the IDE generates for all the visual components makes sure that the components are ready before setting properties or creating child components. The RTL also properly waits until every single component is created, initialized and sized before calling InitializeForm. This eliminates tricky situations where a component was accessed, resized or hidden at the wrong time.

Some big changes were also made to TW3Application.ShowModal. In previous versions the OnInit(), OnOk() and OnCancel() -callbacks passed Dialog: TW3CustomForm as parameter. This was changed to passing ModalInfo: TModalInfo. You can access the modal form through ModalInfo.ModalForm to set and read parameters. Finally, call ModalInfo.Close in the OnOk- or OnClose-callback to properly close the modal form. There is also a new Application.ShowModalForm()-procedure, which lets you show any form as modal.

Installation

This Alpha-version can be downloaded with the SmartUpdate utility. Select the ALPHA -channel for this version.

Known issues and limitations

– The IDE may not always close properly leaving an extra SmartMS.exe or CEF4Delphi.exe process hanging. If this happens, they can be terminated through Task Manager.
– The designer currently only uses the default theme.
– Selecting multiple components for moving/editing is not yet implemented.
– TW3StringGrid does not yet have a Wizard.
– More advanced components like the Ace editor, TW3GoogleMaps and TW3LeafletMap do not show a WYSIWYG designer component. This is by design as they’d bloat the designer with huge amounts of external code.

Changes since 3.0.2

20.12.2019

IDE:
– New WYSIWYG Designer, which is a huge improvement over the original visual designer
– Made in Smart Mobile Studio itself.
– Visualizes every property including align, anchor, angle, styles
– Supports non-visual components like TW3Timer and TW3PopupMenu
– Allows advanced editing of controls, like TW3TabControl pages and contents
– Supports Wizards (TW3PopupMenu)
– Supports cut/copy/paste correctly using System clipboard
– Has extensive Undo-support
– Improved code generator for generating Form impl-code
– When an event is created, add missing dependency units for function parameters too
– Improved handling of Anchors
– Anchors can be set in the Object Inspector
– Added two new properties: AnchorGapRight and AnchorGapBottom.
These are set by the Designer to the distance of the bottom right corner
from the parent bottom right corner.
– Add new Welcome Page, which was made in Smart Mobile Studio itself.
– Update internal Chromium browser
– Update DWS to version 20190215.0

Most important RTL-changes:
– Improvements to constructing of forms when the application is starting.
– The code that the IDE generates for all the visual components makes sure
that the components are ready before setting properties and creating
child components.
– The RTL makes sure to wait until every component is created and initialized
before calling InitializeForm.
– These changes eliminate tricky situations where a component was accessed
or resized at the wrong time or a form was hidden while it was being built.
– Callbacks in ShowModal changed to pass ModalInfo as parameter instead of Form.
– You can still access the form through ModalInfo.ModalForm
– Close the modal form in OnOk() or OnCancel() by calling ModalInfo.Close
– New TW3Application.ShowModalForm
– Application.FormsArray will now only contain the forms that were automatically
created and registered during application startup.
– Change GetVisible to only check visibility-style from the component itself
– Add new IsVisible, which checks any other reasons for a component’s visibility,
like for example if the parent is visible.
– Change GetTop, GetLeft, GetHeight and GetWidth to read values from computed style,
which lets us read these values also when the component or form is hidden.

Additional RTL-changes:
– New TW3PopupMenu, which can be added to any component easily, by using a button
as a Hamburger Menu or by using it as a traditional popup menu by right-clicking
on a component. The new Designer has a Wizard for editing the menu items.
– Improvements to TW3ScrollBox
– AutoUpdate-property. If true, the scrollbox monitors changes in child components
and updates itself automatically.
– ForceParent-property. If true, child components are automatically moved
to the Content- component.
– Child components can be added to the ScrollBox in the new Designer.
– TW3TabControl: Tabs and Tab contents can be edited in the new Designer.
– New versions of TW3CheckBox and TW3RadioButton. Uses only CSS for resizing.
– Bug fixes to TW3ToggleSwitch
– Improvements to EventManager:
– Make OnAllMovement compatible with SetCapture
– Prevent extra OnClick when using SetCapture
– Make sure that more advanced components stop painting contents when the component
is not visible (for example: TW3ListBox, TW3TabControl, TW3ScrollBox)
– New TW3URL, which contains URL parameter handling like Delphi’s ParamStr, ParamCount etc.
– New controller: TW3FormResizer, which can be used to make a form (or any other control)
resizable and draggable.
– Move initialization of Label alignment styles to SmartCL.Css.Stylesheet,
so they can be used in other units as well
– Add TPoint.MoveBy
– Add DateTimeToLocal and LocalDateTimeToUTC to DateUtils
– Parent can now be changed, so components can be moved to different parents just like in Delphi
– Add support for Background position
– Change w3_getPropertyAsInt to return 0 if value is NaN
– Animations and some other browser specific CSS did not work properly in Firefox
due to wrong Browser-prefix.
– Bug fix to setting the cursor by name.
– Fix numerous bugs in TW3EdgeSenseController.
– Bug fixes to BringToFront and SendToBack

18.7.2019

IDE:
– Zip Entire Project did not include Form .sfm -files

RTL:
– Bug fixes to TW3TabControl

6.7.2019

IDE:
– Anchors (and other sets) can be set in the Object Inspector
– Improvements to generated Form implementation code:
– Wait until created components are ready before setting properties and creating children
– Set Anchors last
– Prevent conflicting keyboard shortcuts from being saved
– Use better default project options (no manifests, do not embed Javascript)
– Add new units to units defaults and improve formatting

RTL:
– Add xml-js to Libraries.
– New ECMA.Promise unit from api docs
– System.JSON:
– Support for adding/setting JSON arrays
– Add TJSONObject.Delete
– Set form size to 100% before calling InitializeObject
– Add missing units to SmartCL.Controls
– Setting control’s angle did not work in Firefox
– Don’t raise an exception while freeing a form which is not registered
– Themes: default styles were not applied for all elements in Android and iOS
– Fixes a bug where textarea’s size is too big in TW3Memo

24.4.2019

RTL:
– Anchors and Align-support to the RTL.
– Support in the IDE is currently being worked on. Currently Anchors can
only be set in code. Align can be set in the Object Inspector, but the
changes are not reflected in the designer.
– Bug fix to BoundsRect
– Themes: New background for highlighting errors: bsErrorBackground
– TW3StringGrid:
– New event for setting custom row borders and backgrounds: OnDrawGridLineTheme

14.4.2019

RTL:
– Improvements to TW3StringGrid:
– New columns types:
– TW3StringGridNumericColumn
– TW3StringGridButtonColumn
– Added sorting
– New event: OnCellChanged
– TStringList and TObjectList: Add Sort() with CompareFunction.
– Fix CSS browser prefix for Firefox
– Themes: Use normal size and style text in buttons.

27.3.2019

RTL:
– New control: TW3StringGrid
– New featured demo for the StringGrid.
– New TW3CustomScrollControl, for developing scroll controls with scrollbars/indicators-support.
– New border types: btLightBorderTop, -Bottom, -Left, -Right, -Horiz and -Vert
– EventManager: Check TouchPreventDefault before trying to prevent extra artificial mouse events from touch events
– Improvements to TW3BlockBox and Modal dialogs:
– TW3BlockBox did not trigger a resize
– Dialogs did not get resized when window was resized or device flipped
– Make sure the dialogs are not too big

21.2.2019

Bug fixes and improvements to the IDE:
– BringToFront and SendToBack will now affect component creation order.
– Opening files from Project Search Path is fixed.

20.1.2019

RTL:
– New controls: TW3SpinButton, TW3ArrowUpButton, TW3ArrowDownButton, TW3ArrowLeftButton and TW3ArrowRightButton.
– Add 1px margin to TW3ButtonBorder to prevent the border from being clipped.
– Bug fixes to Tween.Effects

IDE:
– Bug fixes and changes to renaming of forms:
– Renaming in Project Manager will not change form class any more.
– Form class name can be renamed in Object Inspector.
– Improvements to Project Statistics:
– Only count Total time when Smart Mobile Studio IDE has focus.
– Only Count Design time when changes are made in Form Designer.
– Add clear button.
– Component Palette:
– Added new controls
– New icons for many existing controls

Smart Mobile Studio 3.0.2 is released

Posted on 21.12.2018 by Jarto Tarpio Posted in News

Smart Mobile Studio 3.0.2 is released

This release contains lots of fixes and improvements to the IDE as well as improvements to the RTL.

Installers

  • Smart Mobile Studio installer
  • Free command-line compiler

Portable installation

Smart Mobile Studio can also be downloaded with the SmartUpdate utility. Select the MASTER -channel for the official version.

Changes since 3.0.1

20.12.2018

RTL:
– TW3TabControl:
– AnimateTabs-property to control how tabs are changed.
– TW3ListBox:
– Prevent an exception if TW3Image is used as a line control and OnShowItem is not set.
– TW3ListMenu, TW3HeaderControl and TW3SimpleLabel:
– Don’t set default caption to classname during initialization.
– DWScript: Capitalize day and month names correctly (January instead of january, Sunday instead of sunday)

IDE:
– Improvements to the way the IDE reacts to a changed external file.
– Use caption while drawing generic controls instead of component name.

12.12.2018

RTL:
– TW3ListMenu:
– Add Items-property, so items can created in Object Inspector.
– Add OnSelected-event.

IDE:
– Bug fix to renaming of units
– Show form source instead of designer when form is selected from Project Manager

6.12.2018

– SmartNJ.Server.Http: Do not free Request and Response after OnRequest has been generated.
– Updated nodejs http- and https-demos with an example on how to read POST content.

5.12.2018

– Fixed “Argument out of Range” -error while renaming forms or units.
– Fix bug in renaming Form1, which did not change TForm1-classes in Form1.
– This happens if Form1 is not listed in the uses-clause of the main project source.
– Fixed in new projects.
– In older projects, users should change the uses-clause to also contain Form1
– Update uses-clauses in Form1 of a new project to get the same units as a new form.

26.11.2018

RTL:
– Bug fix to SmartCL.Layout: Set component size before position, to avoid problems in bottom and right alignments.
– Bug fix to TW3ToolControlFlatBorder in iOS theme.
– TW3BufferedImage: Don’t try to use TW3BackgroundGraphicContext, which was deprecated in Chrome

22.11.2018

RTL:
– Add styles for TW3RadioButtonLabel and TW3CheckBoxLabel. Also remove hard coded color from source code.
– Add default property values for in various components for the Object Inspector.

IDE:
– Property Inspector shows default values from RTL source.

17.11.2018

RTL:
– Changes to handling of Cursor:
– Style definitions moved from basic html elements to control styles
– GetCursor and SetCursor can now be overridden
– Bug fixes to how many controls handle cursor. Especially TW3Label.
– Themes:
– Add missing styles TW3CheckBox, TW3CheckMark, TW3RadioButton, TW3RadioToggle and TW3RadioGroup
– Two new backgrounds: TW3DecorativeListItemBackground and TW3TransparentBackground
– RTL optimizations to creation of controls, GetBoundsRect, SetBounds, MoveTo and SetSize.
– Bug fix to SmartCL.Graphics.pas: Changing of canvas font, size and styles did not work.
– Bug fix to System.DateUtils.DecodeDate.

IDE:
– Delete key works now Search dialog and other dialogs.
– Bug fix: Internal Browser Window showed only a white screen if Execute was clicked while it was open.

Compiler:
– Now(), EncodeDate() and EncodeTime() returns now the same values as Delphi and FPC
– All time/date -functions fixed to work with the new TDateTime-values

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.

Smart Mobile Studio 3.0.1 released

Posted on 08.11.2018 by Jarto Tarpio Posted in News

Smart Mobile Studio 3.0.1 is released

This is the first release since 3.0. Biggest new feature is TW3LeafletMap, which lets you use OpenStreetMap. As it does not need API keys (like TW3GoogleMaps), it’s really fast and easy to use:

– Create a project
– Add a TW3LeafletMap -control on the form
– Set AutoCreateMap to true on the map control

Please see the changelog at the end of this post.

Installers

  • Smart Mobile Studio installer
  • Free command-line compiler

Portable installation

Smart Mobile Studio can also be downloaded with the SmartUpdate utility. Select the MASTER -channel for the official version.

Changes since 3.0

8.11.2018

RTL:
– EventManager:
– Add procedure AllowDefaultAction, that can be called from OnClick when the default
action should happen. For example: To let the virtual keyboard to pop up from OnTouch.
– Bug fixes:
– Native scrolling was prevented if scrolling was done from an unknown element.
– Prevent an extra OnClick from being fired on mobile devices.
– TW3ListView: Bug fix to resizing of items.
– Bug fixes to GeoLocation. Also update the Geolocation demo.
– Deprecate PhoneGapAPI’s JGeolocation functions. SmartCL.GeoLocation.pas should be used instead.
– Fix slider so that OnMouseDown, OnMouseUp and OnMOuseMove can be used.
– TW3TabControl Tab’s OnShow was sent twice for the first tab
– SmartCL.RegEx moved to System.RegEx. Also fixed TW3RegEx.Exec to return a proper empty array instead of nil.
– Bug fix to Chart: TSeriesData.Refresh now also updates the X axis
– TW3Grid:
– Added TW3ImageColumn
– Add Alignment-property to TW3ColumnHeader
– Added a new OnCellControlCreated-event, which fires when a button, toggle, progress bar or image is created.
Makes it possible to change properties of the control easily.
– Added support for OpenStreetMap using the Leaflet library:
– New control: TW3LeafletMap
– New featured demo: LeafletMap

IDE/Compiler:
– Fixed search path compilation issues
– Relative and absolute paths are working now
– Compiler is updated when search path is modified in options
– $I will look for include file in the project folder first
– $R supports absolute paths, wildcards, folder name extension and ($Libraries) macro
– Fix exceptions in Search
– Upgrade to UPX 3.95

23.7.2018

– SmartCL.Effects: Properly handle padding and margins while doing effects.

22.7.2018

– Fix to css-files for selected text in TW3Edit and TW3Memo

Smart Mobile Studio 3.0 is released!

Posted on 20.07.2018 by Jarto Tarpio Posted in News

We are proud to release Smart Mobile Studio 3.0!

So, what’s new? Oh boy. Where do I even start? There’s tons of changes. The RTL has gone through a big rewrite, which has made it a lot faster. Also, all JavaScript- related quirks have been taken care of. Events work as you expect as a Delphi programmer. All weird resize- bugs are gone. There’s a new way of doing styling, where you can choose backgrounds and borders from a set of pre-defined styles. This makes it easy to have a consistent look in all your controls instead of having to write separate CSS definitions for every control.

A huge amount of attention was to make everything work fast and smooth on mobile devices. There’s a very nice TabControl that lets you change tabs by swiping. And a new ListBox, that is blindingly fast with huge amounts of lines. There are scrollboxes with momentum scrolling. And PhoneGap works as it should adding very easy-to-use push notification support.

Compatibility is great across browsers and mobile devices. While older versions were close to unusable on a Windows phone, Smart Mobile Studio 3 makes even an old Lumia phone fly.

On top of all that, we have made programming easy and fun with margins and padding. The RTL automatically resizes and moves your controls respecting the margins and paddings that the style sheet has. You can also use relative positioning and FlexBox.

We have many new visual controls: TW3ScrollControl, TW3ScrollBox, TW3NativeScrollBox, TW3ListBox, TW3CheckListBox, TW3TabControl, TW3GroupBox, TW3RadioGroup, TW3MediaPlayer and a very cool TW3GoogleMaps. We also added the Ace Editor!

In the IDE we’ve not only fixed bugs, but added better support for properties in the Object Inspector. While previously you had to add ComboBox -items in code, you can simply set the items with the Object Inspector, just like in Delphi.

Under the hood, in the RTL there are also a lot of changes. System.Collections, storage devices that unify file handling across platforms, streams, datasets, you name it.

A lot of work has been done on Smart Mobile Studio’s NodeJS features, which lets you produce scalable applications for cloud platforms or even cheap mini computers like the Tinkerboard or Odroid XU4. You can write HTTPS-servers and use Secure Web Socket.

As an example of what Smart Mobile Studio 3 can do, we’ve written a Smart Desktop -demo to show what is possible. Go to desktop.smartmobilestudio.com and hit the Login-button. The Desktop communicates with a Linux-server running a NodeJS-server application, which is also written in Smart Mobile Studio. The source code of both demos is included in Smart Mobile Studio 3.

Installers

  • Smart Mobile Studio installer
  • Free command-line compiler

Portable installation

Smart Mobile Studio can also be downloaded with the SmartUpdate utility. Select the MASTER -channel for the official version.

Smart Mobile Studio 3.0.0 beta2 released

Posted on 08.06.2018 by Jarto Tarpio Posted in News

Smart Mobile Studio 3.0.0 beta2 is released!

Installers

  • Smart Mobile Studio installer
  • Free command-line compiler

Portable installation

Smart Mobile Studio can also be downloaded with the SmartUpdate utility. To get the beta, make sure to select the BETA channel. If you already have the Alpha-version installed, you can upgrade it to the Beta -version by running the SmartUpdate.exe with the /changechannel switch.

Changelog since beta1

8.6.2018

RTL:
– Prevent whole page from being dragged down/up in iOS.
– TW3TabControl: New property AllowSwipe, to control if tabs can be changed by swiping sideways.
– Bug fix to TW3CustomControl.SetNativeScrolling.

7.6.2018

NodeJS:
– New Ragnarok message framework.
– Lots of changes and improvements to the websocket server.
– Use the latest node.js engine and get rid of the websocket.io framework.
– SQLite3 import api: Nodejs.SQLite3.pas
– Lots of imporvements to TApplication object.
– Lots of improvements and bug fixes to the WebSocket server
– TW3DirectoryWatch moved to SmartNJ.Device.Storage.Watch.pas
– New logfile using write-stream in append mode: SmartNJ.LogFile.pas

RTL:
– New base-classes for a unified DB Framework: System.DB.pas
– All Base64 and UTF8 encoding implemented in Smart Pascal code instead of external js.
– Added OnChildAdded/Removed events to TW3TagContainer.
– New TIniFile-class: System.IniFile.pas
– TW3TagObj.FreeAfter, which can be used to free components after a delay.
– Src property published in TW3IFrame
– TW3ScrollControl to lock scrolling direction to the detected direction.
– Can be controlled with ScrollController.LockMovementDirection -property.
– Improvements and bug fixes to TW3ListBox
– Added InvalidateVisible for a quick and full repaint.
– Added horizontal scrolling if ItemWidth is wider than the listbox.
– Improvements and bug fixes to TW3EditBox and TW3Memo
– Fix text selection bug in Firefox.
– Add MaxLength-property.
– New function TString.EncodeTags, which converts tags and dangerous characters to safe html symbols.
– EventManager: Prevent extra mouse events if OnClick was generated from touch events.
– TabControl:
– Prevent from calling InitializeForm twize, if the tab was a form.
– Improve tab header resizing.
– ListBox:
– Change TagValue to Variant.
– Fixed mouse handling bugs in the ACE editor.
– Bug fixes to font measurement.

Compiler:
– Implemented ‘static’ linking of Javascript files: {$I ‘file.js’}

18.3.2018

RTL:
– Moved WriteLn and WriteLnF from SmartCL.System to System.Types, so they can be used
in WebWorker -projects.
Demos:
– New WebWorker -demo, which counts Primes, demonstrating how you can use all CPU cores.

17.3.2018

RTL:
– Moved coversion and encoding related functions from System.Types to System.Types.Convert,
which results in a lot smaller js-size in WebWorker projects.

16.3.2018

Bug fix to WebWorkers.

14.3.2018

Bug fix to the IDE and TW3GoogleMaps to make the CenterLat- and CenterLng-coordinates work.

13.3.2018

IDE:
– Added TStrings-support to Object Inspector, which allows editing of:
– TW3ListBox.Items
– TW3ComboBox.Items
– TW3RadioGroup.Items
– TW3TabControl.Tabs
– NodeJS background executions are stopped when project is closed.
– Bug fixes to OmniXML
– Updated Datasnap proxy generator dll to latest
– Fixed problem with Datasnap access interface importer

RTL:
– New control: TW3GoogleMaps
– TW3TabControl can use Forms as Tab contents (Check TabForms -demo)
– Updated node.js headers to version 8.10.0 LTS compatible with stable v9.8.0)
– Isolated node.js EventEmitter in separate unit (NodeJS.Events) as per specification (node.js v6.9.1)
– Implemented System.IOUtils with storage independent TPath class
– Implemented a synchronous node.js filesystem API, TW3NodeSyncFileAPI class in SmartNJ.System
– Implemented abstract directory parser (TW3DirectoryParser in System.IOUtils)
– Implemented standard system file and folder functiction in SmartNJ.System
– Upgraded our virtual, BTree based in-memory filesystem to use TPath
– Changed TW3VirtualFileSystem to store data as TByteArray rather than variant
– Implemented directory parser for Linux, Unix and Windows
– Implemented abstract storage device driver (System.Device.Storage)
– Implemented storage device driver for browsers (SmartCL.Device.Storage)
– Implemented storage device driver for node.js (SmartNJ.Device.Storage)
– Implemented TW3DirectoryWatch class for node.js (SmartNJ.Device.Storage)
– Implemented TApplication object for node.js, exposing traditional properties and process info
– Updated our message api (SmartCL.Messages) to support javascript messagechannel ports
– Added full support for socket.io clients (SmartCL.Net.Socketio)
– Updated TW3Memo control to initialize states for autocorrect, autocapitalize etc.
– Added GetIsRunningInBrowser function to system.types
– TStreamReader and TStreamWriter moved to System.Reader and System.Writer units.
This deprecates the System.StreamReader and System.StreamWriter units.
– Implemented new string parser functions for recognizing intrinsic types (TDataType in System.Types.Convert)
– Updated TW3DatasetFilter to use new parser framework
– Fixed string-to-intrinsic-type (TryStrToInt, TryStrToBoolean etc) functions
– Full re-implementation of our parser framework (System.Text.Parser)
– Partial class TBinaryData, under node has functions for consuming and emitting data as a node buffer
– Fixed bug in our node.js http server (SmartNJ.Server.HTTP) where the response object would not release if an
error occured, causing the server to drop the connection.
– Cleaned up multiple declarations for JBuffer and JNodeBuffer, now isolated in unit nodejs.core
– Changed default creation flags for node.js files to R+W as opposed to R+W+E (only affects Linux)
– Fixed bug where TNJHttpRequest.GetHeaders function returned null
– Removed use of JError under node where applicable, now use TJSErrorObject from system.types unit
– Updated bytecode assembler and virtual machine project to latest
– Removed TFileNameHelper class from SmartCl.Legacy unit, this is now handled by TPath in System.IOUtils
– Updated codec manager (system.codec unit)
– Implemented RC4 encryption codec and binding (System.Codec.RC4)
– Updated Base64.js to latest revision (libraries/base64.js) which is added by the linker on demand
– Full re-implementation of base64 codec (System.Codec.base64 unit)
– Changed TString.ToBase64() function to use new codec
– TW3GroupBox header fixed, now uses TW3Label rather than mapping the unreliable “legend” tag
– Improved AutoCreateForm routine, this now performs better checking before construction
– TW3Grid control now uses TW3ScrollControl as a container, adding momentum scrolling and better touch handling
– Fixed important problem with TString helper class, function missing @ for result caused exception

Demos:
– Full reimplementation of our websocket server, replacing websocket.io with the standard ws package
– Updated all node.js demos to use our high-level classes
– Updated WebSQL demo to use correct names
– Updated “Binary data” demo to use TBinaryData class (System.Memory.Buffer unit)
– Fishfacts demo updated to use new functionality
– Fixed problems with advanced demos (biotopia in particular) to work with latest RTL

Smart Mobile Studio 3.0.0 beta1 released

Posted on 12.02.2018 by Jarto Tarpio Posted in Announcements, News

Smart Mobile Studio 3.0.0 beta1 is released!

After almost 5 months of development of Smart Mobile Studio’s alpha-version, we are proud to release the first beta-version of the upcoming version 3.0.0.

Major changes:

  • A control’s style is now split up into a border style, background style and control’s own style. Details
  • Size and position of controls are automatically adjusted according to margins and padding. Description and discussion
  • Improved support for PhoneGap Example
  • Support for WebFonts and Font-Awesome

Installers

  • Smart Mobile Studio installer
  • Free command-line compiler

Portable installation

Smart Mobile Studio can also be downloaded with the SmartUpdate utility. To get the beta, make sure to select the BETA channel. If you already have the Alpha-version installed, you can upgrade it to the Beta -version by running the SmartUpdate.exe with the /changechannel switch.

Known problems:

  • A few demos are not yet updated:
    • Biotopia in Contest Demos
    • ControlsListMenu and ControlsToolBar in Smart Book Demos
  • Datasnap importer is not working at the moment

Changelog since release of the first alpha:

12.2.2018

First Beta of the upcoming Smart Mobile Studio 3.0 -version.

3.2.2018

– Bug fix to LoadFromStream in Sqlite
– Bug fixes to TMemoryStream and TStringStream

25.1.2018

– Bug fix to streams.

21.1.2018

– Bug fix to transitions.
– Various bug fixes to demos.

9.1.2018

– Bug fixes and improvements to TW3ListBox and TW3CheckListBox.
– Bug fix to Control Animation-demo.

8.1.2018

IDE:
– Added support for search paths
– Updated SynEdit
– Bug fixes
– ACE (TW3AceEditor) added to the Component Palette

RTL:
– New units:
– System.Collections
– System.StorageDevice
– Marjor improvements to TW3Dataset, TW3DatasetFilter and WebSQL
– Bug fixes and improvements to TextParser
– Bug fixes to WebFonts support
– Moved TCriticalSection to System.Types
– Improvements to TW3ListBox and TW3CheckListBox:
– Support for SelectedIndex and automatic change of style
background for selected items
– Support for MultiSelect
– Possibility to override creation of TW3ListBoxItemData
– Allows use of own classes and properties
– Allows overriding SetSelected to control what styling
changes should be made when items are selected

Bug fixes to many demos

9.12.2017

– Phonegap: Added Push Notification Support.

29.11.2017

– Important bug fixes to PhoneGap support.
– Fixup of legacy and color mixing classes.

22.11.2017

– Fix scrollbar bug in embedded Chrome browser.
– TW3EditBox and TW3Memo
– Added AutoComplete, SpellCheck, AutoCapitalize and AutoCorrect
– Allow scrolling of memo contents
– Fix bugs related to setfocus
– Update RequireJS to v2.0
– Changes to how EventManager passes or prevents touch events.
– Optimizations and bug fixes to
– System.Dataset
– System.Text.Parser
– TStringHelper
– Small fix to the Label caption to let designer set empty caption.

17.11.2017

IDE:
– Major improvements to Object Inspector (enum-types)
– Added more default units to uses-clauses

RTL:
– TW3Button rewritten.
– Bug fix to TW3BitBtn.
– Bug fixes to System.FileSystem.Memory.
– Big fix to Dialogs.

11.11.2017

Bug fix to scrolling in older iOS devices
Fix to Keypress in Android

9.11.2017

New demo: Featured Demos / Dialog Demo
Fixed Spartacus Demo to use new Dialogs

8.11.2017

This update contains a lot of big changes:
– Themes have been completely rewritten and updated.
– Most controls have been rewritten.
– Massive speed improvements.
– Support for native scrolling even on mobile devices.
– Support for FlexBox.
– Support for font-awesome and webfonts.
– Vastly improved dialogs.
– Automatic support for margins and padding.
– IDE: Bug fixes and small improvements.

16.10.2017

Fixes and improvements to the debugger

8.10.2017

Fix to HttpAndJsonp-demo

7.10.2017

Improvements to resizing:
– Fix wrong display height on iOS/Chrome after device flip
– Reduce number of resizes during startup

5.10.2017

New controls:
– TW3RadioGroup
– TW3MediaPlayer
Support for WebFonts
Styling changes to TW3ScrollControl’s background
EventManager to send OnClick through CBClick
Bug fixes to the RTL
Bug fixes to the IDE

28.9.2017

Improvements to Resizing:
– Minimize number of resizes during form create.
– Trigger only one resize during device flip.

26.9.2017

– New controls and classes:
– TW3GroupBox
– TW3RadioButton
– TStringStream
– Improvements to Game View initialization
– Added overloaded ShowDialog with custom width and height
– Fixed Contest Demos:
– RetroBalls
– PolyDna
– Afternoon Walk
– GraphicsDemo

20.9.2017

Bug fixes and improvements to
– TW3Button
– TW3ScrollBox
– TW3ScrollContentIndicator

19.9.2017

Bug fixes to TW3GraphicControl/TW3PaintBox.
Fixed the Minesweeper-, Tetris- and Box2D-demos.

18.9.2017

Improvements to TW3HeaderControl initialization.
Bug fix to TW3Button to prevent multiple clicks.

16.9.2017

Bug fix: Fixed form saving immediately after project creation

Smart 2.9.9 [alpha] is here!

Posted on 14.09.2017 by Jostein Posted in News

We are proud to release Smart Mobile Studio 2.9.9!

This is an Alpha Version of the upcoming version 3.0.0. We’ve been making so much changes and new features, that listing them all is next to impossible.

A lot of work has been done to make this the fastest and most stable version of Smart Mobile Studio with great support for all major browsers and mobile devices.

How to download this alpha?

Simple. Click here to download the ZIP containing portable version 2.9.9.34. Unpack it into any folder.

If you have a valid Smart Mobile Studio license, copy file user.lic to that folder, too.

Start SmartMS.exe. If you don’t have a license, you can click the button “Request trial license” to get a free 35-day trial key.

You can also periodically run program SmartUpdate.exe to check if Alpha was updated.

What’s new?

Following list reflects just the most important changes:

  • New TW3ScrollControl, TW3ScrollBox
  • Supports MomentumScroll
  • Supports touch
  • Supports both scroll bars and indicators
  • New TW3ListBox
    • Supports desktop and mobile devices
    • Very fast
    • Can have huge number of lines
    • Dynamic item draw
      • Only draws visible lines
      • Can be customized with OnShowItem to produce TVirtualListBox-kind of features
    • New events for “refresh by pulling list down”:
      • OnPullStart
      • OnPullMove
      • OnPullEnd
    • Old one renamed: TW3ListView
  • New TW3Label
    • Very fast
    • Supports Word wrap, autosize and both horizontal and vertical alignments
  • New control: TW3CheckListBox
  • New control: TW3TabControl
    • Smooth scrolling and tab changes
  • New control: TW3BitBtn
  • EventManager
    • Fixes a lot of problems when dealing with mouse and touch events
      • Events firing at multiple controls
      • Mouse getting stuck while releasing mouse button outside of the browser window
    • Listens to both mouse and touch events
    • Can convert touch events to mouse events, so one only has to listen to OnMouseDown, OnMouseMove and OnMouseUp
    • New events for scrollable controls:
      • TW3CustomControl.OnBeginMovement
      • TW3CustomControl.OnEndMovement
      • TW3CustomControl.OnVerticalMovement
      • TW3CustomControl.OnHorizontalMovement
      • TW3CustomControl.OnAllMovement
    • New properties for TW3CustomControl:
      • SimulateMouseEvents: SMS generates OnMouseDown, OnMouseUp and OnMouseMove events also from touch events.
      • TransparentEvents: If true, events are passed to the parent control.
  • IDE: Bug fixes and improvements

A lot more listed here:
https://jonlennartaasenden.wordpress.com/2017/02/06/smart-pascal-changes/

Known bugs/issues

  • Project options/Linker/Add Source map results in an exception during compile.
  • There are graphical glitches in the internal browser. For example: Combobox list.
    While these may look weird, they do only show up in the internal browser and do not affect how your app behaves in a browser.
  • TW3TabHeaders does not have styling for all platforms.
  • Compile and Execute while the Internal Browser window is visible results in a white window.
    Just close and hit Execute again.
  • Styles are still not completely finished. Default style works best while other styles may have issues.

Guide for porting your old projects

If the compiler can’t find:

  • TPoint, TRect or other graphics related types, add System.Types.Graphics to the uses clause.
  • TW3EventRepeater, change SmartCL.Time to System.Time in the uses clause.
  • TW3Component, add System.Widget to the uses clause.
  • Memory buffers, change SmartCL.Buffers to System.Memory.Views in the uses clause.
  • Local storage, add SmartCL.Storage.Local to the uses clause.

Code changes

  • Old: Canvas.Font := ’14px sans-serif’;
    New: Canvas.FontStyle := ’14px sans-serif’;
  • Old: Http.SetRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);
    New: Http.RequestHeaders[‘Content-Type’] := ‘application/x-www-form-urlencoded’;
  • Old: EncodeURIComponent()
    New: TString.EncodeURIComponent()
  • Old: VariantToObj()
    New: TVariant.ToObject()
  • Old: w3_Callback()
    New: TW3Dispatch.Execute()
  • Old: w3_SetInterval()
    New: TW3Dispatch.SetInterval()
  • Old: w3_ClearInterval()
    New: TW3Dispatch.ClearInterval()
  • Old: w3_SetTimeout()
    New: TW3Dispatch.SetTimeOut()
  • Old: w3_ClearTimeout()
    New: TW3Dispatch.ClearTimeOut()

If you are using the old TW3ListBox and features that are not available in the new TW3ListBox, change all TW3ListBox -> TW3ListView.

If you are listening on mouse and touch events through Control Handle or addEventListener,

  • Use standard TW3CustomControl.OnClick, OnMouseMove, OnMouseDown, OnMouseUp etc.
  • If you want to also support touch events, set TW3CustomControl.SimulateMouseEvents:=True;

If you call Resize in your own code, change the call to Invalidate. Invalidate calls resize with a short delay. And if there are multiple calls to Invalidate before the timer has triggered a resize, the extra calls will be ignored resulting in a lot faster app.

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

JavaScript hardware, books and the long awaited update

Posted on 03.11.2016 by Jon Lennart Posted in News 1 Comment
Worth every penny!

Worth every penny!

If you head over to Manning publishing you will find a very interesting book called Javascript on things, written by Lyza Danger Gardner. As mentioned both here as well as Jon’s developer personal developer blog (*) on numerous occasions – more and more hardware is capable of running JavaScript. Or to be more precise: they use JavaScript as their primary automation language.

There is actually a whole market where you as a Smart Pascal developer can use your skills to deliver top of the line products. A market where archetypical languages like C++ and Delphi makes less sense. IOT is about adapting to technology quickly, pivoting on a dime, connecting hardware together in new and exciting ways. In such a market script engines makes more sense than heavy-duty native languages.

If this inspires you then have a look at JavaScript of things, it is one of those books you can return to again and again.

Smart Pascal and IOT

While we love JavaScript at The Smart Company we created Smart Pascal for a reason, and that was to give you the best of both worlds. Smart Pascal gives you a huge advantage over vanilla JavaScript.

The ability to write proper classes with traditional inheritance just like you do in C++ or Delphi is one of them. While JavaScript developers will argue that JS is object-oriented, it is not really true; at least not in the traditional sense. A JavaScript object has no VMT (virtual method table) and instead relies on something called prototypes. Which essentially is an object that can be expanded with new properties at any time, and properties can be both values and methods.

Inheritance is typically emulated through cloning of these prototypes. This is extremely inefficient and cause compatibility problems between frameworks and libraries. This is why standards such as require.js has become so important for JavaScript development because it provides structure. The same structure and order languages like object pascal and C++ gives you out of the box.

Smart Pascal doesn’t need things like require.js or similar standards to deliver order and safe code. Nor do we need to clone prototypes en-mass to fake what is already an intrinsic part of the language. Our compiler organize and sculpts a VMT in JavaScript itself and does exactly what C++ and Delphi does. Namely to isolate an objects data (the fields of your class) in a Self record. A self record that is passed along to class calls as the first parameter automatically. This completely removes the need for low-level cloning of entire objects. Class code is implemented once, and only the self record is initialized when you create new instances. So if you create 10 instances of a class you don’t get 10 copies of all your methods, all your properties and so on in memory. Instead you get 10 instance records (self) and your code is compiled once. This is the way of things, the way of the force .. 😉

So believe it or not, but traditional object orientation in itself an advantage over traditional JavaScript. Then you get all the other perks of a real, archetypical programming language on top of that: interfaces, partial classes, virtual and abstract methods, helper classes, operator overloading, unit organization, a wast runtime library of classes and visual controls – and much, much more!

Most Delphi or C++ developers don’t really think about these things. We are so used to proper inheritance and VMT operations that we regard them as fundamental. Which is also why many C++ and Delphi developers dont like to work in JavaScript. They get the sense that JavaScript is sort of half-finished. Which is actually true! The author of JavaScript never got to finish it, so the prototype system in JavaScript was never intended to be publicly exposed. He was aiming for object inheritance like Smart Pascal and TypeScript delivers – but sadly he never got to finish that part.

Using Smart Pascal to work with JavaScript enabled hardware

Smart Mobile Studio has supported this for quite some time. You can create Espruino projects if you need to work with micro controllers. If you look in the RTL directory there is a folder named Espruino, and it contains pascal versions of the Espruino JavaScript objects. It really gives you a huge advantage over bare-metal JavaScript.

Then there is node.js, which is essentially the engine most hardware vendors add to their SoC to JavaScript enable their devices. Node.js has been supported since version 2.0, and allows you to write a whole host of platform independent projects. You can write Linux servers, Linux Services (daemons as they are called), Windows services — anything you can think of really.

But naturally, you need to get a book on node.js and Espruino to know how to use these project-types properly. But they are all there and once you get into node.js and what you can do, the world really is your oyster.

The next update to Smart Mobile Studio

We are working very hard on getting the next version of Smart Mobile Studio ready for x-mas. While there will be bug fixes to the IDE (and a few new features as well), this update is primarily an update for the RTL and run-time library. We have tried very hard to keep things compatible with previous versions, but there will be changes that requires a bit of editing. But believe me, it will be worth it.

Here are some of the highlights:

  • Better fragmentation of classes and unit files
  • Namespace orientation
  • New visual components
  • Unified filesystem classes
  • A full overhaul of all visual controls
  • Plenty of bug fixes
  • Faster execution time
  • Better resource handling
  • Wiki documentation!

Stay tuned for more in-depth look at all the new classes and the features they provide.

As a bonus, Jon Lennart Aasenden have decided to give his upcoming book, Smart Mobile Studio Unleashed, for free to registered customers. The book will retail for $33 on Amazon. So if you want to learn the inner secrets of the VJL (visual JavaScript component library), how to write kick-ass custom controls – all the way to scalable, cluster based node.js services, this is THE book to get.

(*) the statements and articles on Jon’s personal devlog is not affiliated with this company. His blog is a personal blog which covers a variety of topics.

Book Espruino Inheritance IOT javascript JavaScript of things node.js Update

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.

Logistic problems

Posted on 21.10.2016 by Jon Lennart Posted in Announcements, News

We have been experiencing some logistic problems with our service desk for a while; Sadly we were only able to verify the magnitude of this today.
Apparently our Zendesk account have had problems forwarding messages, and as such – there is a substancial number of emails and messages that we quite frankly havent had access to until now.

We will be going through the backlog in the coming days and weeks, and we apologize to all that have contacted us without getting a proper response.

Regards

The Smart Mobile Studio Team

announcement

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.

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

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
  • …
  • 7
  • Next
© Optimale Systemer AS