pitam se zasto mi sledeca rutina ne radi.
Htio bi da u neka unosna polja ogranicim unos brojki, slovova i ostalih karaktera
parametar te funkcije da char kod KeyPress procedure tog polja.
Nebi htio da pishem svaku proceduru za svako unosno polje, parametre koje posaljem jest Char,koji je bio pritisnut i dozvoljeni Char u array-u
nesto slicno ovom :
Code:
function TFrmOsn.VnosLe(Ch:Char;Lahko:array of Char):Char;
begin
if Ch in Lahko then
Result:=Ch
else
Result:=#0;
end;
function TFrmOsn.VnosLe(Ch:Char;Lahko:array of Char):Char;
begin
if Ch in Lahko then
Result:=Ch
else
Result:=#0;
end;
kod unosnog polja kod KeyPress bi recimo dao
Code:
VnosLe(Key,[#8,#13,#44..#57,#127]);
VnosLe(Key,[#8,#13,#44..#57,#127]);
greska se javi kod funkcije (Ch in Lahko):
[Error] Osn.pas(131): Operator not applicable to this operand type
kako to rijeshiti ?
hvala unaprijed ...
Pozdrav StratOS
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications."
"The one who is digging the hole for the other to fall in is allready in it."
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications."
"The one who is digging the hole for the other to fall in is allready in it."