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 12:42:45 -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: <28648C61-3E4B-41F7-91E2-A99B55D4E697@xochi.com>
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>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 29-Jul-09, at 10:30 AM, Michael Diehr wrote:

On Jul 29, 2009, at 6:19 AM, Greg O'Lone wrote:
triggerAutoComplete
dim x,y as integer
x = me.left
y = me.top
// figure out global coordinates
x = x + self.left
y = y + self.top

Problem is that because this is a subclass of an editfield self.left and self.top are returning the top/left corner of the control... not the window.

I thought "self" was always the owner window (which may be a ContainerControl). What you are describing sounds like "Super.left"...odd.

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)





_______________________________________________
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>