Watch, Follow, &
Connect with Us

The Oracle at Delphi













Older Stuff



Archive for September, 2008

More A Sink Kronos programming

Today, we’ll look at the implementation behind some of the code presented in this post. Let’s start by looking at the implementation of the IAsyncResult interface. Because there are two pairs of BeginInvoke/EndInvoke, one that just calls a procedure and one that is designed to call a function, we’ll start with a base implementation that [...]

Posted by Allen Bauer on September 29th, 2008 under CodeGear | 2 Comments »

A Sink Programming.

In this post I demonstrated how you can use an Anonymous Method to "synchronize" a background thread with the main UI thread. However there are times where you don’t want to block execution of the thread but still want to have something happen in the main UI thread, asynchronously. For several releases of Delphi there [...]

Posted by Allen Bauer on September 26th, 2008 under CodeGear | 3 Comments »

News Flash! Someone has already invented the wheel!

I’m sure most, if not all, of you have heard the phrase "Why reinvent the wheel?" Another one I’m very fond of is "Standing on the shoulders of giants." The latter was often heard coming from Distinguished Engineer, Anders Hejlsberg during his tenure at Borland. So, why reinvent the wheel when there are giant shoulders [...]

Posted by Allen Bauer on September 25th, 2008 under CodeGear | 20 Comments »

Another "MacGyver" moment

Or, "More fun with Generics and Anonymous methods".
I’ll just leave it up to you whether or not these utility functions are useful, but here they are:
type
Obj = class
class procedure Lock(O: TObject; Proc: TProc); static;
class procedure Using<T: class>(O: T; Proc: TProc<T>); static;
end;

class procedure [...]

Posted by Allen Bauer on September 25th, 2008 under CodeGear | 24 Comments »

A "Nullable" Post

Solving problems can be fun and challenging. What is really challenging is solving a problem using only the tools at hand. During the development of Delphi 2009, there were several language features that were dropped in favor of generics and anonymous methods. One such feature was what we called "managed records." This allowed for some [...]

Posted by Allen Bauer on September 18th, 2008 under CodeGear | 27 Comments »

Retrofitting a classic

When Delphi 2 was released targeting the 32bit Windows API there were some new-to-Delphi features of the operating system that opened up some new possibilities; Pre-emptive multi-tasking and multi-threading. Coupled with this "new" concept of a "thread," Delphi introduced the new TThread class that was an abstract base class from which one would derived in [...]

Posted by Allen Bauer on September 8th, 2008 under CodeGear | 26 Comments »

Multicast Events - the finale

In my previous two posts I presented a technique using the new generics language feature of Delphi 2009 to create a typesafe multicast event. In the previous post, I showed how you can create a TMulticastEvent<T> instance and assign it to an event handler for an existing event on a TComponent derived type. Using the [...]

Posted by Allen Bauer on September 3rd, 2008 under CodeGear | 10 Comments »

Server Response from: BLOGS1