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

For existing requests please see The Wish List
Post Reply
avatar
Gowermick
Megastar
Posts: 725
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

Wishlist: Provide a “Program Ready” event in API

Post by Gowermick » 17 Apr 2019 07:14

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
Mike Loney

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.1.4.1(x64), Firefox 67.0.1(64Bit) & Thunderbird 60.7.0
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
ColeValleyGirl
Megastar
Posts: 1296
Joined: 28 Dec 2005 22:02
Family Historian: V6.2
Location: Cirencester, Gloucestershire
Contact:

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

Post by ColeValleyGirl » 17 Apr 2019 08:12

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.

avatar
Gowermick
Megastar
Posts: 725
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

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

Post by Gowermick » 17 Apr 2019 08:38

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
Mike Loney

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.1.4.1(x64), Firefox 67.0.1(64Bit) & Thunderbird 60.7.0
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
ColeValleyGirl
Megastar
Posts: 1296
Joined: 28 Dec 2005 22:02
Family Historian: V6.2
Location: Cirencester, Gloucestershire
Contact:

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

Post by ColeValleyGirl » 17 Apr 2019 08:54

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

User avatar
tatewise
Megastar
Posts: 16459
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

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

Post by tatewise » 17 Apr 2019 09:44

On a point of fact, how is it that "opening the Query window, automatically opens the Property Box window" ?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 1296
Joined: 28 Dec 2005 22:02
Family Historian: V6.2
Location: Cirencester, Gloucestershire
Contact:

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

Post by ColeValleyGirl » 17 Apr 2019 09:55

I wondered that as well.

avatar
Gowermick
Megastar
Posts: 725
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

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

Post by Gowermick » 17 Apr 2019 11:07

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 1194 times
Don't ask me how I found out about this, but now, whenever I open Query Window, the Property box opens!!
Mike Loney

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.1.4.1(x64), Firefox 67.0.1(64Bit) & Thunderbird 60.7.0
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
ColeValleyGirl
Megastar
Posts: 1296
Joined: 28 Dec 2005 22:02
Family Historian: V6.2
Location: Cirencester, Gloucestershire
Contact:

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

Post by ColeValleyGirl » 17 Apr 2019 11:11

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.

User avatar
tatewise
Megastar
Posts: 16459
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

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

Post by tatewise » 17 Apr 2019 11:54

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Ron Melby
Superstar
Posts: 424
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

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

Post by Ron Melby » 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.
FH V.6.2.7 Win 7 64 bit

Post Reply