That's an oversight on our part. It's a little tricky when you think about it because you need to prevent the same session
from repeatedly loading a framework, but you do want other sessions to load it. Here's what I'd suggest:
Add a shared property LoadedLibraries as Dictionary
In the Open event:
If LoadedLibraries = Nil then LoadedLibraries = New Dictionary
Anywhere you will be sending shared code to the browser:
Dim libName as string = "YourLibraryName"
If Not LoadedLibraries.HasKey(Session.Identifier + "_" + libName) then
...Load the library here...
LoadedLibraries.Value(Session.Identifier + "_" + libName) = True
This will prevent two controls from sending the shared code to the browser. Remember this is for code that is not connected to any particular instance of your control.
Awesome! I was curious as to how to setup some sort of identifier ensuring the prevention of multiloads in a session... As an oversight...will future releases of the sdk look to see if a particular library has previously been loaded (possibly disallowing multiple calls to the same library URLs?) to prevent problems in this area? Id like to "internalize" all checks within the controls so that users utilizing the controls won't have to take sessions into consideration...basically dropping the controlset into a project and just using them like native controls...the less work the users of the controlsets have to do to use them, the better
Not sure if you've seen some of my previous collaborative works like eyeOS... But I'll be attempting to port the entire eyeOS framework (minus the implemented security protocol and ability to 'install' eyepackages (php dependent))to real studio as well...allowing users to create entire "virtual operating systems" within real studio...allowing for multiple "apps" within a single webapp... Which allows for windowed apps that appear just like desktop apps...reducing the need for a user to leave a page to access multiple apps simultaneously http://cloud.realdevspot.com
So many things to finish...days just aren't long enough
Again, and as always, thank you Greg for all your help!