Re: A compile problem or a conceptual one
From: Bruce Roberts (ber_at_bounceitattcanada.xnet)
Date: 11/28/03
- Next message: Rick Carter: "Re: Closing Dos box"
- Previous message: AlanGLLoyd: "Re: Menu item alignment"
- In reply to: Stark: "A compile problem or a conceptual one"
- Next in thread: Stark: "Re: A compile problem or a conceptual one"
- Reply: Stark: "Re: A compile problem or a conceptual one"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 Nov 2003 18:04:52 -0500
"Stark" <starkwedder@virgilio.it> wrote in message
news:Uyuxb.17736$AX1.690847@news1.tin.it...
> I moved a proc from one module to another and I cannot compile it anymore.
I
> don't understand why. It fails with the message "Undefined identifier
Self"
> in the following statement:
> NewItem := TMenuItem.Create(Self);
> The unit where the proc used to be was a form with a TMenu as a component,
> while the unit where the proc was moved is a unit with no form (where I
keep
> more general routines), so I suspect that the problem has something to do
> with this.
Read the ObjectPascal (Delphi) Language Reference. In particular note the
difference between a Procedure and a Method.
Self is only valid in methods.
Alter your procedure to take a parameter that replaces Self.
- Next message: Rick Carter: "Re: Closing Dos box"
- Previous message: AlanGLLoyd: "Re: Menu item alignment"
- In reply to: Stark: "A compile problem or a conceptual one"
- Next in thread: Stark: "Re: A compile problem or a conceptual one"
- Reply: Stark: "Re: A compile problem or a conceptual one"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|