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

Category Archives: Developers log

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

Playing with the design

Posted on 03.06.2013 by Jørn E. Angeltveit Posted in Developers log, Documentation, News

There was a question about “adjusting the background color of a form” a while ago. There are actually several ways to adjust the background color of a form, and one should know how Smart works on this area to be able to give the app you’re working on a visual face lift.
Since the various methods might interfere with each-other, it’s important to know the dependencies between the various methods. For example, if you set color by code in the OnCreate method, this will ignore the color in the Object Inspector…

I’ll go trough the various methods by using the classical “Calc (by Eric Grange)” demo in the Demos folder.
Continue reading→

CSS design forms how-to tutorial

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

Game programming – Part 2

Posted on 30.04.2013 by Jon Lennart Posted in Developers log, News

In the first installment of this article we had a look at how to load and display a tile based map. In this second post we will take it one step further by implementing scroll (movement) management – which is an essential part of our chosen genre of games.
Continue reading→

Game programming – Part 1

Posted on 25.04.2013 by Jon Lennart Posted in Developers log, News
Double Dragon on the Amiga 1989

Double Dragon on the Amiga 1989

When I was a kid I used to play tons of games on my Commodore 64 machine. This was the number one gaming machine of the early 80’s and was only surpassed by the Commodore Amiga in the late 80’s early 90’s in terms of popularity. The reason these machines were so popular was not just the games you could play on them, but also the fact that you could make your own games and applications on the same machine. They were not like the PlayStation or the xbox of our days – which turns brilliant children into customers only, with no means of playing with the device and exploring what it means to create.
Continue reading→

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

Summary of The Smart Contest 2013, Round 1 – Graphics

Posted on 15.04.2013 by Jørn E. Angeltveit Posted in Developers log, News

You can now take a look at all the entries for “The Smart Contest 2013, Round 1 – Graphics”.

All the projects are presented in our showcase area.

AfternoonWalk

RealFire

 


Round 2 will be conducted in May, so stay tuned. The topic for this round will soon be announced…

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

Creating a scrollbar

Posted on 04.03.2013 by Jon Lennart Posted in Developers log, News

So, what is a scrollbar? In short it consists of 4 parts: an up arrow, a region to move a handle, the handle, and a down arrow. The hard part is not to draw or setup the actual control, but to translate between screen coordinates and the values the scrollbar represents. The scrollbar might represent 100000 items of “something”, but since you have (for instance) only 400 pixels to represent that sum – you have to translate between the visual and the abstract.
Continue reading→

Creating a toggle switch

Posted on 03.03.2013 by Jon Lennart Posted in Developers log, News

Smart Mobile Studio component writing is actually very simple. It’s much easier than under Delphi – but it involves one aspect that to some Spartans can feel.. well, a bit odd. Namely the fact that you have to take CSS into account.
Continue reading→

Design Patterns – Observer

Posted on 08.02.2013 by Jørn E. Angeltveit Posted in Developers log

Nick Hodges is running a nice series of design pattern articles these days. They are based on the Java examples in the “Head First Design Pattern” book.

These examples are of course easy to replicate in Smart Mobile Studio.
There are a few difference between the Delphi and Smart Pascal languages, but it’s mostly cut’n’paste and minor resolvents to have the examples running under Smart.

Take a look at the Observer Pattern, for instance.
You can read Nick’s article at his blog, and you can download his Delphi code from bitbucket.org.

The Smart version of this code can be downloaded from http://smartmobilestudio.com/SmartCode/HFDP/Observer.opp.

We had to add an additional TWeatherDataDisplay class to the original example, of course…

[code]
TSmileyDisplay = class(TForecastDisplay)
public
procedure Display; override;
end;
[/code]

This is what you get:

(Can also be executed directly from http://www.smartmobilestudio.com/smartdemo/HFDP/Observer/)

Design Pattern

Smart Contest 2013 – Round #1

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

February is upon us and so is our announced graphics competition! This is the first competition out of four this year. So this is your chance to win some exciting prices by showing off your Object Pascal skills!

The topic of this round is: graphics programming (eg. demo-scene, fractal art, visualizations etc).

The rules are as follows:

  • Registration before the 10th of February (registration at contest@smartmobilestudio.com)
  • Deliver your contribution before 1st of March
  • Games are not accepted this round (that’s scheduled for a later date)
  • User interaction is allowed (but not mandatory)
  • Porting of retro demos is allowed (providing it is a clean rewrite)
  • JavaScript snippets are allowed (within limits)

Fractal art

Fractal art

Demos

Demoscene

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

Primož Gabrijelčič

Developer of the popular omnithread library, author of the Smart Mobile Studio Bible, contributor to the Smart Mobile Studio IDE and RTL, and dedicated object pascal speaker and innovator

Christian Budde

Developer of various open source projects. Among these, the popular Delphi ASIO & VST Project for professional audio related development. Another focus of his work is Graphics, which is reflected in projects such as the modernized AggPas implementation, an independent object pascal png library and a native object pascal interface to TrueType fonts (called PascalType). He is also contributor and maintainer of  Graphics32.

Currently he is working on the Smart Mobile Studio IDE and RTL.

Delivery

All contributions must be delivered in full source and binary with no missing pieces. The project must compile on the current version of Smart Mobile Studio (1.1 branch).

Happy coding!

Android announcement Apple competition delphi demo graphics iPad javascript Object Pascal OP4JS Prices Smart Contest 2013 Smart Mobile Studio Windows Tablet

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