Page 2 of 5

Re: Bug in Multiview Search requester

Posted: Sat Sep 19, 2015 11:11 pm
by broadblues
RAmiga-N is used in the Workbench/Window menu for "New drawer" instead of Style Guide "Project/New".
So what would a new projexct be for workbench if not a drawer?
RAmiga-P is used in the Workbench/Icon menu for "Put away" instead of Style Guide "Project/Print".
Print is hardly relavent to workbench, thus the short cut is free to use for something else.
Multiview uses it for Print
RAmiga-S is used in the Workbench/Icon menu for "Snapshot" instead of Style Guide "Project/Save As...".
Likewise.
RAmiga-S is used in the GUI prefs Settings menu for "Use Seperate Screen" instead of Style Guide "Project/Save As...".
There is no Save option only Save as and that uses Ramiga A as per style guide, so again that leaves the shortcut free for reuse on something sensible.
RAmiga-A is used in console/shell Project menu for "Save history" instead of Style Guide "Project/Save As...".
So as history is the only thing to save does this not fit the style guide? Clearly yes.

There really aren't enough keys to have specific guide defined keys combos for every option including all the ones they didn't think off yet, so sensible decisions need to be made keeping the *guide* in mind. And keeping in mind that it's a *guide*.

Re: Bug in Multiview Search requester

Posted: Sun Sep 20, 2015 10:07 am
by trixie
@broadblues, xenic

I have added a note on using the "standard" shortcuts in the relevant section of the Guide:

http://wiki.amigaos.net/wiki/UI_Style_G ... oard#Menus

Re: Bug in Multiview Search requester

Posted: Mon Sep 21, 2015 12:12 am
by xenic
@broadblues
Really? You can always justify violating the guidelines. I'd just like to see more care taken when things are added to the OS. Beyond menu shortcuts there are C: commands that don't have standard templates or respond to ? on the command line etc. How hard is it to add ReadArgs() to a command?

Re: Bug in Multiview Search requester

Posted: Mon Sep 21, 2015 12:14 am
by xenic
trixie wrote:@broadblues, xenic

I have added a note on using the "standard" shortcuts in the relevant section of the Guide:

http://wiki.amigaos.net/wiki/UI_Style_G ... oard#Menus
Thanks. It makes more sense to keep the same shortcuts regardless of language.

Re: Bug in Multiview Search requester

Posted: Mon Sep 21, 2015 1:51 pm
by broadblues
xenic wrote:@broadblues
Really? You can always justify violating the guidelines.
Yes really :-)
Beyond menu shortcuts there are C: commands that don't have standard templates or respond to ? on the command line etc. How hard is it to add ReadArgs() to a command?
Depends on the command, as you must surely understand, I suppose you are talking about things like smartrctl and maybe even python. Replaceing the getopts style command line switches for those would be 1 very difficult due to the complex nature of the options, 2 a maintanance nightmare when you want to upgrade.

Re: Bug in Multiview Search requester

Posted: Mon Sep 21, 2015 6:57 pm
by xenic
broadblues wrote:Depends on the command, as you must surely understand, I suppose you are talking about things like smartrctl and maybe even python. Replaceing the getopts style command line switches for those would be 1 very difficult due to the complex nature of the options, 2 a maintanance nightmare when you want to upgrade.
Yes, smartctrl is among the commands that don't at least respond correctly to ? on the command line. Some commands like "kdebug" respond to ? with the simple template "COMMAND/F" which is better than a command failure; or worse, doing something you didn't intend. Other commands respond to ? by displaying a help list which is also better than failing etc.

I don't think the use of ReadArgs() precludes reading the arguments directly (from argv). You could supply a simple template like "COMMANDS/F" and add a string like "Enter command -h for help" to RDArgs.RD_ExtHelp in the RDArgs structure that you would pass to the ReadArgs() command. The ReadArgs() result can then be ignored (after freeing any memory it uses) and the arguments can be read from argv as they were without ReadArgs.

Some C: commands have no documentation or have docs elsewhere in SYS:Documentation. I don't think it would hurt to supply a copy of command docs in SYS:Documentation/C for commands that have docs elsewhere in SYS:Documentation. There should also be help files in Locale:Help/english/Shell for all commands in the C: directory.

Re: Bug in Multiview Search requester

Posted: Mon Sep 21, 2015 9:29 pm
by xenic
@broadblues
I did a quick test and this is all I had to add to a small ported linux command to get a standard AmigaDOS template when ? is entered as the sole argument on the command line:

Code: Select all

	#include <proto/dos.h>

	struct RDArgs *argsdata = NULL;
	int32 args[1] = {0};

	if (!(argsdata = IDOS->ReadArgs("COMMANDS/F", args, NULL)))
	{
		IDOS->PrintFault(IDOS->IoErr(), "Error");
		return(RETURN_ERROR);
	}

	if (!args[0])
	{
		IDOS->Printf("Enter <command> -h for help\n");
		return RETURN_OK;
	}
If ? is not the only argument on the command line the usual argument parsing is executed. An alternative would be to execute the program's help function when args[0] is NULL like "-h" would if it were entered on the command line.

Re: Bug in Multiview Search requester

Posted: Mon Sep 21, 2015 10:02 pm
by xenic
@trixie
Since we've strayed to the subject of "Style Guide" compliance maybe you could add a paragraph in the Shell "Parsing Commands" section that suggests a simple form of Amiga style command parsing like the one I suggested above for ported commands. It would make ported commands operate more like AmigaDOS commands without excessive changes to the program source. Users expect some reasonable response to entering "?" on a command line instead of the unpredictable results they currently get with a lot of commands that have been added to OS4.

Re: Bug in Multiview Search requester

Posted: Tue Sep 22, 2015 1:58 am
by ggw
xenic wrote:[snip] Users expect some reasonable response to entering "?" on a command line instead of the unpredictable results they currently get with a lot of commands that have been added to OS4.
Because of my exposure to Amigas since 1985, I have hundreds of scripts for our company's general purpose interpretive language where I do just that. If the first space separated item on the command line invocation of the script is "?", then the console receives the "Purpose, Example, Syntax, Required, and Description".

I, too, have been disappointed in seemingly "system" commands which are ports to be lacking in "?" support.

Re: Bug in Multiview Search requester

Posted: Sun Aug 27, 2017 9:40 am
by Raziel
Am i right in my assumption that this bug has not been fixed in text.datatype 53.10 which was released a few days after this thread started?

This bug is system wide and affects Multiview, Multiviewer, NotePad, MultiEdit and everything else using a search/find window.

Has it been fixed in the meantime and could we have a quick fix, please? This is a real PITA when one needs to search/edit big documents.