New topic: Identity crisis..
<http://forums.realsoftware.com/viewtopic.php?t=33304> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message JustSomeGuy Post subject: Identity crisis..Posted: Wed Apr 07, 2010 7:46 pm Joined: Fri May 11, 2007 11:35 am Posts: 782 What is the difference (in RB Language) between me and self????? _________________ 6502 Assembler on Steroids Top DaveS Post subject: Re: Identity crisis..Posted: Wed Apr 07, 2010 7:49 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 2233 Location: San Diego, CA it depends on where you are.. sometimes they refer to the same thing... sometimes one refers to the parent just type in SELF or ME and move the mouse over it... the status bar will tell you what it refers to _________________ Dave Sisemore MacPro, OSX 10.6.2 RB2009r5.1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top pony Post subject: Re: Identity crisis..Posted: Wed Apr 07, 2010 8:06 pm Joined: Sat Nov 11, 2006 2:43 pm Posts: 590 Location: DFW area, Texas, USA From the LR: Me refers to the control that fired the current event. Outside an event handler, it simply refers to the current object (Self). Self is a reference to an object's parent object. _________________ Fly like a mouse, run like a cushion, be the small bookcase. http://www.wish-sandwich.com Top Karen Post subject: Re: Identity crisis..Posted: Wed Apr 07, 2010 11:55 pm Joined: Fri Sep 30, 2005 8:53 am Posts: 739 pony wrote:From the LR: Me refers to the control that fired the current event. Outside an event handler, it simply refers to the current object (Self). Self is a reference to an object's parent object. Not quite right. Me refers to the the class the method is in EXCEPT in a control event handler for a control on a window (or in a container control) it refers to that control. For a control on a window the Control Events actually belong long to the window and NOT the instance of the control. That pretty much aligns with your definition of Me. But Self ALWAYS refers to the class which contains the method/event So in control subclass definition the event does belong the Subclass and me = Self. For a Window or container control (a hybride Class/module) Self always refers to the window regardless. Windows are not Parents in RB parlance. the Parent of a control can only be a RectControl, and a Window is not RectControl - Karen (who is probably being as clear as mud) Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
