Not only does NewtonScript not enforce encapsulation, it doesn't support it
There are no private functions. The contents of any slot can be read whether
declared or not (you may have trouble finding things that are not declared,
but that's another matter). This applies not only to your own application,
but to anything on the system. Applications are just frames. If you are in
the inspector you can start at GetRoot() and work you'r way down to anything
in any applcation or any soup.
Many a happy hour has been passed this way... (never in working time of
course)
Brian
> -----Original Message-----
> From: Michael J. Hussmann [mailto:michael.hu@macmagazin.de]
> Sent: 30 May 2000 11:06
> To: newtontalk@planetnewton.com
> Subject: Re: NTLK [PROGRAMMING] "Programming For The Newton" example
> code
>
>
> Ching Yi Tsai (tsai@mac.com) wrote:
>
> > One more question, doesn't it nullify the OOD's idea of
> Encapsulation?
> > Other objects can directly access the declared object's slots?
>
> NewtonScript doesn't enforce encapsulation -- this is up to the
> developer. But then, you would have to be a real purist not
> to access an
> object's slot directly (except when abstraction provides a
> real benefit).
>
> Michael J. Hussmann
>
> Redaktion macmagazin
> MACup Verlag GmbH
> Leverkusenstrasse 54 VII
> D-22761 Hamburg
> Germany
>
> E-Mail: michael@macmagazin.de
> ***************************************
> NewtonTalk brought to you by:
>
> EVOTE.COM -- the ESPN of politics on the Internet! All the
> players, all the news, and the hottest analysis and features
> (plus 'toons!) anywhere.... visit http://www.evote.com today!
>
> ***************************************
> Need Subscribe/Unsubscribe info?
>
> Visit the NewtonTalk section at http://www.planetnewton.com
>
EVOTE.COM -- the ESPN of politics on the Internet! All the players, all the news, and the hottest analysis and features (plus 'toons!) anywhere.... visit http://www.evote.com today!
***************************************
Need Subscribe/Unsubscribe info?
Visit the NewtonTalk section at http://www.planetnewton.com
This archive was generated by hypermail 2b29 : Sat Jul 01 2000 - 00:00:04 CDT