Delphi 8 Update 3
The delphi 8 update 3 is available for download right now as a public beta. It should solve the problem concerning the .NET Framework 1.1 SP1 issue.
Delphi 2005 Update 1
The first update of Delphi 2005 is also available for download. It solves a lot of issues and the memory leakage problem.
Quote from The Borland Developer Network about the Delphi 2005 update:
This update makes Delphi 2005 rock solid!
More information about Delphi 2005 Update 1 can be found here.
Programming blogs containing .NET, C#, LINQ, Objective-C and Delphi experiences
Thursday, December 23, 2004
Thursday, December 16, 2004
Navigating a .NET dataset
In Delphi 7 navigating a dataset was a snap. You could use a TdbNavigator, or simply call the methods Next or Prior.
In a Winforms application it is not obviuos how to do this. A way to do this is using a CurrencyManager.
A currencymangager manages a list of bindings. A binding binds a value of a property to an object, just as in binding data to a grid.
(Live used to be simple in Delphi 7 :-) )
To navigate a dataset the code looks something like this:
procedure frmMain.MoveRecord(Step : Integer);
var
cm : CurrencyManager;
begin
cm := BindingContext[dsProjects, 'Project'] As CurrencyManager; cm.Position := cm.Position + Step;
Label1.Text := dsProjects.Tables[0].Rows[cm.Position].Item['pr_number'].ToString;
end;
This codes moves the dataset Step records and shows the value of the field pr_number of the current row in a label.
Remark that when you sort your grid, you should also sort your dataset, otherwise they will not be synchronized.
In a Winforms application it is not obviuos how to do this. A way to do this is using a CurrencyManager.
A currencymangager manages a list of bindings. A binding binds a value of a property to an object, just as in binding data to a grid.
(Live used to be simple in Delphi 7 :-) )
To navigate a dataset the code looks something like this:
procedure frmMain.MoveRecord(Step : Integer);
var
cm : CurrencyManager;
begin
cm := BindingContext[dsProjects, 'Project'] As CurrencyManager; cm.Position := cm.Position + Step;
Label1.Text := dsProjects.Tables[0].Rows[cm.Position].Item['pr_number'].ToString;
end;
This codes moves the dataset Step records and shows the value of the field pr_number of the current row in a label.
Remark that when you sort your grid, you should also sort your dataset, otherwise they will not be synchronized.
Thursday, December 02, 2004
Mixing Winforms and VCL.NET
One of the things that really shows the power of Delphi is that you can mix VCL.NET forms within your winforms applications and vica versa. This is really a great feature.
In this 'dirty' example a ClientDataset, Grid, DataSource and VCL Form are created on the fly, and it works just fine. It is however not possible to use the VCL desinger within the winform application.
Can't find the stringbuilder in the .net framework?
No problem, use the TStringList instead.
Delphi makes you feel like you are at home in the .NET framework.
In this 'dirty' example a ClientDataset, Grid, DataSource and VCL Form are created on the fly, and it works just fine. It is however not possible to use the VCL desinger within the winform application.
Can't find the stringbuilder in the .net framework?
No problem, use the TStringList instead.
Delphi makes you feel like you are at home in the .NET framework.
Subscribe to:
Posts (Atom)
Use an image as your UIBarButtonItem
Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...
-
In ASP.NET it is easy to set the prefered authentication method in the web.config file. For external websites this is set mostly to Forms ...
-
Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...
-
How to get, for example, all the hyperlinks from a webpage, which is loaded in your iPhone app using the UIWebView control? (Xcode's web...