Recent

Author Topic: [SOLVED] Is there an equivelant for 'me.method'  (Read 3370 times)

georgelappies

  • New Member
  • *
  • Posts: 35
[SOLVED] Is there an equivelant for 'me.method'
« on: July 17, 2011, 10:41:11 am »
Hi all

Is there a fast way to reference the form in which unit you are at the moment like this:

Code: [Select]
me.object.property := 'Hello';

i.e.

me.lblUser.caption := 'Welkom';
« Last Edit: July 17, 2011, 02:34:09 pm by georgelappies »

Imants

  • Full Member
  • ***
  • Posts: 198
Re: Is there an equivelant for 'me.method'
« Reply #1 on: July 17, 2011, 10:47:28 am »
I tjink you are loking for Self

Self.object.property := 'Hello';

and

Self.lblUser.caption := 'Welkom'

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Is there an equivelant for 'me.method'
« Reply #2 on: July 17, 2011, 10:47:54 am »
Goeiemore George,

Try the self keyword...

Groete,
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

georgelappies

  • New Member
  • *
  • Posts: 35
Re: Is there an equivelant for 'me.method'
« Reply #3 on: July 17, 2011, 11:12:37 am »
Thanks all / Baie dankie almal.

the 'self' keyword is indeed the one ;)

P.S. is there a way to mark a thread 'SOLVED'?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Is there an equivelant for 'me.method'
« Reply #4 on: July 17, 2011, 11:38:06 am »
To mark a thread solved, edit the thread or the first topic (can't remember which), you can add something like [SOLVED] in front...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018