http://www.newton-inc.com/dev/techinfo/qa/qa.htm
protoStaticText
text slot that is in one linked layout window from a button that is in another linked layout window. I tried to allow access to the base view from both linked layouts, but this didn't help. I even tried to allow access from the base view to both layouts, but this didn't help, either. What should I do?textThatChanges
which a child of a view called changingContainer
and is declared to changingContainer
with the name textThatChanges
. ChangingContainer
is the base view for a layout which is linked into the main layout, and the link (in the main layout) is declared as changingContainerLink
. Code in the main layout can change the text of the textThatChange
view like so: SetValue(containerLink.whatToDo, 'text, "Turn and face the...")
viewSetupFormScript
script of the 'buttonThatChanges
button, set the value of the base view's slot 'theTextView
to self
, as in the following code fragment: func()
begin
base.theTextView := self;
end
2) In the buttonClickScript
script of the 'buttonThatSetsText
button, use the global function SetValue
to store new text in the text slot of the 'buttonThatChanges
button, as in the following code fragment: func()
begin
SetValue(base.theTextView, 'text, "Now something happened!");
end
Note that this example assumes the self-declared view called base
. In your application, you may access your base view in a different way.