Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // REMEMBER TO SOURCE THIS, NOT RUN IN THE SCRIPT EDITOR DIRECTLY
- {
- proc string GetTestString () {
- return "TEST_STRING_#";
- }
- proc RunLocal1 () {
- print(GetTestString());
- }
- proc RunLocal2 (string $Input) {
- print($Input);
- }
- proc RunLocal3 () {
- RunLocal2(GetTestString());
- }
- global proc RunGlobal () {
- // works
- print (GetTestString());
- // works
- RunLocal1();
- // works
- RunLocal2(GetTestString());
- // works
- RunLocal3();
- }
- global proc CreateWindow () {
- if (`window -exists "TestWindow"`) {
- deleteUI "TestWindow";
- }
- window
- -title "Test"
- -sizeable 0
- -maximizeButton 0
- -widthHeight 200 100
- "TestWindow";
- string $TestButtons = `frameLayout
- -collapsable 0
- -labelVisible 0
- "TestButtons"`;
- rowColumnLayout -numberOfRows 1;
- button
- -label "Quick Test"
- -command "RunGlobal";
- showWindow "TestWindow";
- }
- CreateWindow();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement