Displaying 20 results from an estimated 23 matches for "item_data".
2006 Nov 30
0
[765] trunk/wxruby2: Fixed item_data functions for ListCtrl, plus test
...solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[765] trunk/wxruby2: Fixed item_data functions for ListCtrl, plus test</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>765</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2006-11-29 20:21:25 -0500 (Wed,...
2006 Nov 12
1
TreeCtrl item_data
The attached fixes set_item_data, get_item_data and some other methods
for the TreeCtrl so they work nicely with Ruby objects and GC.
In C++ Wx TreeCtrl item_data works differently from client_data in
classes derived from ControlWithItems (eg Choice, ListCtrl). A
one-to-one mapping of the way TreeCtrl works would mean that you...
2007 Sep 04
4
listctrl set_item_data
Hi,
I have used set_item_data with ruby objects (an array) and got a crash.
The reason is simple, the objects were deallocated by the GC.
The easy solution would be to accept only long parameters (like the
original interface).
The hard is to play by the GC''s rules and increase the reference count
and decrease on delet...
2006 Dec 01
0
[767] trunk/wxruby2: Added CheckListBox to item_data test, note to explain why fixes are not needed
...in:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[767] trunk/wxruby2: Added CheckListBox to item_data test, note to explain why fixes are not needed</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>767</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2006-12-01 12:42:1...
2007 Sep 05
0
[ wxruby-Bugs-13676 ] xrc listctrl windows custom data crash
...the crash:
$ ./wxb.rb
./wxb.rb:28: [BUG] Segmentation fault
ruby 1.8.6 (2007-03-13) [i386-mswin32]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application''s support team for more information.
>From the documentation:
Boolean set_item_data(Integer item, Integer data)
Integer get_item_data(Integer item)
They shouldn''t accept non integer data. Right now this is accepted:
@lst.set_item_data(x,[x,x])
I don''t know how it supposed to work, but it seems that the ruby object is converted to long and then back (ListCtrl.i...
2006 Feb 20
1
[Prototype] onSuccess Event and Ajax.Updater bug in IE
...with a Autocompleter control that calls a
function that contains
an Ajax.Updater as an AfterUpdateElement callback. It
works fine in
firefox, but I don''t think Ajax.Updater gets called
under IE.
http://pastebin.com/563889
1.
function updater(input, item) {
2.
var item_data =
item.getElementsByTagName(''span'')[0];
3.
var pars = ''item-data='' +
item_data.innerHTML + ''&input-text=''
+ input.value;
4.
new
Ajax.Updater(''nutrients'',''fooddb/browser/nutrients'...
2006 Feb 21
1
RE: [Prototype] onSuccess Event and, Ajax.Updater bug in IE
...at contains
> an Ajax.Updater as an AfterUpdateElement callback.
It
> works fine in
> firefox, but I don''t think Ajax.Updater gets called
> under IE.
>
> http://pastebin.com/563889
>
> 1.
> function updater(input, item) {
> 2.
> var item_data =
> item.getElementsByTagName(''span'')[0];
> 3.
> var pars = ''item-data='' +
> item_data.innerHTML + ''&input-text=''
> + input.value;
> 4.
> new
> Ajax.Updater(''nutrients''...
2004 Jul 16
2
TreeCtrl#get_item_data
Hi
I saw from the ChangeLog that [get|set]_client_data was removed from
ComboBox for 0.4.0 because the methods weren''t working properly.
TreeCtrl#get_item_data still seems to be there. I was wondering if
someone who understood the issue could say if TreeItemData might also be
afflicted with the same problems?
I seem to be segfaulting quite a bit (actually, on TreeEvt#get_item),
but it disappears when I don''t use item_data. The methods are easy
e...
2006 Dec 01
0
[766] trunk/wxruby2: Added item_data aliases for client_data functions, update doc & tests;
...solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[766] trunk/wxruby2: Added item_data aliases for client_data functions, update doc & tests;</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>766</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2006-1...
2007 Mar 30
0
[931] branches/wxruby2/wxwidgets_282/doc/textile/treectrl.txtl: Added insert_item_before documentation.
...":#TreeCtrl_isselected
</span><span class="lines">@@ -730,13 +731,24 @@
</span><span class="cx"> %(arg-type)Integer% selImage = -1,
</span><span class="cx"> %(arg-type)Object% item_data = @nil@)
</span><span class="cx">
</span><del>- "TreeItemId":treeitemid.html *insert_item*(%(arg-type)TreeItemId% parent,
- %(arg-type)size_t% before, %(arg-type)String% text,
- %(arg-type)Integer% ima...
2006 Nov 16
0
[741] trunk/wxruby2: Fix get_item_data, hiding TreeItemData messiness, fix GC-ing (Alex Fenton)
...olid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[741] trunk/wxruby2: Fix get_item_data, hiding TreeItemData messiness, fix GC-ing (Alex Fenton)</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>741</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2006-11-...
2007 Sep 17
7
Re : syntax II
Alex Fenton wrote :
>1) Setting up event handlers
>
>In most real apps, I think the most normal way to set up event handlers
>is for the event to be dealt with by a corresponding method. At the
>moment this has to be done using a block:
>
>evt_button(AN_ID) { on_button_click }
>evt_button(my_button.get_id) do | event |
> on_button_click(event)
>end
>evt_size { |
2007 Oct 09
17
Crash when using item data with a CheckListBox
...ive"]
data = ["data1", "data2", "data3", "data4", "data5"]
lb = Wx::ListBox.new(helloframe)
# lb = Wx::CheckListBox.new(helloframe)
0.upto(4) { |i| lb.append(choices[i], data[i]) }
evt_listbox lb do |event|
puts lb.get_item_data(event.index)
end
helloframe.show
end
end
HelloWorld.new.main_loop
When an item is selected, the corresponding data is ouput.
If the list box is replaced by a check list box, the application
crashes immediately.
Cheers.
Chauk-Mean.
2007 Oct 09
17
Crash when using item data with a CheckListBox
...ive"]
data = ["data1", "data2", "data3", "data4", "data5"]
lb = Wx::ListBox.new(helloframe)
# lb = Wx::CheckListBox.new(helloframe)
0.upto(4) { |i| lb.append(choices[i], data[i]) }
evt_listbox lb do |event|
puts lb.get_item_data(event.index)
end
helloframe.show
end
end
HelloWorld.new.main_loop
When an item is selected, the corresponding data is ouput.
If the list box is replaced by a check list box, the application
crashes immediately.
Cheers.
Chauk-Mean.
2006 Mar 10
5
PDF::Writer Simpletable Iteration
...;item_desc") { |col| col.heading =
"Description" }
tab.columns["item_cose"] =
PDF::SimpleTable::Column.new("item_cost") { |col| col.heading = "Cost" }
tab.orientation = :center
tab.bold_headings = true
@items.each do |item|
@item_data = [
{ "item_code" => item.code,
"item_name" => item.name,
"item_desc" => item.desc,
"item_cost" => item.cost},
]
end
tab.data.replace @data
tab.render_on(_p)
end
send_data _p.render, :filena...
2007 Jan 06
0
[835] trunk/wxruby2/doc/textile: Updated documentation about TreeItemId
...em)
+ else
+ # otherwise the click didn''t happen over an item
+ ...
+
+h3. Associating Ruby objects with TreeCtrl items
+
</ins><span class="cx"> TreeCtrls can be linked to non-GUI application objects by using the
</span><span class="cx"> item_data methods. Methods which add items to the tree all accept an
</span><span class="cx"> optional @item_data@ argument, which may be any normal Ruby
</span></span></pre></div>
<a id="trunkwxruby2doctextiletreeeventtxtl"></a>
<div cla...
2008 Nov 14
1
GenericDirCtrl#re_create_tree behaviour
Hi
When GenericDirCtrl#re_create_tree is called in order to refresh the
tree with any possible changes made to the file system since it was
loaded, it doesn''t re-expand all the tree items that were expanded
prior to calling re_create_tree. I''m working on a solution to note all
open tree items and after re_create_tree manually expand the items
that are still present in the tree.
2007 Dec 30
1
ReOrdering Wx::TreeCtrl Items
Given the following hash:
#...
@project_list = {
''Contract0'' => nil,
''Contract1'' => {
''Project1'' => nil,
''Project2'' => nil,
''Project3'' => {
''task1'' =>
2004 Jun 23
1
some wxruby questions
...true? and
if not, is there a work around? MODERN fonts are NOT fixed width,
especially on debian
3) Are there some memory problems with tree control? I instantiate a
tree control, add some items and then if I call this code several
minutes later, I often get a seg fault :
get_item_data(get_selection).absolute_filename
(where absolute_filename is a method on the item data)
this works, for a while and then it starts seg faulting. I''m guessing
that somewhere the ruby garbage collection is prematurely collecting
these items? has anyone else seen this. It''s re...
2006 Dec 20
4
wxruby2-preview 0.0.38 released
...e.org/frs/?group_id=35
== What''s New
* HtmlWindow and HtmlEasyPrinting, plus related classes
* HelpController and HtmlHelpController for displaying online help
* Enhanced internationalisation support for working with languages and
encodings, including the Locale class
* Fixed the useful item_data family of functions, for associating ruby
objects with UI controls
* Numerous fixes and enhancements within existing classes
* New and updated docs and samples
There''s a full Changelog on the website.
== Important
This is still a preview/alpha release. There''s still some GC-re...