Ben Langhinrichs

Photograph of Ben Langhinrichs

IBM Champion logo

E-mail address - Ben Langhinrichs







Recent posts

Wed 14 Nov 2018

Short agents



Tue 2 Oct 2018

No cookies for you



Fri 28 Sep 2018

We need more than baby steps


February, 2005
SMTWTFS
  01 02 03 04 05
06 07 08 09 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28

Search the weblog





























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
It 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 ot 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.