aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx')
-rw-r--r--lib/wx/api_gen/wx_gen.erl33
-rw-r--r--lib/wx/doc/src/notes.xml58
-rw-r--r--lib/wx/examples/demo/demo_html_tagger.erl12
-rw-r--r--lib/wx/vsn.mk5
4 files changed, 81 insertions, 27 deletions
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 780bb2e741..2ed4476440 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -73,8 +73,7 @@ gen_xml() ->
-record(hs,{alias,skip,fs,fopt,ev,acc,info}).
init_defs(List0) ->
- List1 = to_lists(List0),
- lists:map(fun mangle_info/1, List1).
+ [mangle_info(L) || L <- to_lists(List0)].
mangle_info(E={enum,Type0,SkipStr}) ->
Type = case is_atom(Type0) of true -> atom_to_list(Type0); false -> Type0 end,
@@ -138,9 +137,9 @@ parse_defs([{class,Name,Parent,Info}|Rest], Acc0) ->
Defs0 = load_members(FileName, Name, gb_trees:empty(), Tab, Type, Info),
put(current_class, Name),
- Class0 = #class{name=name(Name,Info),parent=Parent,
+ Class0 = #class{name=name(Name,Info), parent=Parent,
doc=get_value(doc,Info#hs.info,undefined),
- file=FileName,options=Info#hs.info, id=next_id(class_id)},
+ file=FileName, options=Info#hs.info, id=next_id(class_id)},
ParseClass = fun(Member,{Class,Dfs}) ->
parse_class(Member,Tab,Dfs,Class,Info)
end,
@@ -161,12 +160,11 @@ parse_defs([], Acc) -> reverse(Acc).
meta_info(C=#class{name=CName,methods=Ms0}) ->
Ms = lists:append(Ms0),
- HaveConstructor =
- lists:keysearch(constructor, #method.method_type, Ms) =/= false,
+ HaveConstructor = lists:keymember(constructor, #method.method_type, Ms),
case lists:keysearch(destructor, #method.method_type, Ms) of
false when HaveConstructor ->
- Dest = #method{name="destroy",id=next_id(func_id),
- method_type=destructor, params=[this(CName)]},
+ Dest = #method{name = "destroy", id = next_id(func_id),
+ method_type = destructor, params = [this(CName)]},
C#class{methods = [[Dest]|Ms0]};
false ->
C#class{abstract = true};
@@ -451,9 +449,9 @@ find_erl_alias_name(MName,Ps,Fopts) ->
_ ->
Find = fun({all,AliasName},Acc) -> [AliasName|Acc];
({Var,AliasName},Acc) ->
- case lists:keysearch(Var, #param.name, Ps) of
- {value, _} -> [AliasName|Acc];
- _ -> Acc
+ case lists:keymember(Var, #param.name, Ps) of
+ true -> [AliasName|Acc];
+ false -> Acc
end
end,
case lists:foldl(Find, [], Aliases) of
@@ -873,11 +871,14 @@ add_method2(M0=#method{name=Name,params=Ps0,type=T0},#class{name=CName,parent=Pa
end,
M1 = M0#method{defined_in=CName,
min_arity = length(Req),
- max_arity = length(Req) + if length(Opt) > 0 -> 1; true -> 0 end,
+ max_arity = length(Req) + case Opt of
+ [_ | _] -> 1;
+ _ -> 0
+ end,
type = Type,
method_type = IsStatic,
where = Where,
- id=next_id(func_id),
+ id = next_id(func_id),
pre_hook = get_opt(pre_hook, Name, length(Ps), Opts),
post_hook = get_opt(post_hook, Name, length(Ps), Opts),
doc = get_opt(doc, Name, length(Ps), Opts)
@@ -1037,10 +1038,10 @@ types_differ([list|R1], [opt_list|R2]) ->
types_differ([opt_list|R1], [list|R2]) ->
types_differ(R1,R2);
types_differ([C1|R1], [C2|R2]) when is_tuple(C1), is_tuple(C2) ->
- (size(C1) =/= size(C2)) orelse types_differ(R1,R2);
+ (tuple_size(C1) =/= tuple_size(C2)) orelse types_differ(R1,R2);
types_differ([C1|_R1], [_C2|_R2]) when is_tuple(C1) ->
true;
-types_differ([_C1|_R1], [C2|_R2]) when is_tuple(C2)->
+types_differ([_C1|_R1], [C2|_R2]) when is_tuple(C2) ->
true;
types_differ([_C1|R1], [_C2|R2]) -> %% More cases?
types_differ(R1,R2);
@@ -1198,7 +1199,7 @@ name(Name0, #hs{alias=Alias}) ->
Name0;
"esaBrekciP" ++ _ -> %% Arrg uses base
Name0;
- "esaB" ++ Rest when hd(Name0) == $w ->
+ "esaB" ++ Rest when hd(Name0) =:= $w ->
%% Arrg Some decl uses base class directly
reverse(Rest);
_F ->
diff --git a/lib/wx/doc/src/notes.xml b/lib/wx/doc/src/notes.xml
index f9f16defd3..92933c348b 100644
--- a/lib/wx/doc/src/notes.xml
+++ b/lib/wx/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2009</year>
+ <year>2009</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>wxErlang Release Notes</title>
@@ -31,6 +31,58 @@
<p>This document describes the changes made to the wxErlang
application.</p>
+<section><title>Wx 0.98.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Corrected incorrectly generated wxFileDialog:getPaths/1.
+ Reported by Jason/hornja.</p>
+ <p>
+ Own Id: OTP-8330</p>
+ </item>
+ <item>
+ <p>
+ Fixed a memory reference bug which caused unexplained
+ {badarg, Int} exits when running multiple wx
+ applications.</p>
+ <p>
+ Own Id: OTP-8461</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Added <c>wxListCtrl:getEditCtrl/1</c> (not available on
+ Mac).</p>
+ <p>
+ Own Id: OTP-8408</p>
+ </item>
+ <item>
+ <p>
+ Cleanups suggested by tidier and modernization of types
+ and specs.</p>
+ <p>
+ Own Id: OTP-8455</p>
+ </item>
+ <item>
+ <p> Changed representation of wxTreeItem to be an
+ integer. This saves memory, where the driver do not need
+ to keep a object reference to each tree item. </p> <p>
+ Added getFirstChild and getNextChild to wxTreeCtrl.</p>
+ <p>
+ Own Id: OTP-8462</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Wx 0.98.4</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/wx/examples/demo/demo_html_tagger.erl b/lib/wx/examples/demo/demo_html_tagger.erl
index 9b6d1fd950..243e5d659f 100644
--- a/lib/wx/examples/demo/demo_html_tagger.erl
+++ b/lib/wx/examples/demo/demo_html_tagger.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2009-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
-module(demo_html_tagger).
@@ -462,7 +462,7 @@ fix_remote([H|T]) ->
fix_remote([]) ->
[].
--spec is_keyword(atom()) -> bool().
+-spec is_keyword(atom()) -> boolean().
is_keyword('after' ) -> true;
is_keyword('and') -> true;
diff --git a/lib/wx/vsn.mk b/lib/wx/vsn.mk
index 91bbdc8c99..54ab92cad2 100644
--- a/lib/wx/vsn.mk
+++ b/lib/wx/vsn.mk
@@ -1,6 +1,7 @@
-WX_VSN = 0.98.4
+WX_VSN = 0.98.5
-TICKETS = OTP-8243 OTP-8250 OTP-8292
+TICKETS = OTP-8330 OTP-8461 OTP-8408 OTP-8455 OTP-8462
+TICKETS_0.98.4 = OTP-8243 OTP-8250 OTP-8292
TICKETS_0.98.3 = OTP-8138 OTP-8126 OTP-8083
TICKETS_0.98.2 = OTP-7943
TICKETS_0.98.1 = OTP-7875 \ No newline at end of file