#22 RXDbLookupComboBox Errors

open
nobody
None
5
2014-10-31
2011-05-31
No

First of all have a cordial greeting.

I am submitting a problem with the component TRxDbLookupComboBox, I explain to watch because I'm not sure if it's a bug or I'll be using the wrong one component.

I am using a form TRxDbLookupComboBox 2 components, and therefore the properties of each component of the assigned execution mode as follows:
DSRegistrador.DataSet: = ClaseRegistrador.ObtenerLista;
CmbRegistrador.LookupSource: = DSRegistrador;
CmbRegistrador.LookupDisplay: = 'id, description';
CmbRegistrador.LookupField: = 'id';
CmbRegistrador.AutoSize: = false;
CmbRegistrador.Height: = 21;
DSRegistrador.DataSet.First;

Where:
- DSRegistrador => TDataSource
- CmbRegistrador => TRxDbLookupComboBox

Now the first mistake that I faced was when selecting an item from the list that shows the component selected whatever gave me an error such as SIGSEGV, this problem could solve it with the next patch in the file rxlookup.pas:

Index: rxlookup.pas

--- rxlookup.pas (revisi�n: 1640)
+++ rxlookup.pas (copia de trabajo)
@@ -1190,10 +1190,21 @@
else
if AResult and not Assigned(FDataLink.DataSource) and (FLookupDataLink.Active) then
begin
- if FKeyField.IsNull then
- SetValueKey(FEmptyValue)
+ if (Assigned(FKeyField)) then
+ begin
+ if FKeyField.IsNull then
+ begin
+ SetValueKey(FEmptyValue);
+ end
+ else
+ begin
+ SetValueKey(FKeyField.AsString);
+ end;
+ end
else
- SetValueKey(FKeyField.AsString);
+ begin
+ SetValueKey(FEmptyValue);
+ end
end
else

But to have this code so it shows me I can select the components and the values ??of the displayed list. But I have another problem, when I select the item to look internally at the KeyValue property component is not updated or otherwise not selecting anything, porq trying to get the value I get an error "Could not convert variant of type (Null ) Into type (String) "and then I have made it impossible to use these components that are vital to the system I am developing.

Hope you can help me or else if it's a bug of the components can be corrected for the proper use of other users.

Greetings.

Discussion

  • Image Errors

     
    Attachments