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

Author Archives: Smart Mobile Studio Team

How to use Cordova

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

CordovaWhile the next version 2.0 is still not entirely ready, here’s a post about how your HTML5 application can be converted to a native application with Cordova (the open source base of PhoneGap). It’s a bit more tricky than with PhoneGap, but completely free of any costs and you don’t need to transmit your application to any server, which might be in times of NSA surveillance always a bit critical.

The tutorial below only covers the basics. If you want to use plugins to enhance the native experience (e.g. to access hardware directly), you need to consult the plugin’s documentation.
Continue reading→

Build Cordova Deployment how-to tutorial

Smart Mobile Studio v2.0 (beta)

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

Version 2.0 of Smart Mobile Studio will soon be ready for the release.

Over the last few days, we have distributed a private beta to some selected users, and now we would like to make this available for everyone.

We know you have been waiting for this – and so have we!

Download the installer and follow the instructions.

We hope you’ll be as excited about this release as we are 🙂

—
Sincerely,
The Smart Mobile Studio Team

beta release Smart Mobile Studio Version 2.0

New build system

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

At the moment we’re already in the last stage of testing before the next version 2.0 will be released as beta. We hoped to make this happen in November and it still might, but probably at the very end of this month as there are still about 30+ issues that need to be resolved before a beta release. Most of them are tiny things, but there are still some heavy one, that needs more work than others. As you are developers as well, you probably know what we’re talking about…

In the meantime, this post is meant to give you some ideas of what will be possible with the next version. The main topic is about the new build system. With this it is possible to inject custom code at several stage during compilation.
Continue reading→

Build system Deployment script

Micro-controller programming

Posted on 17.11.2013 by Smart Mobile Studio Team Posted in Developers log, News 5 Comments

While it might sound ridiculous in the first place, the new version 2.0 (planned for November, but slightly delayed) will ship with RTL units to make micro-controller programming possible. So it will be not just possible to develop very high level code with Smart Mobile Studio, but also to address the very low end. Also it’s not just a remote control, but really a programming of the hardware. With this the internet of things is not science fiction anymore, but can be reality under your hands!

EspruinoWith the help of Espruino it’s possible to program a micro-controller with Javascript. In conteast to the classic way of programming, the JavaScript code is only interpreted by the micro-controller. The hardware is accessed and handled internally by the firmware with low-level, high performance code, which can be scipted interactively by the standarized ECMAScript (better known as JavaScript). This event based language is well suited for micro-controllers.


Raspi_Colour_R
So far several different boards are already supported by Espruino, which includes dozens of boards based on the STM32 microcontroller, but also other devices like the Raspberry Pi. A list of working devices is updated constantly on the Espruino’s github site.

Thanks to a very successful kickstarter project (in which we also invested some money), a special board has been developed by the Espruino developer, that is designed perfectly designed for the purpose of internet for things. Compared to other devices it is quite small, highly efficient (low power consumption) and ready for easy wireless access (either with Bluetooth or WiFi). The current price of 34.99$ (around 25€) makes it especially suitable for any device you want to bring to the internet.

ESPRUINOBOARDThe favored Espruino board incude the interfaces I²C, SPI, USART and CAN and features ADC, DAC, PWM and an SD card connector. Furthermore an option for Bluetooth/Wifi and an external clock can be attached. A large prototyp area with the option to host arduino shields makes it ideal for any type of project.

In combination with Smart Mobile Studio, the JavaScript interface is used as intermediate language. Our compiler condenses high level & well structured code to a minified, micro-controller optimized code that might be ugly to read, but fast to execute. In addition to the hardware drivers it will ship with several units that make access to the hardware even easier.

bluetooth_logoThe code runs directly on the hardware and can be deployed either via USB or wirelessly via Bluetooth. Thus remote programming is possible. If you decide to make the code persistent (to survive a restart), just add a ‘save;’ (… to flash) to the end of your code.

With this solution cro-controller, but also reuse and interface existing code easily. By using conditional compilation you can even make the same code compatible for all supported boards (e.g. Espruino board, Raspberry Pi and Sony Smart Watch).

WifiAnd not to mention the fact that you can easily write a remote control for the hardware easily with Smart Mobile Studio.

At the moments we’re still working on the basics, but a lot of things are already possible. For now you can have a look at an older video posted about 3 months ago, but we’re also working on newer videos to give you some more ideas of what you can do on the lower end with our new Smart Mobile Studio 2.0.

Electronics Espruino. JavaScript Internet-of-things Microcontroller

Smart Mobile Studio 1.1.2

Posted on 19.08.2013 by Smart Mobile Studio Team Posted in Announcements

If you are following our DevLog, then you have noticed that v1.1.2 is ready 🙂

The installer is available on the download page (where you’ll always find the latest public version).

Installation

Download the installer and install as normal.

It is not necessary to un-install previous versions or beta versions. However, in some situations, that has proved to be the solution. Eg. if RTL is not properly updated. Make sure you backup the files and folders you want to keep before un-installing.

