Closed norberturkiewicz closed 6 years ago
Might be helpful in the wiki.
Here's a dyapp command that will use the folder its in for the project name
Run ⎕se.UCMD 'acre.OpenProject ',(0⊃⎕nparts #.GetEnvironment'DYAPP')
Launching a dyapp file starts Dyalog and sets the current directory to the path of the dyapp file. If acre supports relative paths it should suffice to call Run ⎕se.UCMD 'acre.OpenProject .'
I rely on these dyapp files on windows and hope Dyalog will get the same functionality in the nix versions soon.
Acre 3 puts one of these in the .acre/ folder by default but when it came to putting it back in desktop I couldn't work out the best place for it. Intrigued by Gil's hint above. Is that dot before the final quote standard notation? It certainly works in the project folder!!
Should it be another standard item put there by CreateProject?
A single dot refers to current directory, so yes, it is standard notation.
Won't hurt to add the file as a standard item. I usually have a couple xload.dyapp load.dyapp and sometimes build.dyapp
@PhilLast : any progress?
What progress is required? I did suggest whether the creation of such a .dyapp file should be standard and Gil suggested it wouldn't hurt.
Does anyone actually want this? And if so where should it be put? So far acre populates the project folder and nothing else. To be of use the .dyapp would have to be outside it.
@e9gille ?
To elaborate slightly on my last comment If it's in the project folder it can be merely
Run ⎕se.UCMD 'acre.OpenProject .'
But in windows at least I can only get this to work from windows explorer. From a task bar menu or pinned to the Dyalog icon in the task bar it looks in
C:/WINDOWS/system32/
for the folder so needs the full path to work.
This is a Dyalog/Windows problem: when you create a shortcut from a DYAPP or a DWS and stick it to the taskbar it won't work either in case you use relative path names within the DYAPP.
The reason is that when you double-click any file then Windows checks whether it knows its extension. If it does it starts the associated application and forces it to have the directory the double-clicked file lives in as the working directory.
That works fine in case a DWS or a DYAPP as such are double-clicked for obvious reasons, but it does not work at all with a shortcut pointing to a DWS or a DYAPP. I would have expected that Windows is smart enough to work out that it's a shortcut, and that it does not matter at all where the shortcut lives, only which folder it is pointing to, but it is not. Pity.
I've reported this as a problem to Dyalog. I suggest we forget about DYAPPs for the time being and close this issue. When the report (I hesitate to call it a bug because I think that Microsoft got this wrong) has a result I will report back. I hope that Dyalog is able to do something about this. Until my report they have not been aware of the problem at all.
This works nicely and I no longer have to type 👍