[lazarus] Lazarus Project

Shane Miller smiller at lakefield.net
Thu May 6 22:40:25 EDT 1999




I am having a major problem
 
If you examine editor.pp please notice the 
function OPENFILE.  In it I create a TMemo object and access some of it's 
properties.  Notice how I declare a fmeditor variable and assign that to 
UnitList[Activefile];  Unitlist is an array of FORMS that contain Memo's so 
in this case it's the Form that you want the memo on.  Problem is I CAN'T 
USE SELF!  If I try to put Self in the TMemo.Create(self) function the memo 
never displays because SELF is not being set right (something's wrong with 
it).
 
Another example is where I set the caption of 
the form (a few lines lower in the same procedure).  Notice that I use 
fmeditor.caption := texts instead of simply saying Caption:= Texts.  If I 
simply use Caption, then the caption is never set.  When I use fmeditor 
it's set.
 
Another example:  If I create the Memo1 component in the 
fmEditor.Create procedure, and try to do a Memo.Show in the OpenFile procedure, 
crashola....it tanks.  It's simply can't find the Memo.show function 
because it seems like it's treated as a local variable in the Create, or because 
Self is being sent wrong, perhaps that's causing the problem.  Notice, the 
function OPENFILE is a callback called when you press the OK button in a 
OpenFileDialog box (in dialogs.pp) so is this causing the problem?
 
I really would appreciate someone looking at this.  I'm 
starting to believe it's a compiler problem but that's only because I also 
starting to run out of other things to blame.  i am not using the latest 
snapshot but I am using fpc 0.99.11 version I pulled a while back.
 
Please let me know if anyone has any questions.
Shane
 




More information about the Lazarus mailing list