Before the installation you should check that SmartMS.exe process is not present in the memory. Due to a bug in the 1.1.1 version, closing Smart Mobile Studio sometimes left SmartMS.exe process active in memory and that would prevent the new version from being installed. Just run Task Manager and kill any SmartMS.exe you can find (or reboot the computer, that would also work).

SmartMS

During installation, a backup of existing RTL and Libraries are made. They are simply copied to a folder with date as postfix. You can just delete these folders if you haven’t made any changes these files.

Changes

The focus of this release was mainly on fixing old bugs and making everything run smooth. We did, however, add some useful new features.

As you’ll probably notice looking at the change-list below, we didn’t fix most of the problems with the form designer. The reason for this is that we’re working on a completely new designer which will be included in the 1.2 release (expected to be released in autumn).

Compiler

New functionality

  • Compiler now supports the “in” operator to check if a string contains another string.
  • Added a bunch of built-in helpers/aliases for types String, Integer, Float and Boolean. (Full list can be found in the DWScript documentation.)
  • Helpers can operate directly on in-line constants. For example, now you can write “hello”.Reverse (which would return “olleh”).
  • “For in” syntax can be used on variants (for var s in someVariant do …). This allows enumerating members of a raw JavaScript objects.
  • “For in” syntax can be used on sets (for var el in someSet do …).
  • Dynamic arrays now have a “sort” method which takes a comparison function; that maps directly to JavaScript array sort method. String, Integer and Float arrays also implement a “sort” method without a parameter which sorts the array in the natural order.
  • Dynamic arrays now have a “map” method which maps directly to the JavaScript map method.
  • Conditional compilation symbol DWSCRIPT is always defined.
  • Added CompilerVersion constant. It holds a floating point value that holds the compiler version in language terms under the form YYYYMMDD.XX, with XX the minor version. This will be updated each time the language changes.
  • Added ability to mark all named types as deprecated (just postfix with deprecated “optional message”), this means among other things that (unlike in Delphi) classes and records can be marked as deprecated.
  • Added limited support for sets.
    • Only sets of enumerations are supported.
    • Only in operator is supported.
    • Compiler supports Include and Exclude methods, which can be used in two ways, either as “Include(mySet, value)” or as “mySet.Include(value)”.

Improved functionality

  • Better code completion hints on array elements.
  • Functions and methods can be marked inline. This is implemented only for Delphi compatibility; inline is ignored in the compiler.
  • “For x in string” loops now accept “break” and “continue” statements.

Bugs fixed

  • Division bug is fixed (“Round(1 / (r / 10))”).

RTL

New functionality

  • Unhandled exceptions in console applications are caught and logged to the console window.
  • Added w3_prompt function which maps to the JavaScript prompt command.

Improved functionality

  • W3Effects unit supports FireFox.
  • Cleanup in css-files.

Bugs fixed

  • A toolbar button glyph is displayed even if the button caption is empty.
  • TW3CustomStorage.getKeyInt tries to convert string data back to the integer form; only if that fails it returns the default value.
  • TW3Label appearance changes when it is disabled.
  • TW3CheckBox is fully disabled when the Enabled property is set to False.

IDE

New functionality

  • Forms and units can be stored in external files by default (Preferences, Store new forms and units in external files).
  • Position and size of the Smart Mobile Studio is remembered between sessions.
  • Open tabs, editor bookmarks and active tab are stored in the project (.opp) file and are restored when the project is open.
  • Project file (.opp) uses CDATA for form/unit storage to be more version control-friendly.
  • When a file is modified outside the Smart Mobile Studio environment, a prompt will ask the user to reload the file. A built-in “difference” engine can be used to show changes between the editor and disk file. External program (such as WinMerge or Beyond Compare) can be configured and used instead of the internal one.

Improved functionality

  • When a built-in server is used to serve the application files, address in the Serving link can be changed to any of computer’s internal addresses.
  • Name of the open project is shown in the window title.
  • Screen resolution list in Preferences, Layout can be sorted manually.
  • Units and forms can be deleted from the project by pressing the Del key when a unit/form node is selected in the Project Browser.
  • Ctrl+Click on an identifier jumps to the beginning of the row.
  • Ctrl+Click on an identifier scrolls the target to the middle of the screen.
  • Better performance when many JavaScript messages are logged to the console log window in the integrated browser.
  • Add Form/Add Unit commands prompt for the new form/unit name.
  • Search centers the result in the text editor.
  • Ctrl+/ removes comment markers that are preceeded by whitespace.
  • Scroll past EOF setting is enabled on a new install.
  • Improved highlighter configuration. All elements (strings, numbers, reserved words …) can now be configured separately for different file types (pascal, javascript …). Highlighter settings can be stored in a file.
  • New examples.
  • RTL index gets rebuild automatically after installation.
  • CD out of the project folder when a project is closed.

Bugs fixed

  • Edited data is not lost anymore if you click on the form designer while editing data in the property inspector.
  • A text containing single quotes can be now entered into the Caption and Text properties in the property inspector.
  • Right-clicking in the project browser works as expected.
  • Shortcuts (Ctrl+C, Ctrl+X, Ctrl+V, Del) on the Design tab are now working correctly.
  • Form and unit renaming corrected.
  • Del key works in the Search & Replace dialog.
  • Search & Replace works correctly when Case-sensitive checkbox is not checked and the found text doesn’t match case-sensitively.

—
Sincerely,
Primož Gabrijelčič, product manager

Stable release

Smart Mobile Studio 1.1.2 (RTM)

Posted on 17.08.2013 by Smart Mobile Studio Team Posted in Developers log

The official 1.1.2 version (build 20) is now ready.

News in 1.1.2.20

These are the changes from beta 2 (v1.1.2.14):

  • Snippets will not be removed during un-installation.
  • Division compiler bug is fixed (“Round(1 / (r / 10))”).
  • Use ‘Application’ as suffix (instead of ‘Project’) for the project name.

Download/installation

Download the installer, setup__v1_1_2_20_RTM.exe and install as normal.

It is not necessary to un-install previous versions or beta versions. However, in some situations, that has proved to be the solution. Eg. if RTL is not properly updated. Make sure you backup the files and folders you want to keep before un-installing.

During installation, a backup of existing RTL and Libraries are made. They are simply copied to a folder with date as postfix. You can just delete these folders if you haven’t made any changes these files.

Known issues

There are no known issues in this version.
If you should bump into an issue, please report that at support@smartmobilestudio.com.

—
Sincerely,
The Smart Mobile Studio Team

release rtm

Smart Mobile Studio 1.1.2 (beta-2)

Posted on 27.07.2013 by Smart Mobile Studio Team Posted in Developers log

We have received lots of useful feedback from the first beta-version of v1.1.2 (build 13).
We have fixed these issues in a new beta-version.

News in 1.1.2.14

These are the changes from beta-1 (v1.1.2.13):

  • Snippets will not be overwritten during installation.
  • Existing RTL files and Library files are backed up with a date-time stamp.
  • RTL index gets rebuild autmatically.
  • Cleanup in css-files.
  • CD out of the project folder when a project is closed.
  • ‘Rename Unit’ works again.

Download/installation

Download the installer, (link removed, since new version is available) and install as normal.

Known issues

We have one more issue we would like to fix before we release this version. That’s a compiler bug we discovered in the last minute.
If you write this Smart code:
[code]
Round(1 / (r / 10));
[/code]

It will be compiled to this JavaScript code:
[code]
Math.round(1/r$4/10);
[/code]
which is equal to “Round((1 / r) / 10);”

The workaround is to use a temp variable for “(r / 10)”.
[code]
var
tmp: Real;
begin
tmp := (r / 10);
Result := Round(1 / tmp);
end;
[/code]

—
Sincerely,
The Smart Mobile Studio Team

beta release Smart Mobile Studio

Smart Mobile Studio 1.1.2 beta

Posted on 03.07.2013 by Smart Mobile Studio Team Posted in Developers log, Documentation, News 2 Comments

Just before the first round of summer holidays we managed to put together a beta version of the next Smart Mobile Studio, version 1.1.2. Installer is available on the download page (link removed, since beta 2 is ready).

Installation

In case you are using the snippets functionality of the Smart Mobile Studio, you should first make a backup copy of the snippets file, because the installer will silently overwrite it with a fresh version. (Yes, this is a bug. Yes, we will fix it.) Navigate to Documents, Smart Mobile Projects and make a copy of the snippets.xml file (in another folder). Restore it after the installation.

Before the installation you should check that SmartMS.exe process is not present in the memory. Due to a bug in the 1.1.1 version, closing Smart Mobile Studio sometimes left SmartMS.exe process active in memory and that would prevent the new version from being installed. Just run Task Manager and kill any SmartMS.exe you can find (or reboot the computer, that would also work).

SmartMS

If you are upgrading an existing installation, please run Tools, Rebuild RTL Index the first time you start Smart Mobile Studio. This should be done automatically on the first run but we made a mistake preparing the installer and this step is skipped. It will be fixed in the real 1.1.2 release.

Changes

The focus of this release was mainly on fixing old bugs and making everying run smooth. We did, however, add some useful new features.

As you’ll probably notice looking at the changelist below, we didn’t fix most of the problems with the form designer. The reason for this is that we’re working on a completely new designer which will be included in the 1.2 release (expected to be released in autumn).

Compiler

New functionality

  • Compiler now supports the “in” operator to check if a string contains another string.
  • Added a bunch of built-in helpers/aliases for types String, Integer, Float and Boolean. (Full list can be found in the DWScript documentation.)
  • Helpers can operate directly on in-line constants. For example, now you can write “hello”.Reverse (which would return “olleh”).
  • “For in” syntax can be used on variants (for var s in someVariant do …). This allows enumerating members of a raw JavaScript objects.
  • “For in” syntax can be used on sets (for var el in someSet do …).
  • Dynamic arrays now have a “sort” method which takes a comparison function; that maps directly to JavaScript array sort method. String, Integer and Float arrays also implement a “sort” method without a parameter which sorts the array in the natural order.
  • Dynamic arrays now have a “map” method which maps directly to the JavaScript map method.
  • Conditional compilation symbol DWSCRIPT is always defined.
  • Added CompilerVersion constant. It holds a floating point value that holds the compiler version in language terms under the form YYYYMMDD.XX, with XX the minor version. This will be updated each time the language changes.
  • Added ability to mark all named types as deprecated (just postfix with deprecated “optional message”), this means among other things that (unlike in Delphi) classes and records can be marked as deprecated.
  • Added limited support for sets.
    • Only sets of enumerations are supported.
    • Only in operator is supported.
    • Compiler supports Include and Exclude methods, which can be used in two ways, either as “Include(mySet, value)” or as “mySet.Include(value)”.

Improved functionality

  • Better code completion hints on array elements.
  • Functions and methods can be marked inline. This is implemented only for Delphi compatibility; inline is ignored in the compiler.
  • “For x in string” loops now accept “break” and “continue” statements.

RTL

New functionality

  • Unhandled exceptions in console applications are caught and logged to the console window.
  • Added w3_prompt function which maps to the JavaScript prompt command.

Improved functionality

  • W3Effects unit supports FireFox.

Bugs fixed

  • A toolbar button glyph is displayed even if the button caption is empty.
  • TW3CustomStorage.getKeyInt tries to convert string data back to the integer form; only if that fails it returns the default value.
  • TW3Label appearance changes when it is disabled.
  • TW3CheckBox is fully disabled when the Enabled property is set to False.

IDE

New functionality

  • Forms and units can be stored in external files by default (Preferences, Store new forms and units in external files).
  • Position and size of the Smart Mobile Studio is remembered between sessions.
  • Open tabs, editor bookmarks and active tab are stored in the project (.opp) file and are restored when the project is open.
  • Project file (.opp) uses CDATA for form/unit storage to be more version control-friendly.
  • When a file is modified outside the Smart Mobile Studio environment, a prompt will ask the user to reload the file. A built-in “difference” engine can be used to show changes between the editor and disk file. External program (such as WinMerge or Beyond Compare) can be configured and used instead of the internal one.

Improved functionality

  • When a built-in server is used to serve the application files, address in the Serving link can be changed to any of computer’s internal addresses.
  • Name of the open project is shown in the window title.
  • Screen resolution list in Preferences, Layout can be sorted manually.
  • Units and forms can be deleted from the project by pressing the Del key when a unit/form node is selected in the Project Browser.
  • Ctrl+Click on an identifier jumps to the beginning of the row.
  • Ctrl+Click on an identifier scrolls the target to the middle of the screen.
  • Better performance when many JavaScript messages are logged to the console log window in the integrated browser.
  • Add Form/Add Unit commands prompt for the new form/unit name.
  • Search centers the result in the text editor.
  • Ctrl+/ removes comment markers that are preceeded by whitespace.
  • Scroll past EOF setting is enabled on a new install.
  • Improved highlighter configuration. All elements (strings, numbers, reserved words …) can now be configured separately for different file types (pascal, javascript …). Highlighter settings can be stored in a file.
  • New examples.

Bugs fixed

  • Edited data is not lost anymore if you click on the form designer while editing data in the property inspector.
  • A text containing single quotes can be now entered into the Caption and Text properties in the property inspector.
  • Right-clicking in the project browser works as expected.
  • Shortcuts (Ctrl+C, Ctrl+X, Ctrl+V, Del) on the Design tab are now working correctly.
  • Form and unit renaming corrected.
  • Del key works in the Search & Replace dialog.
  • Search & Replace works correctly when Case-sensitive checkbox is not checked and the found text doesn’t match case-sensitively.

—
Sincerely,
Primož Gabrijelčič, product manager

beta release Smart Mobile Studio

Smart Mobile Studio 1.1.1

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

We have fixed a few issues in the v1.1 release and wrapped up a new release with these hotfixes included.
Just download the latest installer directly from the download page.

Changes

  • Fixed bug in W3Animation unit
  • Fixed compiler bug for div by negative numbers
  • Added missing TW3ListBox.Clear method
  • Fixed wrong modal dialog position
  • Fixed “Unit form1=impl could not be located” error message
  • Improved background compiler
  • Fixed requestAnimationFrame problem in Opera, Android browsers and Safari on iOS < 6.0

—
Sincerely,
The Smart Mobile Studio Team

release

Smart Contest 2013 – Round #2

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

It’s already May, and that means Smart Constest Round #2. This time we’re really going for the playful parts of the competitions, because we have “Game development” on the menu this time.
Join the competition and have fun! You might even win an exciting prize by showing off your Object Pascal skills!

The rules are as follows:

  • Registration before the 13th of May (registration at contest@smartmobilestudio.com)
  • Deliver your contribution before 3rd of June
  • The source code will be shared in our show case area
  • Preferable that it can run in the integrated IDE browser (but not mandatory)
  • No restrictions w.r.t game genre
  • No restrictions w.r.t project type (canvas, sprite, console, VCL)
Wartrail main screenWartrail, by Eric Grange.

Created in Smart Mobile Studio


Prizes

First prize is a tablet device of your own choice (up to USD 750). So have your pick between

  • iPhone
  • iPad
  • iPad mini
  • Windows Tablet
  • Windows phone
  • Android tablet or phone

Judges

Eric Grange

He is the developer of several popular Delphi projects, among them the Delphi Web Script project – the compiler in Smart Mobile Studio. He is the author of the blog delphitools.info where you will find lots of interesting articles and projects.

Jon Lennart Aasenden

The main developer of Smart Mobile Studio since the beginning. De describes himself as “an unorthodox, hyper creative and passionate software developer”. He has contributed with several interesting project to the Delphi community.

Delivery

All contributions must be delivered in full source and binary with no missing pieces. The project must compile with the current version of Smart Mobile Studio (v1.1) with no external dependencies. External libraries must be included in project. Project name, short description, screen shot and browser requirements must be specified along with the delivery.

Delivery to contest@smartmobilestudio.com.


Q: Will it be possible to participate with a trial version of Smart Mobile Studio?
A: Yes! 😀


Happy coding!

The Smart Mobile Studio Team

The Smart Contest 2013 – Topic for the second round

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

We are definitely in a playful year this year.
“The Smart Contest” is soon entering the second round.

The topic this time will be “Game development”.

Wartrail main screenWartrail, by Eric Grange.

Created in Smart Mobile Studio

Hopefully, you learned a few things from our articles on “Graphics programming”. These tips and tricks might come handy now. If you missed them, take a look here:

  • first article
  • second article
  • third article
  • fourth article
  • fifth article

Take also a look at the entries from the first round of the Smart Contest:

  • Showcases: The Entries for The Smart Contest 2013, Round 1 – Graphics

During the last few days of April we will publish a series of articles to get you started on game development in Smart Mobile Studio. Stay tuned! This will be a comprehensive step by step tutorial.

In the mean time, you should head over to delphi.org and listen to Jim McKeeth’s interview with Jason McMillen on game development. Jason is the guy behind Pascal Game Development, and he shows you several interesting resources.

If you google “HTML5 games”, you will find lots of cool examples of what Smart Mobile Studio is capable of producing.

So, pick your favorite game and start the thinking 😉


In case you missed it:
First prize in each round will be a tablet (iPad, iPad mini, Android based tablet, Windows tablet). Value ~750 USD


Q: Will it be possible to participate with a trial version of Smart Mobile Studio?
A: Yes! 😀


Best regards,
The Smart Mobile Studio Team

announcement gamedev Smart Contest 2013

Game programming

Posted on 22.04.2013 by Smart Mobile Studio Team Posted in News

This article will be published on the 25th.

Stay tuned…


Do you wanna try Game Development with Smart Mobile Studio?
Then this is your big chance.

The second round of “The Smart Contest 2013” will be all about “Game development”.

Take a look at the announcement.


Best regards,
The Smart Mobile Studio Team

New feature in the labs

Posted on 01.04.2013 by Smart Mobile Studio Team Posted in Developers log 4 Comments

The Smart Pascal to JavaScript compiler has become very sophisticated over the years, and we wanted to take this technology one step further. In the upcoming release of Smart Mobile Studio, we will support compilation to human readable documentation.

Yup. You read right. Over the years, we have experienced that many programmers struggle to communicate the code they have written to other people. Especially designers and managers. So we took on some creative glasses and gave the feature a second look. After a thorough review of the Pascal parser and a structured review of how we communicate program snippets during lectures, we came up with something brand new and spectacular. An Object Pascal to Human readable documentation compiler. Codename OP-2-HRD-C++. (We added the ++ in the compiler part of the abbreviation to get more google hits).

“Show me the code!”, you say? OK, Here we go:

In (almost) every project you have ever written, you have some custom data types. Right? Well, describing this to someone non-technical can be tedious, difficult and boring. With this new feature, you can just compile to “human readable documentation” and hand over the generated pdf-file.

For example:

[code language=”Pascal”]
type
TPerson = record
Name: String;
Age: Integer;
end;

TPersonArray = Array[0..9] of TPerson;
[/code]

is compiled into:

[quote]In this project we have two data-types. We have a record named TPerson, and an array that can hold 10 elements of TPerson. The array is named TPersonArray. The TPerson record holds Name in a string field (unicode characters are supported), and Age in an integer field, which means that you can register values from -2147483648 to 2147483647 in this field.
[/quote]

