Ticket #127: smallsense_fix_1_of_1_rev_345bd11146c7_Issue__127__Make__AbstractListDialog__to_always_return__acceptedValue__even_if_it_s__nil_.patch

File smallsense_fix_1_of_1_rev_345bd11146c7_Issue__127__Make__AbstractListDialog__to_always_return__acceptedValue__even_if_it_s__nil_.patch, 1.3 KB (added by jan vrany, 7 years ago)
  • SmallSense__AbstractListDialog.st

    # HG changeset patch
    # User Jan Vrany <jan.vrany@fit.cvut.cz>
    # Date 1489443953 0
    #      Mon Mar 13 22:25:53 2017 +0000
    # Node ID 345bd11146c78c908183ce202e6b0c51e0ca3677
    # Parent  f773cc49874344aa1913dec36f897f64a87482ba
    Issue #127: Make `AbstractListDialog` to always return `acceptedValue` even if it's `nil`
    
    ...rather reusing inherited logic to return value of `accept`
    holder (either `true` or `false`) in case `acceptedValue` is `nil`.
    The thing is that in SmallSense, `nil` is used to signal to the
    caller that dialog was cancelled. This is seems to be more natural
    than using `false`.
    
    https://swing.fit.cvut.cz/projects/stx-jv/ticket/127
    
    diff -r f773cc498743 -r 345bd11146c7 SmallSense__AbstractListDialog.st
    a b  
    866866    "Modified: / 13-12-2014 / 08:46:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    867867! !
    868868
     869!AbstractListDialog methodsFor:'opening-dialogInterface'!
     870
     871openInterface:aSymbol
     872    "open a standard interface.
     873     Redefined to return the acceptedValue"
     874
     875    super openInterface:aSymbol.
     876    ^ acceptedValue
     877
     878    "Created: / 13-03-2017 / 22:10:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     879! !
     880
    869881!AbstractListDialog methodsFor:'queries'!
    870882
    871883canCreateMatchingObjectFromString:string