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

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

A while ago, I needed routines to work with absolute and relative paths.

These links were very useful:

  1. The Delphi TPath.IsDriveRooted function (I think it was introduced in Delphi 2010) serves as a IsPathAbsolute function
  2. Conversion between absolute and relative paths in Delphi – Stack Overflow showing how to use the Windows API functions PathRelativePathTo and PathCanonicalize functions declared in the ShLwApi unit to create AbsToRel and RelToAbs functions.

Thanks Andreas Rejbrand and David Heffernan for the last two!

–jeroen

via: Conversion between absolute and relative paths in Delphi – Stack Overflow.


Filed under: Delphi, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development

Firebird News: Firebird’s ADO.NET provider (sources) has a new home

$
0
0
So from today on, the sources for ADO.NET provider for Firebird are available in Git repository.

Firebird News: ADO.NET provider for Firebird 3.1.0.0 is ready

$
0
0
The version 3.1.0.0 of ADO.NET provider for Firebird is ready for your download! More info.

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Lesson 6 of the Embarcadero Mobile Development Summer School was titled Powerful multi-tier applications with DataSnap.

Download of the video will be at streaming.embarcadero.com/summerschool2013.

The Twitter coverage is at Twitter / Search – #embtdd.

Here is the Q&A chat for that session:

Q: Maybe post the main urls (streaming, twitter, etc) here for attendees to make it easier to find them.
A: http://streaming.embarcadero.com

Audience Question
Q: It ssems to me that what would be really handy is a DataSnap wizard that could update an existing client when the available server methods are changed. It is reasonably simple to add or remove a server method by hand, but to do the corresponding fix-ups in the client code is a total pain!Or perhaps I have missed some easy way to do that? :)
A: Just re generate client classes – it will find the original file and update it :-)

Audience Question
Q: As simple as that? Wow! I didn’t dare try that whenever I have needed it in the past. Thanks :)
A: :-)

Q: Tip: NEVER EVER manually change the generated classes.
A: I agree with that! :-)

This is amazing that you can open up your DataSnap servers with just a few lines of code to other languages!

Audience Question
Q: FireDac do’s not give you an option to generate Datasnap client classes like DBExpress used to. Is this going to be an option latter?
A: DBExpress is the recommended client option for DataSnap still. Use FireDAC on server.

Audience Question
Q: Can you easily add the mobile connections at an existing datashap http server?
A: Absoutely just add the mobile connector componets to your datasnap server and set the properties

Audience Question
Q: Thanks too all for a very good episode. good for ref :)
A: Your welcome :-)

developerdirect.online@embarcadero.com.

Audience Question
Q: Thanks also from me. Very useful sessions
A: Your welcome. Happy coding!

Audience Question
Q: Thanks, appreciated the session. Good to see the different ways to connect back to DataSnap.
A: Cool :-)

Audience Question
Q: Many thanks for the sesssions – all very useful.
A: :-)

–jeroen


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

Firebird News: Firebird 3.0 Alpha 1 release is available for testing

$
0
0
Firebird Project announces the first Alpha release of Firebird 3.0, the next major version of the Firebird relational database, which is now available for testing. This Alpha release arrives with an early preview of the features and improvements currently under development by the Firebird development team, as well as with countless bugfixes. Our users are appreciated giving [...]

The Podcast at Delphi.org: Sum(Programming Languages) > 0

$
0
0

A Zero-sum game is a situation where for one contestant to win or gain, the other contestants must lose or have a loss. Thus for contestant A to have a +5 then contestant B must have a -5, resulting in a sum of 0.

Programming languages, and the battle for supremacy, is not such a contest. Many developers know more than one programming language, and they use different languages for different situations. Different languages influence each other; Delphi heavily influenced C#, and then C# influenced Delphi. Even when one language doesn’t change another, knowing one influences how we use the others.

Liking one language does not mean all other languages are garbage. Celebrating the benefits or advantages does not discount strengths of other languages. Not all languages are equal. They all have strengths and weaknesses, advantages and disadvantages, and that is what makes it great to have so many languages to choose from.

I used to prescribe to the idea of “we are the best because everyone else sucks,” but not anymore. What makes us the best is the progress we make and the projects we complete. Celebrating the success of others doesn’t diminish our success, nor does it keep us from competing or innovating.

