Borges future

I’m playing with Borges 0.1.0. I’m just slowly going into.

While learning and writting some simple examples, I found that some
features are missing. For instance while trying to implement login
example I found that it is not possible use input filed of type
password (without doing changes to class Renderer)

Before trying make some patches I need to know the right way, and
possible look into Seaside2.

Should the password input field be implemented as a separate method of
Renderer ( Renderer.password_input ) or will be better to rewrite
methods another way in that class?

Will there be a cvs for borges in near future somewhere?

The actual login example file ‘login.rb’ is:
#!/usr/bin/env ruby

require 'borges’
require ‘borges/Page’

include Borges

class Login < Page
def initialize
@username = nil
@password = nil
end

def render_on(r)
    r.heading 'Login'
r.form do
    r.print "Name:"
    r.text_input(''){|n| @username = n; puts "*> n= #{n}"}
    r.print "<br>Password:"
    r.text_input(''){|n| @password = n; puts "*> n= #{n}"}
    r.print "<br>"
    r.submit({'value'=>'Login'}) {login}
end
end

def login()
puts "*> Login as #{@username} with #{@password}"
end

end

Borges::register_application(“login”, Login)

if $0 == FILE then
require 'borges/Webrick’
Borges::WebrickConnection.start({:Port=>7000})
end
#EOF

···


Radek Hnilica

No matter how far down the wrong road you’ve gone, turn back.
Turkish proverb

I’m playing with Borges 0.1.0. I’m just slowly going into.

Congratulations! You’re the first person to send email about Borges!

While learning and writting some simple examples, I found that some
features are missing. For instance while trying to implement login
example I found that it is not possible use input filed of type
password (without doing changes to class Renderer)

Before trying make some patches I need to know the right way, and
possible look into Seaside2.

Suggestions and patches welcome :slight_smile:

Should the password input field be implemented as a separate method of
Renderer ( Renderer.password_input ) or will be better to rewrite
methods another way in that class?

This should be added to the interface. I’ve only been modifying Borges
as-needed, and haven’t come across such a need just yet. A
password_input method should be something like:

untested

def password_input(value, attrs={}, &update)
attrs[“value”] = value
attrs[“name”] = @callbacks.register_callback(update)
input(“text”, attrs)
end

Will there be a cvs for borges in near future somewhere?

There is, but its on my home box, so I’d like to keep traffic to a
minimum. If you’d like an account, send me a private mail.


Radek Hnilica

No matter how far down the wrong road you’ve gone, turn back.
Turkish proverb

How fitting, for Borges :slight_smile:

···

Radek Hnilica (ML@Hnilica.CZ) wrote:


Eric Hodel - drbrain@segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04