The Accidental Rubyist

invalid byte sequence in UTF-8

General and health update

leave a comment »

Things have been slow. I was in the midst of a lot of testing out with pads, subpads, subwindows etc. Then my dad got hospitalized twice. In the middle of all that, I fell ill. I still have some chest congestion which is being treated (antibiotics). I simple can’t look at a comp terminal or book without eyes smarting after 5 minutes. Dad’s still bedridden, he’s almost 90 so life’s going to be mostly bed and loo for him now :-(.

So last few days, I’ve been mulling over how to get scrollpanes into rbcurse without the component having to be aware. It should be place-able into a scroll pane, that’s all. However, currently rbcurse components write directly onto the screen. OTOH, i was just reading that Java comps are double-buffered. The closest I can think of is a component writing to a pad. And then the pad is written onto the screen. As many pads as components. Or perhaps subpads on one large pad. Then any component or form can be attached to a scrollpane, which will show the appropriate portion of the pad.

Just remember with pads, you need to declare dimensions beforehand. If the components exceeds, need to create a nnew pad and copy stuff (this would be needed when we go in for tree components)

# Rescue to the rescue:

h = { :age => 10 }
h[:name].downcase                         # ERROR
h[:name].downcase rescue "No name"        # => "No name"


Written by totalrecall

October 24, 2009 at 11:21 am

Posted in rbcurse

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: