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/wxAuiManager.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/wx/src/gen/wxAuiManager.erl') diff --git a/lib/wx/src/gen/wxAuiManager.erl b/lib/wx/src/gen/wxAuiManager.erl index 37693060e1..a33e5e9a65 100644 --- a/lib/wx/src/gen/wxAuiManager.erl +++ b/lib/wx/src/gen/wxAuiManager.erl @@ -177,7 +177,7 @@ getManager(#wx_ref{type=WindowT,ref=WindowRef}) -> (This, Window) -> wxAuiPaneInfo:wxAuiPaneInfo() when This::wxAuiManager(), Window::wxWindow:wxWindow(). getPane(#wx_ref{type=ThisT,ref=ThisRef},Name) - when is_list(Name) -> + when ?is_chardata(Name) -> ?CLASS(ThisT,wxAuiManager), Name_UC = unicode:characters_to_binary([Name,0]), wxe_util:call(?wxAuiManager_GetPane_1_0, @@ -223,7 +223,7 @@ insertPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},# -spec loadPaneInfo(This, Pane_part, Pane) -> 'ok' when This::wxAuiManager(), Pane_part::unicode:chardata(), Pane::wxAuiPaneInfo:wxAuiPaneInfo(). loadPaneInfo(#wx_ref{type=ThisT,ref=ThisRef},Pane_part,#wx_ref{type=PaneT,ref=PaneRef}) - when is_list(Pane_part) -> + when ?is_chardata(Pane_part) -> ?CLASS(ThisT,wxAuiManager), Pane_part_UC = unicode:characters_to_binary([Pane_part,0]), ?CLASS(PaneT,wxAuiPaneInfo), @@ -235,7 +235,7 @@ loadPaneInfo(#wx_ref{type=ThisT,ref=ThisRef},Pane_part,#wx_ref{type=PaneT,ref=Pa This::wxAuiManager(), Perspective::unicode:chardata(). loadPerspective(This,Perspective) - when is_record(This, wx_ref),is_list(Perspective) -> + when is_record(This, wx_ref),?is_chardata(Perspective) -> loadPerspective(This,Perspective, []). %% @doc See external documentation. @@ -243,7 +243,7 @@ loadPerspective(This,Perspective) This::wxAuiManager(), Perspective::unicode:chardata(), Option :: {'update', boolean()}. loadPerspective(#wx_ref{type=ThisT,ref=ThisRef},Perspective, Options) - when is_list(Perspective),is_list(Options) -> + when ?is_chardata(Perspective),is_list(Options) -> ?CLASS(ThisT,wxAuiManager), Perspective_UC = unicode:characters_to_binary([Perspective,0]), MOpts = fun({update, Update}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Update)):32/?UI>>|Acc]; -- cgit v1.2.3