Please support our sponsors!
This service provided by BeBits: The Best Source of BeOS Software!
ScriptingBeosRuby
BeBits > TableOfContents > Info > ScriptingBeos

Ruby is the interpreted scripting language for quick and easy object-oriented programming. It

has many features to process text files and to do system management tasks (as in Perl). It is

simple, straight-forward, extensible, and portable.

Oh, I need to mention, it's totally free, which means not only free of charge, but also freedom to

use, copy, modify, and distribute it.

RuBe (or something)

There is no such package yet, searching on raa.ruby-lang.org and ruby-forge.org.

I have written (but not published since it's like nothing yet) a rudimentary ruby extension which wraps BApplication, BWindow, and a few others and provides some of the methods and callbacks to ruby. With it, you can do something like this:

    #!/boot/home/config/bin/ruby
    
    require "be"
    include Be
    
    class MyWindow < BWindow
        def initialize
            super([100, 80, 480, 100], "RuBe says hello!", B_TITLED_WINDOW, B_NOT_RESIZABLE)
    
            view = BStringView.new(bounds, 'text', 'Look at me! I am a fancy BeOS programmer!', B_FOLLOW_ALL, B_WILL_DRAW)
            view.set_font(be_bold_font)
            view.set_font_size(18.0)
            add_child(view)
        end
        def quit_requested
            the_app.post_message(B_QUIT_REQUESTED)
            true
        end
    end
    
    class MyApp < BApplication
        def initialize
            super("application/x-vnd.RuBe-hello")
        end
        def ready_to_run
            win = MyWindow.new
            win.show
        end
    end
    
    app = MyApp.new
    app.run

However, my work is on hold because the display on my thinkpad died.

Until there is any official project going, requests/issues could be posted here.

Discuss code style, packaging, whatever.

-- manik@nospam-home.se

Hi,

Maybe, one way to produce such a wrapper should be to use swig (http://www.swig.org/). In a few days, i have wrap almost all the application kit.

-- Olivier Coursière


As my thesis at school, I'm working on a generic system for generating bindings for Python, Ruby (and potentially more languages), plus documentation, automatically. I hope you guys don't beat me to it. :)

-- Mikael Jansson


Links

Ruby
CompilingRubyForBeOS

RuBe applications, add-ons etc on BeOS

Hold on a sec.. Let's create the beos ruby extension first.


PAGE VISITS
2,445

NEW PAGES
BuildingCairo
StoringDataInBetweenOSes
ScriptingBeosRuby
ScriptingBeosPython
HaikuOS
QemUwinbe
MinimalBeos
XpMBRoverwrite
SteveSakoman
MailingLists

RECENT CHANGES
BuildingCairo
BeCommunity
BuildingFirebird
PlayGround
CorumIII
BeAcademic
SupportForMachinesAndArchitectures
BeOsReleases
HowTo
HaikuOS
Edit Page | Front Page | BeBits
Site content is in the public domain. Unless otherwise noted, everything else is copyright © 1999-2002 Fifth Ace Productions, LLC. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.
Fifth Ace Productions