The way you've written it below I can't see a problem, unless there
is something specific to the use of packages or the package you wrote that
isn't being accounted for. Have you tried running a full trace thru your
code? I use the Jcl and a formatting component I wrote to send the info to
Codesite which is very detailed. If you want to you can send me a copy of
the package via attachment and I see what I can do with it on my end. Send
the source for the package as well if you can so that I can trace write thru
all of it. If not I'm out of ideas. Sorry.
from Robert Meek dba Tangentals Design CCopyright 2006
"When I examine myself and my methods of thought, I come to the conclusion
that the gift of Fantasy has meant more to me then my talent for absorbing
positive knowledge!"
Albert Einstein
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Horváth Márton
Sent: Saturday, February 11, 2006 12:47 PM
To: [email protected]
Subject: TFrame in package (fwd)
>>components, but is the public method you are declaring and calling to
>> get the classname applicable to both your TFrameClass and
Actually I do not want to retrieve classname, but the Class reference. I
would like to make an application, which can show several (a lot)
frames. I thought make a mainform in a project, and the lot of frames
will be in a separated package, and -depending the action performed by
the user- show the proper frame. (on mainform)
So I need to know the Class reference of the frame to create an
instance from it.
But to avoid the disturb effects, I made a more simply sample to produce
this effect. (I have got NO any errors or exceptions)
now, the code of frame in the package looks like:
procedure GetFrameClass(prnt:TForm); stdcall;
var
frame1:TFrame1;
begin
frame1:=TFrame1.Create(prnt); // only create and set parent
frame1.Parent:=prnt;
end;
the mainform's code is:
procedure TForm1.Button1Click(Sender: TObject);
begin
hnd:= LoadPackage('Package1.bpl');
prc:=GetProcAddress(hnd,'GetFrameClass');
if Assigned(prc) then
prc(Form1); // just call a create with the Owner Form1
---
and the effect is the same. An invisible frame.
An interesting addition: when I put the code after prc(Form1)
cmp:= Form1.FindComponent('Frame1');
if cmp<>nil then
showmessage(inttostr(TFrame(cmp).Width));
I got a message about the width (320) of the invisible frame!
If I replace the message to TFrame(cmp).ClassName, the result is
TFrame1 !!
It's unbelievable.
Are there any idea?
m.
___________________________________________________________________________
"AZ ŐSKORBAN A HOMO SAPIENS 6-8 m2 ALAPTERÜLETŰ BARLANGBAN LAKOTT. A XXI.
SZÁZADBAN ÖNNEK MILYENEK AZ IGÉNYEI? " http://www.realisingatlan.hu
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk