[Lazarus] RE : RE : Propose: dont try to open TDBLookup* ListSource automatically
Luiz Americo Pereira Camara
luizmed at oi.com.br
Mon Jul 9 20:48:14 CEST 2012
Em 9/7/2012 07:40, Ludo Brands escreveu:
>>> Default false, I hope. Somebody that wants shaky behavior
>> should do so
>>> willingly and "sign" for it.
>> If that makes you happy, why not ? :)
>>
> So we have also Michael's vote for dropping the current default dblookup
> behavior :)
More then changing the default behavior i propose removing altogether
because:
1) The other option will still be broken and those that use it will
expect to work properly. If a bug report is added complaining of such
bugs we cannot say "Dont use OpenLookupDataset as True since can lead to
problems like this". We will have to fix anyway.
2) The code will be significantly cleaned easing maintainability. To
support this feature a temporary global flag is added leading to ugly code.
3) Fixing the user projects that relies on that is pretty straight forward
4) Currently LookupCache is ignored and work always as if was True (i
plan to fully implement later). To implement it with OpenLookupDataset =
True and the lookup dataset closed we would need to open it every time a
lookup is needed. This is how was implemented earlier. See
TDBLookup.ListFieldValue at
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/include/dblookup.inc?view=markup&revision=28158&root=lazarus
Luiz
More information about the Lazarus
mailing list