Vector35 / Vector35/binaryninja-api
`interaction.TextLineField` has broken `default=` semantics in CLI
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
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:
- Default value is pre-filled and can be erased by pressing Backspace.
- 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.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with binaryninja.TextLineField and binaryninja.get_form_input in the CLI, using the examples in the issue. Trace the CLI handling of the default value and compare it with the GUI behavior. Done means the documented default semantics work consistently and the reported empty-input cases are covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100