Article View: pl.comp.lang.delphi
Article #346911Re: RTTI SetValue i TValue.FromVariant
From: Roman Tyczka
Date: Fri, 25 Jan 2019 07:33
Date: Fri, 25 Jan 2019 07:33
20 lines
1585 bytes
1585 bytes
On Thu, 24 Jan 2019 13:59:34 -0800 (PST), immo wrote: > i problem jest taki, że jak rttiValue jest brane z Varianta, to przy podstawianiu dostaje w ostatniej linii invalid type cast. > > Jeśli Value zmienie na integer a TValue.FromVarian na TValue.From(value) to przy podstawieniu nie ma błędu i działa ok. > > Jednak takie rozwiązanie jest do bani, bo ja chcę żeby to działało ze wszystkimi property (integer, string, datetime, color itp. itd.). > > > Tak sobie szukam po necie i raczej nie znalazłem rozwiązania, bo wszystkie albo są proste tak jak powyżej, albo dla kolekcji czy bardziej złożonych propertiesów. > > > Pytanie - czy ktoś mógłby nakierować mnie co jest nie tak? Jakie Delphi? -- pozdrawiam Roman Tyczka
Technical Details
Message-ID:
<xhs5aachxoxt.dlg@tyczka.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailReferences:
<26a7a704-1917-44d0-9661-5e95ad255534@googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: Roman Tyczka <noemail@because.no> Newsgroups: pl.comp.lang.delphi Subject: Re: RTTI SetValue i TValue.FromVariant Date: Fri, 25 Jan 2019 08:33:51 +0100 Organization: ATMAN - ATM S.A. Lines: 20 Sender: romek@tyczka.no.found Message-ID: <xhs5aachxoxt.dlg@tyczka.com> References: <26a7a704-1917-44d0-9661-5e95ad255534@googlegroups.com> NNTP-Posting-Host: ip-94-75-90-137.wave.com.pl Mime-Version: 1.0 X-Trace: node2.news.atman.pl 1548401633 12411 94.75.90.137 (25 Jan 2019 07:33:53 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Fri, 25 Jan 2019 07:33:53 +0000 (UTC) User-Agent: 40tude_Dialog/2.0.15.84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit