Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return value from AsktoSave not IDYES
Message
From
28/10/2003 13:21:57
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
28/10/2003 12:53:48
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00843642
Message ID:
00843656
Views:
30
Chris,

Neither! I don't see anything wrong with what you're doing (in the sense that I don't think it will cause any problems), nor do I see anything "wrong" with what MM is doing.

Just a difference in philosophy. Since the user has already answered "Yes" to "Do you want to save your changes?", MM is returning the result that save call.

---J


>I put in an a cbizobjform.AsktoSave() call, and need to perform additional actions if the user actually saved. The return value was 0 instead of IDYES(6), changed to that by the return value of the SaveRecord call. I added the two commented lines as a workaround. Is this a bug, or something I'm not doing correctly?
>
>
>CASE lnAnswer = IDYES
>	*----------------------
>	*--- Save the record
>	*----------------------
>	lnAnswer = This.SaveRecord()
>	IF lnAnswer = FILE_MUSTKEY
>		lnAnswer = IDMUSTKEY
>	ELSE
>		IF lnAnswer <> FILE_OK
>			lnAnswer = IDCANCEL
>*		ELSE
>*			lnAnswer = IDYES
>		ENDIF
>	ENDIF
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform