nobody at rubyforge.org
2007-May-21 18:40 UTC
[Wxruby-development] [1025] trunk/wxruby2/swig: Use Wx::THE_APP constant as global reference to App (as per WxWidgets);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type"
content="text/html; charset=utf-8" /><style
type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:'':'';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family:
verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;
font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding:
6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid;
padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family:
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch
.binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[1025] trunk/wxruby2/swig: Use Wx::THE_APP constant as global
reference to App (as per WxWidgets);</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>1025</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-05-21 14:40:07 -0400 (Mon, 21 May
2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use Wx::THE_APP constant as global reference to App (as per
WxWidgets);
add a little hack to renamer to prevent it mangling it</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#trunkwxruby2swigFunctionsi">trunk/wxruby2/swig/Functions.i</a></li>
<li><a
href="#trunkwxruby2swigrenamerrb">trunk/wxruby2/swig/renamer.rb</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwxruby2swigFunctionsi"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/swig/Functions.i (1024 => 1025)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/swig/Functions.i        2007-05-21
18:39:11 UTC (rev 1024)
+++
trunk/wxruby2/swig/Functions.i        2007-05-21
18:40:07 UTC (rev 1025)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> class wxRubyApp
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>-        static
VALUE app_ptr;
</del><ins>+
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> void log_message(int argc, VALUE
*argv, VALUE self)
</span><span class="lines">@@ -64,9 +64,7 @@
</span><span class="cx">
</span><span class="cx"> static VALUE get_app(VALUE self)
</span><span class="cx"> {
</span><del>- VALUE ret = wxRubyApp::app_ptr;
-
- return ret;
</del><ins>+ rb_const_get(mWxruby2,
rb_intern("THE_APP"));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static VALUE
</span></span></pre></div>
<a id="trunkwxruby2swigrenamerrb"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/swig/renamer.rb (1024 => 1025)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/swig/renamer.rb        2007-05-21
18:39:11 UTC (rev 1024)
+++
trunk/wxruby2/swig/renamer.rb        2007-05-21
18:40:07 UTC (rev 1025)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> match = re.match(line)
</span><span class="cx"> if(match)
</span><span class="cx"> quoted_method_name =
match[0]
</span><ins>+ return line if quoted_method_name ==
''"THE_APP"''
</ins><span class="cx"> method_name =
quoted_method_name[1..-2]
</span><span class="cx"> new_method_name =
''"'' + un_camelcase(method_name) +
''"''
</span><span class="cx"> line[quoted_method_name]
= new_method_name
</span></span></pre>
</div>
</div>
</body>
</html>
Reasonably Related Threads
- [1022] trunk/wxruby2/swig/classes/App.i: Memory mgmt: use Wx::App to mark still-alive Windows, set up Wx::THE_APP const
- [1088] trunk/wxruby2/swig/Functions.i: Added a return statement where needed to fix compile on Win32
- [1119] trunk/wxruby2/swig/Functions.i: Avoid erroneous ''parent must not be nil'' errors when using global
- [1136] trunk/wxruby2/swig/classes/App.i: Note when the Wx::App is exiting and avoid doing GC if in process of
- [1118] trunk/wxruby2/swig: Move Wx::message_box function from wx.i to Functions.i, where it belongs
