Displaying 20 results from an estimated 3000 matches similar to: "ruby method names"
2006 Feb 10
12
Accessing ''many'' variables
Hi,
I have a class called Outlet which has_many Jacks. Apart from internal
id, each jack is unique by the attribute ''color''.
I''d like to iterate through each Outlet, and be able to output data
for a Jack of a certain color.
Say, I want to access the orange jack for the current outlet:
<td><%=h outlet.jack.color[''O''].ip_address
2007 Nov 02
11
xrcise tutorial, undefined method ''upper_bt''
Hi
I''m trying to follow the tutorial on xrcise at
http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise
But I keep getting the following error when I try to run the example;
tutorial.rb:21:in `initialize'': undefined method ''upper_bt'' for
#<CaseChangeFrame:0x2d610f8> (NoMethodError)
from tutorial.rb:28:in `new''
from
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 Sep 26
7
development status, 1.9.2
Hi all
Just a quick update on recent SVN activity:
* added Sound and CollapsiblePane classes
* added the XRC tool to wxSugar
* fixed some XRC bugs in Window
* added syntax sugar for event handlers and list-like controls
* added some missing methods in Sizer
Sean - I''m away for about 10 days from this weekend, and I''m thinking of
doing a 1.9.2 release in the next day or two.
2007 Nov 07
1
3 wxSugar questions
A bit new to wxRuby and have 2 questions regarding wxSugar:
1. I only find one sample application for wxSugar, but as I understand
from the docs, wsSugar is the preferred approach. Are there any more
wxSugar samples available somewhere?
2. When I run sugar-sample.rb, I get a couple of warnings: "listen is
deprecated, use evt_xxx directly". Just wanted to check: Is this sample
2007 Mar 21
4
Bug in TextCtrl constructor
Howdy,
I''ve uncovered a bug in the constructor for TextCtrl (originally
uncovered while using WxSugar but it appears to apply to WxRuby itself
as well). Here''s the output from irb:
# ------
irb(main):001:0> require ''wx'';
irb(main):002:0* ctl =
2006 Nov 29
5
wxSugar control problem
I''m using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am
coming up with an error when trying to create a SpinCtrl (and quite a
few others have exactly the same prob.):
#file date_picker.rb
class DatePicker < Wx::Dialog
def initialize
super(nil, :title => "Pick a date...")
@cal = Wx::CalendarCtrl.new(self)
add(@cal)
#works fine up to
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
2007 Mar 29
7
object-oriented GUI design and event handling
I''m trying to setup a fairly simple GUI with Ruby to perform some SQL
queries. There are a few drop-down boxes where users can select
different options and then one button that when clicked should get the
text from each drop-down in order to perform the query. Once it gets the
result it should display it to a text control. The problem is I am not
sure how to actually reference each
2007 Nov 03
9
wxThread
Hey guys,
I''m working on the start of incorperating wxSocket into a library that
can be included with the Core, and a part of this, is to create a
wxThread class, which will basically just be a barebone copy over of
Ruby''s own Thread class. (This should also help when we get Ruby 2.0,
which hopefully will have Native Threads, as we should still be able to
get the base
2007 Aug 24
2
SURVEY: wxRuby API style
Hi
As we''re getting closer to a stable release of wxRuby, I''d like to get
your views on the API style. There''s a survey here:
http://rubyforge.org/survey/survey.php?group_id=35&survey_id=66
I''d like to know if you''d like to see two wxSugar syntax features become
part of core, standard wxRuby version 2.0. These are:
1) Allow ruby-style
2007 Apr 03
2
CalendarCtrl.date not working?
I finally got my CheckListBoxes under control (thanks Alex& Phil) and
have moved on to tackling the CalendatCtrl. This one seemed pretty easy
when I was reading through the documentation but I cannot retrieve the
selected date. I have the following code:
def initialize...
...
@calendar = panel.add(Wx::CalendarCtrl[])
panel.add(Wx::Button[:label => ''test'']) do
2008 Jun 05
2
how to add a method without coding it directly into app?
i''m missing something here.
how would I code this outside the application to be shared with other
Camping apps?
module Blog::Controllers
module AuthenticationHelper
def self.included(base)
class << base
define_method :authenticate do |*a|
a.each do |meth|
if method_defined?(meth.to_s)
2006 Sep 15
2
wxSugar 0.1.1, in subversion
Hi
WxSugar 0.1.1 is now available for download from:
http://rubyforge.org/frs/?group_id=35
And in subversion
svn co svn://rubyforge.org/var/svn/wxruby/trunk/wxsugar
This version speeds up accessors.rb (thanks to Sean''s suggestion), and
fixes a few bugs.
alex
2007 Feb 19
2
Sizer question
First, Thank you, thank you, thank you for those who put wxRuby
together. I''m thrilled to be able to write GUI code in Ruby!
I''m hitting some confusion about how Sizers work. I''ve read the
tutorials and the section in the wxWidgets book but I still can''t
seem to figure this out.
Here''s an example of my code:
parent = Wx::Panel.new(frame, -1,
2006 Dec 18
13
unit testing wxruby GUIs
paul.allton at uk.bnpparibas.com wrote:
> I''m a big fan of automated UI testing (i.e. driving the UI from some
robot API). I appreciate this
> is potentially a whole new project, but does wxwidgets provide a
method of clicking buttons,
> typing into components ... if so, would it be technically possible to
expose this in wxruby.
I like automated UI testing too, but
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 Aug 02
3
wxSocket..... or wxRubySocket....
Hey Alex,
I was looking into figuring out a way to create a truely Asynchronis
Socket type for Ruby, and thought I''d go down to the bare minimal
implementation of it, to start creating a socket, and then I got to
thinking. Looking at the wxWidgets C/C++ Code, it doesn''t do much
different then what I''m doing, only in Ruby, so I thought maybe, as a way
to avoid
2007 Sep 12
1
XRC Tool
Hi
Attached is a rough draft of a tool that parses XRC files and creates
skeleton ruby class files from them.
ruby xrc-tool.rb my_frame.xrc > my_frame.rb
At the moment it only deals with Frame/Dialog/Panel subclasses, for
which it creates a constructor that loads from the XML, and binds the
named controls in the XML to ruby variables and accessors.
THe idea is that this would make
2007 Nov 08
1
wxSugar 0.1.19
Hi
We''ve just released an updated version of wxSugar, version 0.1.19.
http://rubyforge.org/frs/?group_id=35
The only change in this version is that it contains a workaround for a
?bug introduced in REXML packaged with ruby 1.8.6, that meant that the
XRCise tool[1] would not work properly.
alex
[1] http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise