kylix - get one char out of TEdit field
My problem is the following:
I have some code here that i want to compile but it wanst written by me so it is pretty confusing to dig in the code for just this tiny change. I need some help with kylix here and my problem is;
I need to extract one char from a TEdit field. The error message i get is [Incompatible types 'Char' and 'WideChar']. How can i get rid of this error? My code is:
ok:=(UpCase(FParams.Name.Text[1])=UpCase(kind-of-element)) and (Length(FParams.Name.Text)<6);
and i am tryingn to get the first char contained in the TEdit field in the form FParams. Something like:
FParams.Name.Text := 'abcdedfghij' and i just want to get one of the letters displayed, say letter "a" using a very reasonable statement(at least for me)
char := FParams.Name.Text[1];
it doesnnt work. My comparaison doesnt work and the code locks in that exact point. Oh, just to help UpCase expects a char as input and so i get the error message. I accept any suggestion as long as it fixes this bug.
Thanks,
|