Anders Hejlsberg is frequently quoted as saying “we all stand on the shoulders of giants” when talking about the influences of different programming languages on each other. If we don’t strive as developers to be bigger and better, then we are no longer giants with shoulders to stand on. We do a disservice to not compete and grow and do the best we can. It is when we innovate and build on others that we make the world a better place.

Embarcadero offers a lot of great tools for many different languages, including Delphi, C++Builder and HTML5 Builder (PHP & JavaScript). Pick the one you like best, or learn something new. You can even grab RAD Studio and get all those tools for one price (and a special promotion!) Then lets celebrate your victories together!

Firebird News: Using Jaybird with Firebird 3.0 alpha 1

$
0
0
Mark Rotteveel wrote on Firebird Java list : I have started a page on the Jaybird wiki on using Jaybird with Firebird 3.0 alpha 1: http://jaybirdwiki.firebirdsql.org/jaybird/doku.php?id=tip:firebird30a1 It lists know problems, compatibility issues and workarounds between Jaybird 2.2.x and earlier and Firebird 3 (alpha 1). It is a work in progress, but I hope to have […]

Firebird News: Advanced Data Generator 3.1 released

$
0
0
Upscene Productions announces the release of: “Advanced Data Generator 3.1″ 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 […]

TPersistent: You Clumsy GIT

$
0
0

I recently ran into an issue when refactoring a project, in which the compiler was reporting an error that a method had insufficient arguments.  Using Ctrl + clicking to drill through the code clearly showed a parameterless overload.  Error insight also seemed to be off exactly one line.

Rearranging the methods within the unit didn’t change the outcome, but it showed that after a particular line there was an issue, because Ctrl + clicking on a local variable no longer jumped to it’s declaration, but one line above.

Using NotePad++ to show all control characters, there didn’t seem to be anything other than the normal <CR><LF> characters at the end of each line.  Once we performed a conversion to Mac/Unix format and back to Windows in NotePad++, the issue was resolved.  It appears that GIT must have changed an EOLN marker at some point and we simply didn’t notice it in Notepad++.

Firebird News: Donations collected in the 10th FDD

$
0
0
The 10th Brazilian Firebird Developers Day donations is now published. The money was donated by the attendees and sent to the Firebird Foundation. The total amount collected was R$ 4.101,24.  Thanks for all who donated! Go Firebird!  

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

I was called by a client that didn’t want to do maintenance on an old Delphi application, but wanted to get dir of an I/O Error 131:

I/O Error 131: ERROR_NEGATIVE_SEEK

MessageText: An attempt was made to move the file pointer before the beginning of the file.

Tough luck: psychic powers told me someone is using an unsigned 32-bit integer to access a file using traditional style Assign/Reset/Seek/Read/Close patterns that Delphi kept as intrinsic routines for Turbo Pascal backward compatibility, and that file has grown over 2 gigabyte in size.

I quickly found an import file had grown over the 2 gigabyte, so this was indeed the case.

The original developers didn’t do the file access using the 64-bit Seek/Position of the TStream descendant TFileStream.

Too bad, as now someone has to dig through the mothballs to find the sources (if they survived 3 different version control system switches), create a working development environment, and fix the bug.

Another instance where technical debt in IT raises its ugly head and the compound interest is really expensive.

–jeroen

via: erikmartin.com – IO Errors in Delphi.


Filed under: Delphi, Delphi 5, Development, Software Development, Technical Debt

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

StackOverflow user opcOde wrote something interesting:

Writing device drivers in delphi is hard to impossible.

Here is an attempt to write drivers in delphi.

It is funny to see the link pointing to the DelphiBasics site: Advanced Delphi Driver Development Kit – DelphiBasics.

