Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


NDS Context Unknown

Keywords:      NDS context

Question:

I'm using the n4ObjectList function to read groups in a NDS Context. Unfortunately, when the context does not exist, I get a WinBatch error and the script stops. How do I get around this?

Also, what is the context?

Answer:

You can *carefully* turn error mode off directly around the n4ObjectList function, and then test for the error with the Lasterror function. If Lasterror returns a null, then it worked, but if Lasterror is not null, then you could put up a message box and ask them to type in another context.

For example:

errormode(@off)
objects = n4ObjectList("", "Group", "", "")
errormode(@cancel)
if lasterror !="" then Message("Error", "You specified an invalid context.  Try again...")
> Also, what is the context?

In "richard.windowware", the context is "windowware".

In "richard.support.windowware", the context is "support.windowware".


Article ID:   W13627
Filename:   NDS Context Information.txt