Giving a name to an dyalog instance in Windows
7 posts
• Page 1 of 1
Giving a name to an dyalog instance in Windows
The title bar of the session form displays CLEAR WS - Dyalog, etc for a clear workspace. If a workspace is loaded, it displays the full name of .dcs file. I tend to have many workspace instances open all of which are "clear", especially if testing client/server code, reverse proxies, origin servers, etc. I'd like to give a name to an instance. So I can do something like:
⎕WSID←'Origin Server 8080'and that works, mostly, except '.dws' is tacked on to the end. I know its a minor problem, but it is somewhat unsightly, and may give the false impression we are looking at a traditional workspace opened from a .dws file. I don't suppose there is a secret I beam that allows me to set the window caption?
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Giving a name to an dyalog instance in Windows
At least under Mac OS 10, appending a period avoids the added dws suffix:
Appending a NULL char works even better (nothing visibly appended):
Of course, ⎕WSID having an odd value may lead to unexpected results:
- Code: Select all
⎕WSID←'Origin Server 8080.'
Appending a NULL char works even better (nothing visibly appended):
- Code: Select all
⎕WSID←'Origin Server 8080',⎕UCS 0
Of course, ⎕WSID having an odd value may lead to unexpected results:
- Code: Select all
⎕WSID
Origin Server 8080?.dws ⍝ ? is actually a special Unicode symbol (in place of NULL)
)save ⍝ Saves as 'Origin Server 8080' sans NULL and sans '.dws'
Origin Server 8080 saved Thu May 21 23:12:54 2020
- petermsiegel
- Posts: 143
- Joined: Thu Nov 11, 2010 11:04 pm
Re: Giving a name to an dyalog instance in Windows
There actually is a facility for doing just what you want. I believe workspace id Dyalog version and various other parameters are available as elements within the output. I used it for a while a year or two ago but in the end dispensed with it and can no longer remember how to invoke it.
But there's also the fact that if you include a dot in the name Dyalog assumes what follows is the desired extension and doesn't add another. Because I frequently use different Dyalog versions I tend to set it to
But there's also the fact that if you include a dot in the name Dyalog assumes what follows is the desired extension and doesn't add another. Because I frequently use different Dyalog versions I tend to set it to
⊢⎕wsid←'V',1⊃⎕wg'APLVersion'Can be tricky if I have multiple sessions in the same version but usually I don't.
V18.0.38293.0
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
Re: Giving a name to an dyalog instance in Windows
Hi Paul
You might like to take a look at http://help.dyalog.com/17.1/#UserGuide/Installation%20and%20Configuration/Window%20Captions.htm.
With this you cannot alter the session caption from within Dyalog, but you can at least define what fields appear in the caption. From experience incLuding {PID} is the best way of uniquely identifying each Dyalog process, which comes in handy when you're trying to send an interrupt to.
I generally set the caption for MessageBox, Session, Status and Systray - and for my purposes I like to use {VER_A}{VER_B}{SCHARS}{BITS} {PID} {WSID}:{SNSID}
You might also find it useful to call 2022⌶ - Flush Session Caption.
Hope this helps.
Andy
You might like to take a look at http://help.dyalog.com/17.1/#UserGuide/Installation%20and%20Configuration/Window%20Captions.htm.
With this you cannot alter the session caption from within Dyalog, but you can at least define what fields appear in the caption. From experience incLuding {PID} is the best way of uniquely identifying each Dyalog process, which comes in handy when you're trying to send an interrupt to.
I generally set the caption for MessageBox, Session, Status and Systray - and for my purposes I like to use {VER_A}{VER_B}{SCHARS}{BITS} {PID} {WSID}:{SNSID}
You might also find it useful to call 2022⌶ - Flush Session Caption.
Hope this helps.
Andy
-
AndyS|Dyalog - Posts: 257
- Joined: Tue May 12, 2009 6:06 pm
Re: Giving a name to an dyalog instance in Windows
Thanks all!
Andy, in V18, will that stuff be able to be specified in the new dcfg config files as opposed to the registry?
Andy, in V18, will that stuff be able to be specified in the new dcfg config files as opposed to the registry?
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Giving a name to an dyalog instance in Windows
As far as I am concerned, having the process ID (PID) on every single window that the interpreter might throw at me is is indispensible.
-
kai - Posts: 137
- Joined: Thu Jun 18, 2009 5:10 pm
- Location: Hillesheim / Germany
Re: Giving a name to an dyalog instance in Windows
Hello Paul
The subjunctive case is a wonderful thing !
It should is as far as I am prepared to go at the moment. I'll do some digging as I'm always wary of dealing with values in subkeys of the Dyalog registry key.
However, in 18.0 the registry is certainly still in use.
The subjunctive case is a wonderful thing !
It should is as far as I am prepared to go at the moment. I'll do some digging as I'm always wary of dealing with values in subkeys of the Dyalog registry key.
However, in 18.0 the registry is certainly still in use.
-
AndyS|Dyalog - Posts: 257
- Joined: Tue May 12, 2009 6:06 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group