Isn’t that just brilliant?

We actually have some output options with this compiler feature, so it’s possible to specify if the target is “to designer”, “to programmer” or “to manager”. If you, in this case, choose “compile to programmer”, you will get some useful additional information about that array:

[quote][…]The array is named TPersonArray and it’s zero-based – so be careful with any off-by-one mistakes![…]
[/quote]


We’ll give you another example with a control statements:

[code language=”Pascal”]
if (Person.Name = ”) and (Person.Age = 0) then
ShowMessage(‘The record is empty.’);
[/code]

Is compiled to:
[quote]The program will then show a message saying “The record is empty.” if, and only if, the Name field of the Person record is empty and the Age field of the Person record is 0.[/quote]


Now, for a loop like this:
[code language=”Pascal”]
for x := PersonArray.Low to PersonArray.High do
begin
Console.WriteLn(‘The name is ‘ + PersonArray[x].Name);
end;
[/code]

you will generally get an output like this:

[quote]The program will then enter a loop that iterates trough each items in the PersonArray variable. For each iteration, the text “The name is ” will be written to the console along with the Name field of the record that is contained it the current array element.
[/quote]

But! We have actually added some nice compiler magic to the OP-2-HRD-C++ compiler.
So, if you try to compile this snippet:

[code language=”Pascal”]
for x := PersonArray.Low to PersonArray.High-1 do
for y := PersonArray.Low+1 to PersonArray.High do
begin
if PersonArray[x].Name < PersonArray[y].Name then
Swap(PersonArray[x], PersonArray[y]);
end;
[/code]

You will actually get this “to manager” output:
[quote]The program will perform a bubble sort on PersonArray. The bubble sort algorithm is very simple and not very efficient. The management should add a few hours of refinement and optimization to this method…
[/quote]

Pay particularly attention to the request for more time to programming. We strongly believe that the management will allocate more budget to the programming task if they are faced with serious computer-generated concerns like this!

If, however, the documentation is intended for programmers (i.e. yourself), then we’ve added a friendly reminder:
[quote]The program will perform a bubble sort on PersonArray. WTF!? A bubble sort algorithm?! Is this a school project or something? You’d better clean this up before someone else sees it. What if Nick Hodges will review this code in the future?
[/quote]


We hope this new feature will make the everyday life of a programmer better.

—
Sincerely,
The Smart Mobile Studio Team

Breaking news

Smart Mobile Studio 1.1

Posted on 15.03.2013 by Smart Mobile Studio Team Posted in News
Smart Mobile Studio 1.1

Smart Mobile Studio 1.1

We are proud to release Smart Mobile Studio 1.1 to the general public (build 1.1.0.911).

You can download the product here

Notes

  • Remember to update the css and html in your projects after updating (right click file in the ide, click “revert to default”)
  • Remember to back-up any units you have stored in either the RTL or Libraries folder before you install
  • Remember to re-build the RTL index database after installation to examine the new classes and units in the classbrowser
  • Since all controls now exist in their own RTL units, some projects might require you to alter the uses section manually (the easiest way is to drop a control onto the designer, as this will add the unit automatically for you).
  • You can now use curley brackets in ASM sections

Changelog

  • Fixed: TW3Canvas.toDataURL
  • Added: L-System Fiddle demo
  • Added: URI functions
  • Fixed: installer script backs up libs + RTL
  • Fixed: Allow adjusting tab height
  • Added: Active property to pause animation
  • Added: w3Elements.pas  &  elements controls to toolbar
  • Improved JS SetLength for arrays of simple types
  • Re-committed latest WebIDL code
  • Fixed: browser render bug. Was in fact the onNeedsInclude event that needed a modification
  • Added: registered various controls
  • Fixed: unit parser
  • Added: some automatic Web IDL translations (manual work necessary!)
  • Fix: empty names for anonymous methods in unitparser
  • Clarified error messages
  • Initial version of unit test demo (text runner)
  • Updated unit test framework. Unpublished methods that didn’t need published status (now)
  • Fixed: CTRL+V missing from SearchAndReplaceDialog -> ComboBoxSearch
  • Added unit tests
  • SmartUnit now reached initial working state
  • Added time properties
  • TestFramework initial version
  • Added property read write syntax with automatic anonymous field declaration
  • Fixed case for strict hints
  • FastInt64ToStr RTTIMethodAttribute.Call MultByPowerOfTwo expression
  • Minor codegen improvements & cleanup
  • Fixed case for strict hints
  • Added missing units
  • Fixed case for strict hints
  • Updated: CSS theme for latest components + cleanup
  • Added “case of boolean” optimization to if/then/else Improved if..then condExpr optimization for the CodeGen
  • Reintroduced as unit namespace, please complete with missing units from former W3Ctrls unit!
  • Fixed name case
  • Fixed case for strict hints
  • Extended if then optimization to if then else
  • Added RelIntIs(Not)
  • Zero optimization Fixed for non-prototypable fields in external classes
  • Added initial RTTI for methods
  • Improved error reporting when crash occurs during optimization
  • Improved CodeGen for
  • “if” on assigned & int<>0 checks
  • Layout and widget updates
  • Updated: Added check and callback timer to scrollbox so that it initializes when the form is ready (if the contentbox holds elements).
  • Added: childadded + childremoved methods to TW3Component
  • Added: W3_DOMReady function in W3System.pas
  • Altered: cleaned up the use of w3ctrls in various RTL units
  • Altered: All components are now in their seperate units
  • All controls seperated into units
  • Fixed minor memory leak
  • Fixed json array clear
  • Altered: Basecompiler changes Lost: vertical scrollbar (!) damn svn?
  • Fixed external form issue in background compiler & some refactorings in compiler unit
  • Fixed missing initial background compilation for new projects
  • Added: *.inc files to repository
  • RTL Backup before splitting components into their own unit
  • Added: debug logging of background compiler error messages &  added more user warnings in case such errors appear.
  • JSON.Stringify did not work with obfuscation
  • Accept initialization/finalization as end markers for a type declaration block
  • Added: simplified helper syntax
  • Delete unused file (QR code was used as test)
  • Added: QR code generation for server window
  • Moved remaining forms to source directory (below new subdirectory ‘window’, as these are no dialogs)
  • Removed unused dependency WIP on new flowing components
  • Fixed smart-linking not properly filtering the main program, initialization & finalization sections (relevant when types or functions where declared there, but not used)
  • Fixed codegen for multi-dimensional dynamic arrays
  • Improved symbol dictionary discrimination between forwards & declarations
  • Fixed requestAnimationFrame support for IE8-9 and others
  • Fixed hints for strict mode
  • Added: TW3CustomScrollBar Class
  • Added: TW3VerticalScrollbar
  • Altered: Tweaked CSS, more firefox styles
  • Altered: Added css for scrollbar
  • Improved unit test coverage
  • Test manual execution of the automatic build #2
  • Test manual execution of the automatic build
  • Added: The switch control is now added to the toolbar palette
  • Altered: The TW3ToggleSwitch transition now uses the w3_CSSPrefix so it also works on other browsers
  • Altered: minor changes to the toggle-switch. Delayed event callback more in sync with the css animation + destructor
  • Added: TW3ToggleSwitch control
  • Altered: Updated the CSS stylesheet with toggle css classes
  • Added: requestAnimFrame added to drivers
  • Improved unit test coverage
  • Support asm blocks with curlies in them
  • Add support for deactivating curly comments in Pascal tokenizer
  • Tokenizer tests moved to own unit
  • Fix for anonymous symbols acquire in a class var ExprBase
  • Fixed: Adjustment error in TW3HeaderControl fixed
  • Improved errors for null read/write expressions
  • Fixed: Layout difference between offline & online rendering
  • Fixed: Added callback for control adjustment (important!)
  • Added: supportAdjustment method to TW3MovableControl
  • Altered: AdjustToParentBox now checks supportAdjustment
  • Altered: TW3ProgressBar is not affected by AdjustToParentBox
  • Fixed: missing adjustToparentBox
  • Added: internet explorer driver
  • Added: requestAnimationFrame in driver API
  • Disabled trigger and delayed start for code templates (should never work this way)
  • Added Layout.Center
  • Added: script to flush the target RTL folder when updating
  • Added NoRTTI option and slightly rearranged options dialog (compiler options contain only compiler options now, etc.), also added new tab for the linker (as there will be more options in the future for sure)

Sincerely,
Jon Lennart Aasenden
—
The Smart Mobile Studio Team

Smart Mobile Studio 1.1 RC (build 1.1.0.400)

Posted on 15.02.2013 by Smart Mobile Studio Team Posted in News

We are very proud to present the release candidate for Smart Mobile Studio version 1.1  (build number v1.1.0.400). If you would like to give this groundbreaking product a test drive before we officially release it, then you can download the installer directly from SmartMobileStudio.com/download/setup_v1_1_0_400_rc.exe


