Quantcast
Channel: Planet Object Pascal
Viewing all 1725 articles
Browse latest View live

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Hadn’t been doing SOAP in Delphi for a while, and needed to send some Delphi data structures over the write where both Client and Server were going to be Delphi.

These links helped me:

If both client and server are Delphi, you can share the interface units and registration.

Note: since native Delphi SOAP support uses old-skool RTTI, so any property you want to go over the wire needs to be published, not public.

If you want to go beyond that, or use other protocols than SOAP, use libraries for Delphi like RemObjects SDK.

–jeroen


Filed under: Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

Firebird News: A Foreign Data Wrapper (FDW) for Firebird

$
0
0
Bert Herngreen pointed me to this page: http://sql-info.de/postgresql/notes/firebird-foreign-data-wrapper-fdw.html. Maybe it can be useful to someone.

Behind the connection: TIniFile for Android and Windows

$
0
0
When writing cross platform applications, you are faced with different ways of doing thing depending on the platform. Thanks to the OOP paradigm, we may encapsulate those things in a class and create an implementation specific to each platform. This class hides all the details which are not readily portable. In this article, I will model a class depending on the operation of the well-known

Firebird News: Android port of the Firebird Jdbc driver (Jaybird) 2.2.4 is released

$
0
0
New version for Android Jaybird is released This is a port of the Firebird Jdbc driver (Jaybird) You can check what is new in Jaybird 2.2.4 from the official announcement page ps: You can download latest version from Files area also the Netbeans example

Firebird News: TurboBird 1.0 stable version is released

$
0
0
TurboBird 1.0 is released as a stable version

DelphiTools.info: Globals Storages in DWScript

$
0
0
DWScript has a “Globals” facility that allows storing and sharing data across scripts living in the same executable. The first are Global Vars, and is a Key-Value storage, the second are Global Queues, which are LIFO/FIFO named queues. Both are thread-safe and high performance. Enabling Support for Globals To support them, just have dwsGlobalVarsFunctions in…

Firebird News: ANN: Firebird Maestro 14.1 released

$
0
0
SQL Maestro Group is pleased to announce the release of Firebird Maestro v. 14.1, a powerful Windows GUI solution for Firebird administration and database development. New version introduces support for some Firebird 3.0 new features, updated SQL Dump wizard, nullable column checker, data export to JSON, and a lot of other useful things. Read full press-release.

Firebird News: IBX for Lazarus 1.0.5 Released

$
0
0
IBX for Lazarus 1.0.5 is now available for download from http://www.mwasoftware.co.uk/ibx This is a very minor update from 1.0.4 to ensure compatibility with fpc 2.6.4. The specific issue is the proposed change to the TBookmark type definition in the DB unit. This was originally expected to be introduced in 2.6.4 and conditional compilation was set […]

Firebird News: Advanced Data Generator 3.2.0 released

$
0
0
Upscene Productions announces the release of: “Advanced Data Generator 3.2.0″ A fast test-data generator tool that comes with a library of real-life data, can generate data to your database, SQL script or CSV files, many filling options, presets and much more. If you develop database applications, you need data for testing purposes! Version 3 included […]

DelphiTools.info: Who purchased the Delphi you use?

$
0
0
Inspired by a recent question by Bruce McGee in the Delphi non-tech forum, here are a couple of mini-polls. Who purchase the Delphi you use? Do you use Delphi for work, hobby or both?

Firebird News: Spanish blog about Firebird

$
0
0
There is a blog about firebird at http://firebird21.wordpress.com/ His author posts almost every single day since March 2013 News via Linkedin Firebird community

Firebird News: Generate PDF output from Firebird SQL data

$
0
0
Here is a demo program that shows how to generate PDF output from a Firebird database, using xtopdf PDF creation toolkit and the fbd Python driver for Firebird.

Behind the connection: Programming Android and iOS Devices and Gadgets

$
0
0
Our modern world is full of programmable and interactive devices. Delphi and C++Builder can be used to work with these devices and gadgets in innovative ways and extend your apps in ways you never may have imagined. Devices are platforms that can load and execute your program directly, such as an iPhone, Android phone, tablet or even Google Glass. A gadget on the other hand is something your

The Podcast at Delphi.org: Connecting to Any Android with ADB via USB

$
0
0

I’ve seen other attempts at universal ADB (Android Debug Bridge) drivers, but I’ve tested those and not had any luck. The following steps have worked for a wide variety of devices that I’ve tested it with. With such a huge variety of different Android devices available it isn’t always easy to find the right USB driver, but you need an ADB USB driver to connect development and debugging tools. This is different then being able to add and remove files from the Android device.

