I'd like to know how this "intrusion" would be problematic. If someone
makes a change to something they "shouldn't" have, and something crashes
because of it... so be it. They shouldn't have mucked around with it.
The good rule of thumb would be, don't mess with it, unless you know you
are prepared the handle the consequences.
Can someone provide an example of how this "invasion" of private classes
could be used. I know that some people are saying that it would cause
problems, or require authors to worry that people are inspecting their
objects.. but really, how could this be harmful?
Thanks,
Ryan Dary
Phil M wrote:
On Nov 30, 2005, at 1:05 PM, Mark Nutter wrote:
Hmm, that's a thought. What would you do with it, though? You still
couldn't call any of its methods or access any of its properties.
You'd have a reference to it, but all you could do with it would be
to check it with IsA, Is, or "=" against other objects or classes.
Right?
I guess it wouldn't matter as much for custom classes, but would might
a difference for standard REALbasic classes like the Dictionary and
MemoryBlock. You could certainly access and modify public
methods/properties for a class that you identify correctly and have
knowledge of.
All of the property values are available in the debugger including the
property values, but you are unable to change the values (at least in
REALbasic 2005 -- you could in 5.5 and earlier). Even if you did
change the values, you could not do so in a full compiled/ distributed
app so it is relatively harmless.
But if you have a direct access to the object via Runtime, then you
could learn how the class works in the debugger and then apply those
changes once you get a reference to the object. It basically requires
the code author to plan for this situation and make it difficult to
"authorize" a class.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|