MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / TextLineField

Class TextLineField

python/interaction.py:77–113  ·  view source on GitHub ↗

``TextLineField`` Adds prompt for text string input. Result is stored in self.result as a string on completion.

Source from the content-addressed store, hash-verified

75
76
77class TextLineField:
78 """
79 ``TextLineField`` Adds prompt for text string input. Result is stored in self.result as a string on completion.
80 """
81 def __init__(self, prompt: str, default: Optional[str] = None):
82 self._prompt = prompt
83 self._default = default
84 self._result = None
85
86 def _fill_core_struct(self, value):
87 value.type = FormInputFieldType.TextLineFormField
88 value.prompt = self._prompt
89 value.hasDefault = self._default is not None
90 if self._default is not None:
91 value.stringDefault = self._default
92
93 def _fill_core_result(self, value):
94 value.stringResult = core.BNAllocString(str(self._result))
95
96 def _get_result(self, value):
97 self._result = value.stringResult
98
99 @property
100 def prompt(self):
101 return self._prompt
102
103 @prompt.setter
104 def prompt(self, value):
105 self._prompt = value
106
107 @property
108 def result(self):
109 return self._result
110
111 @result.setter
112 def result(self, value):
113 self._result = value
114
115
116class MultilineTextField:

Callers 2

save_svgFunction · 0.90
_get_form_inputMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected