<div dir="ltr">Oops, sorry, that should be <div>text.set_default_style(Wx::TextAttr.new(Wx::BLACK, Wx::WHITE, font))</div><div><br></div><div>OK, I understand, it works now, thanks for the hint!</div><div><br></div><div>But the main problem still exists: it is very hard to determine when you use wrong or incomplete method signature, when it just silently fails.Is it some configuration problem of mine or it is WxRuby feature?<br>
<br><div class="gmail_quote">2008/10/13 Кирилл Лиходедов <span dir="ltr"><<a href="mailto:kirill.likhodedov@gmail.com">kirill.likhodedov@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr"><div><br></div>That worked (but why? Aren't there default values for the rest of the parameters?), but setting this font as the default style of TextCtrl leads to the same error:<div><br></div><div><div>
text = Wx::TextCtrl.new(self, -1, "text", :style => Wx::TE_RICH|Wx::TE_RICH2|Wx::TE_PROCESS_ENTER|Wx::TE_PROCESS_TAB)</div><div> font = Wx::Font.new(12, Wx::FONTFAMILY_DECORATIVE, Wx::FONTSTYLE_NORMAL, Wx::FONTWEIGHT_NORMAL)</div>
<div> text.set_default_style(Wx::TextAttr.new(font)) #This leads to error</div><div><br></div><div>By the way, why is it a Runtime threatening error, not an exception?</div><div><br></div><div class="gmail_quote">2008/10/13 Andreas Garnæs <span dir="ltr"><<a href="mailto:lists@ruby-forum.com" target="_blank">lists@ruby-forum.com</a>></span><div>
<div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Кирилл Лиходедов wrote:<br>
> Wx::Font.new(12, Wx::Font::FONTFAMILY_DECORATIVE)<br>
<br>
</div>Try replacing that line with:<br>
<br>
Wx::Font.new(12, Wx::FONTFAMILY_DECORATIVE, Wx::FONTSTYLE_NORMAL,<br>
Wx::FONTWEIGHT_NORMAL)<br>
<br>
- andreas<br>
<font color="#888888">--<br>
Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
_______________________________________________<br>
wxruby-users mailing list<br>
<a href="mailto:wxruby-users@rubyforge.org" target="_blank">wxruby-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/wxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/wxruby-users</a></font></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div>