From lyle at lylejohnson.name Fri May 2 09:21:06 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 2 May 2008 08:21:06 -0500 Subject: [fxruby-users] A word about compatibility with JRuby and Ruby 1.9 Message-ID: <8B3873D4-1740-4FAF-8344-35A501CD28C7@lylejohnson.name> All, Due to a number of recent bug reports regarding FXRuby's compatibility with JRuby, I feel like I need to clear something up, and that's that FXRuby will never (well, "almost certainly never") work with JRuby. This problem isn't unique to FXRuby; it's true for any C/C++-based Ruby extension. See this page: http://jruby.codehaus.org/Limitations for more information. FXRuby seems to be mostly working under Ruby 1.9, although it has obviously had very little testing at this point since the official release of Ruby 1.9.0. What that means is that the FXRuby source code can be compiled against Ruby 1.9, and the resulting library will work. The FXRuby gem for Windows (i.e. the one that you get when you type "gem install fxruby") is built against Ruby 1.8.6, however, and it is most definitely *not* compatible with Ruby 1.9. Until there's a one- click installer for Ruby 1.9.0 on Windows, or some other reasonably authoritative source for builds of Ruby 1.9.0 on Windows, I probably won't release a gem for that version. What we're beginning to see are some problems that I (and others) noted early on in the development of RubyGems, and that's that the system is pretty indiscriminate with regards to Ruby versions, OS versions, etc. The result is that it can make it difficult to know which components will work properly with each other. Hopefully this situation will improve over time. Thanks, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From philippe.lang at attiksystem.ch Tue May 6 08:37:40 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Tue, 6 May 2008 14:37:40 +0200 Subject: [fxruby-users] Wrap text inside an FXTable cell? Message-ID: Hi, Is it possible to wrap text inside an FXTable cell, just like it is possible with an FXText object? I'd like to display and edit multi-line text inside an FXTable cell. Thanks! Philippe From jeroen at fox-toolkit.org Tue May 6 10:16:25 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Tue, 6 May 2008 09:16:25 -0500 Subject: [fxruby-users] Wrap text inside an FXTable cell? In-Reply-To: References: Message-ID: <200805060916.25537.jeroen@fox-toolkit.org> On Tuesday 06 May 2008, Philippe Lang wrote: > Hi, > > Is it possible to wrap text inside an FXTable cell, just like it is > possible with an FXText object? I'd like to display and edit multi-line > text inside an FXTable cell. FXTableItem can already handle multiple lines of text, separated by newlines. However, the default edit control is FXTextField, which edits only a single line. You can however subclass FXTableItem and have it be edited by FXText instead; see FXComboTableItem on how that's done. Hope this helps, Jeroen From lyle at lylejohnson.name Sun May 18 16:45:38 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sun, 18 May 2008 15:45:38 -0500 Subject: [fxruby-users] FXTable::fitColumnsToContents In-Reply-To: <482EC759.5020309@optonline.net> References: <482EC759.5020309@optonline.net> Message-ID: On May 17, 2008, at 6:54 AM, David Toll wrote: > I tried to submit the following message to the "fxruby-users" > message board (I clicked the link to send it as an email to fxruby-users at rubyforge.org > , but the message did not appear). I conclude I do not know how to > submit questions to this message board. You need to be subscribed to the mailing list before you can send questions to it. Are you subscribed? If not, fill out the subscription form here: http://rubyforge.org/mailman/listinfo/fxruby-users Note that you need to send messages from the same address that you're subscribed under. So if you're subscribed as "tolld at gmail.com" (for example), you wouldn't be able to send messages from "tolld at optonline.net "). > In a table column with a header, when I use "fitColumnsToContents", > if the header is wider than any of the cells in the column then the > header is truncated. It would appear that the contents of the > header are ignored when determining the column width from the column > contents. I took a quick look at the FOX source code and it looks like you're right. Only the cells in the body of the table are considered. > A work-around is to pad the column data with spaces. However, is > there a better way of doing this? This seems to work; see what you think: class FXTable def fitColumnsToContents(col, nc) col.upto(col+nc-1) do |c| cw = getMinColumnWidth(c) hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c)) setColumnWidth(c, [cw, hw].max) end end end Note that this is similar to the original implementation of fitColumnsToContents() from FOX; but it also checks the width of the column header items to see if they're wider. > I have another question: > > Many FXRuby objects have a "height" parameter. However, it seems to > be ignored in at least some cases. For example, if you create an > FXText object without "LAYOUT_FILL" or "LAYOUT_FILL_Y" then the text > window is something like 3 lines high. If I add a height parameter, > the object height does not change. True. For those cases you'd need to specify the LAYOUT_FIX_HEIGHT layout width to get it to enforce your specified height value. > A corollary to this is - what are the units for "height" (pixels, > lines, inches, ....)? - I have not found this in the API > documentation. Width and height are always in pixels. > I have a table with column headers. I changed the header font from > the default (Tahoma at about 8 or 9 point) to Tahoma Bold at 10 > points. The font changes OK; however, the height of the header is > not changed to allow more space for the font - in my case, > descenders (such as the bottom of a "y") are chopped off. > > How do I get round this? My reading of the documentation is that it > should automatically increase the size of the header to fit the > contents unless you tell it the height is fixed (which is not the > case here). When the table constructs its header, it's passing in the LAYOUT_FIX_HEIGHT option. So it's not you that's telling it to use a fixed height, but that is in fact what it's doing. To work around this, just reset the layout hints for that widget: table.columnHeader.layoutHints = 0 > Many thanks for you help. I suspect many of my problems are because > I am a novice at FXRuby. No, they're good questions and things that aren't obvious from the documentation. I always learn something when I have to dig in and figure out these problems. ;) Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From jason at jolierouge.net Mon May 19 05:55:28 2008 From: jason at jolierouge.net (Jason Martin) Date: Mon, 19 May 2008 11:55:28 +0200 Subject: [fxruby-users] Intercepting and reviewing FXText messages, especially KEY_PRESS|SEL_INSERTED In-Reply-To: References: <482EC759.5020309@optonline.net> Message-ID: <48314E90.40408@jolierouge.net> Hi All, I am new to the list, and FXRuby, this being my first post. I have hit a little snag, I am futzing around with a texteditor and everything works fine, but I would like to add in a snippet like functionality, but I seem to be at a loss for how to do it. How I imagine it would be done is. I have created a Dispatcher class, this class handles most messages in the program, adding a new tab/editor, displaying x or why. What I would like to do is have my Dispatcher class intercept messages to and from the FXText, and then perform some actions on the FXText. If someone presses the TAB key, I would want to intercept that, grab the text before the cursor, see if a snippet has been defined, if so, add the text in, otherwise, send the TAB key to the FXText like normal and let it do it's thing. Some code: #dispatcher.rb class Dispatcher def initialize(owner,sender,sel,event) puts "Dispatcher Called with: #{owner}, #{sender}, #{sel}, #{event}" end end #content_pane.rb ... def add_buffer(name) FXHorizontalFrame.new(@tab_book, FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) do |frame| @buffers << FXText.new(frame,:opts => TEXT_WORDWRAP|LAYOUT_FILL) @current_buffer = @buffers.last @current_buffer.setFocus end end ... Essentially, what I imagine is this: #content_pane.rb def add_buffer(name) ... #pseudo Code @buffers.last.connect(message) do |sender,sel,event| Dispatcher.new(self,sender,sel,event) end #end pseudo code ... end #dispatcher.rb ... #pseudo code def handle_text_widget_message(sender,sel,event) if event.code == code_i_want then #do something here else send_message_to(sender,sel,event) end end #end pseudocode ... I may be completely off my rocker and doing things retarded, as I am mainly a webprogrammer, and very new to GUI programming and how it works, so if there is a better, or more standard way of doing it, please point it out to me, or reference documents that might help, anything will be greatly appreciated. While writing this, I realize that I can use SEL_KEYRELEASE and get the info I want, however, I would like to get it before insertion,a nd not have to handle determining key behavior for the widget, like backspace, and insert etc. Many thanks in advance, Jason From meinrad.recheis at gmail.com Mon May 19 14:14:46 2008 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Mon, 19 May 2008 20:14:46 +0200 Subject: [fxruby-users] [ANN] foxGUIb 1.0.0 Message-ID: <43d756720805191114l4f6131f7q9cabfb83f1ddfeaa@mail.gmail.com> Dear fellow (fx)rubyists, I finally found the time to release another version of foxGUIb. It includes a handfull of minor bug fixes that have happened in the past 2 years since the last release. Hope you appreciate it. -- henon ========================== foxGUIb v1.0.0 ========================== == What is foxGUIb? == foxGUIb is a GUI creator and code generator for FXRuby. It's a convenient tool that makes it easy to quickly build complex and good looking graphical user interfaces for Ruby. == Who should care? == * FXRuby newbies who want to experiment with the widgets and layouts. * FXRuby experts who want to prototype parts of their GUI components rapidly. ... ok, lets say everyone who wants to create GUI with FXRuby ;) == What has changed? == Fixed a few minor bugs and finally incremented version to 1.0.0 after all. foxGUIb can be considered pretty stable. == Links: == Homepage: http://fox-tool.rubyforge.org Mike Parr's Users Guide: http://www.mikeparr.info/rubyguib/foxguibhome.htm Download: http://rubyforge.org/frs/?group_id=88 == Copyright and License == foxGUIb is free software. Copyright (c) by Meinrad Recheis aka Henon foxGUIb: Artistic License libGUIb: lgpl enjoy ;) -- henon Boring Disclaimer: THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. From lyle at lylejohnson.name Mon May 19 14:34:01 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 May 2008 13:34:01 -0500 Subject: [fxruby-users] Intercepting and reviewing FXText messages, especially KEY_PRESS|SEL_INSERTED In-Reply-To: <48314E90.40408@jolierouge.net> References: <482EC759.5020309@optonline.net> <48314E90.40408@jolierouge.net> Message-ID: <57cf8f720805191134p1c511547w80ce433cff277970@mail.gmail.com> On Mon, May 19, 2008 at 4:55 AM, Jason Martin wrote: > I may be completely off my rocker and doing things retarded, as I am mainly > a webprogrammer, and very new to GUI programming and how it works, so if > there is a better, or more standard way of doing it, please point it out to > me, or reference documents that might help, anything will be greatly > appreciated. While writing this, I realize that I can use SEL_KEYRELEASE and > get the info I want, however, I would like to get it before insertion,a nd > not have to handle determining key behavior for the widget, like backspace, > and insert etc. Well, if you catch the SEL_KEYPRESS message (instead of SEL_KEYRELEASE) you can interecept the Tab key press before any text gets inserted, right? And if you determine that there is some "snippet" text before the current cursor position, you would (I guess) insert the expanded text and then return true to indicate that your message handler handled the event and FXText's regular SEL_KEYPRESS handler doesn't need to do anything else with it. If you instead determine that there is no "snippet" text to try to expand, you'd want to return false from the message handler so that the default SEL_KEYPRESS processing kicks in. Hope this helps, Lyle > > Many thanks in advance, > Jason > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > From lyle at lylejohnson.name Mon May 19 14:35:22 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 May 2008 13:35:22 -0500 Subject: [fxruby-users] [ANN] foxGUIb 1.0.0 In-Reply-To: <43d756720805191114l4f6131f7q9cabfb83f1ddfeaa@mail.gmail.com> References: <43d756720805191114l4f6131f7q9cabfb83f1ddfeaa@mail.gmail.com> Message-ID: <57cf8f720805191135w14af3a1dqd587ab5b99f0985c@mail.gmail.com> On Mon, May 19, 2008 at 1:14 PM, Meinrad Recheis wrote: > I finally found the time to release another version of foxGUIb. It > includes a handfull of minor bug fixes that have happened in the past > 2 years since the last release. > Hope you appreciate it. Great! Congratulations, Henon. From toll at us.ibm.com Mon May 19 14:56:42 2008 From: toll at us.ibm.com (David Toll) Date: Mon, 19 May 2008 14:56:42 -0400 Subject: [fxruby-users] FXTable::fitColumnsToContents Message-ID: Lyle: I have tried your suggested replacement for fitColumnsToContents. While it is better than the "standard" version, it does not completely cure my problem. It does not get a large enough value for the width of the heading text, and so far I have not determined why. I found that if I increase this size estimate by 1/3 then the display looks about right. That is, the line that determines "hw" is now: hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c))*4/3 However, this is a somewhat arbitrary solution to the problem, I am hoping someone knows why the call to font.getTextWidth does not return an adequate value. The font I am using for the cell headers is: @tahoma10Bold = FXFont.new(app, "Tahoma", 10, FXFont::Bold) The font for the table contents is: @courierNew10 = FXFont.new(app, "Courier New", 10) # 10 point, fixed width Thanks Dave ____________________________________________________________ David C. Toll, Research Staff Member, Secure Systems and Smart Cards IBM T. J. Watson Research Center, 19 Skyline Drive, Hawthorne NY 10532 Phone: 914-784-7019 (t/l 863) Fax: 914-784-6205 (t/l 863) email: toll at us.ibm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason at jolierouge.net Mon May 19 15:24:50 2008 From: jason at jolierouge.net (Jason Martin) Date: Mon, 19 May 2008 21:24:50 +0200 Subject: [fxruby-users] Intercepting and reviewing FXText messages, especially KEY_PRESS|SEL_INSERTED In-Reply-To: <57cf8f720805191134p1c511547w80ce433cff277970@mail.gmail.com> References: <482EC759.5020309@optonline.net> <48314E90.40408@jolierouge.net> <57cf8f720805191134p1c511547w80ce433cff277970@mail.gmail.com> Message-ID: <4831D402.8070306@jolierouge.net> Lyle Johnson wrote: > > Well, if you catch the SEL_KEYPRESS message (instead of > SEL_KEYRELEASE) you can interecept the Tab key press before any text > gets inserted, right? And if you determine that there is some > "snippet" text before the current cursor position, you would (I guess) > insert the expanded text and then return true to indicate that your > message handler handled the event and FXText's regular SEL_KEYPRESS > handler doesn't need to do anything else with it. If you instead > determine that there is no "snippet" text to try to expand, you'd want > to return false from the message handler so that the default > SEL_KEYPRESS processing kicks in. > > Hope this helps, > > Lyle > Hi Lyle, Thanks, that was the piece of info I was looking for, I am sure it's written somewhere, but I missed it. I didn't know that returning false would cause the keypress/message to be sent on. I guess I thought it kinda died there on the operating table... /jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon May 19 21:34:19 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 May 2008 20:34:19 -0500 Subject: [fxruby-users] FXTable::fitColumnsToContents In-Reply-To: References: Message-ID: <97B06892-911A-4512-88D4-2C31E69A0D4C@lylejohnson.name> On May 19, 2008, at 1:56 PM, David Toll wrote: > I have tried your suggested replacement for fitColumnsToContents. > While it is better than the "standard" version, it does not > completely cure my problem. It does not get a large enough value > for the width of the heading text, and so far I have not determined > why. I found that if I increase this size estimate by 1/3 then the > display looks about right. That is, the line that determines "hw" > is now: > > hw = > columnHeader.font.getTextWidth(columnHeader.getItemText(c))*4/3 > > However, this is a somewhat arbitrary solution to the problem, I am > hoping someone knows why the call to font.getTextWidth does not > return an adequate value. I see part of the problem, now that I look at it again. We're not taking into account the cell margin values. So if you change the calculation of "hw" to this: hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c)) + marginLeft + marginRight You get a bit closer to the correct width. But for the particular big font that I'm trying it's still a little short. I don't know if this indicates a bug in FXFont::getTextWidth(), or if there's still some factor that I'm overlooking. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon May 19 21:43:22 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 19 May 2008 20:43:22 -0500 Subject: [fxruby-users] FXTable::fitColumnsToContents In-Reply-To: <97B06892-911A-4512-88D4-2C31E69A0D4C@lylejohnson.name> References: <97B06892-911A-4512-88D4-2C31E69A0D4C@lylejohnson.name> Message-ID: On May 19, 2008, at 8:34 PM, Lyle Johnson wrote: > I see part of the problem, now that I look at it again. We're not > taking into account the cell margin values. So if you change the > calculation of "hw" to this: > > hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c)) + > marginLeft + marginRight > > You get a bit closer to the correct width. But for the particular > big font that I'm trying it's still a little short. I don't know if > this indicates a bug in FXFont::getTextWidth(), or if there's still > some factor that I'm overlooking. Wait, I've got it now. The spacing's different because it's a header item and not a table item. Here's the correct formula: hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c)) + 2*columnHeader.borderWidth + columnHeader.padLeft + columnHeader.padRight That looks right here, for the font that I'm testing with. Let me know what you think! -- Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From toll at us.ibm.com Tue May 20 10:05:28 2008 From: toll at us.ibm.com (David Toll) Date: Tue, 20 May 2008 10:05:28 -0400 Subject: [fxruby-users] FXTable::fitColumnsToContents In-Reply-To: Message-ID: On May 19, 2008, at 9:43 PM, Lyle Johnson wrote: Wait, I've got it now. The spacing's different because it's a header item and not a table item. Here's the correct formula: hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c)) + 2*columnHeader.borderWidth + columnHeader.padLeft + columnHeader.padRight That looks right here, for the font that I'm testing with. Let me know what you think! That does indeed work as I would expect. Thank you. Does this mean there is a bug in the "standard" version of fitColumnstoContents - i.e. should the standard version be changed to this new version? Dave ____________________________________________________________ David C. Toll, Research Staff Member, Secure Embedded Systems IBM T. J. Watson Research Center, 19 Skyline Drive, Hawthorne NY 10532 Phone: 914-784-7019 (t/l 863) Fax: 914-784-6205 (t/l 863) email: toll at us.ibm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue May 20 10:23:57 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 20 May 2008 09:23:57 -0500 Subject: [fxruby-users] FXTable::fitColumnsToContents In-Reply-To: References: Message-ID: <57cf8f720805200723o1ff6f406lcb23cfd860aef53a@mail.gmail.com> On Tue, May 20, 2008 at 9:05 AM, David Toll wrote: > That does indeed work as I would expect. Thank you. > > Does this mean there is a bug in the "standard" version of > fitColumnstoContents - i.e. should the standard version be changed to this > new version? I would consider it a bug, but I don't know if Jeroen (FOX's developer) would. From lyle at lylejohnson.name Tue May 20 10:32:43 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 20 May 2008 09:32:43 -0500 Subject: [fxruby-users] [ANN] At InfoQ: Interview about FXRuby, plus an exclusive chapter from the FXRuby Book Message-ID: <57cf8f720805200732j68bf6e23v1bcc2d9e341caac0@mail.gmail.com> InfoQ has just published Werner Schuster's interview with me, in which we discuss the FOX toolkit and FXRuby's implementation: http://www.infoq.com/articles/johnson-fxruby-book-excerpt The article also includes an exclusive sample chapter from the new book, "FXRuby: Create Lean and Mean GUIs with Ruby". To read more about the book, please see its web page at the Pragmatic Bookshelf site: http://www.pragprog.com/titles/fxruby/ If you're interested in reviewing the book for your web site or blog, please let me know! From celldee at gmail.com Wed May 21 10:19:53 2008 From: celldee at gmail.com (celldee) Date: Wed, 21 May 2008 07:19:53 -0700 (PDT) Subject: [fxruby-users] [Ann] fxruby-google group Message-ID: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> I have created a mirror of the fxruby-users mailing list in Google Groups (http://groups.google.com/group/fxruby-google). I will remove it if anyone has a strong objection to its existence. Otherwise, I hope that it proves to be useful. Regards, Chris From lyle at lylejohnson.name Wed May 21 11:04:01 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 21 May 2008 10:04:01 -0500 Subject: [fxruby-users] [Ann] fxruby-google group In-Reply-To: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> References: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> Message-ID: <57cf8f720805210804v62c89f9kd8617e5b09aeaf47@mail.gmail.com> On Wed, May 21, 2008 at 9:19 AM, celldee wrote: > I have created a mirror of the fxruby-users mailing list in Google > Groups (http://groups.google.com/group/fxruby-google). I will remove > it if anyone has a strong objection to its existence. Otherwise, I > hope that it proves to be useful. Chris, I'm not opposed to it, but I just want to be clear on how it works. Is it just a two-way gateway sort of thing, where posts to the mailing list show up in the Google Group, and vice-versa? I just want to make sure that it isn't some sort of disconnected forum which would just fragment the community. Otherwise, I'm cool with it! Thanks, Lyle From tigger at io.com Wed May 21 10:35:22 2008 From: tigger at io.com (Paul Archer) Date: Wed, 21 May 2008 09:35:22 -0500 (CDT) Subject: [fxruby-users] [Ann] fxruby-google group In-Reply-To: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> References: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> Message-ID: <20080521093341.S2568@eris.io.com> I have no objection to a mirror. The local (Dallas) Ruby group uses Google Groups, and I found it a big pain to get things setup so I could use a non-gmail address though--so I'd prefer it stay *just* a mirror. Paul 7:19am, celldee wrote: > I have created a mirror of the fxruby-users mailing list in Google > Groups (http://groups.google.com/group/fxruby-google). I will remove > it if anyone has a strong objection to its existence. Otherwise, I > hope that it proves to be useful. > > Regards, > > Chris > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > ------------------------------------------------------- "How do you function indoors? Away from the controlling radio signals of your evil overlords, I mean..." -----------------------Get Fuzzy----------------------- From lyle at lylejohnson.name Wed May 21 11:20:58 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 21 May 2008 10:20:58 -0500 Subject: [fxruby-users] [Ann] fxruby-google group In-Reply-To: <20080521093341.S2568@eris.io.com> References: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> <20080521093341.S2568@eris.io.com> Message-ID: <57cf8f720805210820j126ae75agc80e51d44888b9ec@mail.gmail.com> On Wed, May 21, 2008 at 9:35 AM, Paul Archer wrote: > ... I found it a big pain to get things setup so I could use a > non-gmail address though--so I'd prefer it stay *just* a mirror. Yes, it will definitely just be a mirror---I'm not planning on ditching the Mailman-powered mailing list. I also run into that problem, of having to fudge things so I'm posting from a Gmail address instead of my usual e-mail address, and it is a pain. From celldee at gmail.com Wed May 21 11:25:09 2008 From: celldee at gmail.com (celldee) Date: Wed, 21 May 2008 08:25:09 -0700 (PDT) Subject: [fxruby-users] [Ann] fxruby-google group In-Reply-To: <57cf8f720805210804v62c89f9kd8617e5b09aeaf47@mail.gmail.com> References: <0a05dfeb-8d3a-4462-a2a1-e30ee05078cc@25g2000hsx.googlegroups.com> <57cf8f720805210804v62c89f9kd8617e5b09aeaf47@mail.gmail.com> Message-ID: <44fb3d0e-949b-4b06-82c0-d3198b750bd6@m73g2000hsh.googlegroups.com> On May 21, 4:04?pm, "Lyle Johnson" wrote: > > I'm not opposed to it, but I just want to be clear on how it works. Is > it just a two-way gateway sort of thing, where posts to the mailing > list show up in the Google Group, and vice-versa? I just want to make > sure that it isn't some sort of disconnected forum which would just > fragment the community. Otherwise, I'm cool with it! > > Thanks, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/fxruby-users Thanks Paul and Lyle for your replies. I can confirm that the fxruby- google group is solely intended to be a mirror of the fxruby-users mailing list and is set up to function as such. I am posting these messages and receiving your replies via the Google Groups interface. If you have any issues with the functioning of the group in the future, just let me know. Cheers, Chris From lyle at lylejohnson.name Wed May 21 11:31:32 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 21 May 2008 10:31:32 -0500 Subject: [fxruby-users] What ever have I done wrong now? In-Reply-To: References: Message-ID: <7EDFD008-A118-4335-9312-8217FE0A6951@lylejohnson.name> On May 21, 2008, at 10:17 AM, David Toll wrote: > I wrote a simple program, to do further experiments with tables. > > However, before I even started on my experiments, it went wrong. > > If you run this, it displays a simple table. > > If you look at the source, you can see that the calls to > "fitColumnsToContents" and "fitRowsToContents" are both commented > out. Note that the "fitColumnsToContents" is the replacement > version you wrote a few days ago. > > If I un-comment either of these, then the table columns or rows > (respectively) are shrunk bigtime. There is a printf in > "fitColumnsToContents" to display the cw and hw values - these > clearly are garbage (far too small). > > What ever have I done wrong here? The problem is that at the time you're calling fitColumnsToContents(), the fonts haven't been created yet. I can't seem to get to the FOX home page at the moment, but if I could, I'd point you to an item in the FAQ there that talks about this issue of created versus non- created fonts (or icons, etc.) There's also some discussion of it in section 7.7 of the book, where I talk about client-side versus server- side objects. If you just move those two calls to your create() method, e.g. def create super @table.fitColumnsToContents(0,2) @table.fitRowsToContents(0,2) show(PLACEMENT_SCREEN) end You should get the desired result. Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: From datatec at gmail.com Fri May 23 12:16:59 2008 From: datatec at gmail.com (datatec) Date: Fri, 23 May 2008 09:16:59 -0700 (PDT) Subject: [fxruby-users] problem with non-focused fxruby gui freezing or blanking out. Message-ID: <17428155.post@talk.nabble.com> I find that when a running fxruby program looses focus or another window is placed in front of it, when the fxruby window regains focus, many times the gui is now frozen or blank. This seems to happen especially frequently when the window covering it is a java or fox based application. Usually it comes back but sometimes it takes several minutes to do so. I would really like to find someway to stop this from occurring. A good of this is a program I have that parses a large csv file and while the processing taking place it updates a progress bar. once the window looses focus frequently the progress bar and labels do not update again until the process is complete. I have a general idea why this occurs, but don't really know how to stop it. -- View this message in context: http://www.nabble.com/problem-with-non-focused-fxruby-gui-freezing-or-blanking-out.-tp17428155p17428155.html Sent from the FXRuby Users mailing list archive at Nabble.com. From v.konrad at lse.ac.uk Fri May 23 13:02:16 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 23 May 2008 18:02:16 +0100 Subject: [fxruby-users] problem with non-focused fxruby gui freezing or blanking out. In-Reply-To: <17428155.post@talk.nabble.com> References: <17428155.post@talk.nabble.com> Message-ID: <20080523180216.3a037eda@107.201.dyn.lse.ac.uk> > A good of this is a program I have that parses a large csv file Sounds like you need to do the lengthy processing in "chore"... Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From lyle at lylejohnson.name Fri May 23 14:07:47 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 23 May 2008 13:07:47 -0500 Subject: [fxruby-users] problem with non-focused fxruby gui freezing or blanking out. In-Reply-To: <20080523180216.3a037eda@107.201.dyn.lse.ac.uk> References: <17428155.post@talk.nabble.com> <20080523180216.3a037eda@107.201.dyn.lse.ac.uk> Message-ID: <57cf8f720805231107q1a4607aaga6471c1285003da4@mail.gmail.com> On Fri, May 23, 2008 at 12:02 PM, Vladimir Konrad wrote: > Sounds like you need to do the lengthy processing in "chore"... Probably belongs in a thread, but if there's a way to sensibly do it in a chore, that would be OK too. From philippe.lang at attiksystem.ch Mon May 26 02:13:39 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 26 May 2008 08:13:39 +0200 Subject: [fxruby-users] problem with non-focused fxruby gui freezing or blanking out. References: <17428155.post@talk.nabble.com> Message-ID: fxruby-users-bounces at rubyforge.org wrote: > I find that when a running fxruby program looses focus or another > window is placed in front of it, when the fxruby window regains > focus, many times the gui is now frozen or blank. > > This seems to happen especially frequently when the window covering > it is a java or fox based application. > > Usually it comes back but sometimes it takes several minutes to do so. > > > I would really like to find someway to stop this from occurring. > > > A good of this is a program I have that parses a large csv file and > while the processing taking place it updates a progress bar. once the > window looses focus frequently the progress bar and labels do not > update again until the process is complete. > > I have a general idea why this occurs, but don't really know how to > stop it. Hi, Does a call to FXApp.disableThreads before FXApp.create help maybe? Philippe From lyle at lylejohnson.name Mon May 26 11:32:16 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 26 May 2008 10:32:16 -0500 Subject: [fxruby-users] problem with non-focused fxruby gui freezing or blanking out. In-Reply-To: References: <17428155.post@talk.nabble.com> Message-ID: <49CAF4EC-07E9-4BD4-A571-3C648D976578@lylejohnson.name> On May 26, 2008, at 1:13 AM, Philippe Lang wrote: > Does a call to FXApp.disableThreads before FXApp.create help maybe? Granted, we don't know a lot about this particular case yet, but I'm guessing that that's not the problem. It is true that when FXRuby's support for threads is enabled, you'll see a bit of a performance hit (whenever FXRuby allocates some time to Ruby's thread scheduler) but it shouldn't ever just completely lock up the system like this. --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby From jonathan.stott at gmail.com Sat May 31 16:42:33 2008 From: jonathan.stott at gmail.com (Jonathan Stott) Date: Sat, 31 May 2008 21:42:33 +0100 Subject: [fxruby-users] Getting items to fill a column Message-ID: <14cf210a0805311342o76770539jbb6e429c6a358c78@mail.gmail.com> Hi I've been following through the example app in the FXRuby book (which has generally been very helpful!) and I'm now at the extending it stage. I'd like to get the images display at the centre of a column and have a uniform width for all columns. The centering I have fixed, but no combinations of setting width and height options and LAYOUT_FILLs seems to work to get columns to display at the same width, no matter the width of the image within. Regards Jon