Question for WebControlWrapper.LoadLibraries

Hi all,

on LoadLibraries method, you need a Paramarray URLs as String (for example : “","”, …)

How you can load a javascript external library file from the xojo web server , using the LoadLibraries method ? Somewhere, I read to use the webfile. Can someone to provide more info?

I had tried to send a Constants string (passing the js code), but I got an error.


You certainly could use WebFiles. If they’re going to be the same for each of instance of your control, use a shared property and set the Session property to Nil so it’ll be available to all Sessions. Just make sure you only initialize it once.

Thanks Greg,

Understood, but what I will pass as a parameter to LoadLibraries method ? It is needing an URL string.

For example …this is not loading the library “editor-min.js”

Dim f As FolderItem = GetFolderItem(“editor-min.js”)
dim wf as WebFile
If f <> Nil And f.Exists Then
wf = WebFile.Open(f) // MyFile is a property on the App object
LoadLibraries(“setTimeout(RSCustom.yui.RTE.” + Me.ControlID + “_libraryLoaded(),10);”, wf.Filename)
End If

Any help please ?



Thanks, it is working