From: repeater Date: 2002-04-01T20:56:33+09:00 Subject: apollo i've seen some posts previously mentioning apollo, the delphi libary ruby wrapping, but not that much word there after. are there many people using it ? i think that for windows users it is a definite better option than VRuby (the other native option) the strong points of delphi has always been 1.) its brilliant visual component library (vcl) collection 2.) the rapid application development, laying out your components visually especially since delphi and kylix has been freewared recently. although apollo seemingly doesn't currently support kylix they are apparently working on it. could someone point out possible disadvantages ? perhaps linking with the corporazi to a too far extent? delphi6 itself has a rather large distribution (if you want the RAD), but i guess one can live without it. the following is an example of what i find really powerful about the system, and i wish to share: you can design your form with delphi, add the .dfm file that describes the form as part of your data section and simply load the form's layout. what has always pissed me off is the manner how GUI fidgeting messes up my code. this is completely circumvented here, with me only linking the functional on_click events (the way it is supposed to be). really humming regards repeater require "phi" include Phi require "dialogs" form = Component._load DATA.read class << form def setup group_box1.msg_button.on_click = proc { message_dlg "message" } #add new node to root or to selected node group_box1.add_button.on_click = proc do if tree_view1.selected.nil? tree_view1.items.add(nil,group_box1.edit1.text) else tree_view1.items.add_child(tree_view1.selected,group_box1.edit1.text) tree_view1.selected.expand(false) end end #save and load treeview into tabbed text file group_box1.save_button.on_click = proc { tree_view1.save("tree.txt") } group_box1.load_button.on_click = proc { tree_view1.load("tree.txt") } end end form.setup form.show mainloop __END__ object Form1: TForm Left = 228 Top = 191 Width = 696 Height = 480 Caption = 'RubyTalk Demo' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Splitter1: TSplitter Left = 161 Top = 0 Width = 8 Height = 453 Cursor = crHSplit end object GroupBox1: TGroupBox Left = 0 Top = 0 Width = 161 Height = 453 Align = alLeft Caption = 'demo' TabOrder = 0 object AddButton: TButton Left = 112 Top = 16 Width = 41 Height = 22 Caption = 'add' end object LoadButton: TButton Left = 16 Top = 65 Width = 81 Height = 25 Caption = 'load' end object SaveButton: TButton Left = 16 Top = 40 Width = 81 Height = 22 Caption = 'save' end object MsgButton: TButton Left = 16 Top = 95 Width = 81 Height = 22 Caption = 'message' end object Edit1: TEdit Left = 8 Top = 16 Width = 100 Height = 21 TabOrder = 0 Text = 'hello' end end object TreeView1: TTreeView Left = 169 Top = 0 Width = 519 Height = 453 Align = alClient Indent = 19 TabOrder = 1 end end