Can Delphi ClientDataSets be used in iOS Applications? - ios

I read the Components Not Used in iOS Apps post in the Embarcadero DocWiki and was unable to tell if ClientDataSets and DataSources can be used in iOS applications. Can anyone confim or deny whether these components will work in iOS applications.

The first two items on the list you cite are the Data.DB and Datasnap.DBClient units, indicating that they are not supported for iOS applications. TDataSource comes from the former, while TClientDataSet comes from the latter.
To confirm for yourself, try using them in an iOS application and see whether you get the expected compiler error ("Cannot find unit %NameOfTheUnit% used by Project1").

Yes, both ClientDataSet and DataSetProvider can be used in iOS applications. The above answer is incorrect, regarding the Data and Datasnap namespaces. These units are cross-platform. You can see this if you pause your cursor over either ClientDataSet or DataSetProvider in the Tool Palette. Doing this displays the OSs supported by the component you are pausing over, and display for both of these components includes both iOS and Android.

Related

How to Update Look and Feel of Older Windows User Interface?

I have a really solid computer program that was written for Windows XP. The program still works great and I would like to update the look and feel of the user interface.
At this time, I would like to give the buttons etc. a more sleek, contemporary look. Much better would be to allow functionality of touch and swipe etc. for tablets and such.
Can anyone tell me what tools in Delphi are used to accomplish this? For instance, do I need to change every button and object manually through object inspector or can I update/modify all objects objects within a project using a single set of commands?
You can start by enabling Windows themes, using Project->Options->Appearance from the IDE's main menu. It's on by default since D2007, but won't be on because your app is coming from Delphi 5. (New projects have it turned on by default, but the IDE can't know if you want it enabled or not when importing older projects.)
You can then start looking at adding gesture support by looking into the documentation for TGestureManager and TGesture. There's a TGestureManager for both VCL and FireMonkey (FMX) applications.
Note that for cross-platform support (Android, iOS, and OS X) you'll need to port your application from the VCL to FMX.

clx/vcl incompatibility

I have inherited an application that was built in Delphi, using clx components (TcxMaskEdit, TcxCurrencyEdit). I cannot open this application because I lack the clx components in my copy of Delphi. If I ignore the warning messages, the application opens without those components on the forms and the Win32 library disappears. I cannot get these components because they are no longer carried by the original developer. So, this leaves me with two options: either find a way to get the clx components, or convert them to vcl. The application has had so many man hours devoted to it and is so business critical that it cannot be easily re-written or replaced. So, my question is: how can I convert the clx components to vcl or otherwise obtain these deprecated components? Or is there something here that I'm missing?
TcxMaskEdit and TCxCurrencyEdit are not CLX controls. They're part of the older Developer Express components (not sure if they're still around or not). In order to open your project, you'll need to get a copy of whatever version your application used. You'll need to ask the old developer what that was, or contact DevEx support and see if they can help you.
(The CLX components have the same name as their VCL counterparts. The only difference is the unit names in the uses clause of your source; the VCL Dialogs unit is replaced by QDialogs, Forms becomes QForms, and so forth. Switching from CLX to VCL is as easy as searching for any unit starting with Q, and removing that single letter if there's a corresponding VCL unit, and then rebuilding your app.)

Delphi XE2 Firemonkey iOS app controls compatibility

As you all know, Embarcadero just released Delphi XE2. I have download it and i am very excited about having an way of creating an iOS app.
To create the iOS app we should export the code to xcode. But the question is: does every control works on iOS/xcode? I mean, if i want to connect to a sql lite database can I use the delphi controls to do so?
Is there any way of accessing some specific things in iOS like acelerometer and camera?
Is it possible to create a useful iPhone/Ipad app in Delphi (connect to a database, load grids, connect to a webservice, for example)?
1- I don't think you can Components Not Used in iOS Applications
-- I think you can use the TDatasource and the TClientDataSet though ;-)
2- Delphi uses FPC compiler for the iOS so you'll have to parse the iOS SDK headers before you can use it Parsing iOS headers or http://wiki.freepascal.org/objectivepascal#iOS_Headers but there are no out-of-the-box components (yet) that can access the Camera, Accelerometer, ...
3- Check number 1.
Actually ... I think TClientDataSet isn't supported on iOS. I could be wrong ... but at least it wasn't supported a few months ago.

TWAIN scanning components for Delphi

