Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tip! Speed form instantiation in Codebook
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Tip! Speed form instantiation in Codebook
Miscellaneous
Thread ID:
00058804
Message ID:
00058804
Views:
82
All,

In case you missed it, there was a tip in the July '97 issue of FoxPro Advisor from Jim Slater.

Jim discovered that if you are opening local views with NoDataOnLoad = .T., issuing SET DELETED OFF in advance can significantly reduce the time it takes a form to instantiate.

Since most Codebook encourages the use of local views AND the NoDataOnLoad property is set to TRUE by default, this tip can be especially useful to Codebook developers.

We have made the following change to our soon-to-be-released next version of Codebook for Mere Mortals. However, even if you are using the original VFP3 Codebook the change still applies.

Here's what you can do to implement this tip in Codebook:

1. Open CDataEnv.prg
2. Search for the text DataEnvironment::OpenTables()
3. Surround this command with the code as follows:

LOCAL lcDeleted

lcDeleted = SET('DELETED')
SET DELETED OFF

*------------------------------------------------------
*-- Explicitly call the superclass' OpenTables method
*-- so it executes first and opens the specified tables
*------------------------------------------------------
DataEnvironment::OpenTables()

IF lcDeleted = 'ON'
SET DELETED ON
ELSE
SET DELETED OFF
ENDIF

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Reply
Map
View

Click here to load this message in the networking platform