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/wxFindReplaceDialog.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/wx/src/gen/wxFindReplaceDialog.erl') diff --git a/lib/wx/src/gen/wxFindReplaceDialog.erl b/lib/wx/src/gen/wxFindReplaceDialog.erl index 6cc4943f8d..b5cd3350d2 100644 --- a/lib/wx/src/gen/wxFindReplaceDialog.erl +++ b/lib/wx/src/gen/wxFindReplaceDialog.erl @@ -99,7 +99,7 @@ new() -> Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(). new(Parent,Data,Title) - when is_record(Parent, wx_ref),is_record(Data, wx_ref),is_list(Title) -> + when is_record(Parent, wx_ref),is_record(Data, wx_ref),?is_chardata(Title) -> new(Parent,Data,Title, []). %% @doc See external documentation. @@ -107,7 +107,7 @@ new(Parent,Data,Title) Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(), Option :: {'style', integer()}. new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, Options) - when is_list(Title),is_list(Options) -> + when ?is_chardata(Title),is_list(Options) -> ?CLASS(ParentT,wxWindow), ?CLASS(DataT,wxFindReplaceData), Title_UC = unicode:characters_to_binary([Title,0]), @@ -122,7 +122,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, O This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(). create(This,Parent,Data,Title) - when is_record(This, wx_ref),is_record(Parent, wx_ref),is_record(Data, wx_ref),is_list(Title) -> + when is_record(This, wx_ref),is_record(Parent, wx_ref),is_record(Data, wx_ref),?is_chardata(Title) -> create(This,Parent,Data,Title, []). %% @doc See external documentation. @@ -130,7 +130,7 @@ create(This,Parent,Data,Title) This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(), Option :: {'style', integer()}. create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, Options) - when is_list(Title),is_list(Options) -> + when ?is_chardata(Title),is_list(Options) -> ?CLASS(ThisT,wxFindReplaceDialog), ?CLASS(ParentT,wxWindow), ?CLASS(DataT,wxFindReplaceData), -- cgit v1.2.3