Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameter List Bug
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00642946
Message ID:
00642955
Views:
18
This message has been marked as the solution to the initial question of the thread.
It's a known bug. The workaround is either making LPARAMETERS the first line of the method, or making sure that comment lines don't have multiple stars (more than one in row). For example, the following works properly
* * * * * * * * * * * * * * * * * * * * * *
* Deletes Attached Photo
* * * * * * * * * * * * * * * * * * * * * *
LPARAMETERS tlForce
>In VFP 6 if you place a comment at the top of a method in class and then drop the object onto a form, when you add code to the method the classes’ parameters are/were automatically placed at the top of the method.
>
>Now in VFP 7 the parameter list only appears if the classes’ parameter list (the LPARAM statement) is the first line. Anyone figure out a way to get around this bug?
>
>Example Class Method in Photo Control
>
>	PROCEDURE deletephoto
>		******************************************
>		* Deletes Attached Photo
>		******************************************
>		LPARAMETERS tlForce
>		LOCAL lcPhotoFile
>		* Get photo path and file
>		lcPhotoFile = THIS.GetPhotoFileName()
>		* Check to see if the file exists
>		IF FILE(lcPhotoFile)
>		    * Confirm Deletion
>		ELSE
>		    * No photo file found to delete
>		ENDIF
>	ENDPROC
>
>Place the Photo Control on a form and open the DeletePhoto method. No parameter list. Delete the comments at the top, now you get the list.
>
>This one cost me some time!
>
>Rich
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform