Skip to Content
avatar image
Former Member

PowerBuilder DW SaveAs Cancel

Hello,

I am using PB 12.5.

How do I know that a user selected Cancel in PB SaveAs dialog? li_ret = dw_1.SaveAs()

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Nov 07, 2016 at 07:10 AM

    Powerbuilder returns -1 if the user cancels the SaveAs dialog. But it also returns -1 if the save fails because of other reasons.

    So the only way to know that user cancels the dialog is to show your own SaveAs dialog as Roland suggested.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 04, 2016 at 05:30 PM

    You could use GetFileSaveName instead and then pass the returned 'pathname' to the SaveAs with a hard coded SaveAsType.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 07, 2016 at 04:21 PM

    Thanks Rene.

    I think Appeon should update this return code - maybe return 0 if user cancels.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 21, 2016 at 02:25 AM

    I'm using, Powerbuilder 12.5. Where can I download maintenace bug fixed download ?

    Add comment
    10|10000 characters needed characters exceeded