Page 2 of 2
Re: Ancestral Sources Data Entry
Posted: 11 Jan 2014 16:56
by tatewise
Thanks Nick, I will look out for that.
Re: Ancestral Sources Data Entry
Posted: 13 Feb 2014 10:43
by johnmorrisoniom
Hi Mike,
I a using ver 3.3 of the plugin with no errors until last night.
I very occasionally have to work without an internet connection. When the plugin runs in this condition, an error message pops up that "internet connection not available".
I know the plugin needs to be aware of no connection, but it gets quite annoying to have to click OK to clear it.
I am at present working on old entries converting from Method 2 to method 1, so I have all the information to hand without a data connection.
Sorry to be picky, but the plugin in general does a great job.
Re: Ancestral Sources Data Entry
Posted: 13 Feb 2014 11:18
by tatewise
I think the error message is actually
The Internet appears to be inaccessible..
This is associated with its check for the latest Plugin version in the Plugin Store.
I believe that all other versions of any Plugin using that check simply crash with a fatal error.
For the time being, to inhibit the error message, you could edit the Plugin at about line
1550.
Code: Select all
fhMessageBox(strReturn.."\n The Internet appears to be inaccessible. ")
Simply comment out the line by inserting
-- (double hyphen) on the left-hand margin:
Code: Select all
-- fhMessageBox(strReturn.."\n The Internet appears to be inaccessible. ")
I am not sure of the best solution.
Perhaps the Plugin could save a date-time stamped log of the error, and ignore the problem until the next day.
Re: Ancestral Sources Data Entry
Posted: 13 Feb 2014 12:09
by johnmorrisoniom
Thanks Mike,
I did not have the exact error to hand as I was using my laptop at the time, took a screen shot, but forgot to copy it to my USB stick.
I have commented out the line, but won't be able to check as I usually have do have an internet connection.
An "Ignore for 24 hrs" option does sound good though.
Re: Ancestral Sources Data Entry
Posted: 14 Feb 2014 11:18
by tatewise
I have a better Plugin solution if you would like to try it.
With this the Plugin should only report the Internet inaccessible once initially.
If still inaccessible when run again within 10 hours, then it inhibits the report, and restarts the 10 hour time-out.
If however the Plugin detects the Internet is OK, then the 10 hour time-out is cancelled.
Let me know if
10 hours is a good time-out, or should be shorter or longer.
In due course, as they get updated, running any of my Plugins will honour the same time-out, such that once any one of them has reported the error, they will all inhibit the report, and restart the time-out.
Please edit the Plugin at about line
1540 and replace the entire
function VersionInStore(anyPlugin) with:
Code: Select all
function VersionInStore(anyPlugin) -- Obtain the Version in Plugin Store by Name or Id
local strType = "name="
if type(anyPlugin) == "number"
or tonumber(anyPlugin) then strType = "id=" end
if anyPlugin then
local strFile = MachinePath.."\\VersionInStoreInternetError.dat"
local strRequest ="http://www.family-historian.co.uk/lnk/checkpluginversion.php?"..strType..anyPlugin
local isOK, strReturn = pcall(httpRequest,strRequest)
if not isOK then -- Problem with Internet access
local intTime = os.time() - 36000 -- Time in seconds 10 hours ago
local tblAttr, strError = lfs.attributes(strFile) -- Obtain file attributes
if not tblAttr or tblAttr.modification < intTime then -- File does not exist or was modified long ago
fhMessageBox(strReturn.."\n The Internet appears to be inaccessible. ")
end
general.SaveStringToFile(strFile,strFile) -- Update file modified time
return "0"
end
general.DeleteFile(strFile) -- Delete file if Internet is OK
local strVersion = "0"
if strReturn ~= nil then
strVersion = strReturn:match("([%d%.]*),%d*") -- Version digits & dots then comma and Id digits
end
return strVersion or "0"
else
return "0"
end
end -- function VersionInStore
Re: Ancestral Sources Data Entry
Posted: 14 Feb 2014 18:09
by johnmorrisoniom
I have amended the plugin, and it is working OK with internet available. It may be a couple of days before I can check the no connection scenario.
Re: Ancestral Sources Data Entry
Posted: 20 Feb 2014 17:52
by tatewise
There is a formal
V3.3 of this Plugin available from the
Plugin Store.
It incorporates the techniques explored above, plus updated
Hep and Advice pages.
[EDIT]
Sorry, I have misled you, and that
Plugin Store version 3.3 does not have the new techniques.
But the version 3.4 in OneDrive/SkyDrive
Ancestral Sources Data Entry does.
Re: Ancestral Sources Data Entry
Posted: 06 Mar 2014 18:59
by tatewise
A few postings ago
Nick Walker said:
The next version of Ancestral Sources will record the application path under a string value App Path under the 00 key.
Further on this subject, I have discovered that if
Ancestral Sources is uninstalled it leaves all its
HKCU\Software\Ancestral Sources\ keys in the Registry. So when the Plugin checks the
\00\Version value it thinks that
Version of
AS is still installed.
It seems that the
HKLM keys are removed when
AS is uninstalled, but they require different awkward access techniques depending on whether
32-bit AS or
64-bit AS is/was installed.
Is it feasible for a value such as the
App Path or
Version under the
00 key to be cleared when
AS is uninstalled, so that in future the Plugin can easily check if
AS is installed?
Re: Ancestral Sources Data Entry
Posted: 06 Mar 2014 22:51
by NickWalker
Can you take a note of the App Path (registry entry in imminent new version) and then check if that file exists?
App Path is the full path to the executable including \Ancestral Sources.exe at the end.
Re: Ancestral Sources Data Entry
Posted: 07 Mar 2014 00:04
by tatewise
Yes, that would work OK.
Re: Ancestral Sources Data Entry
Posted: 24 Mar 2014 09:03
by johnmorrisoniom
Hi Mike,
Will there be a WIP vers 3.9 for AS Beta testers
Re: Ancestral Sources Data Entry
Posted: 24 Mar 2014 13:27
by tatewise
Yes, it is almost ready, just needs a bit more testing in various OS.
Re: Ancestral Sources Data Entry
Posted: 25 Mar 2014 19:23
by tatewise
There is a
Plugin beta
V3.9 from my
OneDrive at
Ancestral Sources Data Entry.
If you have not yet installed
AS Beta V3.9 then check this Plugin tells you to update.
However, the
Download Now button still links to
KB AS V3.2.3 for now.
Until
Nick fixes it, the newly activated
V3.9 Death and
Burial buttons do NOT actually run AS - you get a command line parameter error message - but everything else should work as before.
Re: Ancestral Sources Data Entry
Posted: 17 Apr 2014 14:45
by tatewise
The latest V4.0 of this Plugin has been submitted to the Plugin Store in support of the new AS V4.0.
While being approved for download by Calico Pie, the Plugin can be loaded from my OneDrive via the link in previous posting.
Re: Ancestral Sources Data Entry
Posted: 26 Apr 2014 09:49
by johnmorrisoniom
Hi Mike,
Now that As is on v4.0.1, your plugin is incorrectly reporting that v4.0.0 is newer.
Re: Ancestral Sources Data Entry
Posted: 26 Apr 2014 10:51
by tatewise
Thanks John, I have been busy for a few days, just when Nick re-issued AS, but am on the case now.
I hope to update the Plugin so that it automatically notices when there is a new version of AS and adapts itself without needing a new Plugin Store version.
Nevertheless, the existing version should still work OK if you ignore the message.
Re: Ancestral Sources Data Entry
Posted: 26 Apr 2014 11:36
by NickWalker
Hi Mike
Sorry I didn't realise it would cause an issue with your plugin. I'll try and remember to let you know in advance in future. Or could you get your plugin to only warn if the user's AS version is a lower number than the one your plugin knows about?
Cheers
Nick
Re: Ancestral Sources Data Entry
Posted: 26 Apr 2014 13:03
by tatewise
Try the Plugin
V4.1 from my
OneDrive at
Ancestral Sources Data Entry.
This automatically determines the latest
AS Version from the
FHUG Downloads page header:
fhugdownloads:contents:ancestral_sources|> Utility ~ Ancestral Sources v4.0.1
So, Nick, if you update that page then the Plugin will follow suit.
Re: Ancestral Sources Data Entry
Posted: 27 Apr 2014 11:01
by Jane
Nick, a quick thought, what we could do is add a file to the download folder, to contain a text file with just the latest version in, Mike could grab that file to check for the latest version, and we could change the linking in the Knowledge base to download the file(s) which match that version.
Re: Ancestral Sources Data Entry
Posted: 27 Apr 2014 12:07
by tatewise
I don't think that complication is needed.
My Plugin already refers to the Knowledge Base > Utility ~ Ancestral Sources v?.?.? download page via its Download Now button using name-space fhugdownloads:contents:ancestral_sources that has no version number.
So it is better that the Plugin only tells users about a new AS version, and presents the Download Now button, when that KB page changes its header.
That KB download page always needs its Description to be updated to explain the features of each new AS version, as well as changing the version number in the header.
Re: Ancestral Sources Data Entry
Posted: 27 Apr 2014 12:24
by NickWalker
Jane wrote:Nick, a quick thought, what we could do is add a file to the download folder, to contain a text file with just the latest version in, Mike could grab that file to check for the latest version, and we could change the linking in the Knowledge base to download the file(s) which match that version.
There already is an xml file on the ancestral sources website that AS uses when a user checks for a new version so that could be used if necessary.
Nick