🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #651

Netinfo Q's - case in point.

#651
From: Scott Hess
Date: Mon, 13 Apr 1992 04:46
35 lines
2276 bytes
About five minutes after posting the original article, I came across a
wonderful example of exactly the type of information I'm looking for.
I was testing my program, which includes a menu button to open a
domain, at which point the program extracts some information from the
domain and presents it to the user in a panel.  I use NIDomainPanel to
let the user choose the domain.

NIDomainPanel panel appears to be set up mostly like SavePanel and
OpenPanel and other AppKit panels that we all know an love.  In
particular, there's a method defined as:

- (int)runModal;

just like those other panels have to pop them up, get the
information/do the process, and then return a result.

The rub?  With most of those other panels, a return value of 0 means
Cancel was hit, non-zero means the user clicked OK.  Natural enough,
seeing how C works with boolean tests.  Unfortunately, NIDomain seems
to return 1 on success, which is OK, and _3_ on failure.  Well, that
one sort of fell out of the blue, now, didn't it?

That really opens a Pandora's Box, I think.  I'm doing the testing on
a standalone machine, with only the local domain.  Is that a factor?
When I run the program on a machine with a 2-level Netinfo domain
hierarchy, will it return 2 for OK and 17 for Cancel?  Or perhaps 193?
I can test on 2-level and 3-level networks, but what about those
four-level ones ... My only choice is to assume that things work as
they appear to, but such an assumption already has bitten me once
tonight!

Thanks for any help you can give,
--
scott hess <scott@gac.edu>   <A GUI is to a command-line as a TV is to a book>
12901 Upton Avenue South, #326  Burnsville, MN  55337  (612) 895-1208 Anytime!
Technical Details
Message-ID: <SCOTT.92Apr13044606@nic.gac.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!src.honeywell.com!umn.edu!noc.MR.NET!gacvx2.gac.edu!gacvax2!scott
References: <SCOTT.92Apr13042438@nic.gac.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!src.honeywell.com!umn.edu!noc.MR.NET!gacvx2.gac.edu!gacvax2!scott
Newsgroups: comp.sys.next.programmer,comp.sys.next.sysadmin
Subject: Netinfo Q's - case in point.
Message-ID: <SCOTT.92Apr13044606@nic.gac.edu>
From: scott@nic.gac.edu (Scott Hess)
Date: 13 Apr 92 04:46:06
References: <SCOTT.92Apr13042438@nic.gac.edu>
Distribution: world
Organization: Gustavus Adolphus College
Nntp-Posting-Host: nic.gac.edu
In-reply-to: scott@nic.gac.edu's message of 13 Apr 92 04:24:38Lines: 35
Lines: 35