Not So Teaser
Okay, some people have been confused about the relevance of my teaser...
Here's an NSF that creates an object that's instantiated across frame boundaries.
"Huh," you ask?
I have a view. That view includes a library with an object that has a NotesDatabase as a property. In my view, I set that NotesDatabase object to be BOOKMARK.NSF.
Then I create a document from a view action. When I create that document, I refresh it. Bound to the refresh event is a trick where the NotesDatabase object I have in the view is made available to the DOCUMENT.
Then, in the DOCUMENT event, I point that NotesDatabase object to HEADLINE.NSF
Then, in the view, I look at the NotesDatabase object again, and low-and-behold, it points to HEADLINE.NSF
Get it? It's an object handle that is PERSISTENT ACROSS NOTES CONTEXTS. It's a real singleton. It's cross-frame events and object handling in Lotuscript.
I'm still going to put together a useful demo over the weekend, but the concept is key here. It's a technique to pass any objects back and forth between UI elements, without writing to a document or anything. If you get a NotesDocumentCollection in a view, you can SEE AND ALTER THAT COLLECTION in another entire tab. Or frame.
Madness, I tell you... sheer madness!!!




Comments
Posted by Chris Whisonant At 12:51:19 PM On 07/21/2007 | - Website - |
It may be an idea to remove the events once the set up is complete. I know this is just a preliminary prototype but I am just thinking out loud.
And this sounds a bit obvious, but the form (uidoc) is not available until after the form has been opened, as in the PostOpen event has already fired. Hence hooking onto that event will not have any effect.
Posted by Slawek Rogulski At 12:57:13 AM On 07/22/2007 | - Website - |
Posted by Nathan T. Freeman At 07:06:14 AM On 07/22/2007 | - Website - |
Posted by Slawek Rogulski At 10:25:45 AM On 07/22/2007 | - Website - |
Posted by Dovid At 03:24:04 PM On 07/30/2007 | - Website - |