LibreCalc GlobalScope.BasicLibraries.loadLibrary failing

I have installed the XRayTools library and can see it in the My Macros list
If I look at the element names in GlobalScope.BasicLibraries it is there.
But GlobalScope.BasicLibraries.loadLibrary(“XRayTool”) fails with NoSuchElementException
The erally annoying thing is it used to work - it just stopped working for no apparent reason.
A complete wipe and re-install of LibreOffice and XRayTool made no difference.

This is LiberOffice version running under Manjaro Linux

It works for me on Windows:

Sub LoadXray

	If (Not GlobalScope.BasicLibraries.isLibraryLoaded("XrayTool")) Then
	End If
end sub

Check the Capital letters. They matter on Linux.

Doh! I had XRayTool not XrayTool. I assumed as the rest of Basic was not case sensitive loading libraries would not be either. Who’d have thought? Many thanks for your hint.

Just a small explanation.

Basic is case-insensitive, yes. But loadLibrary is not Basic; it’s an UNO IDL API method, and case sensitivity of its argument strings depends on that API, not on calling language.

It’s similar to the external functions declared from DLLs, where you wouldn’t expect their case (in)sensitivity to match Basic’s. The only difference is that the UNO functions get “declared” automatically, without explicit user action.

Even for Basic, case-insensitivity of the language does not mean that its functions don’t care about the case of the string arguments: the simple comparison like if "a" = "A" then msgbox "Same" will show case sensitivity :wink: