Delphi 2007 Handbook








September 20, 2005

Delphi for .NET CF

I've recently used the Delphi for .NET CF preview compiler to create an application. Troublesome at times, but nice.

Over the past couple of weeks I've started developing an application for a PocketPC Phone using the Delphi preview compiler for .NET CF. The reason it is a phone, is that we are going to use the GPRS connectivity to transfer data from the device to a web-based server (moving XML-based data over HTTP).
After setting up the development environment (which takes a while as you have to isntall the SDK, the emulator, its plug-in and more) and getting the Delphi compiler with the proper script, compiling and running the first program was rather simple. During the development, however, I did stumble on the many (too many?) limitations of the CF platform. I set up a WinFomrs program I use to try snippets of code (Http download, XML processing, custom data structures, portions of the UI). When a code snippet works, I move it to the CF program. Now, at times this is really annoying.
For example, I figured out that among the many limitations of the Control class there is a lack of the Tag property. I was trying to attach information to listview items, and this is forced me to scan an arraylist for determining the associated object. Another problem I had with the listview control is that is does have checkboxes, but no simple way to get the checked items without scanning the entire list.
Most of the limitations are only annoyances. Searching on newsgroups you generally find alternative solutions for missing methods or classes rather easily. What is relevant is that in my experience using Delphi instead of, say, C# didn't cause any extra hassle. Simply stick to the .NET runtime library and to core WinForms features, and everything seems rather smooth. Of course, in Delphi 2005 you have to compile running an external script (hooked to the tools menu), get no visual editor (the WinForms editor generates extra code that is invalid on the CF, so you should try to avoid using it), and have no debugger... but at least the integrated help lists methods available on the CF platform.
Moral of the story: development is smooth and you can leverage Delphi data structures and algorithms almost freely. Compared to the past experiences Iv'e had with the Palm platform, this is much better. At least for now, I'll let you know how the project proceeds...





 

2 Comments

Delphi for .NET CF 

Could you write some words on how to porting existing 
delphi 7 win32 program to CF .Net. I don't care about 
the visual components. We even cannot use RTL unit 
files, like System, Windows, SysUtils, etc I used 
every time in Win32 application, now how porting 
these code to CF .Net?

I only find some delphi expert write article on 
porting Win32 to VCL.Net. No one try to write an 
article on porting Win32 to CF.Net in Delphi 2005?

I cannot wait for the Highlander's release now.
Comment by Chunfu on October 21, 10:02

Delphi for .NET CF 

I would like to follow the blog in regards to Delphi 
CF.NET, seems that it only stop in 2005 for 1 comment.

-thanks-
Comment by Jonathan [] on February 20, 23:40


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.