From lyle at lylejohnson.name Fri Jan 4 11:08:53 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 4 Jan 2008 10:08:53 -0600 Subject: [fxruby-users] Looking for reviewers... Message-ID: <32FF19FA-1399-42DF-A2A9-D0F2E0D82300@lylejohnson.name> All, Some of you may know that I'm writing a book about FXRuby for the Pragmatic Bookshelf: http://www.pragprog.com/titles/fxruby I'm almost finished with the first draft, and I'm looking for some volunteers to review the book. Specifically, I'm looking for people to go over the book with a fine toothed comb, looking for inconsistencies, things that are confusing or misleading, and outright errors. When there are example programs, I'd like for you to try to run the programs and make sure they work the way the book claims that they work. That sort of thing. Depending on how fast you can read and absorb the material, and then provide feedback based on what you've seen, a thorough review might take a few hours or a few days. In a nutshell, the book is aimed at folks who *do* know Ruby but who don't necessarily know anything about FOX/FXRuby or GUI programming in general. That's the target audience for the book. It's not a comprehensive book about all things FOX and FXRuby, and a lot of the more advanced topics are intentionally left out. The idea is that after reading this book, you'll have enough of a foundation to tackle some of those more advanced topics on your own. If you're interested in being a reviewer, and (more importantly) if you believe that you have the time to do this, please contact me (off- list) as soon as possible. We're looking to release it as a beta book as soon as next week, and we'd be getting the completed first draft out to reviewers shortly after that. Thanks in advance, Lyle From lyle at lylejohnson.name Fri Jan 4 11:46:46 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 4 Jan 2008 10:46:46 -0600 Subject: [fxruby-users] Looking for reviewers... In-Reply-To: <32FF19FA-1399-42DF-A2A9-D0F2E0D82300@lylejohnson.name> References: <32FF19FA-1399-42DF-A2A9-D0F2E0D82300@lylejohnson.name> Message-ID: On Jan 4, 2008, at 10:08 AM, Lyle Johnson wrote: > I'm almost finished with the first draft, and I'm looking for some > volunteers to review the book... Well, that was fast! I think I've got enough reviewers signed up at the moment. Stay tuned for announcements soon about the availability of the beta book. From lyle at lylejohnson.name Tue Jan 8 16:37:59 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 8 Jan 2008 15:37:59 -0600 Subject: [fxruby-users] [ANN] FXRuby Book Now Available as Beta Book Message-ID: <4DFAACA1-4F80-4B96-966E-7FF20594BE35@lylejohnson.name> All, I?m pleased to report that the FXRuby book has just been released as a Beta book: http://www.pragprog.com/titles/fxruby That means that although the book is still under development, you can get early access to the content right now and provide feedback to help make the final book even better when it?s released later this year. We?re getting very close to a completed first draft and I can assure you that it?s well worth it to go ahead and get the book now if you?re anxious to get started with FXRuby programming. As I?ve noted before, this is the first book ever dedicated to the subject of FOX and FXRuby application development. It?s intended for software developers who are already comfortable with Ruby programming and who want to learn how to develop GUI applications with Ruby. No prior experience with GUI development is needed, but it?s intended to be useful both to newcomers as well as those who have worked with other GUI toolkits in the past. The purpose of this book is to give you a head start on developing GUI applications with Ruby and FXRuby through a combination of tutorial exercises and focused technical information. It isn?t a comprehensive book on FXRuby programming, and it?s not a reference manual. What this book will do is get you over the initial conceptual hurdles and equip you with the practical information that you need to build your own applications. Surf on over to the Pragmatic Bookshelf site and order your copy today! Thanks, Lyle From meinrad.recheis at gmail.com Wed Jan 9 04:12:51 2008 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 9 Jan 2008 10:12:51 +0100 Subject: [fxruby-users] [ANN] FXRuby Book Now Available as Beta Book In-Reply-To: <4DFAACA1-4F80-4B96-966E-7FF20594BE35@lylejohnson.name> References: <4DFAACA1-4F80-4B96-966E-7FF20594BE35@lylejohnson.name> Message-ID: <43d756720801090112t4e8404a2re7972aeb5a8faa6f@mail.gmail.com> yeah. it's nice to have a book on fxruby around finally but the cover design is really really bad. -- henon On Jan 8, 2008 10:37 PM, Lyle Johnson wrote: > All, > > I'm pleased to report that the FXRuby book has just been released as > a Beta book: > > http://www.pragprog.com/titles/fxruby > > That means that although the book is still under development, you can > get early access to the content right now and provide feedback to > help make the final book even better when it's released later this > year. We're getting very close to a completed first draft and I can > assure you that it's well worth it to go ahead and get the book now > if you're anxious to get started with FXRuby programming. > > As I've noted before, this is the first book ever dedicated to the > subject of FOX and FXRuby application development. It's intended for > software developers who are already comfortable with Ruby programming > and who want to learn how to develop GUI applications with Ruby. No > prior experience with GUI development is needed, but it's intended to > be useful both to newcomers as well as those who have worked with > other GUI toolkits in the past. > > The purpose of this book is to give you a head start on developing > GUI applications with Ruby and FXRuby through a combination of > tutorial exercises and focused technical information. It isn't a > comprehensive book on FXRuby programming, and it's not a reference > manual. What this book will do is get you over the initial conceptual > hurdles and equip you with the practical information that you need to > build your own applications. Surf on over to the Pragmatic Bookshelf > site and order your copy today! > > Thanks, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080109/d3b07549/attachment.html From philippe.lang at attiksystem.ch Wed Jan 9 09:47:04 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Wed, 9 Jan 2008 15:47:04 +0100 Subject: [fxruby-users] [ANN] FXRuby Book Now Available as Beta Book References: <4DFAACA1-4F80-4B96-966E-7FF20594BE35@lylejohnson.name> <43d756720801090112t4e8404a2re7972aeb5a8faa6f@mail.gmail.com> Message-ID: <6C0CF58A187DA5479245E0830AF84F42337FD2@poweredge.attiksystem.ch> 8] I hope everyone appreciates this particularly interesting comment on the new book of Lyle. _____ De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de Meinrad Recheis Envoy? : mercredi, 9. janvier 2008 10:13 ? : fxruby-users at rubyforge.org Objet : Re: [fxruby-users] [ANN] FXRuby Book Now Available as Beta Book yeah. it's nice to have a book on fxruby around finally but the cover design is really really bad. -- henon On Jan 8, 2008 10:37 PM, Lyle Johnson < lyle at lylejohnson.name > wrote: All, I'm pleased to report that the FXRuby book has just been released as a Beta book: http://www.pragprog.com/titles/fxruby That means that although the book is still under development, you can get early access to the content right now and provide feedback to help make the final book even better when it's released later this year. We're getting very close to a completed first draft and I can assure you that it's well worth it to go ahead and get the book now if you're anxious to get started with FXRuby programming. As I've noted before, this is the first book ever dedicated to the subject of FOX and FXRuby application development. It's intended for software developers who are already comfortable with Ruby programming and who want to learn how to develop GUI applications with Ruby. No prior experience with GUI development is needed, but it's intended to be useful both to newcomers as well as those who have worked with other GUI toolkits in the past. The purpose of this book is to give you a head start on developing GUI applications with Ruby and FXRuby through a combination of tutorial exercises and focused technical information. It isn't a comprehensive book on FXRuby programming, and it's not a reference manual. What this book will do is get you over the initial conceptual hurdles and equip you with the practical information that you need to build your own applications. Surf on over to the Pragmatic Bookshelf site and order your copy today! Thanks, Lyle _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080109/d17af4e0/attachment.html From meinrad.recheis at gmail.com Wed Jan 9 12:12:55 2008 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 9 Jan 2008 18:12:55 +0100 Subject: [fxruby-users] [ANN] FXRuby Book Now Available as Beta Book In-Reply-To: <6C0CF58A187DA5479245E0830AF84F42337FD2@poweredge.attiksystem.ch> References: <4DFAACA1-4F80-4B96-966E-7FF20594BE35@lylejohnson.name> <43d756720801090112t4e8404a2re7972aeb5a8faa6f@mail.gmail.com> <6C0CF58A187DA5479245E0830AF84F42337FD2@poweredge.attiksystem.ch> Message-ID: <43d756720801090912y1def7920xca7b4e9f7258436e@mail.gmail.com> On Jan 9, 2008 3:47 PM, Philippe Lang wrote: > 8] > > I hope everyone appreciates this particularly interesting comment on the > new book of Lyle. > Oh sorry, maybe I shouldn't always be that direct :) ... so let me reformulate it. I am totally respectful to the hard work that Lyle has put into that book. I appreciate it! I didn't mean, that the unprofessional cover design makes the book a bad book. -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20080109/98917726/attachment.html From lyle at lylejohnson.name Wed Jan 9 12:57:05 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 9 Jan 2008 11:57:05 -0600 Subject: [fxruby-users] [ANN] FXRuby Book Now Available as Beta Book In-Reply-To: <43d756720801090912y1def7920xca7b4e9f7258436e@mail.gmail.com> References: <4DFAACA1-4F80-4B96-966E-7FF20594BE35@lylejohnson.name> <43d756720801090112t4e8404a2re7972aeb5a8faa6f@mail.gmail.com> <6C0CF58A187DA5479245E0830AF84F42337FD2@poweredge.attiksystem.ch> <43d756720801090912y1def7920xca7b4e9f7258436e@mail.gmail.com> Message-ID: On Jan 9, 2008, at 11:12 AM, Meinrad Recheis wrote: > Oh sorry, maybe I shouldn't always be that direct :) ... so let me > reformulate it. > I am totally respectful to the hard work that Lyle has put into > that book. I appreciate it! I didn't mean, that the unprofessional > cover design makes the book a bad book. Well, I like the cover just fine. At any rate, as they say, you can't judge a book by its cover. ;) From rmelton at ball.com Thu Jan 10 13:58:34 2008 From: rmelton at ball.com (Melton, Ryan) Date: Thu, 10 Jan 2008 11:58:34 -0700 Subject: [fxruby-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow In-Reply-To: <03B62622BF273442912A2E486B799DD205829A1F@AEROMSG3.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A1A@AEROMSG3.AERO.BALL.COM><6C0CF58A187DA5479245E0830AF84F42337F6B@poweredge.attiksystem.ch> <03B62622BF273442912A2E486B799DD205829A1F@AEROMSG3.AERO.BALL.COM> Message-ID: <2EC28B773AF39E47850AC45765483C2C08BEBCBE@AEROMSG2.AERO.BALL.COM> Hi, I am running on Windows XP SP2 using FXRuby 1.6.11 which uses FOX version 1.6.25. The SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE handlers do not seem to ever get called for an FXMainWindow. Can anyone else recreate this? Here is a simple example program: The SEL_CLOSE works but none of the other handlers. $VERBOSE = nil require 'fox16' $VERBOSE = true include Fox class Test < FXMainWindow def initialize(app) super(app, "Test", nil, nil, DECOR_ALL, 0, 0, 750, 500) self.connect(SEL_CLOSE) do |sender, sel, data| puts "CLOSE" 0 end self.connect(SEL_MAXIMIZE) do |sender, sel, data| puts "MAXIMIZE" 0 end self.connect(SEL_RESTORE) do |sender, sel, data| puts "RESTORE" 0 end self.connect(SEL_MINIMIZE) do |sender, sel, data| puts "MINIMIZE" 0 end end def create super show(PLACEMENT_SCREEN) end end application = FXApp.new("Test", "Test") Test.new(application) application.create application.run Thanks, Ryan This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From jeroen at fox-toolkit.org Thu Jan 10 14:11:56 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 10 Jan 2008 13:11:56 -0600 Subject: [fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow In-Reply-To: <2EC28B773AF39E47850AC45765483C2C08BEBCBE@AEROMSG2.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A1A@AEROMSG3.AERO.BALL.COM> <03B62622BF273442912A2E486B799DD205829A1F@AEROMSG3.AERO.BALL.COM> <2EC28B773AF39E47850AC45765483C2C08BEBCBE@AEROMSG2.AERO.BALL.COM> Message-ID: <200801101311.56851.jeroen@fox-toolkit.org> On Thursday 10 January 2008 12:58:34 pm Melton, Ryan wrote: > Hi, > > I am running on Windows XP SP2 using FXRuby 1.6.11 which uses FOX > version 1.6.25. > > The SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE handlers do not seem to > ever get called for an FXMainWindow. > > Can anyone else recreate this? Here is a simple example program: The > SEL_CLOSE works but none of the other handlers. > > > $VERBOSE = nil > require 'fox16' > $VERBOSE = true > > include Fox > > class Test < FXMainWindow > > def initialize(app) > super(app, "Test", nil, nil, DECOR_ALL, 0, 0, 750, 500) > > self.connect(SEL_CLOSE) do |sender, sel, data| > puts "CLOSE" > 0 > end > > self.connect(SEL_MAXIMIZE) do |sender, sel, data| > puts "MAXIMIZE" > 0 > end > > self.connect(SEL_RESTORE) do |sender, sel, data| > puts "RESTORE" > 0 > end > > self.connect(SEL_MINIMIZE) do |sender, sel, data| > puts "MINIMIZE" > 0 > end > end > > def create > super > show(PLACEMENT_SCREEN) > end > end > > application = FXApp.new("Test", "Test") > Test.new(application) > application.create > application.run The messages are generated when notify=true is passed when these maximize(), minimize() [etc] are called. When its done by the user, you just get SEL_CONFIGURE messages. Note that if you need to find out minimized, maximized state, you can call the isMaximized() and isMinimized() API's. They should give the correct answer even if maximization was done by the user rather than programmatically. Hope this helps, Jeroen From rmelton at ball.com Thu Jan 10 14:27:48 2008 From: rmelton at ball.com (Melton, Ryan) Date: Thu, 10 Jan 2008 12:27:48 -0700 Subject: [fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow In-Reply-To: <200801101311.56851.jeroen@fox-toolkit.org> References: <03B62622BF273442912A2E486B799DD205829A1A@AEROMSG3.AERO.BALL.COM> <03B62622BF273442912A2E486B799DD205829A1F@AEROMSG3.AERO.BALL.COM> <2EC28B773AF39E47850AC45765483C2C08BEBCBE@AEROMSG2.AERO.BALL.COM> <200801101311.56851.jeroen@fox-toolkit.org> Message-ID: <2EC28B773AF39E47850AC45765483C2C08BEBCD9@AEROMSG2.AERO.BALL.COM> Thanks Jeroen, Using the SEL_CONFIGURE I can detect maximizes and minimizes. What I wanted to do was to not let a user maximize the window sometimes. Can I do this with SEL_CONFIGURE? -----Original Message----- From: Jeroen van der Zijp [mailto:jeroen at fox-toolkit.org] Sent: Thursday, January 10, 2008 12:12 PM To: foxgui-users at lists.sourceforge.net Cc: Melton, Ryan; fxruby-users at rubyforge.org Subject: Re: [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow On Thursday 10 January 2008 12:58:34 pm Melton, Ryan wrote: > Hi, > > I am running on Windows XP SP2 using FXRuby 1.6.11 which uses FOX > version 1.6.25. > > The SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE handlers do not seem to > ever get called for an FXMainWindow. > > Can anyone else recreate this? Here is a simple example program: The > SEL_CLOSE works but none of the other handlers. > > > $VERBOSE = nil > require 'fox16' > $VERBOSE = true > > include Fox > > class Test < FXMainWindow > > def initialize(app) > super(app, "Test", nil, nil, DECOR_ALL, 0, 0, 750, 500) > > self.connect(SEL_CLOSE) do |sender, sel, data| > puts "CLOSE" > 0 > end > > self.connect(SEL_MAXIMIZE) do |sender, sel, data| > puts "MAXIMIZE" > 0 > end > > self.connect(SEL_RESTORE) do |sender, sel, data| > puts "RESTORE" > 0 > end > > self.connect(SEL_MINIMIZE) do |sender, sel, data| > puts "MINIMIZE" > 0 > end > end > > def create > super > show(PLACEMENT_SCREEN) > end > end > > application = FXApp.new("Test", "Test") > Test.new(application) > application.create > application.run The messages are generated when notify=true is passed when these maximize(), minimize() [etc] are called. When its done by the user, you just get SEL_CONFIGURE messages. Note that if you need to find out minimized, maximized state, you can call the isMaximized() and isMinimized() API's. They should give the correct answer even if maximization was done by the user rather than programmatically. Hope this helps, Jeroen This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From jeroen at fox-toolkit.org Thu Jan 10 14:45:53 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 10 Jan 2008 13:45:53 -0600 Subject: [fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow In-Reply-To: <2EC28B773AF39E47850AC45765483C2C08BEBCD9@AEROMSG2.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A1A@AEROMSG3.AERO.BALL.COM> <200801101311.56851.jeroen@fox-toolkit.org> <2EC28B773AF39E47850AC45765483C2C08BEBCD9@AEROMSG2.AERO.BALL.COM> Message-ID: <200801101345.54256.jeroen@fox-toolkit.org> On Thursday 10 January 2008 01:27:48 pm Melton, Ryan wrote: > Thanks Jeroen, > > Using the SEL_CONFIGURE I can detect maximizes and minimizes. What I > wanted to do was to not let a user maximize the window sometimes. Can I > do this with SEL_CONFIGURE? Typically, this is done by adjusting the decorations. Once you've decided to show the [lets say] maximize button, it'll get handled. There's no way to block it since the event is dealt with in the non-client handler of the window. FOX itself never sees it. On X11, its the same way since the decorations and maximization is done by the window-manager. All we get is a notify when its done. So, long story short: just change DECOR_XXX options; you may need to play around a bit with the options since some of them are coupled. Hope this helps, - Jeroen From jeroen at fox-toolkit.org Thu Jan 10 16:20:51 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 10 Jan 2008 15:20:51 -0600 Subject: [fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow In-Reply-To: <2d51e2b10801101303t37f6fe87ib97c8600849d61ed@mail.gmail.com> References: <03B62622BF273442912A2E486B799DD205829A1A@AEROMSG3.AERO.BALL.COM> <200801101345.54256.jeroen@fox-toolkit.org> <2d51e2b10801101303t37f6fe87ib97c8600849d61ed@mail.gmail.com> Message-ID: <200801101520.52151.jeroen@fox-toolkit.org> On Thursday 10 January 2008 03:03:39 pm Sander Jansen wrote: > Ok, h > > On Jan 10, 2008 1:45 PM, Jeroen van der Zijp wrote: > > On Thursday 10 January 2008 01:27:48 pm Melton, Ryan wrote: > > > Thanks Jeroen, > > > > > > Using the SEL_CONFIGURE I can detect maximizes and minimizes. What I > > > wanted to do was to not let a user maximize the window sometimes. Can I > > > do this with SEL_CONFIGURE? > > > > Typically, this is done by adjusting the decorations. Once you've decided > > to show the [lets say] maximize button, it'll get handled. There's no way > > to block it since the event is dealt with in the non-client handler of the > > window. FOX itself never sees it. > > Well, that's not totally true, just because you're ignoring the > message, doesn't mean you don't get it.. > > How about sending SEL_MAXIMIZE, SEL_MINIMIZE, SEL_RESTORE based on > information from the WM_SIZE message on windows: > > See the WM_SIZE documentation: > http://msdn2.microsoft.com/en-us/library/ms632646.aspx. It tells you > exactly what happened. > > On Linux you can do the same thing whenever the _NET_STATE changes... > > On Windows you can also intercept the maximize/minimize/restore event > s before they're applied using the WM_SYSCOMMAND message: > > See documentation here: http://msdn2.microsoft.com/en-us/library/ms646360.aspx It sounds like a good idea to try and intercept the messages; but you wouldn't necessarily be able to block the maximization or minimization this way. But at least you'd know about it when it happens. - Jeroen From v.konrad at lse.ac.uk Fri Jan 11 12:04:08 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 11 Jan 2008 17:04:08 +0000 Subject: [fxruby-users] Handling Escape key-press in dialog window Message-ID: <20080111170408.3980d095@whirpool> Hello! I am trying to do a log-in screen for an application and have a problem with handling ESC key - when you press it, the dialog box closes and the application opens. What I would like is to quit the application if user hits ESC key while the initial log-in window is open. The LoginWindow class looks like: class LoginWindow < FXDialogBox def initialize(owner) super(owner, "gbrs - log in", :opts => DECOR_TITLE | DECOR_BORDER, :width => 300, :height => 250) # the following code should do it but it does not self.accelTable.removeAccel(fxparseAccel("ESC")) self.accelTable.addAccel(fxparseAccel("ESC"), getApp(), \ FXSEL(SEL_COMMAND, FXApp::ID_QUIT)) end end # end of class 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 Jan 11 12:20:02 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Fri, 11 Jan 2008 11:20:02 -0600 Subject: [fxruby-users] Handling Escape key-press in dialog window In-Reply-To: <20080111170408.3980d095@whirpool> References: <20080111170408.3980d095@whirpool> Message-ID: <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> On Jan 11, 2008, at 11:04 AM, Vladimir Konrad wrote: > I am trying to do a log-in screen for an application and have a > problem > with handling ESC key - when you press it, the dialog box closes and > the application opens. What I would like is to quit the application if > user hits ESC key while the initial log-in window is open. > > The LoginWindow class looks like: > > class LoginWindow < FXDialogBox > > def initialize(owner) > > super(owner, "gbrs - log in", :opts => DECOR_TITLE | > DECOR_BORDER, :width => 300, :height => 250) > > > > # the following code should do it but it does not > > self.accelTable.removeAccel(fxparseAccel("ESC")) > self.accelTable.addAccel(fxparseAccel("ESC"), getApp(), \ > FXSEL(SEL_COMMAND, FXApp::ID_QUIT)) > end > > end The problem is that the FXDialogBox doesn't store that mapping for the "Esc" key in its accelerator table, as you're assuming here. The FXDialogBox is just listening for SEL_KEYPRESS and SEL_KEYRELEASE messages and checking to see if the key being pressed (and released) is the Escape key (KEY_Escape). See what happens if you do something like this: self.connect(SEL_KEYPRESS) do |sender, sel, event| app.exit(0) if event.code == KEY_Escape false end In other words, we're overriding the default handler for SEL_KEYPRESS to check for the KEY_Escape keypress, and exiting the application if we see it. If we don't, the handler returns 'false' to indicate that we didn't handle whatever key was pressed. Hope this helps, Lyle From v.konrad at lse.ac.uk Fri Jan 11 12:34:17 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 11 Jan 2008 17:34:17 +0000 Subject: [fxruby-users] Handling Escape key-press in dialog window In-Reply-To: <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> References: <20080111170408.3980d095@whirpool> <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> Message-ID: <20080111173417.1f3cf6d4@whirpool> > See what happens if you do something like this: > > self.connect(SEL_KEYPRESS) do |sender, sel, event| > app.exit(0) if event.code == KEY_Escape > false > end This was my first approach (and it still does the same - carries on. The self.connect(SEL_KEYPRESS) does not get even called (is this because some other widget has a focus (there are other keyboard handlers in the log-in screen, but they are set-up for KEY_RELEASE)? Also, the log-in dialog box gets created in the main window .create method: # Main window .create method def create super LoginWindow.new(self).execute(PLACEMENT_SCREEN) show(PLACEMENT_SCREEN) end Vlad PS: I bought your book, time permitting I will send some feed-back... Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From tobi at gronom.de Sat Jan 12 06:21:42 2008 From: tobi at gronom.de (Grobie) Date: Sat, 12 Jan 2008 03:21:42 -0800 (PST) Subject: [fxruby-users] Problem with FXSwitcher Message-ID: <14771533.post@talk.nabble.com> Hello, I'm writing my first FXRuby program (with the help of Lyle Johnsons Pragmatic book, thanks) and I've got a little problem with the FXSwitcher. I've got a form and a picture. When the user opens a new picture, I want to reload the form (so every picture has one form). This works, FXSwitcher fires a message and I can react. But if the switcher is empty (when the program starts) and I add the first picture to it, it doesn't fire. Why? And if it's impossible to do it my way, how can I fire a message manually? Thanks for helping Tobias Schmidt -- View this message in context: http://www.nabble.com/Problem-with-FXSwitcher-tp14771533p14771533.html Sent from the FXRuby Users mailing list archive at Nabble.com. From lyle at lylejohnson.name Sat Jan 12 07:02:04 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sat, 12 Jan 2008 06:02:04 -0600 Subject: [fxruby-users] Problem with FXSwitcher In-Reply-To: <14771533.post@talk.nabble.com> References: <14771533.post@talk.nabble.com> Message-ID: On Jan 12, 2008, at 5:21 AM, Grobie wrote: > I'm writing my first FXRuby program (with the help of Lyle Johnsons > Pragmatic book, thanks) and I've got a little problem with the > FXSwitcher. > I've got a form and a picture. When the user opens a new picture, I > want to > reload the form (so every picture has one form). This works, > FXSwitcher > fires a message and I can react. But if the switcher is empty (when > the > program starts) and I add the first picture to it, it doesn't fire. > Why? And > if it's impossible to do it my way, how can I fire a message manually? Tobias, The switcher only fires a SEL_COMMAND message when the index of its current window is changed from one child window to another. So for example if you are currently showing panel 2, and then you change to panel 3, it should fire SEL_COMMAND. However, merely adding a window to a switcher doesn't cause this index to change (nor does removing a window from the switcher). If you're wanting to fire a SEL_COMMAND every time a new panel is added to the switcher, you'd need to do something manually, e.g. switcher = FXSwitcher.new(...) ... new_panel = FXVerticalFrame.new(switcher, ...) switcher.setCurrent(switcher.numChildren -1, true) Hope this helps, Lyle From v.konrad at lse.ac.uk Sat Jan 12 07:22:28 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Sat, 12 Jan 2008 12:22:28 +0000 Subject: [fxruby-users] Handling Escape key-press in dialog window In-Reply-To: <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> References: <20080111170408.3980d095@whirpool> <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> Message-ID: <20080112122228.2dc63177@whirpool> Lesson 1 - beginners tend to use framework in unexpected ways (My code was structured badly, solved with registering chore on start-up, which opens the log-in screen). Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From v.konrad at lse.ac.uk Sat Jan 12 07:29:08 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Sat, 12 Jan 2008 12:29:08 +0000 Subject: [fxruby-users] Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)? Message-ID: <20080112122908.25eb611e@whirpool> I cannot figure out how to call a function (or have a block executed) when a FXDialogBox closes (to have some program variables set from the text-fields in the dialog). Also, how do I close the dialog box when user presses Enter in some text-field, I know how to handle Enter key-press but not how to send message to the FXDialogBox window). Vlad PS: I searched and tried but still failing. Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From tobi at gronom.de Sat Jan 12 07:28:00 2008 From: tobi at gronom.de (Tobi) Date: Sat, 12 Jan 2008 13:28:00 +0100 Subject: [fxruby-users] Problem with FXSwitcher In-Reply-To: References: <14771533.post@talk.nabble.com> Message-ID: Thanks for your reply. I think, I forgot something to explain. If the user adds a picture to the program (like the example in your book), this picture is added to the switcher and set as the current item. This is an excerpt of my code. class CardList < FXSwitcher def initialize(parent) super(...) @cards = [] end def add_card(card) @cards << card PictureView.new self, card self.setCurrent @cards.size-1, true end ... end When I initialize the CardList, current is already set to 0. When I add the first picture, current is still 0. How can I fire a SEL_COMMAND at this point? Thank you Tobias Am 12.01.2008 um 13:02 schrieb Lyle Johnson: > > On Jan 12, 2008, at 5:21 AM, Grobie wrote: > >> I'm writing my first FXRuby program (with the help of Lyle Johnsons >> Pragmatic book, thanks) and I've got a little problem with the >> FXSwitcher. >> I've got a form and a picture. When the user opens a new picture, I >> want to >> reload the form (so every picture has one form). This works, >> FXSwitcher >> fires a message and I can react. But if the switcher is empty (when >> the >> program starts) and I add the first picture to it, it doesn't fire. >> Why? And >> if it's impossible to do it my way, how can I fire a message >> manually? > > Tobias, > > The switcher only fires a SEL_COMMAND message when the index of its > current window is changed from one child window to another. So for > example if you are currently showing panel 2, and then you change to > panel 3, it should fire SEL_COMMAND. However, merely adding a window > to a switcher doesn't cause this index to change (nor does removing a > window from the switcher). > > If you're wanting to fire a SEL_COMMAND every time a new panel is > added to the switcher, you'd need to do something manually, e.g. > > switcher = FXSwitcher.new(...) > ... > new_panel = FXVerticalFrame.new(switcher, ...) > switcher.setCurrent(switcher.numChildren -1, true) > > Hope this helps, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From v.konrad at lse.ac.uk Sat Jan 12 09:16:02 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Sat, 12 Jan 2008 14:16:02 +0000 Subject: [fxruby-users] (parially figured it out) Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)? In-Reply-To: <20080112122908.25eb611e@whirpool> References: <20080112122908.25eb611e@whirpool> Message-ID: <20080112141602.46e54bc1@whirpool> > Also, how do I close the dialog box when user presses Enter in some > text-field, I know how to handle Enter key-press but not how to send > message to the FXDialogBox window). used, .handle method 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 Sat Jan 12 10:01:06 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sat, 12 Jan 2008 09:01:06 -0600 Subject: [fxruby-users] Handling Escape key-press in dialog window In-Reply-To: <20080112122228.2dc63177@whirpool> References: <20080111170408.3980d095@whirpool> <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> <20080112122228.2dc63177@whirpool> Message-ID: <3E7356B0-FE90-4EC3-8D33-16E729D320D3@lylejohnson.name> On Jan 12, 2008, at 6:22 AM, Vladimir Konrad wrote: > Lesson 1 - beginners tend to use framework in unexpected ways Indeed. ;) > (My code was structured badly, solved with registering chore on > start-up, which opens the log-in screen). Does that mean that you've solved (or worked around) this issue with the Esc key press? From v.konrad at lse.ac.uk Sat Jan 12 12:44:24 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Sat, 12 Jan 2008 17:44:24 +0000 Subject: [fxruby-users] Handling Escape key-press in dialog window In-Reply-To: <3E7356B0-FE90-4EC3-8D33-16E729D320D3@lylejohnson.name> References: <20080111170408.3980d095@whirpool> <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> <20080112122228.2dc63177@whirpool> <3E7356B0-FE90-4EC3-8D33-16E729D320D3@lylejohnson.name> Message-ID: <20080112174424.4efd2929@whirpool> > > (My code was structured badly, solved with registering chore on > > start-up, which opens the log-in screen). > > Does that mean that you've solved (or worked around) this issue with > the Esc key press? Yes, at the end there was no need to handle the Escape key press - the FXDialogBox (the log-in screen) closes and returns 0 when Escape is pressed so I test for that and exit as necessary. Vlad PS: Once I get over the beginners hurdles, I would like to create example application for this and would like to have it included in the FXRuby examples. How do I go about that (just send it to you?)? 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 Sat Jan 12 15:16:32 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sat, 12 Jan 2008 14:16:32 -0600 Subject: [fxruby-users] Handling Escape key-press in dialog window In-Reply-To: <20080112174424.4efd2929@whirpool> References: <20080111170408.3980d095@whirpool> <13627780-6286-4C16-AE43-D19856BE27D7@lylejohnson.name> <20080112122228.2dc63177@whirpool> <3E7356B0-FE90-4EC3-8D33-16E729D320D3@lylejohnson.name> <20080112174424.4efd2929@whirpool> Message-ID: On Jan 12, 2008, at 11:44 AM, Vladimir Konrad wrote: >>> > PS: Once I get over the beginners hurdles, I would like to create > example application for this and would like to have it included in the > FXRuby examples. How do I go about that (just send it to you?)? Yes, that would be fine. Thanks! From lyle at lylejohnson.name Sat Jan 12 15:19:50 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Sat, 12 Jan 2008 14:19:50 -0600 Subject: [fxruby-users] Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)? In-Reply-To: <20080112122908.25eb611e@whirpool> References: <20080112122908.25eb611e@whirpool> Message-ID: <17CFB011-28CD-41AB-9DE9-5EA0578B61FD@lylejohnson.name> On Jan 12, 2008, at 6:29 AM, Vladimir Konrad wrote: > I cannot figure out how to call a function (or have a block executed) > when a FXDialogBox closes (to have some program variables set from the > text-fields in the dialog). It depends on how the dialog box closes. Usually, you would use a pattern like the following: dialog = FXFileDialog.new(...) # or some other kind of dialog box # # ... add code here to initialize the text fields in the dialog box equal to program variables... # if dialog.execute != 0 # # ... add code here to set the program variables based on the new values of the text fields... end Hope this helps, Lyle From tobi at gronom.de Sun Jan 13 06:02:04 2008 From: tobi at gronom.de (Tobi) Date: Sun, 13 Jan 2008 12:02:04 +0100 Subject: [fxruby-users] Combobox Message-ID: <54B4C618-097F-4D02-985F-0302BACD9B8B@gronom.de> Hi, I've got a little problem with the comboboxes. I want to provide a search where the user enters a word into the combobox and the program runs a mysqlsearch and returns the result in the comboboxlist. While the user enters a searchword or moves up or down within the list, it is necessary that the list opens itself without a manual click on the button. That's exactly my problem. I was able to implement the search, but I don't know how I can make the list popup. There is a method paneShown?, but no showPane. Then I found the method popup (from FXPopup), but I don't know how I can use it. An example for a search I want to build is the url bar in a browser. thanks Tobias Schmidt From v.konrad at lse.ac.uk Mon Jan 14 05:57:47 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Mon, 14 Jan 2008 10:57:47 +0000 Subject: [fxruby-users] [solved] Is there a way to handle window (FXDialogBox) "close event" ? In-Reply-To: <17CFB011-28CD-41AB-9DE9-5EA0578B61FD@lylejohnson.name> References: <20080112122908.25eb611e@whirpool> <17CFB011-28CD-41AB-9DE9-5EA0578B61FD@lylejohnson.name> Message-ID: <20080114105747.1da8f0d1@whirpool> > It depends on how the dialog box closes. Usually, you would use a > pattern like the following: > > dialog = FXFileDialog.new(...) # or some other kind of dialog > box # > # ... add code here to initialize the text fields in the > dialog box equal to program variables... > # > if dialog.execute != 0 > # > # ... add code here to set the program variables > based on the new values of the text fields... > end > > Hope this helps, Thank you. Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From jeroen at fox-toolkit.org Mon Jan 14 11:24:43 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 14 Jan 2008 10:24:43 -0600 Subject: [fxruby-users] Combobox In-Reply-To: <54B4C618-097F-4D02-985F-0302BACD9B8B@gronom.de> References: <54B4C618-097F-4D02-985F-0302BACD9B8B@gronom.de> Message-ID: <200801141024.44399.jeroen@fox-toolkit.org> On Sunday 13 January 2008 05:02:04 am Tobi wrote: > Hi, > > I've got a little problem with the comboboxes. I want to provide a > search where the user enters a word into the combobox and the program > runs a mysqlsearch and returns the result in the comboboxlist. While > the user enters a searchword or moves up or down within the list, it > is necessary that the list opens itself without a manual click on the > button. That's exactly my problem. > I was able to implement the search, but I don't know how I can make > the list popup. There is a method paneShown?, but no showPane. Then I > found the method popup (from FXPopup), but I don't know how I can use > it. > > An example for a search I want to build is the url bar in a browser. OK, I will add some API's to FXComboBox to post the menu programmatically; this will be in FOX 1.7, of course. - Jeroen From jmthomas at ball.com Mon Jan 14 14:29:28 2008 From: jmthomas at ball.com (Thomas, Jason M (Software)) Date: Mon, 14 Jan 2008 12:29:28 -0700 Subject: [fxruby-users] FXMessageBox - MBOX_SAVE_CANCEL_DONTSAVE problem Message-ID: <03B62622BF273442912A2E486B799DD205829A7C@AEROMSG3.AERO.BALL.COM> When I try to create a FXMessageBox with option MBOX_SAVE_CANCEL_DONTSAVE, I get the following error: RangeError: bignum out of range of unsigned long. My code looks like this: value = FXMessageBox.question(self, MBOX_SAVE_CANCEL_DONTSAVE, 'Save?', 'Save Before Opening?') The other MBOX_XXX options all seem to work. Jason This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From lyle at lylejohnson.name Mon Jan 14 15:01:44 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 14 Jan 2008 14:01:44 -0600 Subject: [fxruby-users] FXMessageBox - MBOX_SAVE_CANCEL_DONTSAVE problem In-Reply-To: <03B62622BF273442912A2E486B799DD205829A7C@AEROMSG3.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A7C@AEROMSG3.AERO.BALL.COM> Message-ID: <752BFB0D-75F4-4234-A68F-DD57A4BE17D0@lylejohnson.name> On Jan 14, 2008, at 1:29 PM, Thomas, Jason M ((Software)) wrote: > When I try to create a FXMessageBox with option > MBOX_SAVE_CANCEL_DONTSAVE, I get the following error: RangeError: > bignum > out of range of unsigned long. > > My code looks like this: > value = FXMessageBox.question(self, MBOX_SAVE_CANCEL_DONTSAVE, > 'Save?', > 'Save Before Opening?') > > The other MBOX_XXX options all seem to work. OK. The integer value of that option flag must be exceeding some Ruby size limit. Could you please file a bug report on this one in the FXRuby bug tracker at RubyForge? From jmthomas at ball.com Mon Jan 14 15:04:10 2008 From: jmthomas at ball.com (Thomas, Jason M (Software)) Date: Mon, 14 Jan 2008 13:04:10 -0700 Subject: [fxruby-users] FXMessageBox - MBOX_SAVE_CANCEL_DONTSAVE problem References: <03B62622BF273442912A2E486B799DD205829A7C@AEROMSG3.AERO.BALL.COM> <752BFB0D-75F4-4234-A68F-DD57A4BE17D0@lylejohnson.name> Message-ID: <03B62622BF273442912A2E486B799DD205829A7E@AEROMSG3.AERO.BALL.COM> Will do. I also noticed that FXMessageBox doesn't have a MBOX_CLICKED_DONTSAVE return value so it looks like that option hasn't been used/tested very much. -----Original Message----- From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Lyle Johnson Sent: Monday, January 14, 2008 1:02 PM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXMessageBox - MBOX_SAVE_CANCEL_DONTSAVE problem On Jan 14, 2008, at 1:29 PM, Thomas, Jason M ((Software)) wrote: > When I try to create a FXMessageBox with option > MBOX_SAVE_CANCEL_DONTSAVE, I get the following error: RangeError: > bignum > out of range of unsigned long. > > My code looks like this: > value = FXMessageBox.question(self, MBOX_SAVE_CANCEL_DONTSAVE, > 'Save?', 'Save Before Opening?') > > The other MBOX_XXX options all seem to work. OK. The integer value of that option flag must be exceeding some Ruby size limit. Could you please file a bug report on this one in the FXRuby bug tracker at RubyForge? _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From lyle at lylejohnson.name Mon Jan 14 15:50:28 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 14 Jan 2008 14:50:28 -0600 Subject: [fxruby-users] FXMessageBox - MBOX_SAVE_CANCEL_DONTSAVE problem In-Reply-To: <03B62622BF273442912A2E486B799DD205829A7E@AEROMSG3.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A7C@AEROMSG3.AERO.BALL.COM> <752BFB0D-75F4-4234-A68F-DD57A4BE17D0@lylejohnson.name> <03B62622BF273442912A2E486B799DD205829A7E@AEROMSG3.AERO.BALL.COM> Message-ID: On Jan 14, 2008, at 2:04 PM, Thomas, Jason M ((Software)) wrote: > Will do. I also noticed that FXMessageBox doesn't have a > MBOX_CLICKED_DONTSAVE return value so it looks like that option hasn't > been used/tested very much. That is quite likely. ;) Thanks for taking the time to file a bug report. I will try to get these fixed ASAP in the next release. From jeroen at fox-toolkit.org Mon Jan 14 22:02:07 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 14 Jan 2008 21:02:07 -0600 Subject: [fxruby-users] FXMessageBox - MBOX_SAVE_CANCEL_DONTSAVE problem In-Reply-To: <03B62622BF273442912A2E486B799DD205829A7E@AEROMSG3.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A7C@AEROMSG3.AERO.BALL.COM> <752BFB0D-75F4-4234-A68F-DD57A4BE17D0@lylejohnson.name> <03B62622BF273442912A2E486B799DD205829A7E@AEROMSG3.AERO.BALL.COM> Message-ID: <200801142102.07736.jeroen@fox-toolkit.org> On Monday 14 January 2008, Thomas, Jason M (Software) wrote: > Will do. I also noticed that FXMessageBox doesn't have a > MBOX_CLICKED_DONTSAVE return value so it looks like that option hasn't > been used/tested very much. No, the return values are determined by what the buttons are supposed to DO. WHICH group of buttons is shown is determined by the options. So MBOX_SAVE_CANCEL_DONTSAVE means we have three buttons: "Save", "Cancel", and "Don't Save", with return values MBOX_CLICKED_SAVE, MBOX_CLICKED_CANCEL, and MBOX_CLICKED_NO, respectively. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 20:50 01/14/2008 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From jmthomas at ball.com Mon Jan 21 17:33:48 2008 From: jmthomas at ball.com (Thomas, Jason M (Software)) Date: Mon, 21 Jan 2008 15:33:48 -0700 Subject: [fxruby-users] FXSplashWindow Message-ID: <03B62622BF273442912A2E486B799DD205829A9C@AEROMSG3.AERO.BALL.COM> I saw Jeroen's suggestion on how to use FXSplashWindow on the foxgui-users list and thought I'd try it. My attempt was as follows: require 'fox16' include Fox app = FXApp.new("App") icon = nil File.open('icon.gif', 'rb') { |f| icon = FXGIFIcon.new(app, f.read) } splash = FXSplashWindow.new(app,icon) splash.create splash.show(PLACEMENT_OWNER) app.runModalWhileShown(splash) I get a Segmentation fault at the splash.create line. Does FXSplashWindow work in fxRuby 1.3.13? Thanks, Jason Thomas This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From rmelton at ball.com Mon Jan 21 18:39:00 2008 From: rmelton at ball.com (Melton, Ryan) Date: Mon, 21 Jan 2008 16:39:00 -0700 Subject: [fxruby-users] FXSplashWindow In-Reply-To: <03B62622BF273442912A2E486B799DD205829A9C@AEROMSG3.AERO.BALL.COM> References: <03B62622BF273442912A2E486B799DD205829A9C@AEROMSG3.AERO.BALL.COM> Message-ID: <2EC28B773AF39E47850AC45765483C2C08CC64E7@AEROMSG2.AERO.BALL.COM> You need to create the application rather than the splash window (it will get created with the application). I also recommend doing PLACEMENT_SCREEN rather than placement owner. I updated your code below. Ryan -----Original Message----- From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Thomas, Jason M (Software) Sent: Monday, January 21, 2008 3:34 PM To: fxruby-users at rubyforge.org Subject: [fxruby-users] FXSplashWindow I saw Jeroen's suggestion on how to use FXSplashWindow on the foxgui-users list and thought I'd try it. My attempt was as follows: require 'fox16' include Fox app = FXApp.new("App") icon = nil File.open('icon.gif', 'rb') { |f| icon = FXGIFIcon.new(app, f.read) } splash = FXSplashWindow.new(app,icon) app.create splash.show(PLACEMENT_SCREEN) app.runModalWhileShown(splash) I get a Segmentation fault at the splash.create line. Does FXSplashWindow work in fxRuby 1.3.13? Thanks, Jason Thomas This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From ernst at tanakasite.com Fri Jan 25 16:55:02 2008 From: ernst at tanakasite.com (Ernst J. Tanaka) Date: Fri, 25 Jan 2008 16:55:02 -0500 Subject: [fxruby-users] fxtable and sort Message-ID: <479A5AB6.2050309@tanakasite.com> Hi: Make good progress in understanding Fxruby. I am using FXTable in my application. I don't see a standard function to sort colums based on double clicking on the header. I was looking for something in the line of |TABLE_SORTABLE| as a creation option and non application level sort of column value base on user click on header. Am I correct to understand this is not a function of FXTable within ruby? Thanks Ice -------------- next part -------------- A non-text attachment was scrubbed... Name: ernst.vcf Type: text/x-vcard Size: 264 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20080125/80f5bff2/attachment.vcf From philippe.lang at attiksystem.ch Mon Jan 28 01:51:24 2008 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 28 Jan 2008 07:51:24 +0100 Subject: [fxruby-users] fxtable and sort References: <479A5AB6.2050309@tanakasite.com> Message-ID: <6C0CF58A187DA5479245E0830AF84F4218D00C@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > Hi: Make good progress in understanding Fxruby. > > I am using FXTable in my application. > I don't see a standard function to sort colums based on double > clicking on the header. > > I was looking for something in the line of >> TABLE_SORTABLE| as a creation option > > and non application level sort of column value base on user click on > header. > > Am I correct to understand this is not a function of FXTable within > ruby? Hi, There is unfortunately no such thing in the FXRuby library. You'll have to write this logic at the application level yourself. It is not that hard, and by the way, I think you can find a few examples on Internet. Philippe From jeroen at fox-toolkit.org Mon Jan 28 11:54:21 2008 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 28 Jan 2008 10:54:21 -0600 Subject: [fxruby-users] fxtable and sort In-Reply-To: <479A5AB6.2050309@tanakasite.com> References: <479A5AB6.2050309@tanakasite.com> Message-ID: <200801281054.21838.jeroen@fox-toolkit.org> On Friday 25 January 2008, Ernst J. Tanaka wrote: > Hi: Make good progress in understanding Fxruby. > > I am using FXTable in my application. > I don't see a standard function to sort colums based on double clicking > on the header. > > I was looking for something in the line of > |TABLE_SORTABLE| as a creation option > > and non application level sort of column value base on user click on header. > > Am I correct to understand this is not a function of FXTable within ruby? Yes, that is correct. A click on a row [column] header just selects the row [column]. However, the good news is that it should be quite easy to intercept the messages from these header controls. FXTable api's getColumnHeader() and getRowHeader() return the header controls for the columns and rows, respectively. After this, its a simple matter of reassigning the message and target emitted by these controls to a piece of code which does the sorting. Hope this helps, - Jeroen From v.konrad at lse.ac.uk Tue Jan 29 07:30:24 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Tue, 29 Jan 2008 12:30:24 +0000 Subject: [fxruby-users] FXTable: fitColumnsToContents() and fitRowsToContents() Message-ID: <20080129123024.40c021f5@whirpool> Hello, I have a simple table where the cells are set using .setItemText() method (all cells are set). I am trying to re-size the height and width of all cells so the content of all cells is fully wisible. When I do: @table.fitColumnsToContents(0, @table.numColumns) @table.fitRowsToContents(0, @table.numRows) the cells shrink to their minimal size (smaller then default without calling .fitColumns/RowsToContents() method. I searched but obviously missing something... 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 Tue Jan 29 10:56:57 2008 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 29 Jan 2008 09:56:57 -0600 Subject: [fxruby-users] FXTable: fitColumnsToContents() and fitRowsToContents() In-Reply-To: <20080129123024.40c021f5@whirpool> References: <20080129123024.40c021f5@whirpool> Message-ID: <0BFA6A16-C0B4-4ED5-AA29-04228B071A3C@lylejohnson.name> On Jan 29, 2008, at 6:30 AM, Vladimir Konrad wrote: > I am trying to re-size the height and width of all cells so the > content > of all cells is fully wisible. When I do: > > @table.fitColumnsToContents(0, @table.numColumns) > @table.fitRowsToContents(0, @table.numRows) > > the cells shrink to their minimal size (smaller then default without > calling .fitColumns/RowsToContents() method. Make sure that you're calling those methods after the table (and more importantly, the table items) has already been created. Before the table has been created, it doesn't know the font size and therefore doesn't actually know how wide/tall the cells should be. From v.konrad at lse.ac.uk Tue Jan 29 11:28:47 2008 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Tue, 29 Jan 2008 16:28:47 +0000 Subject: [fxruby-users] [solved] FXTable: fitColumnsToContents() and fitRowsToContents() In-Reply-To: <0BFA6A16-C0B4-4ED5-AA29-04228B071A3C@lylejohnson.name> References: <20080129123024.40c021f5@whirpool> <0BFA6A16-C0B4-4ED5-AA29-04228B071A3C@lylejohnson.name> Message-ID: <20080129162847.1c09c46c@whirpool> > Make sure that you're calling those methods after the table (and > more importantly, the table items) has already been created. Thank you :-), I called the methods in window's .initialize method (which does not work as window was not created/shown yet). Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm