Displaying 20 results from an estimated 700 matches similar to: "Re : syntax II"
2007 Sep 10
2
syntax II
Hi
Given the warm response to the syntax additions in 1.9.1 I''m considering
moving one or two more syntax extensions into core, and would like your
thoughts. Last ones, I promise. Realise we don''t want much more API
change now, but also we''ll probably also have to live with whatever we
settle on for 2.0 for a little while, so...
1) Setting up event handlers
In
2007 Oct 23
6
wxRuby 1.9.2
I''m happy to announce that wxRuby 1.9.2 is now available from Rubyforge.
As usual we''ve got source and binary gems for Win32, OS X and Linux:
http://rubyforge.org/frs/?group_id=35
or
gem install wxruby
== WHAT''S NEW ==
This release has a mix of new syntax features, new classes, and lots of
minor fixes and additions
* New shorter syntax for event handlers
* New
2007 Sep 15
2
wxRuby 1.9.1 and id accessor consistency problem
Hi all,
wxRuby 1.9.1 introduced great Rubish style accessors (x.label as a synonym
for x.get_label).
I just found that get_id has no corresponding Rubish style id accessor.
For a CheckListBox or a StaticText (I haven''t checked for other kind of
controls), id just returns the Ruby object_id.
This is very confusing and not consistent with other accessors.
Chauk-Mean.
2009 Jan 05
8
How to use evt_update_ui wrt RichTextCtrl ?
Hi,
I''m trying to create a very simple RichTextCtrl sample based on the C++ version.
This works pretty well now with the fixes for missing
RichTextCtrl.selection_bold? ... methods.
See the attached script.
Given the formatting buttons (bold, italics, underlined), I can type
text with the proper formatting, select some text and apply a
formatting later ...
The problem I have is I
2009 Jan 05
8
How to use evt_update_ui wrt RichTextCtrl ?
Hi,
I''m trying to create a very simple RichTextCtrl sample based on the C++ version.
This works pretty well now with the fixes for missing
RichTextCtrl.selection_bold? ... methods.
See the attached script.
Given the formatting buttons (bold, italics, underlined), I can type
text with the proper formatting, select some text and apply a
formatting later ...
The problem I have is I
2010 Mar 30
2
My first wxRuby app doesn't work, please help!
Hi, I'm trying to learn wxRuby. This is program:
require 'wx'
include Wx
class MyFrame < Frame
def initialize
super(nil,-1,"Mi primera ventana Wx!")
@panel = Panel.new(self)
@lbl1 = StaticText.new(@panel,-1,"Label")
@text1 = TextCtrl.new(@panel,-1,"Text Value")
@combo =ComboBox.new(@panel,-1,"Combo Text")
@button
2007 Oct 09
17
Crash when using item data with a CheckListBox
Hi,
The following code works as expected with a list box.
require "wx"
class HelloWorld < Wx::App
def on_init
helloframe = Wx::Frame.new(nil, "Hello World")
choices = ["one", "two", "three", "four", "five"]
data = ["data1", "data2", "data3", "data4", "data5"]
2007 Oct 09
17
Crash when using item data with a CheckListBox
Hi,
The following code works as expected with a list box.
require "wx"
class HelloWorld < Wx::App
def on_init
helloframe = Wx::Frame.new(nil, "Hello World")
choices = ["one", "two", "three", "four", "five"]
data = ["data1", "data2", "data3", "data4", "data5"]
2008 Feb 27
2
Missing evt_tree_item_menu method for TreeCtrl ?
Hi,
The documentation mentions the evt_tree_item_menu method for TreeCtrl
but it seems that this method is not defined (wxRuby 1.9.4 on
Windows).
As a workaround, I''m currently using evt_tree_item_right_click.
Cheers.
Chauk-Mean.
2007 Sep 20
7
Troubles with ListBox and CheckListBox events
Hi all,
Here is an excerpt of code (with the new syntax from upcoming wxRuby 1.9.2) :
evt_checklistbox(my_checklist, :on_checklistbox)
evt_listbox(my_checklist, :on_listbox)
evt_listbox(my_list, :on_listbox)
def on_checklistbox(event)
checklist = event.event_object
# puts "listbox - event : item[#{event.int}] checked : #{event.checked?}"
puts "listbox -
2006 Oct 21
3
wxsugar question
I''ve only had the briefest play with wxSugar and already I like it a lot.
One small question - have you considered some more ''convention over
configuration'' like they do in rails, in particular for event connectors?
So instead of
listen(:button, my_button, my_button_pressed)
you can leave it out entirely and rely on the convention that a button has
a _pressed
2007 Oct 23
3
CheckListBox : delete method bug !
Hi,
I''ve practically finished a patch for removing the limitation of
CheckListBox (http://rubyforge.org/pipermail/wxruby-development/2007-October/000973.html)
but I just discovered a new bug related with this control !!
I need to redefine the delete method to take into account the deletion
of the associated data. The problem is that if I just redefine this
method and simply call super,
2008 Mar 18
14
Proposal for an improved API for Sizer (and ToolBar)
Hi all,
This is a proposal for supporting keyword arguments to Sizer#add
following the thread below :
http://rubyforge.org/pipermail/wxruby-development/2008-March/001244.html
After a deeper look at lib/wx/keyword_ctors.rb and
lib/wx/keyword_defs.rb, I understood the whole thing :-).
I just reused and modified slightly the method args_as_list.
The new Sizer#add_item combines the features of add
2007 Sep 27
10
Adding more sugar to wxSugar
Hi all,
New wxRuby event handling offers the choice between using blocks or
methods seamlessly and easily. This is great respectively for simple
app and more complex app.
Nevertheless, currently the creation of an application, a frame, or a
dialog is very tedious for simple app :
- you need to create a subclass of Wx::App, Wx::Frame ...
- you need to put the initialization code in the initialize
2009 Sep 03
24
wxRuby-2.0.1 release ?
Hi,
What about releasing a new version shortly ?
This is a long-awaited request from several users especially for
recent ruby-1.9.1 versions on MinGW.
Cheers.
Chauk-Mean.
2004 Jun 11
9
Handling Events that don''t take an ID
Hey Kevin,
Am I correct in assuming that if I want a particular widget to respond to an
event which doesn''t take an ID as an argument (like evt_size or
evt_left_down), that I have to inherit a new widget and define the event
handler within the inherited class? Here''s a little contrived code example
to illustrate what I mean:
class MyCtrl < Wx::TextCtrl
def
2008 Nov 11
6
Build problem with ruby-1.9.1-preview1
Hi all,
I wanted to have a look at wxRuby on a recent version of ruby 1.9
(ruby-1.9.1-preview1) on Ubuntu 8.10 x86.
Here is the result :
chauk-mean at MyUbuntu:~/wxruby2$ ruby19 -v
ruby 1.9.1 (2008-10-28 revision 19983) [i686-linux]
chauk-mean at MyUbuntu:~/wxruby2$ rake19 WXRUBY_VERSION=1.9.9 gem
(in /home/chauk-mean/wxruby2)
Enabling DYNAMIC build
Enabling RELEASE build
Enabling UNICODE build
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
<!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:
2007 Sep 20
3
Bug? in wxSugar enumerable_controls.rb
Hi,
I wanted to use wxSugar enumerable features to add a method for
returning checked items'' index to the CheckListBox class :
require ''wx_sugar/version''
require ''wx_sugar/wx_classes/control_with_items''
require ''wx_sugar/wx_classes/listctrl''
class Wx::CheckListBox
def checked_items
# use of find_all method from Enumerable
2007 Oct 09
3
Trouble with dialog based application
Hi,
A long time ago, I made some MFC GUI programming ...
There was basically 2 kinds of application :
- dialog based application : a simple app based on a dialog (without
menu, toolbar, status bar ...)
- frame based app (Single Document or Multiple Document) with menu,
toolbar, status bar ...
I tried to make a dialog based app with wxRuby but the application
never exits !!
The following code