Page 1 of 3
Research Planner Technical Nuts & Bolts
Posted: 19 Nov 2018 14:18
by tatewise
Another approach to planning and tracking research (16402) is interesting but I have some technical issues.
Since it is all about managing
Tasks might
Task Planner or even
Task Manager be a better overall name?
That would make it more generically applicable to any
Tasks and not just
Research.
Typos in how_to:research_planner#status_and_priority|> Status and Priority:
1st paragraph ends with an unmatched parenthesis
).
Last paragraph
Source and/or Priority should say
Status and/or Priority.
Throughout, instead of
Fact tab, it should refer to
Facts tab.
All the links to
#Customisation are broken as the section headline is now
Customising the Approach.
(That is a snag of those forms of hyperlink ~ they must keep in step with changes to section headlines.
Whereas hyperlinks to pages automatically adapt to new page headlines as long as the underlying page name is retained.)
I found the single page of advice and the long left-hand Table of Contents awkward to navigate back and forth.
Does it need sub-pages such as
Research Concepts,
Using the Tools,
Installation & Download,
Customising the Approach?
I have not had time to experiment with any of the tools yet.
Re: Research Planner Tehnical Nuts & Bolts
Posted: 19 Nov 2018 15:13
by ColeValleyGirl
Mike, thanks.
Typos and links (I hope) all fixed.
Re name, I'm pretty focussed on planning Research (I wrote a whole app for it -- GenQuiry). Not sure Task Manager is right as it doesn't manage Tasks; Task Planner might be OK until we get to
More Complex Planning ... I shall think.
I wish it was possible to keep the Table of Contents in line with the main content, so that it was always in view -- I agree, it's a large chunk of text (cut and pasted from a more structured Help File). Sub-pages would be easier but of course it may not be of the least interest to anyone anyway.
Re: Research Planner Tehnical Nuts & Bolts
Posted: 19 Nov 2018 18:21
by tatewise
That is why I prefer my Plugin Help & Advice structured pages integrated with the FHUG [kb]|[/kb].
They are the one stop shop either for FHUG users, or from the Plugin itself.
Some of my Plugins have a separate IUP window, but others simply invoke the FHUG [kb]|[/kb] URL.
I am sure you are familiar with the former, and Clean Living Persons is an example of the latter with the URL in the Plugin Store page and via the Plugin Help & Advice button.
Re: Another approach to planning and tracking research
Posted: 19 Nov 2018 19:05
by ColeValleyGirl
As you know I prefer a help file structure -- ideally delivered as html but the knowledge base can't host that. Heyho...
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 08:07
by Jane
Personally I like the single page view as it makes it easier to get a good overview. The helpfile works well with the plugin and has the advantage that it works "offline", so perhaps have the guide in the KB as a single page and use the helpfile with the plugin.
I like the design of the Plugin nice and simple and clean to look at.
I'll look at locking the TOC but I suspect it will only be practical for the "desktop" view.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 08:34
by ColeValleyGirl
Thanks, Jane. Re ToC, don't put too much effort into it -- as you say, once people have decided to use the plugin, the Help file will get the most use.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 09:32
by Valkrider
Helen
I tried to install the plugin. On first run it wanted to install and additional module, I OK'd that and then get this popup error message.

