[Kerberos for Macintosh] [Applications] [Miscellaneous Documentation]
This document discusses the design and implementations in this version of MacHostinfo.
The input frame is a Text Edit box where the user types in the name of the server the user wants to recieve information on. The user has the ablity to highlight text in the frame, to cut & copy text from the frame to the clipboard, to paste text from the clipboard to the frame, and to delete text from it.
The history menu is a pop up that contains the names of previous queried machines. When the user selects an name from the menu, the name is copied into the input field so the user can requery for that name.
The "Query" button executes a search for host information of the machine name entered into the input frame. Results of the query are printed in the output field, unless an error occured, in which case an alert box will appear to explain what went wrong.
The output frame is a Text Edit box containing the results of a query for hostinfo. The user can highlight text in the field, copy & cut text from the field to the clipboard, and paste text from the clipboard to the field. The user can also scroll text up and down the screen by using the scroll bar or arrow keys.
The user can make a hostinfo queries by typing the name of the desired machine in the input field and either pressing return/enter or clicking the query button. If the query fails, a dialog box will be displayed explaining what when wrong. Otherwise, the results of the query will be appended to the end of the output field. The user can also paste hostnames from other programs into the input field or use the history pop-up menu between the input field and the query button.
MacHostinfo also has help balloons to give the user a quick, on-screen reference for the program.
Two important issues came up when deciding how to impediment windows in MacHostinfo. The first issue was whether to allow users to open multiple windows in the program or not and the other issue was whether to use the Dialog Manager to handle the drawing of windows and of controls in the windows or to use the Window Manager to handle window(s) and the Control Manager for controls (i.e. scroll bars, buttons, etc.) The decision made was to go with the Window and Control Managers for the windows, since using the Dialog Manger would limit the program to one modial window and would limit the way some controls could be used.
Because I had to write code to get and change values in the scroll bar, query button, and text fields, I used a struct called WindowInfo to hold handles to these items. Although this struct was original intended to help keep track of items in multiple windows, this struct was still useful even after the decision was made to limit MacHostinfo to one window in the app.
Text fields were implemented using Text Edit boxes, which took care of basic features like handling key strokes
There are two issues that have not yet been resolved.
1)Because hitting return in MacHostinfo will start a query, the input field cannot have any return or enter characters in it. Although key stokes in the input field are currently being caught to check for return characters, text pasted into the input field is not being checked at the moment.
2)Because Text Edit is used to implement the text fields, the maximum number of characters a field can have is 32767. This limitation in the output field is currently handled by preventing the user from doing anymore queries when the output field gets to the maxium amount of characters and having the user quit. A better approach would be to delete characters at the begining of the field to make room and the end of the field.
MacHostinfo has a standard File menu, with a "Quit" option, and an Edit menu with "Copy", "Cut", "Clear", "Paste", and "Select All" options in it. A future menu option wouldbe a "Select name server..." item, which is supported in the Unix version of hostinfo, but not the current version of MacHostinfo.
Questions or comments? Send mail to email@example.com
Last updated on $Date: 2003/11/18 21:59:35 $
Last modified by $Author: smcguire $