realbasic-nug
[Top] [All Lists]

Re: Window.Left and WIndow.Top incorrect

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Window.Left and WIndow.Top incorrect
From: Norman Palardy <npalardy@great-white-software.com>
Date: Wed, 29 Jul 2009 18:21:22 -0600
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <49AFBF14-61E8-4111-881D-43F044CBB886@shaw.ca>
References: <048D0EFB-D608-4802-99E5-46187B30F447@stretchedout.com> <3A1798A9-5105-450C-A220-10F5D8E82C52@xochi.com> <CF7C7E87-5990-4C26-B5E9-4BD6DAC61D8A@stretchedout.com> <28648C61-3E4B-41F7-91E2-A99B55D4E697@xochi.com> <B902623E-524A-49BA-B34E-94CF2A52FD38@great-white-software.com> <49AFBF14-61E8-4111-881D-43F044CBB886@shaw.ca>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 29-Jul-09, at 1:18 PM, Terry Ford wrote:


On Jul 29, 2009, at 11:42 AM, Norman Palardy wrote:

In an instance placed on a windows self refers to the window and me refers to the instance on the window

In the code in a subclass, me and self refer to the instance (they are synonyms)

Sometimes it is also helpful if one considers who owns the code or control. That way, self always refers to the owner. If the code is in an instance, the window owns it. If the code is in a subclass, then the class owns it. If the code in a window control needs a method or property in the subclass, it must refer to 'me.' to call that code. Outside references must also refer to the window's control directly as it inherited the method or property from its super. This all depends on the scope that the method or property has as well.

It can be confusing until one truly understands how it all works.

Very true this is a good way to think about it but the perception seems to be that the code on an instance on a window is "owned by" or is part of the control - that is until you understand that it isn't :)



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>