🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.winforms.controls.using
Article #492

No parameterless constructor defined for this object

#492
From: Stefanidis Dimitris
Date: Wed, 27 Oct 2004 15:56
17 lines
1510 bytes
Hello folks
I have an package2.dll wich has an TForm1 inside on it.


When i call this via reflection as

a:Assambly
typ:System.Type
begin
  a:= Assembly.LoadFrom('package2.dll');
 typ := a.GetType('Unit1.TForm1')
 Activator.CreateInstance(typ) <-- Exception here
end;
I get error: "No parameterless constructor defined for this object"
Thanks
Dimitris
P.s.   I'm also get tha same error with DataModules
Technical Details
Message-ID: <417fc4e6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed1.uni2.dk!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,77f91c77a30b4714,start
X-Google-Attributes: gid1eff29,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Stefanidis Dimitris" <distef01@yahoo.gr>
Newsgroups: borland.public.delphi.winforms.controls.using
Subject: No parameterless constructor defined for this object
Date: Wed, 27 Oct 2004 18:56:29 +0300
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 194.30.233.129
Message-ID: <417fc4e6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098892518 194.30.233.129 (27 Oct 2004 08:55:18 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed1.uni2.dk!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail