realbasic-nug
[Top] [All Lists]

Design Question

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Design Question
From: Sam Rowlands <rowlands@mac.com>
Date: Thu, 30 Oct 2008 22:53:16 +0800
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
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Is there a way to create a class.parent without having a property on the class?

For instance say I have a class called Engine, then I have an array of Valve classes. The array is a property of Engine.

Engine.Valves()

However now I want the valve to communicate with the Engine, to notify the engine when it fails, do I create a property on the valve class called parent and set that to be my engine, or is there some fancy trick I can use to probe the valve and figure it out?

Have a Great Week :)

Sam Rowlands




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

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


From  Thu 30 Oct 2008 10:01:04 -0500 (CDT)
Delivered-To: listarchive@realsoftware.com
Received: by 10.143.2.3 with SMTP id e3cs48729wfi;
       Thu, 30 Oct 2008 08:02:15 -0700 (PDT)
Received: by 10.143.17.13 with SMTP id u13mr4734290wfi.18.1225378935023;
       Thu, 30 Oct 2008 08:02:15 -0700 (PDT)
Return-Path: <realbasic-nug-bounces@lists.realsoftware.com>
Received: from advanced107.inmotionhosting.com (advanced107.inmotionhosting.com 
[74.124.194.228])
       by mx.google.com with ESMTP id 32si3023267wfa.8.2008.10.30.08.02.11;
       Thu, 30 Oct 2008 08:02:14 -0700 (PDT)
Received-SPF: neutral (google.com: 74.124.194.228 is neither permitted nor 
denied by domain of realbasic-nug-bounces@lists.realsoftware.com) 
client-ip=74.124.194.228;
Authentication-Results: mx.google.com; spf=neutral (google.com: 74.124.194.228 
is neither permitted nor denied by domain of 
realbasic-nug-bounces@lists.realsoftware.com) 
smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Received: from localhost ([127.0.0.1] helo=advanced107.inmotionhosting.com)
        by advanced107.inmotionhosting.com with esmtp (Exim 4.69)
        (envelope-from <realbasic-nug-bounces@lists.realsoftware.com>)
        id 1KvZ1L-0003wb-Gs; Thu, 30 Oct 2008 08:01:11 -0700
Received: from boundless.hostrefugee.com ([69.65.40.13])
        by advanced107.inmotionhosting.com with esmtps (TLSv1:AES256-SHA:256)
        (Exim 4.69) (envelope-from <fargo@rpgportland.com>)
        id 1KvZ1K-0003wL-87 for realbasic-nug@lists.realsoftware.com;
        Thu, 30 Oct 2008 08:01:10 -0700
Received: from localhost ([127.0.0.1] helo=rpgportland.com)
        by boundless.hostrefugee.com with esmtpa (Exim 4.69)
        (envelope-from <fargo@rpgportland.com>) id 1KvZ1E-0004iW-I0
        for realbasic-nug@lists.realsoftware.com;
        Thu, 30 Oct 2008 10:01:04 -0500
Received: from 65.100.48.231 ([65.100.48.231])
        (SquirrelMail authenticated user fargo@rpgportland.com)
        by rpgportland.com with HTTP; Thu, 30 Oct 2008 10:01:04 -0500 (CDT)
Message-ID: <34945.65.100.48.231.1225378864.squirrel@rpgportland.com>
In-Reply-To: <3A251409-3EBD-497B-88AE-365FD9F90498@mac.com>
References: <3A251409-3EBD-497B-88AE-365FD9F90498@mac.com>
Date: Thu, 30 Oct 2008 10:01:04 -0500 (CDT)
Subject: Re: Design Question
From: fargo@rpgportland.com
To: "REALbasic NUG" <realbasic-nug@lists.realsoftware.com>
User-Agent: SquirrelMail/1.4.13
MIME-Version: 1.0
X-Priority: 3 (Normal)
Importance: Normal
X-AntiAbuse: This header was added to track abuse,
        please include it with any abuse report
X-AntiAbuse: Primary Hostname - boundless.hostrefugee.com
X-AntiAbuse: Original Domain - lists.realsoftware.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - rpgportland.com
X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: realbasic-nug@lists.realsoftware.com
X-Mailman-Version: 2.1.10
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: realbasic-nug-bounces@lists.realsoftware.com
Errors-To: realbasic-nug-bounces@lists.realsoftware.com
X-AntiAbuse: This header was added to track abuse, please include it with any 
abuse report
X-AntiAbuse: Primary Hostname - advanced107.inmotionhosting.com
X-AntiAbuse: Original Domain - realsoftware.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lists.realsoftware.com

Is there a way to create a class.parent without having a property on
the class?

For instance say I have a class called Engine, then I have an array of
Valve classes. The array is a property of Engine.

Engine.Valves()

However now I want the valve to communicate with the Engine, to notify
the engine when it fails, do I create a property on the valve class
called parent and set that to be my engine, or is there some fancy
trick I can use to probe the valve and figure it out?

Have a Great Week :)

Sam Rowlands

Whenever I've done something like this, mind you I'm not the sharpest tool
here, I would just have a property in Valve of type Engine that can be set
however you decide. I typically use the constructor.

Best of luck,
Fargo


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