Solved

Debug My Debug Code.

Posted on 2004-04-27
4
207 Views
Last Modified: 2013-12-18
Hello all,
This one should be simple enough, I'm just not seeing it.

I'm trying to solve the debug issue. See if you have the same issue. If I'm in the notes client and I switch to debug mode, notes says it's in debug mode but really isn't yet. But, if you change views and then go back, it will start the debugger. I am trying to make a generic "Switch To Debug" that I can throw in to any DB. Here's what I've got so far.

In LS:
Sub Initialize
Dim ws As New NotesUIWorkspace
Dim uidb As NotesUIDatabase
Dim uiview As NotesUIView
Dim uidoc As NotesUIDocument

Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim views As Variant
Dim NotesViewArray() As NotesView
Dim agt As NotesAgent
'Dim i As Integer

Set uidb = ws.CurrentDatabase
Set uiview = ws.CurrentView
Set uidoc =ws.CurrentDocument 'prompt for close and switch views then reopen

Set db = s.CurrentDatabase
views = db.Views
'i = Ubound(db.Views)
Forall v In views
If v.name <> uiview.View.Name Then
currentname = uiview.View.Name
selectname = v.name
Exit Forall
Else
selectname=uiview.View.Name
currentname = selectname
End If
End Forall

If currentname <> selectname Then
uidb.OpenView(Cstr(selectname))
uidb.OpenView(Cstr(currentname))
End If
End Sub

**But I don't know how to switch to debug mode from LS

and in formula:
@Command([DebugLotusScript]);
viewTitle:=@ViewTitle;
@Command([SwitchView]);
@Command([switchview];viewTitle);
@all;
**But I can't find the view names, namely one to switch to. @viewtitle will get the current for me, but I need to find an alternative view if one exists and use it in the first switchview. It works now but I have to manually select a view via a goto dialog when the first switchview is executed.

Okay, There's my predicament. Thanks greatly for the help. This is just a fun side tool that I've wanted. If anyone has an alternative suggestion I'm up for that too.
0
Comment
Question by:yoshi78
  • 2
  • 2
4 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10928663
There is some timing issue here

try this instead

@Command([DebugLotusScript]);
viewTitle:=@ViewTitle;
@PostedCommand([SwitchView]);
@PostedCommand([switchview];viewTitle);


~Hemanth
0
 
LVL 1

Author Comment

by:yoshi78
ID: 10928718
This still asks me which view to switch to(@PostedCommand([SwitchView]);).  I'm looking, if it's in formuala language, for a way to grab the view names so I don't have to ask which view to switch to.

Thanks for the input Heman.
Yoshi
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 125 total points
ID: 10929371

Then remove that line and chck with this

@Command([DebugLotusScript]);
viewTitle:=@ViewTitle;
@PostedCommand([switchview];viewTitle);
0
 
LVL 1

Author Comment

by:yoshi78
ID: 10930084
I was about to say that this wouldn't do anything, but then I tried it and apparently it doesn't care which view - even if it's the current view - it switches to, it works.

Very Nice Job.
Thanks for sorting my little problem out.
Yoshi
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus Notes and VMWare require a double-click 22 1,421
Notes 8.5.2 application on web 4 218
See used databases in Domino 8 104
LotusScript: Merge Data to Word File 22 102
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question