Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Tue 15 Feb 2005, 10:41 PM
Inline JPEG imageIt may be just coincidence, but it feels like some days every person who calls or writes wants to hear about the same piece of Midas functionality.  Today was something unexpected for me, since it is usually HTML generation or MIME e-mails or dynamic tables.  Today, everybody wanted to know about the amazing AppendHotspot method.




Well, to be fair, nobody asked about the AppendHotspot method.  Nope, not one.  They just asked questions to which the AppendHotspot method was the answer.  


So, what is this method, and why should you care?  Part of the reason is that this is an "all purpose" method.  You can add action hotspots, buttons, computed text, text popups, file download hotspots, mosueovers, etc. etc., all with the same method.  Here is a brief sampling of the kinds or questions and answers (not just from today):

Q. Can I use create computed text on a page using Midas.
A. Sure.  Just use code such as:
Call rtitem.ConnectPageBody(db.Server, db.FilePath, pagename)
Set rtchunk = rtitem.DefineChunk("Everything")
Call rtchunk.AppendHotspot("ComputedText", |@If(@ClientType="Web"; "I'm a web browser"; "I'm a Notes client")|)

Q. Can I add a button to an e-mail message I am sending that will reply to me when the user presses it?
A. Sure.  Just use code such as:
Call rtitem.ConnectBackend(doc.Handle, "Body")
Set rtchunk = rtitem.DefineChunk("Everything")
Call rtchunk.AppendHotspot("Formula Button", |@MailSend("Joe Schmoe"; ""; ""; "I was pressed"; "Body")|, "", "Press me")

Q. Is it possible to insert a subform into a form using Midas?
A. Sure.   Just use code such as:
Call rtitem.ConnectFormBody(db.Server, db.FilePath, formname)
Set rtchunk = rtitem.DefineChunk("Inside Section 1")
Call rtchunk.AppendHotspot("Subform Formula", |@If(@ClientType="Web"; "WebSub"; "NotesSub")|)

Q. Can I add a JavaScript action hotspot inside a table cell of an existing document?
A. Sure.  Just use code such as:
Call rtitem.ConnectBackend(doc.Handle, "Body")
Set rtchunk = rtitem.DefineChunk("Table 1; Row 3; Column 2")
Call rtchunk.AppendHotspot("JavaScript Action", |alert('If I knew more JavaScript, this example would be better')|, "", "JavaScript example to press")

Q. Is it possible to add a file upload onto a form using Midas?
A. Sure.  Just use code such as:
Call rtitem.ConnectFormBody(db.Server, db.FilePath, formname)
Call rtitem.Everything.AppendHotspot("File Upload", "", "")

I could go on, but I bet you catch the drift.  Pretty slick method, eh?  Really makes you want to go look at the Midas Help and see what else you can find (or even just read up on AppendHotspot), doesn't it?

Copyright © 2005 Genii Software Ltd.