home *** CD-ROM | disk | FTP | other *** search
- Frequently Asked Questions about the MiscFindPanel Package
-
- Christopher J. Kane (kane@gac.edu)
-
- Version 1.1
-
-
- This file presents a number of often-asked questions and
- comments about MiscFindPanel, and the related categories
- and files, and my answers or responses to them. (And a
- few questions and answers I made up myself.)
-
- Thanks especially to Scott Anguish (sanguish@digifix.com),
- Charles C. Lloyd (clloyd@gleap.sccsi.com), and Don Yacktman
- (Don_Yacktman@byu.edu) for asking or inspiring many of
- these questions.
-
-
- Topics:
- 1. The "non-standard" interface
- 2. Having other objects do the searching
- 3. The searching code is not in the bundle
- 4. SearchableText rather than MiscSearchableText
- 5. Separate bundle rather than .bproj
- 6. Those translations
- 7. Objects other than Text
-
-
- ----------------------------------------------------------------
- Question 1: The "non-standard" interface
- > The find panel offers all the standard features, but doesn't
- > present the "standard" interface found in Edit. Why is this?
- > Did you consider making the MiscFindPanel an exact clone of
- > the find panel in Edit?
-
- That's how it began, of course. But I made a few changes:
- 1. The Find TextField and Replace With TextField are not
- lined up as in a Form. I didn't see any good reason why
- this had to be, and maximizing the "area to type in"
- seemed more important.
- 2. The position of the message text in the Edit find panel
- seemed to be arbitrary--there was no reason to prefer it
- being on the left. But there _did_ seem to be a good
- reason to move the Replace All Scope radio buttons to the
- left: it associates the matrix moreso with the Replace All
- button, and also reduces the amount of mouse movement
- required after acting in the matrix. Myself, the only
- reason I operate on those radio buttons is that I am
- immediately going to Replace All. I very briefly looked
- at having the message text in the center, but that was
- not aesthetically pleasing, and harder for the eye to pick
- out somehow.
- 3. The Previous and Next buttons on the German version of the
- Edit panel are translated awfully (well, the translations
- mangle the panel). I think my translations are sufficient
- and make the panel look better.
-
- The biggest (and most often commented on) change is #2, above.
- I don't think that the changes are significant enough to cause
- confusion. I think that in the few-hundredths-of-a-second
- period, as the user's eyes track horizontally across the panel,
- the eye will not be tracking for an empty area of the background
- color, but rather for color changes from that of the background:
- the square shape of the boxes, the black text, or most likely
- (in my opinion), the white dot in the Replace All radio matrix.
-
- So it seems to matter less that the Replace All matrix and
- friends have been left rotated one place, than that the Replace
- All matrix has a similar look to the one in Edit's find panel.
- And if a developer _really_ wants the look of the interface that
- Edit has supposedly "standardized", she or he can simply modify
- the .nib files (though they are not as simple as they appear).
-
- I used this same design in an application I wrote (Schematik.app,
- a NeXT front-end to MIT Scheme) two years ago, and as of now,
- two years and thousands of users later, there has never been
- a complaint, nor even a comment, about the "non-standard"
- find panel user interface.
-
- People are highly adaptable creatures. How many thousands of
- people use NewsGrazer (as an example, sorry Jayson), with its
- non-standard command-key usage, every day and live through the
- experience?
-
- ----------------------------------------------------------------
- Question 2: Having other objects do the searching
- > Why not integrate the regex and searching functionality into
- > the MiscFindPanel?
-
- Another NeXT application developer and I, as it happens,
- discussed this at length. He thought the MiscFindPanel should
- also have searching functionality. I disagreed (and implemented
- it without that functionality). There were two reasons I had:
- 1. I wanted a generic sort of panel. I didn't want to
- complicate the developer's job if the developer had a
- different regex package she or he wanted to use (for
- instance). This is the reason for having a SearchableText
- protocol, too. I didn't want to leave developers out in
- the cold however, so I included a good set of regex
- routines with the example.
- 2. I wanted to follow the general NeXT paradigm for panels;
- and a more general object-oriented one. Does the SavePanel
- actually save the file? Does the PrintPanel actually do
- the printing? (Well, no the printer does, but in software...)
- Panels are generally vehicles that users use to have actions
- performed, but which don't actually do them. (NXHelpPanel
- is something of a special case.) Thus the MiscFindPanel is
- a vehicle for the user to specify searching parameters, but
- does not do the searching. A Text object (for instance) is
- best equipped to search the text itself.
-
- ----------------------------------------------------------------
- Question 3: The searching code is not in the bundle
- > Does the regex library get put into the bundle automatically?
- > What about putting the regex code in the bundle too?
-
- This relates to question #2. There is no point in including the
- regex code with the MiscFindPanel object file, since the
- MiscFindPanel doesn't use it. The Misc_TBMK searching routines
- and the SearchText category do not go into the bundle for the
- same reason.
-
- This non-MiscFindPanel.bundle stuff is provided as a convenience
- to the developer, to make the panel a bit easier to use. But the
- decision to use it or not remains with the developer; it is not
- gratuitously included in the bundle. And it's easy enough for
- a developer to add the files to a project and have them linked
- into the proper place.
-
- ----------------------------------------------------------------
- Question 4: SearchableText rather than MiscSearchableText
- > I was wondering why you hadn't changed the SearchableText to
- > have the "Misc" prefix that nearly everything else has....
-
- There were a few reasons...
- 1. I didn't like the sound of "MiscSearchableText".
- 2. Protocol names should be descriptive (I think) of some
- property of itself that an object wants to advertise. The
- "Misc", being an almost-word in itself, seemed to act as an
- adverb to "Searchable", and seemed to distorted the meaning
- of the name.
- 3. Protocol names only conflict with other protocol names.
- From NextDev/Concepts/ObjectiveC/3_MoreObjC/MoreObjC.rftd
- (NS 3.x):
- Unlike class names, protocol names don't have global
- visibility. They live in their own name space.
- Only class names, function names, non-static global variables,
- and #defines and typedefs in header files need to have the
- "Misc" prefix to avoid the majority of name clashes. Protocol
- and category name clashes are still possible, but much more
- unlikely.
-
- ----------------------------------------------------------------
- Question 5: Separate bundle rather than .bproj
- > Why is the MiscFindPanel not in a .bproj?
-
- Well, I don't know. Probably because I didn't originally implement
- it that way. I've used subprojects in the past, and have never
- been impressed. I just wasn't inclined in that direction.
-
- You shouldn't need to compile the MiscFindPanel.bundle more than
- once (per project at least). Subprojects are useful if you are
- doing development on "subsystems".
-
- ----------------------------------------------------------------
- Question 6: Those translations
- > Some of your translations don't seem to be correct...
-
- Quite possibly. Most of my translations are translations taken
- from NS 3.0/3.1, others were gotten from semi-informed opinions,
- and the rest are "best guesses". NeXT may not have used the
- _best_ translations, but it seems likely that they used the most
- _suitable_ one (the length of a translation is one consideration).
- And the others are probably comprehensible, even with a mis-
- conjugated verb or mis-pluralized noun here and there.
-
- I am *very* willing to listen to translation suggestions, and/or
- to work with someone on translating the MiscFindPanel to another
- language. Please e-mail me.
-
- ----------------------------------------------------------------
- Question 7: Objects other than Text
- > How about a find panel that works with NXBrowsers or in a Matrix.
- > Will MiscFindPanel handle this too?
-
- Yes, sort of. An object must conform to the SearchableText protocol,
- but if it does, the MiscFindPanel will work with it. I created the
- SearchableText protocol with Matrixs, selection lists, and, of course,
- the Text class in mind. My goal was to create a general protocol
- which any object that had text it wanted to "vend" for searching or
- replacing operations could implement. For a Text-like object, this
- is simple. For a Matrix, a programmer would have to decide how to
- map a linear sort of text model to two/three dimensions (depending
- on your interpretation of the text in a Matrix). This is not all
- that difficult either, and there is lots of documentation to explain
- things. If you are having trouble, feel free to e-mail me.
-
- I'd be interested in implementations of the SearchableText protocol
- for NeXT's *Kit classes, as well as others, to be included (with
- copyright notices and documentation, as appropriate) in future
- releases of the MiscFindPanel package. Please e-mail me if you
- would like to contribute.
-
- ----------------------------------------------------------------
-