Que erro é esse: Unsafe typecast of ´Integer´ to ´TObject´ ?
16/03/2006
0
[b:9573ea356a]Unsafe typecast of ´Integer´ to ´TObject´ [/b:9573ea356a]
nesta linha,
if (Tag <> 0) and (TObject(Tag) is TPenProp) then FPenProp := TPenProp(Tag);
O que pode ser isso?
Obrigado,
[]s
Titanius
Posts
16/03/2006
Massuda
16/03/2006
Titanius
16/03/2006
Massuda
16/03/2006
Dopi
[i:c54acb1d41]{$WARNINGS OFF}[/i:c54acb1d41]
Codigo
[i:c54acb1d41]{$WARNINGS ON}[/i:c54acb1d41]
Acho que o efeito desejado no código acima seria o mesmo que
if (Tag <= Integer(High(TPenProp)) ) and (Tag >= Integer(Low(TPenProp)) ) then FPenProp := TPenProp(Tag);
Dessa maneira não gera warnings mas acho que fica ainda mais confuso..
:roll:
Clique aqui para fazer login e interagir na Comunidade :)