C H A P T E R 1 7
Additional System Services
Using Additional System Services
17-21
includes an
InitialSetup
frame initializes this view automatically before
it opens.
myStatusTemplate := {
_proto: protoStatusTemplate,
// custom self-animating barber pole
vMyBarber:
{
height:105,
name:'vMyBarber,
kids:
[
protoStatusText,
{
_proto: protoStatusBarber,
//we animate ourself in this script
ViewIdleScript: func()
begin
// if hidden, don't bother with updating barber
if Visible(self) then
// animate barber pole
base:UpdateIndicator({name: 'vMyBarber,
values: {barber: true}});
// return number of ticks to wait
// before returning to ViewIdleScript
300;
end,
ViewSetupDoneScript: func()
begin
inherited:?ViewSetupDoneScript();
:SetupIdle(100);// kick off idle script
end,
},
{
_proto: protoStatusButton,
text: "Stop",
// ButtonClickScript: func() ...
// default is statusView:CancelRequest()...
},
//Note that we do not need to include a closebox or an
//icon these are provided by the protoStatusTemplate,
//All views created from protoStatusTemplate have
//these two children.
],