realbasic-nug
[Top] [All Lists]

Re: Interfaces and Computed Properties

To: REALbasic NUG Network Users Group <realbasic-nug@lists.realsoftware.com>
Subject: Re: Interfaces and Computed Properties
From: Thomas Tempelmann <tt@tempel.org>
Date: Sun, 30 Nov 2008 17:55:34 +0100
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: <309A7CE1-F179-4FB5-AE8D-422152714F34@xochi.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Thread-index: AclTDHXttDrvBr7/Ed2XuQAdT0hFXA==
Thread-topic: Interfaces and Computed Properties
User-agent: Microsoft-Entourage/11.3.6.070618
On 30.11.2008 17:46 Uhr, "Michael Diehr" <md03@xochi.com> wrote:

> * a way for a subclass (including window classes) to shadow a
> superclass property with a method or computed property, and then
> access that property:

We had a discussion on this just recently in the forum:

  http://forums.realsoftware.com/viewtopic.php?f=1&t=25181

I see two possible solutions:

1. Enhance the compiler to make computed properties virtual so that they can
be overridden just like "normal" class methods.

2. Turn all computed properties in the framework into methods (functions) so
that they can be overridden without a need for a changed compiler.

I like the second way better because it would be cleaner - we've learned
that properties are not overridable, and solution 1 would mess with that.

Also, solution 2 would make sure that ALL accessible "properties" in the
framework classes would be implemented as virtual methods, so that even
properties that are now _real_ properties, would become overridable by
subclasses, which wouldn't be the case with solution 1.

Thomas



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