Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Scott Hess
Mon, 13 Apr 1992 04:24
Netinfo Q's.
Author: Scott Hess
Date: Mon, 13 Apr 1992 04:24
Date: Mon, 13 Apr 1992 04:24
43 lines
2754 bytes
2754 bytes
I'm currently working on a project where I need to munge about in NetInfo to store network-wide defaults and the like. I finally think I've got enough of an understanding so that I'm not entirely lost, but the netinfo stuff (and the NIKit) is a wealth of undocumentation. Netinfo is very, very flexible, but alot of programs simply don't take advantage of it - and after spending the past week banging at the access routines, I can understand why! Oh, what's my Q? Well, does anyone out there have any documentation on the Netinfo stuff? Or the NIKit stuff? I guess I'm looking for stuff more in the line of tutorial information, though I will take anything I can get. Example code is wonderful, _especially_ if it accomplishes modification to the database. It's not so much that I'm unable to get anything done - I've almost finished the first stage of the project, and it actually seems to work. What I'm looking for, though, are tips and tricks. What stuff I shouldn't muck with. The best way to go about installing a new set of properties for a directory. What do the routines return when there's an error (I know, ni_status, but I'm looking for something more in line with the ERRORS section most of the 2nd section of Unix Manual pages includes)? Does it make more sense to go insane caching information, or is reply time reasonable? When do the differences between clone and master servers make a difference? I'm interested in any info out there. Thus far, I see no reason not to collect any information, bang it around, and pop it onto the archives. Netinfo isn't exactly something you want any old idiot to be messing with, but I'd be interested in making it so that a sufficiently intelligent idiot can :-). [After the past week and more of working with Netinfo, I can tell why the NeXT Netinfo utilities have so many limitations, like to two-level domain hierarchies. I wonder if there are only three people at NeXT who understand the code to the point where they can write the utilities, and those three people are so in demand that they just don't have the time to get rid of the limitations :-).] Later, -- 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!
Netinfo Q's - case in point.
Author: Scott Hess
Date: Mon, 13 Apr 1992 04:46
Date: Mon, 13 Apr 1992 04:46
35 lines
2276 bytes
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!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads