Article View: borland.public.cppbuilder.nativeapi
Article #2562Re: dynamic_cast does not work in packages
From: Dmitry
Date: Wed, 14 Feb 2007 08:56
Date: Wed, 14 Feb 2007 08:56
37 lines
2338 bytes
2338 bytes
> Clayton, in documentation for TObject::ClassNameIs i finding the next: //-------------------------- Use ClassNameIs when writing conditional code based on an object's type or to query objects across modules or DLLs. //-------------------------- this gives me idea that my problem is known borland problem. Meaning - always to use ClassNameIs of VCL but not dynamic_cast of C++. I was not able to find key to the problem for 2 weeks already. When i prepared simple example of dynamic_cast in packages - everything worked fine. But since i started to complicate the example up to existing model - the glutch appeared again.This glutch hardly dependent of length of module and even name of class of my actions. Since i change class name of my actions to something different it stopped to work again! SO dynamic cast worked only with AnsiString a_ClassName = DataSource->DataSet->ClassName(); before it and certain rule for class name. Eg. it worked for TMyDataSetAction but did not for TDVKDataSetAction. When i unremarked all the rest module code(which had no relation to dynamic_cast at all) dynamic_cast stopped to work again! So this also dependent of module length. Please some ideas. Dmitry
Technical Details
Message-ID:
<45d2ce9a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45c1f643@newsgroups.borland.com> <45c7c793$1@newsgroups.borland.com> <45c7cad8$1@newsgroups.borland.com> <45c83ebc@newsgroups.borland.com> <45c8b0b1$1@newsgroups.borland.com> <45d08f2f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,eea25a98edb328b5 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Dmitry" <dmitry@pikalevo.com> From: "Dmitry" <dmitry@pikalevo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <45c1f643@newsgroups.borland.com> <45c7c793$1@newsgroups.borland.com> <45c7cad8$1@newsgroups.borland.com> <45c83ebc@newsgroups.borland.com> <45c8b0b1$1@newsgroups.borland.com> <45d08f2f@newsgroups.borland.com> Subject: Re: dynamic_cast does not work in packages Date: Wed, 14 Feb 2007 11:56:55 +0300 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 89.20.24.218 Message-ID: <45d2ce9a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171443354 89.20.24.218 (14 Feb 2007 00:55:54 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail