From 097cc3f6679a7c3769111cdb15a630186218d015 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 5 Oct 2016 16:25:59 +0200 Subject: Fix guard test for chardata Previously only accepted lists tough a call is made to unicode:characters_to_binary/1, and the functions where specified to handle chardata. --- lib/wx/src/gen/wxMultiChoiceDialog.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/wx/src/gen/wxMultiChoiceDialog.erl') diff --git a/lib/wx/src/gen/wxMultiChoiceDialog.erl b/lib/wx/src/gen/wxMultiChoiceDialog.erl index 1f67b9dfae..9b3129cf53 100644 --- a/lib/wx/src/gen/wxMultiChoiceDialog.erl +++ b/lib/wx/src/gen/wxMultiChoiceDialog.erl @@ -99,7 +99,7 @@ new() -> Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[unicode:chardata()]. new(Parent,Message,Caption,Choices) - when is_record(Parent, wx_ref),is_list(Message),is_list(Caption),is_list(Choices) -> + when is_record(Parent, wx_ref),?is_chardata(Message),?is_chardata(Caption),is_list(Choices) -> new(Parent,Message,Caption,Choices, []). %% @doc See external documentation. @@ -108,7 +108,7 @@ new(Parent,Message,Caption,Choices) Option :: {'style', integer()} | {'pos', {X::integer(), Y::integer()}}. new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options) - when is_list(Message),is_list(Caption),is_list(Choices),is_list(Options) -> + when ?is_chardata(Message),?is_chardata(Caption),is_list(Choices),is_list(Options) -> ?CLASS(ParentT,wxWindow), Message_UC = unicode:characters_to_binary([Message,0]), Caption_UC = unicode:characters_to_binary([Caption,0]), -- cgit v1.2.3