[Lazarus] RE : RE : RE : RE : @DBLookupControls users: call for test

Luiz Americo Pereira Camara luizmed at oi.com.br
Wed Dec 14 01:34:17 CET 2011


On 13/12/2011 09:35, Marcos Douglas wrote:
> On Tue, Dec 13, 2011 at 6:05 AM, Ludo Brands<ludo.brands at free.fr>  wrote:
>>>> Sorry, I don't understand what you mean.
>>>>
>>> In a dataset i have to fields: PreferredFruit and FallbackFruit.
>>>
>>> Both are indexed fields that lookup de display value in the
>>> same dataset
>>> Fruits
>>>
>>> I set the PreferredFruit to 1 (Orange) and FallbackFruit to 2 (Banana)
>>>
>>> Where the cursor of dataset Fruits should be?
>>>
>> The last one you selected. So, when user selects PreferredFruit, he can look
>> at the the details of Fruits to help him in selecting the right fruit
>> (customer hates red fruit and fruit with hard shells, so the user verifies
>> color and shell type before selecting). Then he selects FallbackFruit. Same
>> usage, verify Fruits details before selecting FallbackFruit, user is not
>> interested in the details of Orange anymore.
>>
>> Your next question: where is the cursor in the dataset Fruits if I change
>> the cursor in the customer dataset? Answer: Delphi selects the first key
>> field in the dataset record (the one with lowest fielddefs index or fields
>> index if no fielddefs). If the user wants another field, an AfterScroll on
>> the customer dataset can fix that.
> That is right.

I've got your point.

Mine is that the control should keep less intrusive as it was designed 
earlier (the original author explicitly avoided changing listsource cursor).

With this it can have more granular usage for those that dont want to 
interfere to the dataset position and also for those that want to change 
it, and know the collateral effects, just add a single call to Locate in 
OnSelect or OnEditingDone

I will concentrate in the remaining bugs

Luiz




More information about the Lazarus mailing list