On my list of things to remember: might come in very useful one day (:

Note that opcOde also has an interesting blog: opc0de | just another enthusiastic coder.

–jeroen

via delphi – Winrollback/DeepFreeze How these softwares work? – Stack Overflow.


Filed under: Delphi, Delphi 2010, Delphi 7, Development, Software Development

Firebird News: GSOC LibreOffice Firebird Integration Weekly Update 08 and Embedded DB Selector for Base

$
0
0
New GSOC update for the previous week   It’s now possible to select the driver to use for embedded databases within Base thanks to the new selector

Dr.Bob's Delphi Notes: Enabling Developer Options on Android 4.2

$
0
0
As an Android developer (using Oxygene for Java for HTC Wildfire and HTC Desire devices - using Android 2.2 and 2,3), I've recently bought a new phone: a Sony Xperia Z.

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Peter Leslie Morris asked if Delphi already incorporates the `yield` keyword that C# had introduced in C# 2.

Delphi doesn’t, but for the people interested what it does in C#:

Basically `yield` is syntactic sugar to make it a lot easier to write methods that return enumerators of some sort.

It delays (hence the yield keyword) execution until the enumerator as actually being used.

It is one of the hardest C# things to master (it is the most complicated transformation in the compiler, followed by anonymous methods - well maybe with the exception of async/await), but it can be very useful.

VB.NET doesn’t have it either, but has iterator blocks.

Some start posts on yield:

–jeroen


Filed under: .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Development, Software Development

Behind the connection: RAD Studio Mobile Roadmap updated

$
0
0
Embarcadero updated his RAD Studio Mobile Roadmap. This concern Delphi and C++ Builder for Android and iOS. What is in development: - Integrated C++ and Delphi Native ARM toolchains for iOS and Android (compiler, linker, debugger) - NDK based Android Platform support (Gingerbread, ICS and Jelly Bean) - FireMonkey mobile Framework for Android - Mobile designer for Android - iOS 7 support -

Te Waka o Pascal: XE5 News: Coming in September, With Android Support

$
0
0
The word is out. XE5 will be coming this September, as described in the announcement of a tour of Russia to promote the new release. Translation: Dear developers! Traditionally, in September we are launching a new version of RAD Studio, this year has been for us an exception, as we started the RAD Studio XE4 […]

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Just found out this the hard way, glad I found it soon which prevented me from doing like Ondrej Kelle – Google+ – Wasted a few hours with this….:

Debugging 64 bit Delphi applications with Delphi XE2 on Windows 8 does not work

Problem: Debugging a 64 bit Delphi application using Delphi XE2 with Windows 8 results in the error Disconnected session.

Solution: Windows 8 is not a supported platform for versions of Delphi prior to Delphi XE3. To get debugger support for 64 bit applications on Windows 8, you must get Delphi XE3. If you are upgrade sensitive, Embarcadero recommends you get Support and Maintenance along with your next purchase. Support and Maintenance guarantees you all updates for 1 year and gets you 3 support incidents in addition.

The proposed solution is to upgrade to at lease Delphi XE3, but this project is not ready to upgrade just yet.

Anybody with a real workaround (apart from downgrading to Windows 7)?

–jeroen

via Error: Disconnected session.


Filed under: Delphi, Delphi XE2, Development, Software Development

TPersistent: The Dangers of With

$
0
0

I have known about the dangers of using the with statement for a long time now.  Today, I encountered a new one.  I was refactoring code in a datamodule used to iterate over a dataset and insert each record into the database (a common construct).  The numerous ParamByName() calls were enclosed in a ‘with query do’ and I received a run-time error in a FieldByName() call.  The FieldByName() was to be called on the dataset which was not yet part of a with clause so it resolved to the query and of course the field didn’t exist.  A classic problem with using FieldByName() exacerbated by the with statement.

The issue I didn’t expect, was when I tried to modify the with statement the XE4 IDE stopped responding.  I waited a few seconds thinking it would come back after the the parser finished.  It didn’t.  I decided to go for lunch…when I came back about 20 minutes later the IDE was still unresponsive and I had to kill the process.  Thankfully I have always enabled the Autosave options in the IDE, so I didn’t really lose any work.

Te Waka o Pascal: Learning Cocoa with Oxygene and Objective-C

$
0
0
When XE4 came out and the full extent of the bait and switch perpetrated by Embarcadero became clear, I decided that my money was better spent with RemObjects and their Oxygene product. But it has only been this past weekend that I finally found some “quality time” to spend with it. I have had a […]
Viewing all 1725 articles
Browse latest View live