dormky 2 Posted March 19 I'd like to create a TValue that holds a TBytes array. From what I see of TValue's code, it doesn't seem to be designed for such, even by using variants. Alternatively, if I can just get a pointer to the relevant instance field from TRttiField and cast it to a TBytes, that'll work too. Share this post Link to post
Lajos Juhász 293 Posted March 19 I see no problem to assign a TBytes to TValue. Where you find it impossible? var v: TValue; a: TBytes; begin setLength(a, 3); a[1]:=56; v:=TValue.From<TBytes>(a); ShowMessage(v.AsType<tBytes>[1].ToString); end; Share this post Link to post
dormky 2 Posted March 19 Damnit, the debugger is showing the error on the wrong line. I had an invalid typecast, but in the next block of code... Thanks :') Share this post Link to post