Skip to content

Commit f6a8e7d

Browse files
authored
Merge pull request #169 from mathworks/168-baseviewcontroller-onfieldedited-should-handle-cellstr-values-as-strings-just-like-char-values
168 baseviewcontroller onfieldedited should handle cellstr values as strings just like char values
2 parents c7837cb + 517bfa8 commit f6a8e7d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/+wt/+test/BaseWidgetTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef BaseWidgetTest < wt.test.BaseTest
1+
classdef (Abstract) BaseWidgetTest < wt.test.BaseTest
22
% Implements a unit test for a widget or component
33

44
% Copyright 2020-2025 The MathWorks Inc.

widgets/+wt/+abstract/BaseViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function onFieldEdited(obj,evt,fieldName,index)
205205
newValue = evt.Value;
206206

207207
% Treat char as string
208-
if ischar(newValue)
208+
if ischar(newValue) || iscellstr(newValue) %#ok<ISCLSTR>
209209
newValue = string(newValue);
210210
end
211211

0 commit comments

Comments
 (0)