Skip to content

interaction.TextLineField has broken default= semantics in CLI #6695

Open
@whitequark

Description

@whitequark

Version and Platform (required):

  • Binary Ninja Version: 5.0.7280-test Ultimate (9ef1367f)
  • OS: Debian
  • OS Version: trixie
  • CPU Architecture: x64

Bug Description:
In the GUI, the default value is pre-filled in the field, which works out.

In the CLI, it is never used no matter how the API is called.

Steps To Reproduce:

>>> import binaryninja
>>> binaryninja.get_form_input([f := binaryninja.TextLineField("Type:", default="AAA")], ""); f.result
Type: 123
'123'
>>> binaryninja.get_form_input([f := binaryninja.TextLineField("Type:", default="AAA")], ""); f.result
Type: 
''

Expected Behavior:
One of:

  1. Default value is pre-filled and can be erased by pressing Backspace.
  2. Default value is returned when no input is entered. (While this makes entering an empty string impossible, it's easier to work around that than around lack of default values.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: APIIssue needs changes to the APIEffort: TrivialIssue should take < 1 dayImpact: LowIssue is a papercut or has a good, supported workaround

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions