Search DominoPower's 11,320 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
THIS WEEK'S POWERTIP
A quick way to turn debugging on and off using the ACL
By Mick Moignard

Many years ago, I learned a life tip that has stood me well over the years. It's to be ready and willing to learn from everyone you meet and everything they say. There are always opportunities to learn something new, if only your mind is open and ready when the opportunity arises.

And that's not just in your work, but also in your family life, hobbies, whatever, and at any time.

All it takes is to listen to people just a little more carefully, and you will come across real gems. Maybe not very often, but they do happen, and in unlikely places and from unlikely sources. You get them from friends, work colleagues, your kids, other people's kids. And often from people who you might not expect to get such ideas from.

What prompted writing this was doing an interview recently, for a Domino developer for the project I'm currently working on. Normally, at an interview, you don't expect to pick up new knowledge yourself. After all, you are selling a job to the interviewee and he's selling himself to you. We were talking about debugging techniques, and he suggested something I'd not thought of. I filed it away mentally as a useful idea, reminding myself that if I'm not mentally ready to learn in any situation, I'd have missed it.

And here's the Notes tip that came from that idea. When working on complex code, it's often useful to be able to switch on or off some sort of debugging output.

The original tip was to use @UserRoles output to determine whether to @statusbar or @prompt debugging info during a piece of formula code just by whether you are in a role called, say [Debuggers]. Then, all you need to do to turn it on is to add the role to the ACL (Access Control List), and add yourself into the role.

Quite a neat idea, because you can turn it on and off without changing the code. You can also extend this idea to LotusScript and Java. All you need to do to do this is to Get the NotesACL for the database, get the NotesACLEntry for the NotesSession.EffectiveUserName -- which is the person or server running the code -- and see if the NotesACLEntry.Roles contains the Role called, again, say [Debuggers].

If so, then do whatever you do to display or log debugging output.

Remember, keep an open mind. It might just save you some coding time.

Mick Moignard has been working and traveling with Lotus Notes since Release 2.0 in 1991. Mick is a DominoPower Senior Technical Editor and a Principal CLP with Unipart Expert Practices, a Lotus Advanced Partner in the UK. If you want to discuss anything to do with this article, or indeed anything else to do with Notes and Domino, contact Mick at Mick_Moignard@unipart.co.uk. Unipart Expert Practices will also happily discuss any opportunities you may have with any Notes and Domino application development or infrastructure projects you need help with. Unipart Expert Practices can be found at http://www.unipartep.com.


Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
Enabling DAOS on a database - new recommendation
Need your opinion on some new policy settings for Mail
Sometimes IBM Lotus Domino HTTP RPC Agents aren't the answer...
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Teamstudio announces the 2010 spotlight awards winners!
We had some extraordinary submissions for the 3rd annual Teamstudio Spotlight Awards, and choosing the winners was no easy task for our judges! Click here to find out who won, and to learn more about these remarkable applications and the genius developers behind them!

Tap here for more information.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login