Menu ▾ ▴

#2920 bind command with converter inserts incorrect binding into the dom

nextrelease
open-fixed
nobody
None
5
19 hours ago
1 day ago
No

I have a script which binds a slice component string to a datumRange using a converter. This binding is inserted into the dom when it cannot be represented in the dom. The .vap is saved and the .vap is not loadable.

Discussion

  • Jeremy Faden

    Jeremy Faden - 1 day ago

    The script:

    from org.jdesktop.beansbinding import Converter
    
    setScriptTitle('Binding Converter Vap Bug')
    setScriptDescription('''Binding registers the binding in the .vap, so that
    it can be restored later.  But when it has a converter,
    it should not be registered.''')
    
    a0= annotation(0,text='one')
    a1= annotation(1,text='eno',anchorOffset='1em,4em')
    
    class ReverseBC( Converter ):
        def convertForward( self, c ):
            print c, '->', c[::-1] 
            return c[::-1]
        def convertReverse( self, c ):
            print c, '->', c[::-1] 
            return c[::-1]
    
    bind( a0, 'text', a1, 'text', ReverseBC() )
    print len(dom.bindings)
    
     

    Last edit: Jeremy Faden 1 day ago
  • Jeremy Faden

    Jeremy Faden - 1 day ago
     
  • Jeremy Faden

    Jeremy Faden - 1 day ago

    This is fixed and will be in v2026a_10.

     
  • Jeremy Faden

    Jeremy Faden - 19 hours ago
    • status: open --> open-fixed