MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / setText

Function setText

packages/nativescript-inspector/src/index.ts:2390–2401  ·  view source on GitHub ↗
(target: any, value: string)

Source from the content-addressed store, hash-verified

2388}
2389
2390function setText(target: any, value: string): void {
2391 if (!(isKindOf(target, "UITextField") || isKindOf(target, "UITextView"))) {
2392 throw new InspectorFailure(
2393 -32011,
2394 "setText is only supported for UITextField and UITextView.",
2395 );
2396 }
2397 target.text = value;
2398 if (isKindOf(target, "UITextField")) {
2399 sendActions(target, controlEventEditingChanged);
2400 }
2401}
2402
2403function setControlValue(target: any, value: unknown): void {
2404 if (isKindOf(target, "UISwitch")) {

Callers 1

performMethod · 0.85

Calls 2

isKindOfFunction · 0.85
sendActionsFunction · 0.85

Tested by

no test coverage detected