Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wizard form
Message
 
To
25/02/2006 06:25:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01098903
Message ID:
01099161
Views:
13
I would recommand NOT to use the wizard if you need to modiy what the code does. I have been through what you are trying to achieve, the wizard code works if you don't modify it, and if you decide to modify you have to understand the impact it will have on the rest of the wizard code. But if you still want to use this code, I would recommend not to modify the parent class code (which is part of VFP framework), but rather copy the parent class code into you click event, and modify that, this way you will not change the behavior of the parent class.

>hi,
>thank you for reply,
>i put at click event DODEFAULT()
>
>i see at delete command at view parent code --->txtbtns
>this code? how i can add new code or locate to somthing if found it don't delete.
>
>
>#DEFINE C_WIZSTYLE			"WIZBTNS.VCX"
>#DEFINE C_WIZDIR 			"WIZARDS\"
>#DEFINE C_PROMPT1_LOC		"Find: "
>#DEFINE E_NOSTYLE_LOC		"The class library (WIZBTNS.VCX) needed by this form could not be found. "+;
>							"Please locate."
>
>LOCAL cGridRef,cWizHomePath,separator,cWizStyFile
>
>IF TYPE('THIS.Parent') # "O"
>	RETURN
>ENDIF
>
>IF SET("TALK") = "ON"
>	SET TALK OFF
>	THIS.oldTalk = "ON"
>ELSE
>	THIS.oldTalk = "OFF"
>ENDIF
>
>
>IF ATC(C_WIZSTYLE,SET("CLASSLIB")) = 0
>	
>	* Returns just the pathname
>	cWizHomePath = _WIZARD
>	IF '\' $ cWizHomePath
>	   cWizHomePath = SUBSTR(m.cWizHomePath,1,RAT('\',m.cWizHomePath))
>	   IF RIGHT(m.cWizHomePath,1) = '\' AND LEN(m.cWizHomePath) > 1 ;
>	            AND SUBSTR(m.cWizHomePath,LEN(m.cWizHomePath)-1,1) <> ':'
>	         cWizHomePath = SUBSTR(m.cWizHomePath,1,LEN(m.cWizHomePath)-1)
>	   ENDIF
>	ELSE
>	   cWizHomePath = ''
>	ENDIF
>
>	* Add a backslash unless there is one already there.
>	separator = IIF(_MAC,":","\")
>	IF !(RIGHT(m.cWizHomePath,1) $ '\:') AND !EMPTY(m.cWizHomePath)
>	   m.cWizHomePath= m.cWizHomePath+ m.separator
>	ENDIF
>
>	DO CASE
>	CASE FILE(C_WIZSTYLE)
>		cWizFile = C_WIZSTYLE
>	CASE FILE(m.cWizHomePath+C_WIZSTYLE)
>		cWizFile = m.cWizHomePath+C_WIZSTYLE
>	CASE FILE(m.cWizHomePath+C_WIZDIR+C_WIZSTYLE)
>		cWizFile = m.cWizHomePath+C_WIZDIR+C_WIZSTYLE	
>	CASE FILE(HOME()+C_WIZSTYLE)
>		cWizFile = HOME()+C_WIZSTYLE
>	CASE FILE(HOME()+C_WIZDIR+C_WIZSTYLE)
>		cWizFile = HOME()+C_WIZDIR+C_WIZSTYLE
>	OTHERWISE
>		=MESSAGEBOX(E_NOSTYLE_LOC)
>		cWizFile = GETFILE("VCX",C_PROMPT1_LOC+C_WIZSTYLE)
>	ENDCASE
>	
>	IF ATC(C_WIZSTYLE,m.cWizFile)#0
>		SET CLASS TO (m.cWizFile) ADDITIVE
>	ELSE
>		* Failed to get WIZSTYLE.VCX file
>		RETURN .F.
>	ENDIF
>	
>ENDIF
>
>THIS.InitVars()
>
>IF THIS.lStartTop AND !EMPTY(ALIAS())
>	GO TOP
>ENDIF
>
>THIS.ButtonRefresh()
>THIS.NavRefresh()
>
>cGridRef=THIS.GridRef
>IF !EMPTY(m.cGridRef)
>	* Change this if you desire to have the grid initially selected.
>	* THISFORM.&cGridRef..SetFocus()
>ENDIF
>
>
>
>>If you still want to have the functionnality of the button and you want to add code after the record is deleted, use something like in the click event of the button.
>>
DODEFAULT()
>>  &&& New code here
>>
>>If you want to do something before the record is deleted reverse the order above.
>>
>>
>>>hi all,
>>>any idea help
>>>how i can add new code at delete command at myform created via wizard form.
>>>
>>>thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform