tag:fxruby.lighthouseapp.com,2009-10-26:/projects/40125-fxruby/eventsfxruby / FXRuby Events2009-11-11T22:33:30Ztag:fxruby.lighthouseapp.com,2009-10-26:Event/200658522012-06-19T08:50:11Z2012-06-19T08:50:11Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [0a5fc9969a8b24437c05b9e5be7f0c01ce01e8e8] by Lars Kanis<div><p>Update README.textile with a link to <a href=
"https://github.com/larskanis/fxruby">https://github.com/larskanis/fxruby</a><br>
<a href=
"https://github.com/lylejohnson/fxruby/commit/0a5fc9969a8b24437c05b9e5be7f0c01ce01e8e8">
https://github.com/lylejohnson/fxruby/commit/0a5fc9969a8b24437c05b9...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/180498472012-02-16T20:47:33Z2012-02-16T20:47:36ZLars KanisFXRuby: Improved version of Bounce Example [#20]<li>Milestone order changed from <em class="change">“0”</em> to <em class="change">“0”</em></li>
<div><p>Merged with <a href=
"https://github.com/larskanis/fxruby/commit/94b0663c220952b281103271c582fb7d43b5287f">
https://github.com/larskanis/fxruby/commit/94b0663c220952b281103271...</a>
.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/180496012012-02-16T20:33:48Z2012-02-16T20:33:54ZLars KanisFXRuby: buttons.rb example crashes on exit [#12]<li>Assigned user set to <em class="change">“lyle (at lylejohnson)”</em></li>
<div><p>This is solved in 1.6.22.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/180486352012-02-16T19:45:01Z2012-02-16T19:45:04ZLars KanisFXRuby: Crash after setItemJustify with custom FXTable createItem [#31]<li>Milestone order changed from <em class="change">“0”</em> to <em class="change">“0”</em></li>
<div><p>This is solved in 1.6.22.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/180483372012-02-16T19:30:57Z2012-02-16T19:30:59ZLars KanisFXRuby: Segmentation fault with FXImage.rotate [#32]<li>Milestone order changed from <em class="change">“0”</em> to <em class="change">“0”</em></li>
<div><p>This is solved in 1.6.22.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/130307232011-04-21T08:19:18Z2011-04-21T08:19:20ZSven A.FXRuby: buttons.rb example crashes on exit [#12]<li>Milestone order changed from <em class="change">“0”</em> to <em class="change">“0”</em></li>
<div><p>This happens also under Debian Squeeze running ruby 1.9.2-p180
and fxruby-1.6.20.</p>
<p>It seems that the destruction of the application is not working
correctly, because<br>
the following change - a bottom-up removal of all children before
exiting - fixes<br>
the crash:</p>
<pre>
<code class=
"ruby">--- button.rb 2011-04-21 10:05:17.612782000 +0200
+++ button.rb.fixed 2011-04-21 10:07:27.540782516 +0200
@@ -129,7 +129,14 @@
FXRadioButton.new(group4, "Apart", @group4_dt, FXDataTarget::ID_OPTION + 3)
quitButton = FXButton.new(controls, "&Quit", :opts => FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X)
- quitButton.connect(SEL_COMMAND) { getApp().exit(0) }
+ quitButton.connect(SEL_COMMAND) { clean_up(self); getApp().exit(0) }
+ end
+
+ def clean_up(component)
+ component.children.each do |child|
+ clean_up(child)
+ component.removeChild(child)
+ end
end
# Load the named icon from a file</code>
</pre></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85743492010-08-03T21:32:53Z2010-08-03T21:32:53Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [8cb74e534b04d6844e367953755f7864e09c0544] by Lyle Johnson<div><p>Merged latest changes from the topic/1.6 branch<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/8cb74e534b04d6844e367953755f7864e09c0544">
http://github.com/lylejohnson/fxruby/commit/8cb74e534b04d6844e36795...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85743472010-08-03T21:32:49Z2010-08-03T21:32:49Zlyle (at lylejohnson)FXRuby: Warning messages from ActiveRecord when used with FXRuby [#8]<li>Milestone order changed from <em class="change">“0”</em> to <em class="change">“0”</em></li>
<div><p>(from <a href=
"/projects/40125/changesets/ed6af26685a586605164161d5aeb4c0c4d907ecc"
title=
"Changeset [ed6af26685a586605164161d5aeb4c0c4d907ecc]">[ed6af26685a586605164161d5aeb4c0c4d907ecc]</a>)
Modified the generate_kwargs_lib.rb script so that it remembers the
previous warning level the user had set instead of just
assuming<br>
that warnings were turned on. [<a href="/projects/40125/tickets/8"
title="Ticket #8">#8</a> state:resolved]<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/ed6af26685a586605164161d5aeb4c0c4d907ecc">
http://github.com/lylejohnson/fxruby/commit/ed6af26685a586605164161...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85743462010-08-03T21:32:49Z2010-08-03T21:32:49Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [6e78cc26bbd18aea802a202e23fc7f50767dc8d9] by Lyle Johnson<div><p>updated TODO<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/6e78cc26bbd18aea802a202e23fc7f50767dc8d9">
http://github.com/lylejohnson/fxruby/commit/6e78cc26bbd18aea802a202...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85743452010-08-03T21:32:48Z2010-08-03T21:32:48Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [ed6af26685a586605164161d5aeb4c0c4d907ecc] by Lyle Johnson<div><p>Modified the generate_kwargs_lib.rb script so that it
remembers<br>
the previous warning level the user had set instead of just
assuming<br>
that warnings were turned on. [<a href="/projects/40125/tickets/8"
title="Ticket #8">#8</a> state:resolved]<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/ed6af26685a586605164161d5aeb4c0c4d907ecc">
http://github.com/lylejohnson/fxruby/commit/ed6af26685a586605164161...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739302010-08-03T21:13:07Z2010-08-03T21:13:07Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [78173cdc29cdcc47ab23708dde4a8b54daa4854e] by Lyle Johnson<div><p>Removed require 'fox16' statement from top of kwargs.rb to avoid
circular require issue<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/78173cdc29cdcc47ab23708dde4a8b54daa4854e">
http://github.com/lylejohnson/fxruby/commit/78173cdc29cdcc47ab23708...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739292010-08-03T21:13:07Z2010-08-03T21:13:07Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [309a772487a63fbb63368e5a7348ac578b7075af] by Lyle Johnson<div><p>Removed duplicate unit test 'test_emission' in
TC_FXMaterial.rb<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/309a772487a63fbb63368e5a7348ac578b7075af">
http://github.com/lylejohnson/fxruby/commit/309a772487a63fbb63368e5...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739282010-08-03T21:13:06Z2010-08-03T21:13:06Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [d88b20d7eae5a98f48e153226ac0b0ffbb24f9d4] by Lyle Johnson<div><p>Corrected indentation in TC_FXMemoryStream.rb in response to
Ruby 1.9 warnings<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/d88b20d7eae5a98f48e153226ac0b0ffbb24f9d4">
http://github.com/lylejohnson/fxruby/commit/d88b20d7eae5a98f48e1532...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739272010-08-03T21:13:06Z2010-08-03T21:13:06Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [e4a173083c9453b6583dc7d6705383a66035f050] by Lyle Johnson<div><p>Modified TC_FXDCWindow.rb to suppress warning about local
variable shadowing outer variable<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/e4a173083c9453b6583dc7d6705383a66035f050">
http://github.com/lylejohnson/fxruby/commit/e4a173083c9453b6583dc7d...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739262010-08-03T21:13:06Z2010-08-03T21:13:06Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [8dfd22f7d7314a8427825b558ea7f08629db53c8] by Lyle Johnson<div><p>Changed Hoe test_globs from a String to array of string<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/8dfd22f7d7314a8427825b558ea7f08629db53c8">
http://github.com/lylejohnson/fxruby/commit/8dfd22f7d7314a8427825b5...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739252010-08-03T21:13:06Z2010-08-03T21:13:06Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [92a4917f80aa21ba2b2194a24420a9b6e6e91710] by Lyle Johnson<div><p>Corrected indentation in core.rb in response to Ruby 1.9
warnings<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/92a4917f80aa21ba2b2194a24420a9b6e6e91710">
http://github.com/lylejohnson/fxruby/commit/92a4917f80aa21ba2b2194a...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739242010-08-03T21:13:06Z2010-08-03T21:13:06Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [1d8eed89aae817f74fce99e037b1df4dc117e3d8] by Lyle Johnson<div><p>fixed up a few other compiler warnings for 64-bit compiles<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/1d8eed89aae817f74fce99e037b1df4dc117e3d8">
http://github.com/lylejohnson/fxruby/commit/1d8eed89aae817f74fce99e...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/85739232010-08-03T21:13:06Z2010-08-03T21:13:06Zlyle (at lylejohnson)[Changeset] FXRuby: Changeset [79db7ce15ae8187411498f7424a13da320cba8d6] by Lyle Johnson<div><p>Modified stub for FXApp#init to suppress compiler warning about
implicit trunc<br>
<a href=
"http://github.com/lylejohnson/fxruby/commit/79db7ce15ae8187411498f7424a13da320cba8d6">
http://github.com/lylejohnson/fxruby/commit/79db7ce15ae8187411498f7...</a></p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/52053002009-11-12T17:21:32Z2009-11-12T17:21:32Zlyle (at lylejohnson)FXRuby: Correct documentation for FXTopWindow messages [#33]<div><p>The documentation for FXTopWindow needs to be corrected to
reflect the fact that you only get SEL_MINIMIZE, SEL_MAXIMIZE,
SEL_RESTORE and SEL_CLOSE when you call one of the corresponding
FXTopWindow methods (e.g. FXTopWindow#maximize). If you just click
the corresponding window button, you only get SEL_CONFIGURE.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51963042009-11-11T22:42:28Z2009-11-11T22:42:28Zlyle (at lylejohnson)FXRuby: Segmentation fault with FXImage.rotate [#32]<div><p>FXImage.rotate results in a segmentation fault if the rotation
is used for other than 0, 90, 180 or 270 degrees. The Fox toolkit
only supports these degrees for rotating FXImages, but the
documentation of FXRuby doesn't state this clear and the warning
from Fox isn't passed to FXRuby.</p>
<pre>
<code class=
"ruby">img = FXImage.new(app, nil, IMAGE_OWNED | IMAGE_KEEP, 20, 20)
img.setPixel(5, 5, FXColor::Yellow)
img.create
dc.drawImage(img, 50, 50)
img.rotate(45) # <- segmentation fault
dc.drawImage(img, 80, 80)</code>
</pre></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962862009-11-11T22:41:02Z2009-11-11T22:41:02Zlyle (at lylejohnson)FXRuby: Crash after setItemJustify with custom FXTable createItem [#31]<div><p>Tim, I can't reproduce this bug on Windows XP, using Ruby 1.8.6
(2007-09-24 patchlevel 111) and FXRuby 1.6.16, if I remove the call
to exit at the end of the chore block. That is, instead of forcing
the application to immediately exit after adding the new item, I
just close the application a few seconds later by clicking the
close button.</p>
<p>In an ideal world, the app wouldn't crash in either situation,
but right now this feels like a low priority bug. Can you provide
some more information about why it is that you'd want to
immediately exit the application as shown in this test program?</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962822009-11-11T22:40:41Z2009-11-11T22:40:41Zlyle (at lylejohnson)FXRuby: Crash after setItemJustify with custom FXTable createItem [#31]<div><p>I've tested it with the latest (post-1.6.16) FXRuby code and
while it still crashes if you exit immediately after creating the
table item, it doesn't crash if you just exit the app normally
(i.e. by clicking the close button). Will back up and test it with
1.6.16 to confirm that I can reproduce it there.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962782009-11-11T22:40:16Z2009-11-11T22:40:16Zlyle (at lylejohnson)FXRuby: Crash after setItemJustify with custom FXTable createItem [#31]<div><p>The following code crashes on exit on XP and Vista with Ruby
1.8.6 and FXRuby 1.6.16. The crash remains if setItemJustify is
replaced with setItemBorders, but not if it is replaced with
setItemText or setItemData. All four of these functions call
createItem.</p>
<pre>
<code class="ruby">require 'fox16'; include Fox
class CustomTable < FXTable
def createItem *args
puts 'createItem was called'
FXTableItem.new *args
end
end
app = FXApp.new
main = FXMainWindow.new app, 'Test'
table = CustomTable.new main
table.setTableSize 1, 1
table.visibleRows = table.visibleColumns = 1
app.addChore {
table.setItemJustify 0, 0, FXTableItem::LEFT|FXTableItem::CENTER_Y
exit
}
app.create
main.show PLACEMENT_SCREEN
app.run</code>
</pre></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962682009-11-11T22:39:11Z2009-11-11T22:39:11Zlyle (at lylejohnson)FXRuby: Fox::TRUE and Fox::FALSE conflict with Ruby TRUE and Ruby FALSE [#30]<li>Milestone set to <em class="change">“<span class="milestone" data-id="55484">1.8.0</span>”</em></li>
<div><p>I didn't even realize that Ruby defined those constants. Ugh.
Yes, we ought to see if we can get rid of those in FXRuby 1.8. I
don't want to make that kind of API change in FXRuby 1.6 since it
breaks compatibility with those folks who may already be using
Fox::TRUE and Fox::FALSE.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962642009-11-11T22:38:57Z2009-11-11T22:38:57Zlyle (at lylejohnson)FXRuby: Fox::TRUE and Fox::FALSE conflict with Ruby TRUE and Ruby FALSE [#30]<div><p>After "require 'fox16'" we have:</p>
<p>Fox::TRUE -> 1<br>
Fox::FALSE -> 0<br>
Fox::MAYBE -> 2</p>
<p>Meanwhile, Ruby has built-in constants:</p>
<p>TRUE -> true<br>
FALSE -> false</p>
<p>So after "include Fox", we have:</p>
<p>TRUE -> true<br>
FALSE -> false<br>
MAYBE -> 2</p>
<p>To avoid confusion, perhaps in FXRuby, Fox::TRUE and Fox::FALSE
could be renamed or even abolished entirely?</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962442009-11-11T22:37:42Z2009-11-11T22:37:42Zlyle (at lylejohnson)FXRuby: FXMessageBox class methods are not threadsafe [#29]<div><p>OP replied:</p>
<p>This is just an example. The actual code has since been
rewritten to use app.addTimeout with :repeat = true in place of the
thread, and in fact I'm now calling app.disableThreads for faster
GUI updates.</p>
<p>Nonetheless, the segfault is real. You say that "all of the GUI
stuff needs to take place in the main thread". But in the FXRuby
examples folder, groupbox.rb uses a thread to update a clock. And
if you remove the sleep call on line 373, then run the program,
click "First", and choose an option from the dropdown, it segfaults
after a call to FXMessageBox.information, just like this
example.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962352009-11-11T22:37:13Z2009-11-11T22:37:13Zlyle (at lylejohnson)FXRuby: FXMessageBox class methods are not threadsafe [#29]<div><p>Lyle asked the OP:</p>
<p>Tim, what is it that you're trying to accomplish in this code
(or in the actual code, if this is just an example)? Since all of
the GUI stuff needs to take place in the main thread, we usually
just reserve threads for long-running (or potentially long-running)
activities, e.g. processing data in the background.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962292009-11-11T22:36:30Z2009-11-11T22:36:30Zlyle (at lylejohnson)FXRuby: FXMessageBox class methods are not threadsafe [#29]<div><p>In the following code, any of FXMessageBox.error,
FXMessageBox.information, FXMessageBox.question, and
FXMessageBox.warning will cause a seg-fault (WinXP, Ruby 1.8.6,
FXRuby 1.6.13). But FXMessageBox.new followed by a call to execute
seems OK. When the Thread.new line is removed, both cases work.</p>
<pre>
<code class="ruby">require 'fox16'; include Fox
app = FXApp.new
main = FXMainWindow.new app, 'Test'
button = FXButton.new main, 'button'
button.connect(SEL_COMMAND) {
# this works
# dialog = FXMessageBox.new(
# main, 'Test', 'test', nil, MBOX_OK|DECOR_TITLE|DECOR_BORDER
# )
# dialog.execute PLACEMENT_OWNER
# this causes a seg-fault
FXMessageBox.information main, MBOX_OK, 'Test', 'test'
}
Thread.new {button.text while true}
app.create
main.show PLACEMENT_SCREEN
app.run</code>
</pre></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51962082009-11-11T22:35:13Z2009-11-11T22:35:13Zlyle (at lylejohnson)FXRuby: Unusable device context for FXTableItem.drawContent [#28]<div><p>Originally submitted by Tim Hunter:</p>
<p>One of FXTableItem.drawContent's parameters is a device context
dc. This parameter seems to be unusable - calls to dc.drawText, for
example, change nothing on the screen. Specifically, see the thread
<a href=
"http://rubyforge.org/pipermail/fxruby-users/2008-February/thread.html#1442">
"Text color for individual items in FXTable"</a>.</p></div>tag:fxruby.lighthouseapp.com,2009-10-26:Event/51961862009-11-11T22:33:30Z2009-11-11T22:33:30Zlyle (at lylejohnson)FXRuby: Segmentation faults for nil parents/owners [#27]<li>Milestone set to <em class="change">“<span class="milestone" data-id="55484">1.8.0</span>”</em></li>
<div><p>Added checks for passing nil to FXMainWindow.new() and
FXDialogBox.new() in FXRuby 1.6.15. Tim noted the problem still
exists for many other classes (e.g. FXButton, FXHorizontalFrame,
FXVerticalFrame, FXList, FXTable), but we're going to hold off on a
more comprehensive solution until FXRuby 1.8 (since it's a pretty
invasive change)</p></div>