From 546b1dfb3d66be446c90b4d9e11333352dbd5011 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 4 Dec 2009 09:56:03 +0100 Subject: The generated updates, of the previous fix. --- lib/wx/c_src/gen/wxe_funcs.cpp | 12 ++---------- lib/wx/src/gen/wxFileDialog.erl | 13 +++++-------- 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'lib') diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index cb662fc91b..ccbacce9b9 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -20582,19 +20582,11 @@ case wxFileDialog_GetPath: { // wxFileDialog::GetPath break; } case wxFileDialog_GetPaths: { // wxFileDialog::GetPaths - wxFileDialog *This = (wxFileDialog *) getPtr(bp,memenv); bp += 4; - int * pathsLen = (int *) bp; bp += 4; wxArrayString paths; - int pathsASz = 0, * pathsTemp; - for(int i=0; i < *pathsLen; i++) { - pathsTemp = (int *) bp; bp += 4; - paths.Add(wxString(bp, wxConvUTF8)); - bp += *pathsTemp; - pathsASz += *pathsTemp+4; - } - bp += (8-((0+ pathsASz) & 7 )) & 7; + wxFileDialog *This = (wxFileDialog *) getPtr(bp,memenv); bp += 4; if(!This) throw wxe_badarg(0); This->GetPaths(paths); + rt.add(paths); break; } case wxFileDialog_GetWildcard: { // wxFileDialog::GetWildcard diff --git a/lib/wx/src/gen/wxFileDialog.erl b/lib/wx/src/gen/wxFileDialog.erl index 22b39aa150..efe1ff57f3 100644 --- a/lib/wx/src/gen/wxFileDialog.erl +++ b/lib/wx/src/gen/wxFileDialog.erl @@ -31,7 +31,7 @@ -module(wxFileDialog). -include("wxe.hrl"). -export([destroy/1,getDirectory/1,getFilename/1,getFilenames/1,getFilterIndex/1, - getMessage/1,getPath/1,getPaths/2,getWildcard/1,new/1,new/2,setDirectory/2, + getMessage/1,getPath/1,getPaths/1,getWildcard/1,new/1,new/2,setDirectory/2, setFilename/2,setFilterIndex/2,setMessage/2,setPath/2,setWildcard/2]). %% inherited exports @@ -152,15 +152,12 @@ getPath(#wx_ref{type=ThisT,ref=ThisRef}) -> wxe_util:call(?wxFileDialog_GetPath, <>). -%% @spec (This::wxFileDialog(), Paths::[[string()]]) -> ok +%% @spec (This::wxFileDialog()) -> [[string()]] %% @doc See external documentation. -getPaths(#wx_ref{type=ThisT,ref=ThisRef},Paths) - when is_list(Paths) -> +getPaths(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxFileDialog), - Paths_UCA = [unicode:characters_to_binary([PathsTemp,0]) || - PathsTemp <- Paths], - wxe_util:cast(?wxFileDialog_GetPaths, - <>|| UC_Str <- Paths_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Paths_UCA])) band 16#7)) band 16#7))/unit:8>>). + wxe_util:call(?wxFileDialog_GetPaths, + <>). %% @spec (This::wxFileDialog()) -> string() %% @doc See external documentation. -- cgit v1.2.3