Tuesday, May 22, 2012

Sunday, May 20, 2012

A Smart Book

Yes, there will be a book about the Smart Mobile Studio. I don’t know yet how it will be published – as a printed manual that you’ll get together with the software, as an on-demand printed book, as an e-book or combination of those options – but there definitely will be a book about Smart.

For starters, you can download test chapter (not yet completely finished) about using regular expressions in Smart: PDF, Mobi, ePub (rename it to .epub after download). If you like what you see, you can express your interest in the book at the Leanpub site.

On a slightly unrelated topic – I’m thinking about moving all my writing about Smart to another, yet unnamed blog. However, I’m of two minds about this so I would appreciate a feedback. What do you think – should I create a new blog or should I write about Smart here (after all, it uses almost the same language as the Delphi)?

Saturday, May 19, 2012

OmniThreadLibrary Documentation: BackgroundWorker

A chapter on Parallel.BackgroundWorker is now available online.

Laying out Smart applications with Layout Manager [4]

Last time you’ve seen how to make different layouts for portrait and layout orientations. This time I’ll show you how to dynamically set layout parameters in Resize.

Friday, May 18, 2012

OmniThreadLibrary Documentation: ParallelTask

A chapter on Parallel.ParallelTask is now available online.

Laying out Smart applications with Layout Manager [3]

The third layout manager demo shows how to set different layouts for portrait and landscape display orientation.

Thursday, May 17, 2012

Embarcadero Academy–The Multithreading Session

I spoke to Slovenian Delphi developers about multithreading today and you probably know that this is a topic I love to speak about. The room was packed (I took this photo five minutes before the beginning, more people arrived after that) but still listeners managed to stay attentive through the four-hour session (including a short break). Lots of interesting questions too – it is good to see many developers actively interested in multithreading.

We’ll probably repeat this session in the autumn as again there was much more interest for the speech than this room can handle.

image

Laying out Smart applications with Layout Manager [2]

The second layout manager demo builds on the first one.

There’s an edit box and two small buttons right to it. A large button lies under all three of them. At the bottom of the screen is a status bar and all the rest is taken by a memo control.

Wednesday, May 16, 2012

Laying out Smart applications with Layout Manager [1]

Smart Mobile Studio was released today. To celebrate this – in my opinion – very important step for the Object Pascal language, I have prepared a series of articles on the Layout Manager – a feature of the Smart RTL that I wrote.

Smart is an excellent tool, but in some areas it clearly shows that there was only so much time allowed for the development. I’m sure Lennart will polish the rough edges in next releases but for now we have to do with what we have.

One of those rough edges is component placement. You can drop components on the designer and set their size but there’s no mechanism for dynamic size adjustments. In other words – there is no Align, no Anchors, no Margins and no layouts (as TFlowPanel and TGridPanel in Delphi). We have to resize components in code, in the overloaded Resize method.

I quickly got sick of writing resizing code and decided to alleviate the problem by writing a layout manager. It does not work in the designer, you have to declare and use it in code, but still it is a big simplification over the default “just call SetBounds from Resize” approach. I donated layout manager to the Smart project and it is included in the 1.0 release as the w3layout unit.

This article starts a short series which will explain layout manager on simple examples. All of those examples are also included with the Smart installations (look in Demos, LayoutManagerDemo).

Thursday, May 10, 2012

SmartMS Demos

The Smart Mobile Studio is nearing its release date (no, can’t tell you when, but it will be soon, really soon) and it’s time to revisit my demos. You test them all from my website (just click on the images) and access the source code. If you don’t (yet) have Smart, you can browse OPP file with my primitive OPP Browser.

Accelerometer

image

Accelerometer-handling demo (iOS only). Move the square by tilting the device.

article, source

Game of Life

image

Conway’s Game of Life. Works on desktop and on tablets. Click in the gray rectangle on the left to open a library of building blocks then drag and drop a block on the game surface.

source

Gesture

image

Gesture-handling demo (iOS only). Handles move, zoom and rotate.

source

Mandelbrot Explorer

image

Mandelbrot explorer. Works on device (at least on iPad) and on desktop.

article, article, source

Multi Finger Paint

image

Paint with multiple fingers (iOS only; single finger may work on Android). Also handles mouse on desktop.

article, source

SmartTTT

image

Tic-tac-toe game.

source

TSmiley

image

