Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-04

patch to tdataset

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis
to Alexandrov Alexandru
Alexandrov Alexandru wrote
added GetIndexDefs and InitFieldDefsFromFields, implemented Filed.GetIsIndexField.

Hmm.. Delphi (7) doesn't have the GetIndexDefs and InitFieldDefsFromField functions?
And I don't see the use of the first function. From the second I can imagine that it's usefull, but since it's not in Delphi, it should be placed into a derrivate of TDataset? Or can you explain why it is generally usefull?

And your TField.GetIsIndexField simply callse TDataset.GetIsIndexField, which isn't implemented also...

And the patch also contains a GetStateFieldValue, which isn't there in Delphi but it's usefull. Only you set FState directly, I should use SetTempState, so that the controls are disabled. Or else all datasource- controls will display the 'old' values from the fields, if I want to get only one old-value...

And could you clean up your patch next time. So that all the lines which only removes ome spaces are gone?

JoJo,
Joost.

Reply by email

Alexandrov Alexandru
to Joost van der Sluis
Joost van der Sluis wrote 10 lines
On Sun, 2006-04-16 at 20:46 +0300, Alexandrov Alexandru wrote: > added GetIndexDefs and InitFieldDefsFromFields, > implemented Filed.GetIsIndexField. Hmm.. Delphi (7) doesn't have the GetIndexDefs and InitFieldDefsFromField functions? And I don't see the use of the first function. From the second I can imagine that it's usefull, but since it's not in Delphi, it should be placed into a derrivate of TDataset? Or can you explain why it is generally usefull?

But they are in Delphi 7..
In fact this is the main reason i added those functions.

And your TField.GetIsIndexField simply callse TDataset.GetIsIndexField, which isn't implemented also...

In TDataset, GetIsIndexField function is virtual.
TDataset is a prototype. Some functions are declared only to be implemented or overrided in tdataset descendants.

Show quoted text 5 lines
And the patch also contains a GetStateFieldValue, which isn't there in Delphi but it's usefull. Only you set FState directly, I should use SetTempState, so that the controls are disabled. Or else all datasource- controls will display the 'old' values from the fields, if I want to get only one old-value...

FState is a simple variable.
GetStateFieldValue function saves fstate, retrive the field value and restore fstate back in a single try..finally statement. If this is not safe enough, we can add code to disable and enable controls.

And could you clean up your patch next time. So that all the lines which only removes ome spaces are gone?

Sorry, I use TortoiseSvn and i don't know much about diff format.

Alex

Reply by email