PE Programming for dummies

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: PE Programming for dummies

Post by tofro »

pjw wrote: Sun Jan 07, 2024 1:21 pm
FI2 has all the information you have configured for each extension, and
very kindly lets you easily access it. All you would have to do it to parse
and interpret all that information and then carry out the required action
yourself.
I agree it shouldn't be a major problem for FI2 to execute a specific action on a file if asked for it. I'd consider that the smallest problem.

I rather see the problem on behalf of the calling program that would somehow need to identify the specific action it wants to execute. The only way to identify (and "understand" what it is) an action is through the action name - and that's fully user configurable. So, your program must either enforce specific action names on the installation or somehow apply heuristics on what the proper action name to select could possibly be. Way too many dependencies for my taste.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
pjw
QL Wafer Drive
Posts: 1316
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: PE Programming for dummies

Post by pjw »

tofro wrote: Sun Jan 07, 2024 1:40 pm
pjw wrote: Sun Jan 07, 2024 1:21 pm
FI2 has all the information you have configured for each extension, and
very kindly lets you easily access it. All you would have to do it to parse
and interpret all that information and then carry out the required action
yourself.
I agree it shouldn't be a major problem for FI2 to execute a specific action on a file if asked for it. I'd consider that the smallest problem.

I rather see the problem on behalf of the calling program that would somehow need to identify the specific action it wants to execute. The only way to identify (and "understand" what it is) an action is through the action name - and that's fully user configurable. So, your program must either enforce specific action names on the installation or somehow apply heuristics on what the proper action name to select could possibly be. Way too many dependencies for my taste.
There are a few cases where you will need FI2 to execute a specific action:

1. You dont use PE or Qmenu but still want to make some kind of menu to
view and execute the various FI2 options. Without PE/Qmenu FI2 will only
execute the first option.

2. You want to make your own PI/Wman menu that aesthitically matches the
rest of your program and that doesnt hog the whole effing screen.

3. As above and you wish to add some other program-specific item(s) to the
menu to avoid having to call up multiple menus were one would suffice.

4. Some other advanced option where your program can be configured to
selectively understand the textual clues, for example, of your FI2
configuration which, after all, is under your control.

All of these cases can only be realised with difficulty as FI2 stands, as
it only allows you to execute the first option with ease despite its innate
ability to execute any option - provided you use its own menu.

In other words the call:

Error_code=FI2_FCALL([#Channel,]File_name[,action_number[,Key]])

is missing!


Per
dont be happy. worry
- ?
Post Reply