====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #99-9 September 1, 1999 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar * Tech Tips: Finding FoxPro Newsgroups Steve Settimi A Queer and Quirkish Quandary Steve Settimi AutoDialogs Utility Dan Covill * Other Stuff: The Importance of Bad News Bill Gates Data-Structuring Strategy Lisa Slater Consulting Solutions Group * Administrivia ====================================================================== CALENDAR: We are now alternating meetings between Escondido and Sorrento Mesa. All meetings are at 7:00 pm. Sept 1 - Sorrento Mesa ----------------------- After last month's last minute cancellation, we're giving John Little from Microsoft another chance to present SQL 7. Oct. 6 - Escondido ----------------------- Claude Nikula will show us how to manage SQL 7 with VFP Escondido meetings are at Bergelectric, 2222 Meyers Avenue. Take the Nordahl exit from Highway 78 (west of I-15). Head South. Right on Meyers Ave, first right past Mission. It's a one-story building on the right (there's no sign). Sorrento Mesa meetings are in the PS Business Center, 6450 Lusk Blvd. From the Lusk Blvd driveway, go straight back to the furthest corner of the rear bldg and park. The conference room is upstairs over the Fitness Center. ====================================================================== TIPS ====================================================================== FINDING FOXPRO NEWSGROUPS Steve Settimi Someone mentioned how hard it is getting to find news groups or threads on Fox/VFP matters: This site is quite good as it fetches applicable news groups based on a the topic, then presents links to a graphical display of the threads. Good for VFP or anything else for that matter. http://www.deja.com/=mssb/home_if.shtml [I tried it (not on FoxPro). It works! DC] ---------------------------------------------------------------------- QUITE QUEERLY A QUIRKISH QUANDARY Steve Settimi Example: Subclass a command button. Normally this object has no Show event. Add a custom method of "Show". Now edit that method. It's not blank! The header contains "LPARAMETERS nStyle". :-) What's Going On Here? When subclassing then adding custom methods, if one of new method names is used in any other base class (like "Run" is used in the ActiveDoc class definition and "Show" is used in Forms class definitions), the parameter statement associated with that method name of the original class will be automatically dropped in to your new subclass method, regardless of what subclass you are creating. [What to Do: You can, of course, just ignore this - it's only a parameter statement, not code - or replace it with the parameters you really want. More likely, if you called your new method Show you just might be trying to parallel the Show method of the form; if so, then the parameter may be just what you want. Possibly the best rule is this: "Don't name a custom method with the name of any existing method UNLESS you specifically want to implement the function of that method." DC] [VFP, like its practitioners, is easily confused.] [Isn't Quirky where they just had the Quake?] ---------------------------------------------------------------------- AUTODIALOGS UTILITY Dan Covill <> AutoDialogs v1.0.37 Beta 2 [310k] W9x/NT FREE http://www.metaproducts.com/download/adsetup.exe http://www.metaproducts.com/mpAD-AY.html Don't you get sick of "navigating" across your whole system every time you do an Open or Save As? (Yes, that's what "Favorites" is supposed to cure, but it's too cumbersome and only works for a few applications.) AutoDialogs makes YOUR favorites available to most programs. Give it a list of your most frequently-accessed folders, then when an open/save dialog pops up, click on AutoDialogs in the system tray, and Bob's your uncle. [Another good tip from the Lockergnome weekly newsletter - highly recommended. DC] ====================================================================== OTHER STUFF ====================================================================== THE IMPORTANCE OF BAD NEWS by Bill Gates from an interview in Context magazine July, 1999 ... A final thought here that may sound negative but that I think is crucial: Bad news must travel fast. As soon as a company gets electronic mail, executives start getting messages from people that say, "Hey, we've just won a certain piece of business. Let's celebrate." It's mandatory to send back a piece of mail saying, "Hey, congratulations." For some reason, you never get mail that says, "Hey, we just lost this piece of business." If you got it, I suppose you'd have to send back a piece of mail saying, "No, that wasn't what you were supposed to do. Next time, try harder." It's just not human nature to say that things aren't going well. And yet when you ask yourself, what does management really need to know, it's much more important to have the bad news. Good news simply reinforces what you're already doing. It says, "Hey, we probably have our priorities right. We've got a pretty good plan. Let's just go full speed." Bad news, particularly if you catch it early on, where you see a very demanding customer starting to get unhappy, or a new competitor that is servicing customers' needs in a different way, enables you to use your best assets to respond in time. ---------------------------------------------------------------------- DATA-STRUCTURING STRATEGY by Lisa Slater Why would anybody ever want a FileAs field? Something very odd happened to me a couple of weeks ago, as I was watching a developer demonstrate the features of his app. I can only describe it as a kind of conversion: I finally understood one piece of the rationale behind the file structure of Outlook's contact files. I don't mean I understood it with contempt or as a kludge, but rather as the right solution for the right problem. The kind of thing you and I are accustomed to achieving with clean living and normalized, relational tables. If you're shocked, please don't blame the developer I was with (he wasn't even using Outlook at the time). Here's how it happened: He was showing me an alphabetized list of companies in Access, and we couldn't find the particular company we were looking for, "The Acme Group", at the top of the list, where we expected to see it. "Ah," he said, and snapped his finger, "it'll be in the T's, because of the 'The'". And so it was. You can imagine how I felt. Why didn't they just index on an intelligent expression, which would have removed such words as "A", "The", or whatever from the ordering process? That's what we would do in Fox, right? Of course, we'd end up writing a UDF of some sort so we could tweak the intelligence, or at least a really, really complicated IIF() statement. Well, perhaps they can't do that in Access. (Don't feel too superior just yet.) Note that we're always talking about an "alphabetized list" here, not the capability to support multiple sort orders. We're just looking for that "alphabetized list" to be as intelligent and useful as possible. That's when I started to think about how Outlook handles the same problem. When you enter a new Contact, Outlook has a FileAs field. When you enter the contact's full name and/or company name, it offers some intelligent choices for this field, and lets you pick between them, but it also lets you type something completely unrelated, if you like. Previously, every time I encountered that FileAs field, especially while writing code to synchronize my Fox and Outlook contact lists through automation, I chafed. I felt FileAs was both a waste of space and a redundancy that caused potential problems on every data update. How much better, I thought, was the Fox method of maintaining an index that did all this work without requiring a separate field in the table for it! Now I'm not so sure. Here's why: 1.We may have saved space in the table, but we haven't really saved very much space overall, since the index we've created will store the expressions to order each row in the table, using pretty much the same space as the FileAs field. 2.Our complex expression, whether IIF() or UDF(), will be accessed and evaluated every time index maintenance needs to be done, and it won't be speedy. This is a minor point, I know. 3.Here's the major point: our complex expression will never be as complex as the user's intentions and needs. Outlook (or Access) can use exactly the same logic that we would use in the index, at exactly the right moment (when the user chooses to add or edit a contact entry), but it does not assume that this logic models the world perfectly. The user still gets a chance (at exactly the right moment), to further adjust the FileAs string. If the user has to adjust it too often or too drastically, we can refine future versions of the logic to include additional patterns that we've identified -- but we never assume that this logic is perfect, so the user never has to settle for an irksome, machine-ordained, intractable order. And I think that's really great. Sure, it takes time and space on the update form for the extra field, sure the user may not want to bother. (Remember the user doesn't have to bother, since our logic, available during the update, will give exactly as intelligent a default choice as it would have when it was in the index expression.) But the user spends a lot more time looking through that ordered contact list than s/he does updating its entries, right? And isn't that, in the end, the point? Not data maintenance, but data use. Think about it. Perhaps you'll tell me all this was obvious. But I'll tell you, it wasn't obvious to me. These are tricks I didn't learn down on the Daisy Hill Normalized Puppy Farm. (How many of you still have a copy of that poster, from Database Programming & Design magazine or whatever it mutated into?) (Lisa Slater, Dec '98 [Former editor of FoxTalk] ---------------------------------------------------------------------- SOLUTIONS CONSULTING GROUP Solutions Consulting Group, at 6540 Lusk Blvd, is the host for our Sorrento Mesa meetings. But who are they, and what do they do? "Since its inception in 1993, Solutions Consulting Group has grown to more than 40 employees with over 65 active clients throughout Southern California. We are a Microsoft Certified Solution Provider Partner and a member of the Oracle Business Alliance Program." They do: Corporate Application Development Data Warehousing Network Services They work in FoxPro, VFP, VB, Access, SQL, and Oracle. They are looking for more employees and they do use contractors as well; contact Armando Andrade at if you're interested. For More Information... --------------------------Administrivia------------------------------- This newsletter is a service to members of the FoxPro Developers Network of San Diego (FPDN). The editor (Dan Covill) is solely responsible for the content, Barbara Peisch does the distribution. E-mail the editor YOUR tips, comments, complaints, and rebuttals. Editor: Dan Covill 858-272-2448 Board of Directors: Eric Lendvai - President 760-439-6617 Art Bergquist - Vice Pres 760-740-0428 Claude Nikula - Secretary 619-615-6318 Barbara Peisch - Treasurer 760-729-9607 Steve Settimi - Director 619-262-5883 ----------------------------------------------------------------------