David Jondreau Posted July 29, 2008 Posted July 29, 2008 If create an unstored calc and set it to = Get(WindowName) will that calc always show the correct name for that window, even with multiple windows open (but different names) and displaying the same record?
comment Posted July 29, 2008 Posted July 29, 2008 No, not always - only when the window is refreshed. If, for example, you change the window's title while it's not in front, it won't redraw and the calc will continue to show the previous name until the next refresh.
David Jondreau Posted July 29, 2008 Author Posted July 29, 2008 Good point. But what if the user has no ability to change the window title? If you've got static window titles on several windows all showing the same layout and the same unstored calc, will the calc ever show the wrong title for its window? Get(WindowName) should show the currently selected window title, but if a window isn't the currently selected one, it still shows the "old" title in the calc field.
comment Posted July 29, 2008 Posted July 29, 2008 will the calc ever show the wrong title for its window? I don't think so, but I want to be careful here, because it's difficult to imagine every possible scenario. The only thing I am reasonably certain of is that when the field is refreshed, it will calculate the name of the window it lives in - whether that window happens to be in front or not.
Vaughan Posted July 30, 2008 Posted July 30, 2008 One interesting thing I've found with window names (and I've been advised that it is a feature not a bug) is that when files are hosted, the default window name is the file name with the server name appended in brackets... Corporate Database System (FM Server 01) ... but the Get( WindowName ) function only returns "Corporate Database System". Go figure. :
LaRetta Posted July 30, 2008 Posted July 30, 2008 I can confirm this. But it shouldn't mess up anyone attempting to call a window or use a window name in a calculatioN (but I might be wrong). But as test, WordCount produces the word count based upon only the window name (or layout name if window isn't named) even thought it shows (the server) at the end.
Vaughan Posted July 30, 2008 Posted July 30, 2008 I agree LaRetta... and I can understand why FMI has chosen to do this... but I looks up and sees "filename (servername)" as the window name, but really it's not.
Fitch Posted July 30, 2008 Posted July 30, 2008 If it bugs you, you can always set the window title to Get(FileName) and the server name will go away.
Recommended Posts
This topic is 6020 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now