(The context menu is replaced with Ctrl+Shift+R (start/stop recording) and Ctrl+Shift+P (replay the recorded macro).

We have done a lot of improvements in the IDE, the editor, the RTL and the Smart Pascal language. Below is a list of some of the improvements that have been done since version 1.0 (see full manifest of changes for beta 1 here).

IDE changes

  • Added: Support for external form files
  • Added: Navigate to ancestor from class-browser
  • Added: Components are now organized in more tabs
  • Added: RTL source proxy, speeds up compilation and dependency chain
  • Added: Syntax hints and improved code insight
  • Added: The IDE now uses threading to handle background compilation
  • Added: Dependencies for controls are automatically added to the uses clause
  • Fixed: Resizer bugs for nested controls
  • Fixed: Scrolling issue fixed ([CTRL] + [Up]/[Down])
  • Fixed: Disabled unit structure flickering
  • Fixed: LineCount issue
  • Fixed: Case fix for strict hints
  • Fixed: A label “mistake” in the baseframe (it was renamed further up the chain).
  • Fixed: modified [CTRL]+/ to work the same as in Delphi:
    • if a single line is changed, caret is moved to the next line (current column is preserved)
    • if multiple lines are selected, comment is toggled for the whole block and caret is move to the line following the block (current column is set to 1)
    • modification is placed into the undo buffer so that it can be undone
  • Altered: [CTRL]+[/] is replaced by [CTRL]+[#] for systems where [/] is only accessible via [SHIFT]
  • Altered: Minor changes on compiler output (bulk output of errors, warnings and hints).
  • Altered: Search and replace dialog remembers the last states
  • Altered: improved code proposal (insert item highlight)
  • Altered: dialogs are centered
  • Altered: Recent file on welcome tab now supports to show unlimited entries if desired (by default limited to 10 items)
  • Added: Pascal “Gabelou” StyleCop (see prefrences->misc. to enable it).
  • Added: Rename refactoring (including closed files)
  • Added ‘Format Keywords’ action (see popup menu), which translates all keywords to lowercase.
  • Added: Simplified BrowserAPI
  • Added: possibility to filter log messages from the console output (filtered ‘event.layerX and event.layerY are broken and deprecated …’ by default). Select a certain text to filter and right click -> Ignore Message to filter out all messages containing this particular string. The filter will be resetted on restart.

RTL

  • Updated: Remobjects headers
  • Updated: WebGL headers
  • Updated: Sprite3d
  • Added: DrawTo, DrawPart and misc CODEF functions added to TW3Canvas
  • Added: TW3Progressbar control
  • Added: TW3ListBox control
  • Added: Unit for complex numbers (w3complex.pas)
  • Minor formating and added overload function for CreateImageData
  • Added fast sequential read text file loaders
  • Applied the new ‘Format Keywords’ to the remaining RTL files
  • Removed duplicate & tweaked hash function
  • Improved hashing function
  • dialogs need custom initialization
    • modal dialog support integrated into TW3CustomApplication (ShowModal, HideModal)
    • modal dialog is re-centered if application is resized (for example when orientation of a mobile device changes)
    • added  TW3CustomApplication.CreateOpaqueMask
    • TW3CustomControl.getMaxZIndex is now public
    • modal dialogs triggered from modal dialogs are now supported
  • Fixed: zIndex issues with modal dialogs
  • Fixed: opaque layer has high z-index to cover all controls on the form
  • Fixed: SendToBack
  • Altered: dialogs are centered on the form
  • Altered: event handlers are only called when assigned
  • Altered: W3ModalDialog made external for easier reuse
  • Altered: updated Remobjects interface
  • Altered: Changed default Mouse event X,Y coordinates
  • Added: W3ModalDialog uses opaque div to block owner form (tnx to Eric)
  • Added: PixelRatio info
  • Added TVariant.Properties + OwnProperties
  • Added HorzLine/VertLine
  • Added: New FillRectF/StrokeRectF overloads
  • Added: TW3CustomApplication.FormByName, TW3Component.ChildByName, TW3Component.EnumChildrenAltered: SetSize now virtual
  • Added: PhoneGapAPI is now complete

COMPILER

  • Added: Support for RTTI (!)
  • Added: Support for property expressions
  • Added: Support for interface expressions
  • Fixed: Case fixes for strict mode
  • Fixed: an issue where compiler would accept method implementations in a different unit the class was declared
  • Fixed: Lambdas don’t have a “var”/”const”/etc. section
  • Fixed: issue with invalid symbol table in suggestions in case of fatal error in a lambda
  • Fixed: SymbolDictionary bug for forwarded overloaded methods
  • Fixed: calling overloaded inherited constructors
  • Fixed: codegen for assignments of a function’s result to a var param
  • Fixed: timestamp is now up to date
  • Updated: now uses latest compiler core
  • Updated: tokenizer updated to latest revision
  • Altered: Compile speed optimizations
  • Added: Missing semi-colon no longer a stopping error
  • Added: JSON to reserved names
  • Added: JSON static class
  • Added: Preparation for source maps

DEMOS

  • Fixed: style bug in smartflow
  • Fixed: bug in spartacus
  • Fixed: bug in box2d wrapper
  • Altered: Tested all demos (with exception of gyro). All demos now compile.
  • Altered: formatting of Archimedes Spiral
  • Added: frames demo
  • Added: modal dialog example

Sincerely,
Jon Lennart Aasenden
—
The Smart Mobile Studio Team

Android announcement Apple candidate compiler CSS HTML5 javascript Object Pascal OP4JS Pascal release Smart Mobile Studio w3C webkit

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)
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
© Optimale Systemer AS