Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dodefault() and nodefault() 2

Status
Not open for further replies.

PeriyurParthi

IS-IT--Management
Jul 18, 2001
258
IN
hi all
i need more explanattion for dodefault and nodefault, as for as i know dodefault will refresh methods and events, and nodefault will clear the buffers at keyboard, i think i need to know more about the commands please help
parthi
 
Hi,

NODEFAULT - there are no parentheses () - is nothing to do with the keyboard buffer. What it does is prevents the native VFP action from happening. So if you put this in the Keypress event of a textbox, the keys you press will not appear in the textbox at runtime.

DoDefault() - with parentheses - if the event or method in which you are working accepts parameters, you need to pass these on in DoDefault. DoDefault executes code that you have put in the parent class of the control on which you are working. If you put anything into an event or method (even just a space) then any code you had in the parent won't run. You have to call it with DoDefault().

If you can get hold of a copy of the Dec 1999 edition of Foxtalk, there was an excellent article on this subject.

Hope this helps, ask again if you have more questions,

Stewart

Stewart
 
HI
In simplicity..

Let us take a formclass which is used to crate a form.
Also in the form, you are adding a navigation class. The navigation class has many codes in its vcr buttons click event.

If in the form created, if the clcick event of ADD button is empty, by default it does the AddButtons click event when user clicks on that. But if you want to say... select a specific modification to what the parent Navigation Class is doing.. and also do the event..
Example..
SELECT myAlias
DODEFAULT()

Here the default of the parent Navigation class is done.
If the dodefault is not there, the click event of parent class will not be executed, and explicitly saying that is NODEFAULT.

If the parent class needs some parameters, you have to put that within the parenthesis... example..
DODEFAULT(myParm1,myParm2...)

Remember that some events do the default even when some codes are put in their event. Example is a KeyPressEvent. Here if you dont want the specific BaseClass function not to be executed.. you add the code.. NODEFAULT.

Hope this explains you. :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top