| To: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
|---|---|
| Subject: | Re: Scope/Protection Question |
| From: | Joe Strout <joe@inspiringapps.com> |
| Date: | Sat, 30 May 2009 14:32:01 -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: | <671647DA-EC14-41EB-A175-5289BBC5E0E3@satx.rr.com> |
| Organization: | Inspiring Applications, Inc. |
| References: | <345AFE42-338C-4588-9F76-7560C88B8609@verizon.net> <671647DA-EC14-41EB-A175-5289BBC5E0E3@satx.rr.com> |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
| User-agent: | Thunderbird 2.0.0.21 (Macintosh/20090302) |
William Squires wrote: A protected property can be accessed via code in IT'S instance, or in code in a subclass method (which would refer to its inherited property), but not in other code. That appears to be a fair description of how RB's compiler currently works, but there is no reason that it SHOULD work that way. That is, in the code in Class2, you can refer to Property1 without an accessor, but you'll be referring to the value of Property1 associated with the instance of Class2 that you created with New. A different instance of Class2 cannot access the Property1 in the first instance without an accessor!! And this isn't even true, since you can trivially access the other object's Property1 simply by typecasting it to a Class1. Best, - Joe -- Joe Strout Inspiring Applications, Inc. http://www.InspiringApps.com _______________________________________________ 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> |
|---|---|---|
| ||
| Previous by Date: | Re: OS X bug: Listbox scrolling wrong with "scroll to here" option, Tim Jones |
|---|---|
| Next by Date: | Re: Operator_Compare with variant objects?, Joe Strout |
| Previous by Thread: | Re: Scope/Protection Question, William Squires |
| Next by Thread: | Re: Scope/Protection Question, William Squires |
| Indexes: | [Date] [Thread] [Top] [All Lists] |