Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SplitterBar
Message
 
To
01/11/2006 18:50:42
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brazil
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01166302
Message ID:
01166518
Views:
12
Hi Emerson,

I like the simplicity of your approach. Here is my feedback:

1) Objects linked to the splitter are resized with each mouse movement. It will be slow if the objects are containers with many complex controls inside. How about doing the resize only on mouse-up? (Of course you have to add an extra visible cue to show the splitter movement before mouse-up.)

2) Inside the Moved() method, you said checking variable type is slower than a Try...Catch. The following test code tells us NOT to use Try...Catch. Adding a property as a flag for checking if GetReference() has already been run may be the best way.
nLoops=5000
oObj=CreateObject('Empty')
AddProperty(oObj,'p')

oObj=Null	&& Remark this line and test again

nSec=Seconds()
For i=1 To nLoops
	If Vartype(oObj)='O'
		oObj.p=1
	EndIf
Next
?Seconds()-nSec

nSec=Seconds()
For i=1 To nLoops
	Try
		oObj.p=1
	Catch
	EndTry
Next
?Seconds()-nSec
Ben
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform