Payne,
I'm not sure what code your working off, so this may not work.
Make sure that your global.pp file has a reference to unitlist and ActivePage. If so this will work.
The reason it crashes is because fmEditor does not contain anything so assigning the Memo1's parent to fmeditor crashes. What I did was add a local variable called fmeditor in the OPENFILE procedure and assign it to TEditor(UnitList.Objects[ActivePage]);
Then, fmeditor is assigned to something.
Try that and let me know if it works.
Shane
>> Payne Thomas E CNIN 05/13 9:43 AM >>>
Problem: Lazarus halt with an unhandled exception after choosing a file from FILE OPEN pulldown menu dialog box reference (lazarus/editor.pp line 278 'Memo1 := TMemo.Create(fmEditor);' )
Possible Cause: Object TMemo's create method is the constructor and should pass a pointer back to Memo1 variable, but... the vmtSelfPtr is not implemented in FPC (reference rtl/objpas/objpas.pp line 27 '//vmtSelfPtr = -36; {not implemented yet})
Background:
I have not tested this theory, but it seems right. Object Pascal liturature states that you can send an app into the 'wild blue yonder' by using an object's method without calling the constructor to intialize the link to the virtual method table of the object. The editor problem seems related to tha t, even though you are calling the constructor.
Solution:
It beyond my capability to suggest one.
Tom
Show quoted text 23 lines
-----Original Message-----
From:
Sent: Thursday, May 13, 1999 8:58 AM
To:
Subject: [lazarus] Shane's Self Problem detected!
Shane.
Tom sent me a mail message that said we should look at the objpas unit
something about self being commented out where it should
be pointing to a memory table....
Cliff
- "If you kiss me, I'll turn into a beautiful princess."
- "Look, I'm a computer programmer. I don't have time for girls,
but a talking frog is very very cool."
_________________________________________________________________
To unsubscribe: mail with
"unsubscribe" as the Subject
archives at
http://www.miraclec.com/list_archives/lazarus_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus