- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Bring Window To Front not working properly?
[JMP 17.0.0]
This may be kind of obscure, but let's say I create a new project that contains two data tables: Table 1 and Table 2. In Table 1, I have a script to duplicate Table 2 in a new Table 3 (if Table 3 doesn't already exist), then bring the focus back to Table 2:
dt = Data Table( "Table 2");
If( Try( Data Table("Table 3") << Get Name, "") == "",
dt << Subset(
Output Table( "Table 3" ),
All rows,
Selected columns only( 0 )
);
);
Window( "Table 2") << Bring Window To Front;
After the script runs, this should change the window focus to Table 2, but instead the focus is on Table 3. Subsequently running the script brings the focus to Table 2 as intended.
Not sure what I'm missing.
Joel
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Bring Window To Front not working properly?
This is one of those scenarios which call for the Wait() function.
dt = Data Table( "Table 2");
If( Try( Data Table("Table 3") << Get Name, "") == "",
dt << Subset(
Output Table( "Table 3" ),
All rows,
Selected columns only( 0 )
);
Wait(0)
);
Window( "Table 2") << Bring Window To Front;
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Bring Window To Front not working properly?
This is one of those scenarios which call for the Wait() function.
dt = Data Table( "Table 2");
If( Try( Data Table("Table 3") << Get Name, "") == "",
dt << Subset(
Output Table( "Table 3" ),
All rows,
Selected columns only( 0 )
);
Wait(0)
);
Window( "Table 2") << Bring Window To Front;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Bring Window To Front not working properly?
Yes - that is exactly it. This is the first time I've run across a need for the Wait function.
Thank you!