http://www.newton-inc.com/dev/techinfo/qa/qa.htm
newtEntry(Roll/Page)Header
proto has a PopIt
method which opens the header. You will need to override the StatScript
of your newtNewStationeryButton
and send the header a PopIt
message. Because PopIt
is not defined prior to Newton 2.1 OS, you will need to check for its existence before calling it. Here is a code example: newtNewStationeryButton. StatScript: func( theStat )
begin
// Keep a copy of the inherited return value for use below
local result := inherited:?StatScript( theStat );
// Pass self as a parameter for the closure. This gives us a reference
// to the application so we can get the entry view.
AddDeferredCall( func( context )
begin
local entryView := context:GetTargetView();
// This code assumes that your header is declared to the entry
// view with the name theHeaderView
if entryView.theHeaderView.popIt then
entryView.theHeaderView:Popit( true );
end,
[self] );
result;
end;