aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-03-28 10:16:51 +0100
committerDan Gudmundsson <[email protected]>2014-03-28 10:16:51 +0100
commit7811310ee2c72173824007d3db73ae2b62a725d9 (patch)
tree3ed1b81ed09a5230551dbb2aca7135a0942735bf /lib/wx/test
parente3f9bf8dbfe4e055753f04125406d29af0ae1050 (diff)
parentc15c7c6b2117320aa5feb2c77781634d055cfcd7 (diff)
downloadotp-7811310ee2c72173824007d3db73ae2b62a725d9.tar.gz
otp-7811310ee2c72173824007d3db73ae2b62a725d9.tar.bz2
otp-7811310ee2c72173824007d3db73ae2b62a725d9.zip
Merge branch 'dgud/wx/fix-wx3-windows64'
* dgud/wx/fix-wx3-windows64: wx: Send destroy message direct wx: Add wxLocale class wx: Added misc functions wx: Fix memory garbage collector wx: Fix possibility to fetch early open msgs on mac wx: Fix listCtrl sort callback wx: Fix configure for win64 with wxWidgets-3.0
Diffstat (limited to 'lib/wx/test')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 0e151ccc9b..b375c9d515 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -344,21 +344,21 @@ listCtrlSort(Config) ->
Wx = wx:new(),
Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
- LC = wxListCtrl:new(Frame, [{style, ?wxLC_REPORT bor ?wxLC_SORT_ASCENDING}]),
+ LC = wxListCtrl:new(Frame, [{style, ?wxLC_REPORT}]),
%% must be done crashes in wxwidgets otherwise.
wxListCtrl:insertColumn(LC, 0, "Column"),
Add = fun(Int) ->
- wxListCtrl:insertItem(LC, Int, integer_to_list(Int)),
+ wxListCtrl:insertItem(LC, Int, "ABC " ++ integer_to_list(Int)),
%% ItemData Can only be integers currently
- wxListCtrl:setItemData(LC, Int, abs(2500-Int))
+ wxListCtrl:setItemData(LC, Int, abs(50-Int))
end,
- wx:foreach(Add, lists:seq(0,5000)),
+ wx:foreach(Add, lists:seq(0,50)),
wxWindow:show(Frame),
- timer:sleep(200),
+ timer:sleep(2000),
Sort = fun() ->
wxListCtrl:sortItems(LC, fun(A, B) ->
@@ -374,11 +374,12 @@ listCtrlSort(Config) ->
io:format("Sorted ~p ~n",[Time]),
Item = wxListItem:new(),
+ wxListItem:setMask(Item, ?wxLIST_MASK_TEXT),
_List = wx:map(fun(Int) ->
wxListItem:setId(Item, Int),
?m(true, wxListCtrl:getItem(LC, Item)),
- io:format("~s~n",[wxListItem:getText(Item)])
- end, lists:seq(0,100)),
+ io:format("~p: ~s~n",[Int, wxListItem:getText(Item)])
+ end, lists:seq(0,10)),
wxListItem:destroy(Item),
wx_test_lib:wx_destroy(Frame,Config).