Your code looks correct when it comes to the step children and their allocation, but I can't see why it doesn't work... I tried the same approach, but without the newtStatusBar, and that seems to be fine:
kAppSymbol := '|ProtoTest:40Hz|;
kAppTitle := "ProtoTest";
kVersion := "1.0";
infoButtonProto := {
_proto: protoInfoButton,
DoInfoAbout: func ()
begin
if not Visible(:Parent().aboutView) then :Parent().aboutView:Open();
end,
DoInfoPrefs: func ()
begin
:Notify(kNotifyAlert, "MyApp", "DoInfoPrefs() got called!");
end
};
aboutView := {
preallocatedContext: 'aboutView,
_proto: protoFloatNGo,
viewJustify: vjParentFullH + vjParentCenterV,
viewBounds: {left: 12, top: 0, right: -12, bottom: 220},
stepChildren: [
{
_proto: protoTitle,
title: "About"
},
],
};
mainView := {
_proto: protoApp,
title: kAppTitle,
appSymbol: kAppSymbol,
stepChildren: [
{
_proto: infoButtonProto,
viewJustify: vjParentRightH + vjParentBottomV + vjCenterH + vjCenterV,
viewBounds: {left: -39, top: -16, right: -26, bottom: -3}
},
],
aboutView: nil,
stepAllocateContext: [
'aboutView, aboutView
],
viewJustify: vjParentFullH + vjParentFullV,
viewBounds: {left: 16, top: 16, right: -16, bottom: -16},
};
{
app: kAppSymbol,
text: kAppTitle,
theForm: mainView,
}
Even if I did get that "Declare To" functionality working, how would I then call it? Could I just do GetRoot().|MyApp:MyCompany|.layoutView:Open();?
As you can see in the infoButtonProto, you can refer to the app itself (and all slots it contains) using the :Parent() method (or _parent slot), as the button is a child of the app. The same is true for the aboutView, its parent should also be the app itself.