No IDE is mature until it has a TSmiley component. Supports desktop and mobile. Click/touch to change TSmiley’s mood.

article, source

Tuesday, May 08, 2012

Delphi-Tage 2012

Incidentally, I’ll be in Germany just when the Delphi-Tage 2012 will be going on and I'll be staying fairly close (in Nürnberg). Is there any interest amongst my German readers in me presenting a session on multithreading there?

Sunday, May 06, 2012

Embarcadero Akademija: Multithreading

This is an announcement for the next “Embarcadero Academy” session. This time I will be talking about my favourite topic – multithreading. As the previous two sessions (Unicode, FireMonkey), this one is intended for the Slovenian Delphi programmers. The rest of my post is directed to potential participants and is therefore written in the Slovenian language.

Monday, April 23, 2012

GpDelphiUnits update

As always, all units are available on Google Code.

DSiWin32 1.66

  • Implemented DSiSetFileTime and DSiSetFileTimes.
  • Implemented DSiDateTimeToFileTime.
  • TDSiRegistry.ReadBinary, WriteBinary now use RawByteString for data buffer.

GpHugeF 6.05

  • Added logging to TGpHugeFile[Stream].

GpStreams 1.39

  • Added function CopyStreamEx accepting a TStreamProgressEvent.

GpStringHash 1.11

  • TGpStringObjectHash.Find returns 'nil' in 'value' parameter if key is not found.

GpTextStream 1.10

  • Implemented TGpTextMemoryStream, a TGpTextStream wrapped around a TMemoryStream.

Saturday, April 21, 2012

OmniThreadLibrary 3.01 released

This is mainly bugfix release with only few additions to the codebase. If you are using version 3.0 and not following the SVN trunk, update is very much recommended.
Get it now: ZIP, SVN.

Friday, April 20, 2012

OmniThreadLibrary Documentation: Join

A long chapter on Parallel.Join has been added to the wiki.

All book material is now also available in the Markdown format in the SVN.

I have started putting together “the book”. The plan is to release early – most probably when all high-level stuff is covered – and then to regularly publish updates. Updates will always be free for all customers. At the moment you can’t preorder the book but you can express your interest at the link above.

Sunday, March 25, 2012

How do you build FireMonkey iOS applications on Lion?

Delphi uses FPC 2.6.0 to do the iOS compilation.

image

I have Xcode 4.3.1 installed (no idea why the version is not displayed in the list).

image

FPC 2.6.0 doesn’t recognize it. Apparently it only works with Xcode up to 4.2.

image

Apple only offers XCode 4.3.1 for Lion.

image

So I’m asking you – can I really use Lion to compile FireMonkey iOS applications? Doesn’t seem so.

Sad smile

Friday, March 23, 2012

Running FireMonkey applications on OS X 10.7.3

I have big problems with FireMonkey applications not running on my new Mac Mini. Does anybody have any information about any possible incompatibilities between XE 2 Update 4 and OS X 10.7.3?

Full problem description is on StackOverflow.


This problem is connected to the Thread Status window. If you have this window visible in the Debug desktop, Delphi will lock when you try to run an OS X application in the debugger. Removing Thread Status window from the Debug desktop solves the problem.

Interestingly, some installations of XE2 Update 4 are working just fine even when Thread Status window is visible.

Wednesday, March 14, 2012

Embarcadero Akademija: FireMonkey

This is an announcement for the second “Embarcadero Academy” session. As the previous one, it is intended for the Slovenian Delphi programmers. The rest of my post is directed to potential participants and is therefore written in the Slovenian language.

Thursday, March 08, 2012

Unicode in modern Delphi applications

The first “Embarcadero Academy” session was a huge success. More than 40 people were present (we had to cap the participants as the venue don’t allow for larger audience) and as far as I could tell from all the direct and indirect feedback they were very satisfied with the three-hour Unicode presentation.

The topic of the next workshop will be FireMonkey. See you on March the 29th!

Sunday, February 26, 2012

Embarcadero Academy

In 2012, Embarcadero with the help of Slovenian distributor Marand is preparing a series of presentations, focused on different aspects of Delphi programming – Unicode, FireMonkey, multiplatform development, Object Pascal as a modern programming language, debugging, multithreading and more. Presentations will be given in Slovenian language by yours truly. The rest of my post is directed to potential participants and is therefore written in the Slovenian language.