Severin wrote: @lazi Make sure the icon is Write AND Delete enabled. some programs overwrite an icon others delete a write a new icon.
It is already writeable, deleteable... ... but I thought the prefs should be saved to env: and env-archive:
No, what you are seeing there are the attributes of the program file (FKey) itself. To see the icon's attributes, you need to go into a shell, or something like DOpus 4. It's the FKey.info file that has to be writeable and (possibly) deletable.
And although it is maybe a bit confusing, FKey is not formally a Prefs program (it doesn't live in the Prefs drawer, but in Utilities/Commodities). Had it been a "real" Prefs program, it would have had a .prefs file in ENV[ARC]:Sys/ like the others.
Actually, there's nothing stopping a program from loading its icon's tooltypes even when started from shell. DvPlayer loads the icon tooltypes when started from shell, although any shell arguments override what is set in the tooltypes for that particular setting.
Actually, there's nothing stopping a program from loading its icon's tooltypes even when started from shell.
Well that depends on how the application was written?.
A normal AmigaDOS program will read it argumenst like this
Int Main (int args, char **arg ) { For (i=<args;i++) Printf(?arg%i : %s\n ?,I Arg[i] ); }
But on wb program the argument is read from wbstartup structure, and not the normal **arg, the program most check for this, and take care, you know it is a wb program when args is 0, then arg is not a char **, but wbstartup structure.
And also if you start the program from AmigaDOS you most take care and make shore it starts from the same directory as your icon, unless you change directory to your tooltype icon in your program.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
A normal AmigaDOS program will read it argumenst like this
Int Main (int args, char **arg ) { For (i=<args;i++) Printf(?arg%i : %s\n ?,I Arg[i] ); }
A normal AmigaDOS (OS >= 2.0) program will use IDOS->ReadArgs(). This is what all the OS C: commands use for their commandline args. It takes care of the "?" option as well as providing a standard way to supply commandline arguments.
This argc, argv thing is an ANSI C construct and is provided by the C startup code and has nothing to do with the AmigaDOS. AmigaDOS just passes the entire commandline as a long string that the program can then parse as it pleases.
Quote:
And also if you start the program from AmigaDOS you most take care and make shore it starts from the same directory as your icon, unless you change directory to your tooltype icon in your program.
Actually, there's nothing stopping a program from loading its icon's tooltypes even when started from shell.
There's nothing stopping it. Except that this happens to be the way that commodities should work according to Commodore, it is stated so f.e. in the RKRM: Libraries section on commodities.library.
Also the commodities helper functions for reading tooltypes/arguments (ArgArrayInit(), ArgString(), etc.) work this way.
To be honest I really don't think this behavior makes much sense though.