« Teaser | Main| Part 1 - The Revolution will not be televised... »

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

1 - Kind of reminds me of an application that's, oh, what's the word? Maybe a conglomerate or mixed application. But that's not quite the word... Hmmm, what am I thinking of? Emoticon

2 - Wow! I hope though, that it does not get classified as a "bug" with potential security implications and then "fixed", for madness it is!

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.

3 - @2 - Slawek, you would think so about the PostOpen, but it's not entirely correct. I'll be doing a full write up and sample demo today, but you can definitely remote bind to the PostOpen on a view and exchange objects. I couldn't get the document to work in anything prior to a QueryRecalc last night, but that might have something to do with the celebratory consumption of Macallan, rather than the actual coding limitations.

4 - @4 - Nathan, I did think so, but I am/will be happy to revise my thinking especially after seeing the new possibilities on this very blog lately.

5 - Umm, so you never did this before?

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

11 Aug 

Hire Me 

Lotus-911-Logo.jpg

Search 

Disclaimer 

Welcome to Escape Velocity!

Opinions expressed here by Nathan T. Freeman are not necessarily those of his employer. However, there's a decent chance they are, so check with them if you really want to know.

But really... do you need that kind of validation? Are the opinions expressed here in doubt?

MiscLinks