|
From: Kent D. <ke...@st...> - 2001-09-30 14:40:27
|
Hi.
I just started playing around and changing the ListBox to accomodate my
needs.
When I did that, I noticed something that appears to work not quite as
FLTK does when you're using C++, and confused me for a few seconds :-)
After populating the HoldBrowser with data...
@transactionlist.add("Some text", objectItRefersTo)
And setting up a callback:
@transactionlist.callback do |a,b|
puts a.value.to_s + ":" +
a.data(a.value).to_s + ";" + b
end
...I still get b==nil. Its not an immediate problem, as I can get the
data thru the browser object, but since most Fltk callbacks use the
idiom of a widget pointer and a void pointer as arguments in C++, this
caught me by surprise.
Reading /ruby-fltk/doc/en/guide.txtand especially 3.2 seems to be
somewhat misleading on this subject, as it states that only the data
should be passed. I'm assuming it should say that the widget itself and
the data will be passed. (Or is this changing?)
--
<[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]>
)____(stud.techn.;ind.øk.data)||(softwareDeveloper.at(Trustix))_(
/"Opinions expressed are mine and not those of my Employer, "\
( "the University, my girlfriend, stray cats, banana fruitflies, " )
\"nor the frontal lobe of my left cerebral hemisphere. "/
|