Disclaimer: I’ve done this a few times, and talked to others who have done it too, all without any incident. This is however a bit of a hack, and may result in some unintended consequence, which may including voiding your warranty, damaging your computer, damaging your android device, or even causing your hair to fall out. Proceed at your own risk.

First of all, you need the Android SDK installed. You don’t need the ADT Bundle or Android Studio if you don’t want those. Just scroll down to Use an Existing IDE. If you have RAD Studio XE5 (an edition with Mobile) installed then you had the option to install this during the RAD Studio install. I’ll include directions for either installation method. Google provides a USB driver for their Nexus line of devices. This is the driver we are going to use, but first we need to modify it to work with our device. I’m assuming you are running Windows. OS X doesn’t need device specific USB drivers.

These directions are for Windows 8.1. Run the Android SDK Manager. You can do this from the Android Tools start menu item that is installed with RAD Studio, or run the android.bat file located in the SDK\Tools folder of the Android SDK installation. This brings up the Android SDK Manager. Scroll to the bottom and look for Google USB Driver in the Extras category. If that is not installed then put a check mark next to it and install it. Android SDK Manager - Extras - USB Driver Next go to the folder where your Android SDK is installed. With RAD Studio XE5 the default install location is  under Users\Public\Documents:

C:\Users\Public\Documents\RAD Studio\12.0\PlatformSDKs\adt-bundle-windows-x86-20130522

From there go to the \sdk\extras\google\usb_driver folder, as that is where the Google USB Driver is installed. I typically make a copy of these folder somewhere else, as we will be modifying some of these files. If you get an updated driver, then your changes will be overwritten if you leave them here. Next we need to go to Device Manager with your new Android device attached (and in developer mode). Look for the entry for Android under Other devices. Device Manager - Other Deivces - Android This is your Android device without a driver loaded. If you don’t see it then either it isn’t connected, or your Android device isn’t in developer mode. It is possible it may show up with the name of the Android device, but it should still be under “Other devices” and have the yellow triangle on it. Right click on this device and select properties. Android Properties - No DriverThen go to the Details tab and from the dropdown select the Hardware Ids property.AndroidProperties-Details

These are the identification for your specific Android device. It should look similar to the picture above.

USB Driver file in folder

Now using your favorite text editor open the android_winusb.inf file we found in the usb_driver folder above. Locate the line that says [Google.NTamd64]. You’ll see some entries above this line, these are for 32-bit installs (it is section [Google.NTx86]), and the entries after the line are for 64-bit installs. Chances are you only need to edit one section, since you are doing this for your own windows install, but you can edit both sections if you are not sure. The lines are the same.

So add lines similar to the following in the section(s) you choose.

;Samsung Galaxy S3 
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6860 
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_03

You probably noticed that is that crazy looking string on the right looks really similar to the values we saw for the Hardware Ids from device manager. The line prefixed by the semicolon is a comment, so I usually put the name of the device there.

Notice that the portion of the identifier with REV_#### is missing (I usually leave it off, but it should work either way). Also the %SingleAdbInterface% line doesn’t have the MI_## portion, while the %CompositeAdbInterface% line does include it. You might need to experiment with this to find what works (again remember the disclaimer).

If you want to load the driver for Google Glass, then it should look something like the following.

;Google Glass
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&REV_0216&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_01

%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&REV_0216&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_00

(the first two lines are for the 2nd edition, the second two lines are for the 1st edition I believe).

Advanced: If you want to load the driver for the bootloader, then put your device into bootloader mode and add a %SingleBootLoaderInterface% line for the value that shows up in Device manager then (it will be different).

Now save the android_winsub.inf file. Unfortunately since it is modified, the signature is invalid and Windows won’t let you load it. With Windows XP this wasn’t such a big deal, but in recent versions the driver signature is enforced. There is a way around it though.

Check out the following guides for loading unsigned drivers in specific OS:

I’ve also made a video of the process on Windows 8.1

The Podcast at Delphi.org: Launching a Delphi XE5 App via Voice on Google Glass

$
0
0

Building a running an app on Google Glass is easy with Delphi XE5, but what about integrating it into the Glass menu system and launching it with a voice command? Turns out that is pretty easy too.

First of all, I find it easiest to to add AndroidManifest.template.xml to your project. It shows up in your project folder after you build an Android app the first time. This template is for the AndroidManifest XML file that is used to describe your application to the Android OS. We open this file and find the <manifest><application><activity><intent-filter> element. We then need to add the following child to it, along with the <action> and <category> children elements already there.

<action android:name="com.google.android.glass.action.VOICE_TRIGGER">

This tells it that our main activity is eligible to receive the VOICE_TRIGGER intent. Next we need to specify which voice command we want to receive. This is done by adding a <meta-data> element outside of the <intent-filter> element (but still inside the <activity> element).

