search for: wxconvutf8

Displaying 10 results from an estimated 10 matches for "wxconvutf8".

2007 Jan 23
0
[853] trunk/wxruby2/swig: Replace deprecated STR2CSTR with StringValuePtr
...;/span><span class="cx"> void log_message(int argc, VALUE *argv, VALUE self) </span><span class="cx"> { </span><span class="cx"> VALUE str = rb_f_sprintf(argc, argv); </span><del>- wxLogMessage(wxString(STR2CSTR(str), wxConvUTF8)); </del><ins>+ wxLogMessage(wxString(StringValuePtr(str), wxConvUTF8)); </ins><span class="cx"> </span><span class="cx"> } </span><span class="cx"> </span><span class="lines">@@ -35,11 +35,11 @...
2007 Jun 25
0
[1069] trunk/wxruby2/swig/typemap.i: Fix big memory leak in methods taking wxString as a parameter
...############################## -%typemap(in) wxString& { -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp// $argnum: $1_type $1_name ($1_mangle) [$1_ltype] -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp$1 = new wxString(StringValuePtr($input), wxConvUTF8); -} </del><span class="cx"> </span><del>-%typemap(in) const wxString& { -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp$1 = new wxString(StringValuePtr($input), wxConvUTF8); -} - -%typemap(in) wxString* { -&nbsp&nbsp&nbsp...
2005 Oct 09
0
[Fwd: Re: [Swig] Re: Object return problem]
...r. wxWindow uses directors (as almost all our wxruby classes do), and the swig error message hints at the problem. We need to use directorout typemaps, rather than just plain "out". I inserted this, and it seemed to work: %typemap(directorout) wxString { $result = wxString(STR2CSTR($1), wxConvUTF8); } Typemaps are sure a confusing feature. They''re great, and powerful. But I hope for SWIG v3 they can be completely overhauled to be more consistent and straightforward. I''ll forward this message to the wxruby list, too. Kevin Charlie Savage wrote: > Hi Roy, > > N...
2005 Oct 06
9
Grid.GetTextExtent
Wow. Look what SWIG does to GetTextExtent in Grid.cpp: void SwigDirector_wxGrid::GetTextExtent(wxString const &string, int *x, int *y, int *descent, int *externalLeading, wxFont const *font) const { ... if (swig_get_up()) { wxWindow::GetTextExtent(string,x,y,descent,externalLeading,font); return; } obj0 = rb_str_new2((const char *)(&string)->mb_str());
2005 Jul 24
2
Fwd: fix Choice.cpp unicode string
...-- swig/classes/Choice.i 31 Jan 2005 04:18:52 -0000 1.2 +++ swig/classes/Choice.i 24 Jul 2005 19:18:55 -0000 @@ -14,7 +14,7 @@ for(int i=0; i < $1; ++i) { VALUE thisItem = rb_ary_entry($input, i); - $2[i] = (wxChar *)STR2CSTR(thisItem); + $2[i] = wxConvUTF8.cMB2WC(STR2CSTR(thisItem)); } } There''s another I think UTF8 problem: The onAbout dialog in caret.rb uses the (c) character so the string is not shown. Jani
2005 Aug 03
24
patch for Icon
...ignature is only used on GTK on other systems it is: wxIcon(const wxString& name, long type = wxBITMAP_TYPE_ICO_RESOURCE, int desiredWidth = -1, int desiredHeight = -1); So I wrapped this in a #ifdef __WXGTK__ #else #endif I also had to change: wxLogWarning(wxConvUTF8.cMB2WC(StringValuePtr(str))); I don''t know about other systems but on Windows wxLogWarning and wxLogStatus only take const char *formatString and that is what the docs show also. Kevin the refactored install works great also. I will be out of town for 5 days starting tomorrow so if you...
2005 Aug 03
2
patch for text ctrl
This is to add back the << operator to TextCtrl it got removed somewhere along the way. Sean _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2005 Aug 02
1
Latest tarball
The latest tarball won''t compile on Windows: src/Functions.cpp(582) : error C2664: ''wxLogWarning'' : cannot convert parameter 1 from ''const class wxWCharBuffer'' to ''const char *'' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called src/Functions.cpp(592) : error
2007 Jun 28
0
[1095] trunk/wxruby2: Remove useless methods from Wx::Object and add wx_class method for info; document
...VALUE wxwx_class() { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxString class_name( self->GetClassInfo()->GetClassName() ); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_class_name = rb_str_new2((const char *)class_name.mb_str(wxConvUTF8)); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturn rb_class_name; + } +} + </ins><span class="cx"> %include "include/wxObject.h" </span></span></pre> </div> </div> </body> </html>
2005 Aug 04
9
wxruby2 retooling
I finally gave up on swig 1.3.22, since it seems to be causing too many problems. Ubuntu breezy will have 1.3.24, so I''m retargeting wxruby2 to swig 1.3.24+. At the moment, I have 1.3.25 on my system, since that''s the current release. I''m finding all kinds of problems with the post-processors we have that clean up the .cpp files that swig creates. The