------------------------------------------------------------------------------ ------------------------------------------------------------------------------ NNNNNNNNNNNN NNNNNNNNNNNN NNNNNNN NNNNNN NNNNNNN NNNNNN NNNNNNNNNNNNNN NNNNNNNNNNNNNN NNNNNNNN NNNNNN NNNNNNNN NNNNNN NNNNNN NNNNN NNNNNNNNNN NNNNNNNNN NNNNNN NNNNNNNNN NNNNNN NNNNNN NNNNN NNNNNNNN NNNNNNNNN NNNNNNN NNNNNNNNNN NNNNNN NNNNNNNNNNNN NNNNNN NNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNN NNNNNN NNNNNN NNNNNNN NNNNNN NNNNNNNNNN NNNNNN NNNNNNNNNN NNNNNN NNNNNN NNNNNNNN NNNNNN NNNNNNNN NNNNNN NNNNNNNN NNNNNNNNNNNNNN NNNNNNNNNNNNN NNNNNN NNNNNNN NNNNNN NNNNNNN NNNNNNNNNNNNN NNNNNNNNNNN NNNNNN NNNNNN NNNNNN NNNNNN ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Boston Computer News Network March 1994 A Service of the Boston Computer Society, USA Vol.1, No.2 Sponsored by the Foxpro SIG Foxpro Version ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ 0. Introduction. -------------------------------------------------------------------------- Here it is! The second issue of our Foxpro newsletter. The feedback that we received from our first issue was great. Thanks! We hope to meet the challenge in this and succeeding issues. Thanks to all of you who have contributed something. You are making this newsletter a truly global dialog between Foxpro developers everywhere. 1. April 13th User Group Meeting: 'BROWSE Tips and Tricks'. ----------------------------------------------------------------------- ReplyTo: Arnold Bilansky [71533,1031] (617)522-3700 x374 Meeting: April 13, 1994, 7:00 p.m. ** Place: Microsoft Office, 9 Hillside Avenue, Waltham, MA USA. Val Matison, organizer of the Toronto's June FoxTeach Conference, presents 'Browse Tips and Tricks'. 2. BCS Fox User Group at Database World Boston. ----------------------------------------------------------------------- ReplyTo: Arnold Bilansky [71533,1031] BCS FoxPro SIG Mark your calendar for June 29, as the BCS FoxPro User Group once again. presents a full day of free FoxPro sessions at Database World, Boston. Location: Hynes Convention Center, 900 Boylston Street, Boston. More details next month... In addition to our free BCS FoxPro sessions, for admission to the free vendor exposition (June 29-30) or information on the Relational DBMS Conference (June 28-30, fee required) call DCI at (508) 470-3880. 3. New FoxPro 2.6 ----------------------------------------------------------------------- ReplyTo: Arnold Bilansky [71533,1031], BCS FoxPro SIG ReplyTo: Microsoft for product details. Beta tester Jim Booth received permission from Microsoft to prematurely break non-disclosure in order to present FoxPro 2.6 to a special meeting of the BCS FoxPro User Group on Monday, March 16. Version 2.6 is specifically targeted to attract dBase IV users. New features include: o Automigrate technology to convert dBase programs reports and queries. o Catalog Manager, FP's answer to the dBase Control Center, is more integrated into the main product than is Control Center. Catalog Manager directly imports Control Center files. With its tabbed dialog box, end-users can more easily keep track of tables, screens, reports, labels, queries, and programs. o End-user oriented wizards: Screen Wizards, Report Wizards, and Application Wizards. We saw a preview of these in FoxPro Mac. Like other FP power tools they are table-driven. Knowledge of their structure will allow construction of greatly enhanced versions. Ken Levy, creator of the freeware GenScrnX, is known to be working already on WizardX. The best side-effect of these wizards may be that Microsoft employees can actually demo the product now. Query Wizard steps the end-user through a series of english descriptive dialogs in order to build queries. It is far more user- friendly than RQBE. Mail Merge Wizard sends data directly to a popular word processors such as Word and WordPerfect. The Label Wizard supports 85 label formats. The user can interactively create reports with the Report Wizard and Tables with the Table Wizard. The Screen Builder Wizard helps the user create screens from databases. It even adds navigation controls to the generated screens. There are selections which permit generation (in the Windows version) of chiseled or shadowed elements. It does this by generating code to lay down alternate light and dark lines on the screen (no angled line-endings unfortunately). o Of most interest to us programmers are some of the 60 language enhancements lifted from the dBase dialect. For example: OBJVAR(), unlike the familiar VARREAD(), returns an 'm.' or an '.' along with the variable name. This permits building of truly generic screens. PCOUNT() returns the actual number of parameters passed to the current procedure. FP's PARAMETERS() returned the most recent number of parameters passed. Thus, when calling ModuleA with 4 parameters, PARAMETERS() returns 4. If ModuleA calls ModuleB with 2 parameters, PARAMETERS() returns 2. When ModuleB returns to ModuleA, PARAMETERS() still returns 2, yet PCOUNT() returns 4. KEYMATCH() tells whether a key exists by checking the index. It does not move the record pointer. DESCENDING() tells if an index was created in descending order. ISBLANK() returns true from numeric, logical or date field if they have never been given a value. A command such as AVERAGE TO lnAvg FOR NOT ISBLANK(nMyvar) can be used to simulate null properties. Also, consider indexing on ISBLANK() to rushmorize relevant operations. The BLANK command 'nulls' a field with an existing value. ISBLANK() cannot return .t. for numeric or logical values memory variables. It behaves identically to EMPTY() for character variables. o The following functions have also been added, but are not from the dBase dialect: PRTINFO() (windows only) gives useful information regarding the printer settings, including page length and whether printing is in portrait or landscape mode. NORMALIZE() is useful for comparing string values to FP system function return values. For example NORMALIZE(allt(b->cFirst)) returns 'ALLTRIM(B.CFIRST)'. One might use this to search for an index expression, for example. Version 2.6 does not add the additional dBase IV syntax for SQL, security, or transaction processing. Until June 30, upgrades for the Standard Edition are $19.95. Initial purchase price is $99. For information on availability and on pricing for the Professional Edition (which adds Distribution Kit, Connectivity Kit, Library Construction Kit, Client-Server Wizard, and [Windows only] Workgroup Extensions), call Microsoft at 800 426-9400 (USA) or 800 933- 4750 (Canada). 4. Been Thinking 'Bout Colors... ----------------------------------------------------------------------- ReplyTo: Whil Hentzen, 70651,2270 Milwaukee WI USA Hentzenwerke 414.332.9876 Download: COLORS.ZIP, FoxForum Lib 5 By: Sue Cunningham & Nancy Jacobsen I've been thinking about colors a lot lately. For the longest time, I thought that messing with colors was kind of a wasted effort. Sure, you could create new color sets with that marvelous tool - the FoxPro Color Picker . And there were some other nice utilities if the FPCP didn't suit your needs... Alan's aaColor, Colin's Cute Color Picker, and of course, Blaise's ProColor. But weren't all these just a waste of time? Well, one day, really bored, I downloaded COLORS.ZIP from FoxForum - a group of about 70 color sets put together by Sue Cunningham and Nancy Jacobsen - and added them to my FOXUSER. Tried a few, nearly threw up a PIZZA, and then got back to work...but it was kinda fun. Every couple days, I'd get bored and load up a new one. Well, I'm addicted. I can't stand looking at the same scheme for too long, to the extent that I've added the following routine to SETUPFOX, the FoxPro boot up program that I call from CONFIG.FP: sele NAME ; from sys(2004)+'FOXUSER' ; where ID = 'COLORSET' ; and TYPE = 'PREF2.5' ; into array aSumCulers use in FOXUSER m.nNumCulers = mod( val(sys(2)), alen(asumculers) ) + 1 set color set to &asumculers[m.nNumCulers] set shad off ? 'Color Set: ' + asumculers[m.nNumCulers] rele aSumCulers rele nNumCulers This subroutine selects a random color set each day. If it picks a really awful one, I just manually run SETUPFOX again until I get one I like. There are only a few that I don't care for, and like every- thing, some color sets seem to be more random than others, so they don't show up too often. 5. A 'Set Default To ...' Dialog. ----------------------------------------------------------------------- Reply To: Steve Kern, 74640,3431 Columbus, Ohio USA Database Design (614)459-6511 In response to Whil's request for 'short tools' like the four Macros he presented in the first BCNN newsletter, here's one I use. Like Whil, I change directories frequently, so I created SetDir.prg: * Program...........: SETDIR.PRG * Author............: Steven Kern * Project...........: Setdir.prg * Created...........: 01/28/94 * Copyright.........: (c) Steven Kern, 1994 *) Description.......: Sets the directory * Calling Samples...: FOXPROX -T SETDIR * : Also a macro call from ALT+F9 * Parameter List....: * Major change list.: PRIVATE ALL LIKE j* *-- Store the current directory jcDefault = CURDIR() *-- Get a new directory jcPath = GETDIR('','Select a Project Directory') IF !EMPTY(jcPath) SET DEFAULT TO (jcPath) ELSE *-- If the user presses Escape, jcPath is empty * be sure we stay in the current directory SET DEFAULT TO (jcDefault) ENDIF !EMPTY(jcPath) *-- Show the user where we are jcCurDir = SYS(5) + CURDIR() WAIT WINDOW NOWAIT 'The current directory is now ' + jcCurDir RETURN As mentioned in the program header, you can call this in two ways. 1) as a startup program for Foxpro, and 2) as a Macro. For the Macro, I define Alt F9 in this way: DO{SPACEBAR}D:\FOXPRO25\SetDir.prg{ENTER}. This works as long as you're in the command window. 6. A 'Touch'ing Macro. --------------------------------------------------------------------- Reply To: Ted Roche [76400,2503] Whil Hentzen asked in the last issue what people's favorite macros might be. My personal favorite is the F2 key, which I use to 'touch' each line of code I remark out or modify. It is so much simpler to press F2 than to mark each line individually that I find there's a chance I'll actually do it! I have added the F2 key definition to my startup sequence. To ensure that the current date is used, I must redefine the macro each day: * Define a keyboard macro with today's date by using ; the Macro Record Shift-F10 keyboard shortcut. This ; ASSUMES that function is available! The &"+"& ; construct in the middle prevents the Fox interpreter ; from parsing a comment beginning there set function F2 to && clear any existing macro keyboard "{DnArrow}{Shift-f10}{F2}{Ctrl-Enter}" +; "{Ctrl-Enter}{End} &"+"& tr - " +; dtoc(date())+"{Shift-F10}{Ctrl-Enter}" * display the info that macros are live, place the ; cursor on a fresh line keyboard " Macros activated!{DnArrow}" 7. Time = Money. --------------------------------------------------------------------- Reply To: Ted Roche [76400,2503] Here are a few time manipulation sniplets. Time functions are the variables that Xbase forgot, essential to record 'up to the minute' events, or to ensure 'timely' data reporting. * HHMMSS2s.PRG Hours:Minutes:Seconds to seconds * Ted Roche 12/14/93 Copyright (c) 1993, Computer Resource parameter tcTime if empty(tcTime) or type('tcTime') <> 'C' tcTime = TIME() endif return val(left(tcTime,2))*3600 +; val(substr(tcTime,4,2))*60 +; val(right(tcTime,2)) * S2HHMMSS - seconds to Hours:minutes:days * Ted Roche 12/14/93 Copyright (c) 1993, Computer Resource parameter tcSeconds if type('tcSeconds') <> 'N' && tr - 12/14/93 was empty(tcSeconds) or tcSeconds = SECONDS() endif return PADL(INT(tcSeconds/3600),2,'0') + ':' + ; PADL(INT((tcSeconds-INT(tcSeconds/3600)*3600)/60),2,'0') ; + ':' + PADL(INT(tcSeconds-INT(tcSeconds/60)*60),2,'0') * TimeDiff.PRG * Return time2 - time1 * Ted Roche 12/14/93 Copyright (c) 1993, Computer Resource parameters tcTime1, tcTime2, tdDate1, tdDate2 * 1st and 2nd Parameters must be time, 'HH:MM:SS' * 3rd and 4th parameters are optional ; if supplied, * time difference in 'HH:MM:SS' format is returned, up to '99:59:59' * returns second time minus first * will return 'elapsed time since' if only one parameter supplied return s2hhmmss(iif(type('tdDate2')='D' AND type('tdDate1')='D', ; (tdDate2-tdDate1)*24*3600, 0) + ; hhmmss2s(tctime2) - hhmmss2s(tcTime1)) 8. Tip: The Netware User Login Name. ----------------------------------------------------------------------- ReplyTo: Arnold Bilansky [71533,1031] BCS FoxPro SIG I am frequently asked how to identify the login name from within a FoxPro program. Here goes... Insert the following following line into the System Login Script: DOS SET LOGIN_NAME="%LOGIN_NAME" FoxPro's GETENV("login_name") will then return the value. 9. Development Tip: Rebuilding a Relocated Project File. ----------------------------------------------------------------------- Reply To: David Rose [73164,2263] Reference: FoxPro Advisor, January 1994, Vol. 2 No. 1 'Why I don't hate to move anymore' Alan Schwartz, pp. 10,12. Suppose you have built version 1 of the Great American APP and you are ready to embark upon version 2. Where I work we use the following strategy: 1. Copy the PJX and PJT files to a new directory. 2. Rebuild the PJX files, pointing to the original source code. 3. Copy only those files that we want to work on into the new directory (usually a small subset of all of the files in a project). 4. Change the project to refer to the copied files. 5. Start making changes to the copies without worrying about losing the current version. Step 2, above, was a real pain, because in the rebuilding all process, we have to locate each subdirectory used. In some projects we have, this meant responding to a dozen 'Locate...' dialogs or so. Not any more, because of this nifty little program: Procedure rebuild Parameters tcPJX if type('tcPJX')='C' and not '.' $ tcPJX tcPJX = rtrim(tcPJX)+'.PJX' endif if empty(tcPJX) or not file(tcPJX) tcPJX = getfile('PJX','What Project do you wish to rebuild?') endif if empty(tcPJX) or not file(tcPJX) return endif private lnAt, lcHome use (tcPJX) go top lnAt = at(chr(0),HomeDir) && See Note 1 lcHome = left(HomeDir,lnAt-1)+'\' goto 2 replace rest Name with lcHome+Name ; for not ':' $ Name && See Note 2 use return * Note 1: HomeDir ends with a CHR(0), we need to exclude the * CHR(0) and add a backslash to change all project component * references from relative to absolute path names. * Note 2: Don't change Names that already have an absolute path. * That means any name located on a different drive from the * original home directory. For a 'deep' copy of a project (relocating a project and all of its attendant files), see the reference given above in Foxpro Advisor. 10. 'Managing Your Money' Beta Testers Wanted. ----------------------------------------------------------------------- Reply To: Jake Geller [76711,511] VP R&D Reply To: Harriet Smiley [76247,1474] Beta Coordinator Vendor: MECA Software MECA Software is in final beta testing for the Windows version of Managing Your Money ('MYM'). MYM is a leading personal finance program. It received an Editor's Choice award from PC Magazine and a Best Buy award from PC World this year. One of the important philosophies of this product was that users should own their personal finance data. To accomplish this, we chose DBF files for database storage. We're very excited about this open-architecture approach to personal finance and wanted to share this announcement first with the people we felt would most appreciate the potential of having complete, open access to their data. We are looking for Xbase users who would be interested in 'exercising' the DBF capability and giving us feedback on what additional support might be helpful for the Xbase community. If you're interested please contact our beta coordinator Harriet Smiley at 76247,1474. 11. *NEW SERVICE * VOICEMAIL: Your Own 800 Number Voice Mail. ----------------------------------------------------------------------- ReplyTo: Traci Walker, Account Executive, 800-568-5553, F:615-291-7555 A-Plus Communications Center 830 Fesslers Parkway, Suite 103, Nashville, TN 37210 ReplyTo: Les Squires [73020,3435] Could you use an 800 service? Would you like your customers to use a toll-free number to leave messages for you? VoiceMail answers in your own voice, date and time stamps messages, ad can send and transfer messages to other subscribers. BCNN has successfully negotiated an affinity group price structure for its readership for VoiceMail phone services (good only in the USA). $4.95 per box and $0.21 per minute for the first 100 BCNN subscribers. $3.95/$0.20 for 101-499 subscribers. The price drops FOR EVERYBODY to $2.50/$.019 if we enroll over 500 persons. Activation fees are $9.95 per box for the first 500. $5.00 per box over 500. Tell Traci Walker that 'Les from the BCNN' referred you to A-Plus VoiceMail. She has all the details. Editor's Note. This offer is an experiment. Please feel free to express your opinion about this type of activity. 12. Book Review: 'Foxpro Event-Driven Programming'. ------------------------------------------------------------------------ Reply To: David Rose [73164,2263] Title: Foxpro Event-Driven Programming Author: Dick Bard [70744,2251] Lauderdale Associates (New York) Publisher: Brady Publishing ISBN: 1-56686-099-7 Copyright: 1993 While it seems that my favorite computer book stores hold plenty in the way of introductory books on Foxpro programming, the pickings are far slimmer when I go looking for something more advanced. So it gives me real pleasure to read a book like Dick Bard's. This book lays out the application methodology developed by Dick and his associates that lies at the heart of a sophisticated EIS application. Sample source code of this application is provided. Essentially, the approach taken is to transform events (changes in screen focus) into messages on a stack which are then translated into action by the application engine. This method gives the programmer greater control of the result of an action. A benefit of this control is the creation of context sensitive actions, as ably demonstrated in the example application. This is not a book for the beginning Foxpro programmer, nor will all professional developers agree with many of the specific design decisions made in the book. Be warned: there is a lot of source code to wade through, and I haven't gotten the sample programs included on the diskette to work yet. But I'm convinced that for those who will take the time to give this book the attention it deserves will benefit by it. 13. Fox History Lesson Revisited. ----------------------------------------------------------------------- ReplyTo: Arnold Bilansky [71533,1031] BCS FoxPro SIG Last month we requested anecdotes on Dave Fulton and Fox Software. From former Fox Software sysop Toni Taylor [70253,3501] of Neon Software: 1. Dave could often be seen juggling while walking the aisles of the Fox offices. You could never tell if he was relieving stress or if he was just bored. 2. I am not sure, but I think that Dave was the first to coin the expression, 'infelicity.' FoxPro *never* had bugs, they were always infelicities. Foo Say How in Singapore responded to our mention of Dr. Dave's Dacor Co., the predecessor of Fox Software. 'A Dacor application is still in use today. An ex-staffer of INCHAPE CO in Singapore told me that Dave visited Singapore in the early 80's to implement packages for car distributors. He told me that the Report Generator developed by Dave (in BASIC) for the mini is the most flexible he has seen.' 14. For Fun & Amusement. ----------------------------------------------------------------------- ReplyTo: Arnold Bilansky [71533,1031] BCS FoxPro SIG We searched high and low to discover any FoxPro secret credit screens. The story we heard (apocryphal?) is that an early Fox Software version had a secret screen which was removed after the developers started getting support phone calls at home at odd hours. To keep you amused here are some new and old secret screens for some other products, plus the FP puzzle solver! Hold the phone calls please. Excel version 5.0 Secret Screen ------------------------------- 1) Right click on the toolbar. 2) Click on Customize. 3) Select Custom from the list box. 4) Drag the Solitaire icon to the worksheet. 5) Click on the Cancel button. 6) Click on the Close button. 7) Hold down the keys while clicking on the Solitaire icon. (This did not work on one computer I tried, but did on all others. Good luck on yours.) Windows 3.1 Secret Screen ------------------------- 1) Select 'About Program Manager' from the Program Manager 'Help' menu drop-down. 2) Hold down the keys while double-clicking on the Microsoft Windows flag. 3) Click on the OK button. 4) Repeat steps 1 through 3. 5) Repeat steps 1 through 3 again. Word for Windows 2.0 Secret Screen ---------------------------------- 1) Select 'Record Macro...' from the 'Tools' menu drop-down. 2) Type 'Spiff' (without the quotation marks) in the 'Record Macro Name' box. 3) Click on the OK button. 4) Select 'Stop Recorder' from the 'Tools' menu drop-down. 5) Select 'Macro...' from the 'Tools' menu drop-down. 6) Click on 'Spiff' for the 'Macro Name' box. 7) Click on the 'Edit' button. 8) Delete all of the contents of the macro (except the final paragraph mark). 9) Close the macro window and save changes. 10) Select 'About...' from the 'Help' drop-down menu. 11) Double click on the Microsoft Word icon. Solving the FoxPro Puzzle ------------------------- 1) With the Puzzle window active and unsolved, press . (Works for FPW and FPDOS 2.0, but apparently not for FPDOS 2.5.) 15. BCNN Statement of Ownership, Copyright, and Responsibility. ---------------------------------------------------------------------- The BCNN Newsletter is sponsored by the Foxpro User Group of the Boston Computer Society. BCNN is dedicated to keeping professional database developers (both consultants and corporate employees) informed about educational events, meetings, job openings, world events, notable articles, technical tips, new and 'must have' products, etc. As an electronic network BCNN is also a hub where developers can address world class issues with fellow developers around the world. Recipients agree to respond via Email to periodic polls of their directions, opinions, and needs. For those who do not have User Groups in their areas, BCNN is a vehicle for individuals to volunteer and contribute to something larger than themselves. Over 7,500 persons world-wide participate with CA-Clipper, Microsoft Access and FoxPro. The newsletter is distributed monthly by electronic mail via CompuServe, Internet, FidoNet, and other electronic gateways. It is free of charge to individual developers. Modest fees are charged to corporations for job placement and third-party announcements. Opinions expressed are solely expressed by the Foxpro User Group or the author found in the ReplyTo of the article. No warranties are made by the authors, editors, the Foxpro User Group or BCNN regarding the accuracy or applicability of the information provided in this newsletter, nor are the above named parties responsible for direct or incidental damages due to your use of this information. All materials are copyrighted by the BCS, unless otherwise indicated, and free for any user group to redistribute on their own BBS on the condition that a by-line referencing the BCS is included. Associate Editors: ---------------------------------------------------------------------- David Rose, Days (508)538-8064, Eves (617)935-6843. CIS:73164,2263 Internet:73164.2263@CompuServe.Com Arnold Bilansky Days (617)522-3700 x374 CIS:71533,1031 Internet:71533.1031@CompuServe.Com Ted Roche, CIS:76400,2503 Submissions. ---------------------------------------------------------------------- Send submissions to 73164,2263 with the subject 'BCNN Foxpro Submission'. Format your submissions similar to this letter. Distribution and Subscription Services. ---------------------------------------------------------------------- Les Squires, Director, Xbase Language Group. bcnn@World.Std.Com or 73020,3435 Add Subscribers: @BCNN@FoxYes to bcnn@World.Std.Com. Delete Subscribers: @BCNN@FoxNo to bcnn@World.Std.Com. Back Issues: (to be announced...) Boston Computer Society, Inc. 101 First Avenue Suite 2 Waltham, MA 02154 617-290-5700 General Number 617-290-5700 Ext. 432 for up-to-date meeting information. BCNN Email Services donated by Word Jenny Inc. LSquires@World.Std.Com (c) 1994 Boston Computer Society, Inc.