- error-task.JPG (18.91 KiB) Viewed 9580 times
If I try and re-run the plugin this error pops up immediately.
Any thoughts?
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 10:26
by ColeValleyGirl
Colin,
It looks to me as if:
- either the required module (pl) isn't being downloaded
- or the Help file isn't being downloaded
Can you check ProgramData > CalicoPie > FamilyHistorian > Plugins and let me know if there's a directory in there called pl please? That will help me know which it is.
I'm assuming you have Internet connectivity?
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 10:31
by Valkrider
Internet fine.
Yes I do have the pl directory with 38 files in it.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 10:34
by ColeValleyGirl
OK, the it's the help file. Can you try opeing this url in a browser (should download the help file):
https://www.fhug.org.uk/wiki/lib/exe/fe ... lanner.chm
You don't have to save it -- I just want to know if you can access it.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 10:39
by Valkrider
Yes my browser can see it and offers to download it.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 10:45
by ColeValleyGirl
OK, let me think...
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 11:43
by tatewise
That
COM exception can arise for all manner of Internet difficulties, including the FHUG site being down or slow.
So my Plugins trap that sort or error using
pcall( ) as used in plugins:code_snippets:check_version_in_store|> Check Version In Store (code snippet).
Code: Select all
local function httpRequest(strRequest) -- Luacom http request protected by pcall() below
local http = luacom.CreateObject("winhttp.winhttprequest.5.1")
http:Open("GET",strRequest,false)
http:Send()
return http.Responsebody
end -- local function httpRequest
local strRequest ="http://www.family-historian.co.uk/........"
local isOK, strReturn = pcall(httpRequest,strRequest)
if not isOK then -- Problem with Internet access
fhMessageBox(strReturn.."\n The Internet appears to be inaccessible. ")
return nil
end
Then depending how that is organised it is possible to identify exactly which download is failing.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 11:52
by ColeValleyGirl
Thanks, Mike, but trapping the error is the easy bit -- the plugin will still fail (with an error message that says, effectively "Duh -- can't download a file so I'm going to exit") if the file(s) it needs can't be downloaded. I need to rework some logic...
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 11:55
by Valkrider
Maybe as a work around if the help file downloads from the url just tell users where to copy it to?
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 11:56
by ColeValleyGirl
Colin, there's a config file to create as well. Let me look at the logic....
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 12:52
by tatewise
Helen, I found this type of Internet connection problem very difficult to resolve satisfactorily.
The snag is it can be transient and can depend on the domain involved.
Sometimes I get the problem with the FHUG website or Family Historian website even though the Internet connection is good.
So testing the Plugin by perhaps simply unplugging the Internet does not necessarily proved the script is correct.
What trapping with pcall() does allow is a meaningful message to the user and a repeat attempt after a delay, rather than crashing with the generic COM Exception error.
It can also identify exactly which URL domain & file caused the problem, which may not help the user, but gives you useful feedback.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 12:56
by ColeValleyGirl
Mike, I shall try again: the work I need to do is on the startup logic so that it fails safe. Trapping the error is the least of my worries.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 13:37
by tatewise
I noticed one minor startup glitch.
Running the Plugin twice without closing and reopening FH to install the Fact Set resulted in a second .fhf file being downloaded with a similar name suffixed with (2). So presumably the Plugin is only checking the Task fact exists rather than the .fhf file exists.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 13:58
by ColeValleyGirl
Yes, it's checking that the Task fact exists -- there's no way of testing for the .fhf file other than ferreting around in ProgramData\Calico Pie\Family Historian\Fact Types\Custom (and so relying on undocumented data structures...) 42 years of programming tells me what a good idea that is not.
Should I remove the option for the user to download the .fhf file manually? I don't think so.
I'll have a look at the logic while I'm working on the other problem, as I seemingly can't rely on the user following the instruction that they ought to close FH before running the plugin again.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 16:38
by ColeValleyGirl
Colin, Mke -- try the version now available for download from
the Knowledge Base.
Colin, it fails safe(r) if the downloads fail -- at least you have the option of doing all of them manually.
Mike, it tests for the existence of the Research Planner Fact Set in the Program Data directory structure (much as I hate to make assumptions about the structure of that Directory) , but it will still have problems if somebody is using a different Fact Set and hasn't completed the installation. (It will not be a problem if and when Calico Pie fixes the problem I reported about new fact sets not being recognised without a restart unless they're Imported).
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 16:46
by tatewise
I use fhGetContextInfo("CI_APP_DATA_FOLDER") and then drill down to the Family Historian\Fact Types\Custom folder in several Plugins. As far as I can recall none of the existing folders have ever changed since the inception of FH, and it would be difficult to do so, and maintain backward compatibility with earlier versions, and with my Backup and Restore FH Settings Plugin. So I think that folder hierarchy will never change.
Anyway your Plugin downloads files to Family Historian\Plugin Data\Research Planner.dat, so you could check there for the Research Planner.fhf file.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 16:48
by ColeValleyGirl
MIke, yes I could but that wouldn't cater for the users that download manually, unfortunately.
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 17:19
by tatewise
Well it is working better now, and the Plugin can't cater for everything users might do.
BTW: Line 926 has a typo for /n/n that should be \n\n
Re: Another approach to planning and tracking research
Posted: 20 Nov 2018 17:45
by ColeValleyGirl
Thanks, Mike.