9

The LA Fox Developer Newsletter
September 1997
ActiveX (Con’t from page 6)
creating
Component-Based Software Gets Easier, John Lam;
PC Magazine; April22, 1997; Vol. 16, No. 8; pp. 201-
205

rEd. Note: Michael W. Thomas is a commercial application
developer for Resource Data International, Inc. in Boulder, CO.
CIS: 103650,2175; email: mthomas@resdata.com.]


VFP Tips, Tricks, and Bugs
Eliminating Deleted Records
from Views
by Doug Sherman, Rocky Mountain Fox User Group
I’m developing a VFP5O application that is using
PrivateDataSession DBC views of underlying tables, instead of
the tables directly, in order to more easily up-size the applica-
tion utilizing to a SQL back end server. When running the
forms in testing, I began encountering deleted records present
in the view of the table. However, the records were not flagged
as deleted!! Placing SET DELETED ON into the INIT or the
LOAD event did not solve the situation because these events
occur after the views are created in the data environment.

THE SOLUTION
Make use of the BeforeOpenlables procedure of the Data
Environment! This code section is accessed by right clicking
on the form and selecting “Data Environment”. The form data
environment opens. Right click in the environment area. The
dialog opens with selections for “Add, Properties, Form De-
signer, and Code”. Select “Code”, then select the procedure
“BeforeOpenTabbles” of the Dataenvironemt object.

Place the code “SET DELETED ON” into this procedure.

(Doug Sherman is president of the Rocky Mountain Fox User
Group in Denver. He has been developing in xBased languages
for 8 years and with other ‘big box’ main frame languages many
decades. Doug specializes in database apps that also inte-
grate with communications and Office elements. He can be
reached at 73112.11 1@CompuServe.com]


Future Programming (Con't form page 8)
language has its strong points and will have to be used for that
purpose. The “one is totally better then the other” or “Mine can
do it all and do it better” mindset needs to be discarded as soon
as possible and an “this is better for that purpose” attitude will
need to be adopted. In my opinion this is the future of program-
ming an integrated programming environment.
Tricks, Tips, Techniques (Con? from page 8)
whole lot easier? Not only can you drag and drop classes
between libraries, the Class Browser will automatically update
all references for you.

Here’s how. Open two instances of the Class Browser and drag
and drop the class icon from one instance to a different class
library in the other instance. All .vcx and .scx files in all class
browser windows automatically get updated if a subclass or
instance exists for the class. In Visual FoxPro 5.0, you can now
open a project file (*.pjx) in the Class Browser, which loads all
.vcx and .scx files in the project. This means one drag and drop
operation can automatically update your entire project!

The default behavior when you drag and drop a class icon is to
move the class. If you want to copy the class, hold the CtrI key
down while dragging and dropping. Note that copying does not
update class references.

Here’s one more tip to save you mouse clicks! In the Visual
FoxPro 5.0 Command window you can type MODIFY CLASS
myclass OF myclasslib METHOD foo. This will open the Class
Designer and take you right to the method snippet. No mouse
clicking necessary!


(Ed. Note: VFUG is an online Visual FoxPro Developer News-
letter. For in formation on how to become a member and
receive their newsletter, e-mail Scot Becker, Director of Market-
ing and Public Relations, Virtual FoxPro User Group (VFUG),
scot@vfug.org. Or visit their website at http://www.vfug.org.


It Can’t Get Any Easier.......
We’ve come up with an easy way to submit articles to the LA
Fox Developer Newsletter one that has been overlooked for
a long time.

You can submit your articles to Barry Lee at CIS# 72723,3422
on Compuserve, orbrlee@earthlink.net.

These articles can be on any FoxPro-related topic, whether it
concerns a new technique you’ve discovered, a certain develop-
ment technique you may favor over others, book reviews, etc.
Editor reserves the right to edit or offer constructive comments
concerning submitted articles and accepted articles shall be
considered to be in the public domain.

The quality of this newsletter really depends on the members
that support it, not just read it. And I think we’d all be surprised
by the useful information that could be circulated around the
membership.

So.
How ‘bout it?
Page 9

9