Today,I drag and drop a ComboBox on my form,it's style is Drop down.When I design my form ,I add comboBox's list in Studio.On runtime,I want to get the list's index and I used the function "(Setq rValue (dcl_ComboBox_GetCurSel Project2_Form1_ComboBox1))",but it return nil .Is there any mistake about it?And what can I do about it ?
Regards,
Aoxiangzcr
TRY:
(Setq rValue (dcl_ComboBox_GetTBText Project1_Form1_ComboBox1))
A NIL return indicates an error in the argument, such as passing a NIL control name. Make sure the symbol name is correct, and also make sure you call this function while the control still exists (i.e. before the form is closed).
I check it ,but the argument is right,and when I use "SetCurSel " ,it return right value.So ,I do't know what happen.
If you can attach your .odcl and .lsp files, perhaps someone can figure out what is going on.
I have got it .Thanks