Synopsis
Set the specified window as current.
Syntax
current_window(id)
Description
The function arguments.
Argument | Description |
---|---|
id | A ChipsId structure identifying the item, or a string containing the name of the object. |
The current_window command sets the window indicated by the argument as the current window; see "ahelp currency" for general information on currency.
Use the info_current command to retrieve a list of all the current items in the ChIPS session, as shown below.
Examples
Example 1
chips> add_window("id=M31") chips> add_window() chips> current_window("M31")
Two windows are created. After the second window is created, it is current. The current_window command then sets the first window as the current window:
chips> print(info_current()) Window [M31]
If the 'all' label had been used instead - e.g.
chips> current_window('all')
then the output would include both windows:
chips> print(info_current()) Window [M31] Window [win1]
Example 2
chips> id = ChipsId() chips> add_window() chips> add_window("id=M33") chips> id.window = "win1" chips> current_window(id)
This is similar to the previous example except that a ChipsId object is used to select the window.
Example 3
chips> add_window("id=M31") chips> add_window() chips> current_window("all")
Two windows are created. After the second window is created, it is current. The current_window command then makes all windows current.
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- concepts
- chipsid, currency
- utilities
- clear
- windows
- add_window, deiconify_window, delete_window, get_window, iconify_window, print_window, set_window