C H A P T E R 3
Views
3-32
Using Views
New Warning Messages
3
Warning messages are now printed to the inspector when a NewtonScript
application calls a view method in situations where the requested operation is
unwise, unnecessary, ambiguous, invalid, or just a bad idea.
Obsolete Functions and Methods
3
The following functions and methods are obsolete with version 2.0 of the Newton
System Software:
Confirm
, which created and displayed an OK/Cancel slip. Use
AsyncConfirm
instead.
DeferredConfirmedCall
and
DeferredConfirmedSend
have both been
replaced by
AsyncConfirm
.
Using Views
3
This section describes how to use the view functions and methods to perform
specific tasks. See "Summary of Views" (page 3-47) for descriptions of the
functions and methods discussed in this section.
Getting References to Views
3
Frequently, when performing view operations, you need access to the child or
parent views of a view, or to the root view in the system. You need to use the
ChildViewFrames
and
Parent
methods as well as the
GetRoot
and
GetView
functions to return references to these "related" views.
To test whether an application is open or not, for example, you can use the
GetRoot
function and the application's signature, together with the global
function
kViewIsOpenFunc
:
call kViewIsOpenFunc with (GetRoot().appsignature)
The
ChildViewFrames
method is an important method you must use if you need
access to the child views of a view. It returns the views in the same order in which
they appear in the view hierarchy, from back to front. The most recently opened
views (which appear on top of the hierarchy) will appear later in the list. Views
with the
vFloating
flag (which always appear above nonfloating views) will be
at the end of the array.