I need to add TWAIN scanning to an Delphi application and am having trouble locating an off-the-shelf component to do so.
I downloaded TDelphiTwain but, when used in D2010 on Windows Vista, it does not appear to recognize any Twain sources on my system. I also tried the trial version of Twain Toolkit for Delphi from MCM which has the advantage of being currently updated (DelphiTwain's last update was 2004), but the Twain Toolkit will not even compile on my system (I think some of the DCUs are out of date).
Can anyone suggest a simple method of getting TWAIN scanning into my Delphi application?
UPDATE: Using vcldeveloper's update to DelphiTwain (see below) I was able to get this working. Also, I also discovered that Envision Image Library supports Twain scanning as well as assisting in handling multi-page TIFFs, and has been updated for compatibility with D2010.
Late Breaking UPDATE VCLDeveloper's code, below, works fine. However, I settled on Envision library which includes the ability to easily create multi-page TIFF files. I got the Envision scanning, including multi-page file handling, implemented in a few hours.
I changed DelphiTWAIN to work with Delphi 2009 and 2010. You can download the source code from here: http://www.kluug.net/delphitwain.php
Additional links are here:
http://torry.net/pages.php?id=507
and here: http://www.delphipraxis.net/1179589-post3.html
Another graphic library that also supports TWAIN scanning is ImageEn which also can save the scanned documents as PDF (as well as numerous graphical formats). That feature alone sold me on that product years ago.

Stand-alone report preview through RDC/ActiveX Crystal Reports XI

I'm porting an application from Crystal Reports 8 to Crystal Reports XI in Delphi 5, using the RDC/ActiveX interface.
In Crystal Reports 8, I was able to bring up the crystal reports default report viewer window for a report like so:
RptInvoicing.Destination := 0; // To: window
RptInvoicing.Action := 1; // Execute
However, this does not fly with CR XI. Printing and exporting I've figured out to work like this:
crReport.PrintOut(True);
...
crReport.Export(True);
But I haven't been able to find anything relevant to show the default preview window. I've tried implementing my own using the report viewer component, but it has a lot of problems like locking up when resizing, freezing and crashes, so it's not a viable solution for a production app.
Even the official support forums weren't of help, I only got a nasty answer to go look at the manuals, which I've been through several times and can only refer to as bad. It's not every day you see such bad documentation for an enterprise product. I found nothing relevant to this in their manuals, so I'm led to think their own staff have no idea about this either.
So I'm hoping someone here could tell me if the default report viewer still exists in CR XI, and if it does, how to invoke it? If it doesn't, is using the report designer component really the only solution to create one?
I recently had the same problem, and described the solution here. I am using Delphi 2007, but since the code involves calls to an external ActiveX DLL, it should work for you too.
From their documentation:
Craxddrt.dll (Crystal Reports ActiveX
Designer Design and Runtime Library)
is a unified object model that
combines the runtime capabilities of
the Craxdrt.dll (Crystal Reports
ActiveX Designer Run Time Library)
with the design time capabilities of
the Craxddt.dll (Crystal Reports
ActiveX Designer Design Time Library).
Craxddrt.dll will replace Craxddt.dll
for versions 8.5 and up. Both the
Craxddrt.dll and the Craxdrt.dll
contain all the objects and associated
methods, properties, and events needed
for creating, opening, exporting,
saving, and printing a report at run
time. In addition, Craxddrt.dll is
either used with the RDC ActiveX
Designer when designing reports at
design time, or used with the
Embeddable Designer when designing
reports at run time. See “Embeddable
Crystal Reports Designer Control
Object Model” on page 343 for more
information.
Note: The RDC ActiveX
Designer is only available in
Microsoft Visual Basic.
Prior to
version 8.5, the Craxdrt.dll would be
distributed with an application. Now
the developer has a choice of two
automation servers to distribute.
Craxdrt.dll is backwards-compatible
with previous versions and contains
all the features introduced in this
version. Use the Craxdrt.dll for any
client-side application that does not
contain the Embeddable Designer, or
use it for any server-side
application. Craxddrt.dll is
apartment-model threaded, but is not
thread safe, and can only be used in a
client-side application. Although the
Craxddrt.dll is a fully functional
automation server for the RDC, and can
work in any client-side application,
it will increase the install size.
Therefore, it is recommended that you
only use Craxddrt.dll with the
Embeddable Crystal Reports Designer
Control.
I can't say anything about Delphi, but in VB we are using CRViewer ActiveX Control. Using it is straightforward - you put viewer control on form and assign RDC object to it. This is covered in CR help somewhere. (I can't look at code ATM to provide working exmples.)

Resources