background image
C H A P T E R 1 2
Special-Purpose Objects for Data Storage and Retrieval
12-16
Using Special-Purpose Data Storage Objects
Testing the Validity of a Mock Entry
12
The
IsMockEntry
global function returns the value
true
for objects that are valid
mock entries. You can use this function to distinguish between mock entry objects
and other objects such as cache frames or soup entries. Note that the
IsSoupEntry
function returns
true
for both mock entries and normal soup entries.
Getting Mock Entry Data
12
The
EntryCachedObject
global function returns the cached frame associated
with a specified mock entry. You can call this function to retrieve the cached frame
associated with a specified mock entry. For example, your handler frame's
EntryChange
method must retrieve the cached frame in order to write it back to
a mock soup.
Changing the Mock Entry's Handler
12
The
EntrySetHandler
function is a special-purpose function that you can use to
replace a mock entry's handler. For example, you can use this function to install a
handler that implements debug versions of methods present in the mock entry's
original handler frame. Such methods might include breakpoints and print
statements that would not be present in the commercial version of an application.
Getting the Mock Entry's Handler
12
The system supplies the
EntryHandler
function for debugging purposes. The
EntryHandler
function returns a reference to the handler frame associated with
the mock entry specified by the value of the mockEntry parameter.
Implementing Additional Handler Methods
12
Your handler needs to provide additional methods that are the mock entry counter-
parts to system-supplied entry functions, such as
EntryUndoChangesXmit
, and
others. For a list of suggested methods that your handler may implement, see
"Application-Defined Mock Entry Handler Methods" on page 12-19.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна