Bug in Multiview Search requester

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Bug in Multiview Search requester

Post 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*.
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Bug in Multiview Search requester

Post 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
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Bug in Multiview Search requester

Post 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?
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Bug in Multiview Search requester

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Bug in Multiview Search requester

Post 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.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Bug in Multiview Search requester

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Bug in Multiview Search requester

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Bug in Multiview Search requester

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE
ggw
Posts: 106
Joined: Wed May 02, 2012 4:19 am
Location: Austin, TX
Contact:

Re: Bug in Multiview Search requester

Post 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.
George Wyche
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Bug in Multiview Search requester

Post 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.
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Post Reply