<meta-data
    android:name="com.google.android.glass.VoiceTrigger"
    android:resource="@xml/voice_trigger_start"/>

This specifies that there is VoiceTrigger metadata in the xml file voice_trigger_start. So now we need to create that XML file. Simply right click on your project in the Project Manager and select Add New, then under Web Documents select XML File. Rename it to voice_trigger_start.xml, save it, and edit it to look like the following:

<?xml version="1.0" encoding="UTF-8"?>
 <trigger keyword="My voice is my passport, verify me." />

The value of keyword can be any word or phrase that you want to associate with your app. This will be used in the sentence of “OK Glass, my voice is my passport, verify me.” Generally you want to keep it short, like “take a picture” or “get directions”, while not using something that conflicts with a built in command. This is also what will show up in the launcher on glass next to your app icon.

Now we use the Deployment Manager to specify the location for this new XML file. Simply go to Project \ Deployment and select Add File and choose the voice_trigger_start.xml file. Then change the Remote Path to res\xml.

Simply run your app from the IDE (after you’ve installed a Google Glass USB ADB driver) and after that you can launch your app from the Glass launcher or your selected voice command.

What to learn more about other devices and gadgets? Join me for my free webinar on Programming Devices and Gadgets with RAD Studio on January 22nd.

Programming Devices and Gadgets with RAD Studio


Behind the connection: TIniFile for Windows and Android (Source code)

$
0
0
I made available a zip file with the full source code for my TIniFile class compatible with both Windows and Android. You need Delphi XE5 to compile it for Android and a reasonably recent Delphi to compile it for Windows. You can read the article on my blog. This article explain how it works. You can download the source code here. Follow me on Twitter Follow me on LinkedIn Follow me on Google+

while true do;: Sending Android Intents from Delphi (Part 2)

$
0
0
Some months ago I wrote a post with title “Sending Android Intents from Delphi (Part 1)”. In that post I promised to write a 2nd part… here’s it is! This time I want to play a video deployed with my APK using an external player. Some informations are available on the Internet, but to correctly know how [...]

Lazarus Team Anouncements: Announcment: RC2 for the upcoming Version 1.2.

$
0
0
The Lazarus team would like to announce the second Release Candidate for the upcoming Version 1.2.

We invite all users to test this Release Candidate.
Please read here why everybody really should join the testing now.

News in this Version
http://wiki.l...

DelphiTools.info: DataBasePool in DWScript

$
0
0
A recent addition to dwsDataBase is the DataBasePool static class. As the names indicates, it facilitates pooling database connections from the script-side, while previously you had to rely on Delphi or driver-side pooling (or lack of). DataBasePool This is a really simple affair, with only three methods: Acquire(name) : acquires a DataBase object from the…

The Podcast at Delphi.org: Skeuomorphic No More?

$
0
0

Skeuomorph is compounded from the Greek: skéuos (container or tool), and morph (shape). It describes something that possess additional ornamentation indicative of its inspiration. It is used to describe both physical objects as well as digital designs.

In the physical world we frequently see it as something made of plastic that is styled to look like leather, wood, etc. In the digital world it shows up when a button or other digital element contains textures, shading, etc. to make it look like the physical element that inspired it. From a design point of view in digital assets it is useful in that the user recognizes what an object represents by its physical familiarity (called an affordance).

Apple’s platforms used to be full of a great examples of Skeuomorphism. On iOS all the default icons had a glare that made them look 3D. Many apps, had a extra details to make them look lifelike. Take the Notes app, it was full of torn bits of paper, leather borders, stitching, paper lines, etc. The new version doesn’t have any of that (although it does have a slight paper texture).

iOS6 vs iOS7 Notes

iOS 7 didn’t lead the move to non-skeuomorphic design. Windows Phone 7 (the predecessor to WP8 and Windows 8) and the Metro design eschewed skeuomorphism completely. (If you are keeping score, iOS 7′s features were inspired by Android and design inspired by Microsoft.) Android has always been been straddling the proverbial skeuomorphic fence. Although with the the other two mobile plays moving away from skeuomorphism I expect Android to follow.

iOS7′s move away from skeuomorphism really highlights how most apps design no longer tries to mimic the platform’s design completely. Users are creative with their apps, and often times bring their own design with their app across all platforms. That is the great thing about building your cross platform apps with Delphi. You can use the standard platform styles so your app looks like a standard app on each platform, or just as easily switch to a premium or custom style and have your app stand-out and look consistent across platforms.

Now you need to ask yourself it I only wrote this post so I could use words like eschew, skeuomorphic, proverbial and affordance.

Viewing all 1725 articles
Browse latest View live