[lazarus] Patches to Shanes files
Michael A. Hess
mhess at miraclec.com
Thu Jul 8 12:53:09 EDT 1999
Shane Miller wrote:
>
> Notice in gtkint.pp I had commented out all the strdispose functions.
> That's not good. :-)
I had noticed that and put them back in why I was testing. :-)
> Once I put those back in (for every StrPCopy there should be one)
Not for every StrPCopy but for every StrAlloc.
> then the strpcopy seemed to work fine.
I think that is a fluke. I was trying to use the StrPCopy against
gsignal : array[0..20] of char;
which would mean it was dynamically allocated on the stack each time the
method was called and StrPCopy still goofed it up.
> However, then we get an error and it doesn't run.
> It doees all the events then when trying to gtk_widget_show the menu
> bar it crashes! I moved the gtk_widget_show stuff out of twincontrol
> and put a InterfaceObject.IntSendMessage() call into TWinControl and
> now it crashes in GTKINT.PP when it tries to do the gtk_widget_show.
>
> Any thoughts now?
I am beginning to think that it is something nasty that is going on else
where but I can't point to a specific thing. Here is the reason I am
suspecting it. For one, because of some of the issues and test we are
doing and second because of something that occured for me when I was
tracing the Exception last night. I was putting some simple
writeln('xxx'); statements in the code so as to determine where things
were and to figure out where the exceptions was coming from. At one
point I placed a writeln in the code and suddenly the compiler
complained that a class was suddenly defined wrong.
In TApplication we pass in a reference to a TFormClass which is simply
type
TFormClass : class of TForm;
It actually looks like this
TApplication.CreateForm(Form : TFormClass; var ref);
I think that is correct I'm doing it from memory.
Then in the lazarus.pp unit it is called with.
Application.CreateForm(TForm1, Form1);
Now TForm1 is simply
type
TForm1 : class (TForm)
but when I put the writeln statement in I was talking about the compiler
suddenly complains that it was expecting TFormClass to be passed and it
got TForm1 instead.
But they are the same thing???????
I removed the writeln and it compile correctly. I put it back and it
complained. I moved the writeln up on the other side of a few commented
lines and it compile correctly. So something is going goofy during the
compile. I don't know if this is part of the StrPCopy problem but it is
strange. :-\
--
==== Programming my first best destiny! ====
Michael A. Hess Miracle Concepts, Inc.
mhess at miraclec.com http://www.miraclec.com
More information about the Lazarus
mailing list