Page 1 of 1

Wishlist: Provide a 'Program Ready' event in API

Posted: 17 Apr 2019 07:14
by Gowermick
Most software in Windows operate by reacting to Events, e.g. Run this routine when ‘Right Mouse Button Down’ event is triggered if cursor is on ‘OK’ Button.

It would be extremely useful If CP could introduce a Program Ready event in their API (Application Program Interface), triggered when when FH has completed its opening routine, and is ready to accept user commands. Users could then make use of the event to run plugins at startup. E.g. open ToDo list window

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 08:12
by ColeValleyGirl
Mike,

Was this intended to be in the WishList forum?

Also, I believe that what you suggest needs lot more thought...

It isn't possible to run a Plugin automatically, so in addition to the Program Ready Event that you suggest, you would need to add the ability to run a Plugin on some trigger rather than via a user action.

And Plugins can't modify the FH window set, so there's no way a plugin can open a Window (although it could display a result set as a surrogate) so you might also want to add API elements to modify the FH display.

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 08:38
by Gowermick
Helen,
From previous comments from MikeTate, I understood that proposed Wish List items had to be discussed in General forum first, before moving it to WishList forum. Sorry if I was mistaken.

As for your comment about plugins, as I've never written a plugin, I wasn't aware of what they can and can't do!

My thinking was that somehow, the Program Ready event could be utilised to perform some code to open a window, in much the same way as opening the Query window, automatically opens the Property Box window! :D

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 08:54
by ColeValleyGirl
From previous comments from Mike Tate, I understood that proposed Wish List items had to be discussed in General forum first
Well, yes, as a rule but I'll move this as there definitely isn't an existing way to do this.

I know what you're getting at but I wonder if there isn't a more general thing we could ask for (which leaves the implementation up to Calico Pie): The ability to specify a set of FH windows to open automatically at startup -- which would remove the dependency on plugins/the API? I've already suggested something similar in the discussion about simple to-do lists: viewtopic.php?f=43&t=16751&start=25#p92098

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 09:44
by tatewise
On a point of fact, how is it that "opening the Query window, automatically opens the Property Box window" ?

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 09:55
by ColeValleyGirl
I wondered that as well.

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 11:07
by Gowermick
MikeTate,
I haven't found something you didn't know, wonders will never cease :D

If you go to Preferences/Workspaces, you can set default actions of property box when various modules/workspaces are opened.
I have set all modules to Open it
Proprty Box Preferences.jpg
Proprty Box Preferences.jpg (234.55 KiB) Viewed 9322 times
Don't ask me how I found out about this, but now, whenever I open Query Window, the Property box opens!!

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 11:11
by ColeValleyGirl
That's the sort of facility I think a Wish List item could ask to enhance -- add other option to those workspace options -- e.g. including the Named List pane.

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 17 Apr 2019 11:54
by tatewise
Ah, yes, I'd forgotten about those Workspace options.
Another option could be to run a nominated Plugin that for example could signal reminders.
If enabled for the Focus Window or Records Window then that would happen at startup.

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 19 Jun 2019 03:19
by Ron Melby
in my days programming we had standard API holes:
for example

*ON STARTUP
*ON FILE OPEN
*ON FILE CLOSE
*ON FILE CHANGE
*ON EXIT

and so on .....
you would select the API 'hole' plugin your program name, they generally required standar input parms and output args, and could be run *IMMED, *DELAYED(time) *BACKGROUND, *INTER *THREAD and so on.

and from the interface hole program you created meeting the standard, you could run inside them calls to other programs and so on.

fundamentally along the same lines as triggers in SQL languages.

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 14 Dec 2022 18:21
by ColeValleyGirl
Gowermick wrote: 17 Apr 2019 08:38
My thinking was that somehow, the Program Ready event could be utilised to perform some code to open a window, in much the same way as opening the Query window, automatically opens the Property Box window! :D
As we already have requests for 'Preserve all workspace ad Window Characteristics' and 'Allow Workspace Layouts to be saved and restored' can we close this request?

Re: Wishlist: Provide a “Program Ready” event in API

Posted: 14 Dec 2022 18:23
by ColeValleyGirl
Ron Melby wrote: 19 Jun 2019 03:19 in my days programming we had standard API holes:
for example

*ON STARTUP
*ON FILE OPEN
*ON FILE CLOSE
*ON FILE CHANGE
*ON EXIT

and so on .....
you would select the API 'hole' plugin your program name, they generally required standar input parms and output args, and could be run *IMMED, *DELAYED(time) *BACKGROUND, *INTER *THREAD and so on.

and from the interface hole program you created meeting the standard, you could run inside them calls to other programs and so on.

fundamentally along the same lines as triggers in SQL languages.
Ron, this feels like a fundamentally different request addressing a different requirement. Would you raise a new Wish List Request with some detail of the problem to be addressed/benefit of the new feature?

Re: Wishlist: Provide a 'Program Ready' event in API

Posted: 14 Dec 2022 22:26
by tatewise

Re: Wishlist: Provide a 'Program Ready' event in API

Posted: 14 Dec 2022 22:58
by davidf
tatewise wrote: 14 Dec 2022 22:26 Is this related to Allow use of 'File Description' when creating and opening projects (21232)?
Allow use of 'File Description' when creating and opening projects (21232)
The "Use of File Description ..." is far more modest!

Re: Wishlist: Provide a 'Program Ready' event in API

Posted: 15 Dec 2022 10:27
by ColeValleyGirl
I don't think so...

Re: Wishlist: Provide a 'Program Ready' event in API

Posted: 03 Jun 2023 12:40
by ColeValleyGirl
Closing as the use case described is already addressed by another request.