* Ancestral Sources Data Entry

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 11 Jan 2014 16:56

Thanks Nick, I will look out for that.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Re: Ancestral Sources Data Entry

Post by johnmorrisoniom » 13 Feb 2014 10:43

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.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 13 Feb 2014 11:18

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

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Re: Ancestral Sources Data Entry

Post by johnmorrisoniom » 13 Feb 2014 12:09

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.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 14 Feb 2014 11:18

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

Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Re: Ancestral Sources Data Entry

Post by johnmorrisoniom » 14 Feb 2014 18:09

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.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 20 Feb 2014 17:52

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

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 06 Mar 2014 18:59

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

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Ancestral Sources Data Entry

Post by NickWalker » 06 Mar 2014 22:51

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.
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 07 Mar 2014 00:04

Yes, that would work OK.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Re: Ancestral Sources Data Entry

Post by johnmorrisoniom » 24 Mar 2014 09:03

Hi Mike,
Will there be a WIP vers 3.9 for AS Beta testers

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 24 Mar 2014 13:27

Yes, it is almost ready, just needs a bit more testing in various OS.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 25 Mar 2014 19:23

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

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 17 Apr 2014 14:45

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

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Re: Ancestral Sources Data Entry

Post by johnmorrisoniom » 26 Apr 2014 09:49

Hi Mike,
Now that As is on v4.0.1, your plugin is incorrectly reporting that v4.0.0 is newer.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 26 Apr 2014 10:51

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

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Ancestral Sources Data Entry

Post by NickWalker » 26 Apr 2014 11:36

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
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 26 Apr 2014 13:03

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

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Ancestral Sources Data Entry

Post by Jane » 27 Apr 2014 11:01

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.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Ancestral Sources Data Entry

Post by tatewise » 27 Apr 2014 12:07

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

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Ancestral Sources Data Entry

Post by NickWalker » 27 Apr 2014 12:24

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
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

Post Reply