×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    11

    How can you tell if a form was cancelled or okayed?

    I have a form

    f = appuifw.Form(data, 17)
    f.execute()
    self.get_stuff_from_form(f)
    ...

    def get_stuff_from_form(self, form):

    a = int(form[2][2][1])
    b = int(form[0][2])
    if (<the form was cancelled>):
    ...


    How can I tell if my form was cancelled or not? Is it one of the attibutes of 'form'?

    Thanks

  2. #2
    Regular Contributor
    Join Date
    Dec 2004
    Location
    Czech Republic
    Posts
    50
    I haven't tried it, but I think that when you cancel the form (and you change the values), the returned values will be the default ones, won't them?

    If so (I am not sure, that's just an idea), you can compare the default value with the returned value and find out if the form was cancelled or not

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    11
    Thanks, that's a good workaround. I was hoping there was a better way, but I guess not.

    I actually want to send something if they hit ok even if they don't change the values, but not with a cancel. I guess it doesn't support it.

    K
    http://nokiapython.blogspot.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×