From jkinsella at ancillaryservices.com Wed Dec 2 11:42:10 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Wed, 2 Dec 2009 11:42:10 -0500 Subject: [fxruby-users] FXTextCodec Message-ID: <39b4b9790912020842k40d1b5x316f070fcfd95d2d@mail.gmail.com> It appears FXTranslator is supported, but no FXTextCodec. Is there a different way to use FXTranslator in FXRuby than in C++? Also, the rdoc says to get a textCodec reference you use FXTranslator::textCodec(), and to set it you use FXTranslator::textCodec=, but it appears (atleast for me) that I should use getTextCodec()/setTextCodec() Thanks, Joey -- If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkinsella at ancillaryservices.com Wed Dec 2 12:46:59 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Wed, 2 Dec 2009 12:46:59 -0500 Subject: [fxruby-users] Timer control In-Reply-To: <352700.27736.qm@web30005.mail.mud.yahoo.com> References: <352700.27736.qm@web30005.mail.mud.yahoo.com> Message-ID: <39b4b9790912020946u1dbbca0bv3a389889a91f3d9@mail.gmail.com> Simple, hope this helps... class ProgressDlg < FXMainWindow def initialize(app, caption, text) @app = app super(@app, caption, :opts => DECOR_NONE, :width => 520, :height => 40) FXLabel.new(self, text, :opts => LAYOUT_FILL_X | JUSTIFY_CENTER_X) @bar = FXProgressBar.new(self, :opts => PROGRESSBAR_NORMAL | LAYOUT_FILL_X) end def create super show(PLACEMENT_SCREEN) end def run(limit = 100) @bar.setTotal(limit) @bar.setProgress(0) @app.addTimeout(1000, method(:progress_update)) end def progress_update(sender, selector, data) @bar.increment(1) if @bar.progress == @bar.total self.close(true) else @app.addTimeout(1000, method(:progress_update)) end end end On Mon, Nov 2, 2009 at 2:51 AM, dave L wrote: > Was wondering if anyone could via small piece of code show how a timer is > envoked. > > Sometimes (at least for me) a worked sample (with some documentation) is > better than having something explained in words. > > I would be grateful, > > Dave > > > > Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's > new email address. > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dglnz at yahoo.com Thu Dec 3 23:23:03 2009 From: dglnz at yahoo.com (dave L) Date: Thu, 3 Dec 2009 20:23:03 -0800 (PST) Subject: [fxruby-users] Timer control In-Reply-To: <39b4b9790912020946u1dbbca0bv3a389889a91f3d9@mail.gmail.com> Message-ID: <694294.65117.qm@web30007.mail.mud.yahoo.com> @Joey, Many thanks for the help. I ended up looking at some sample source code and was able to butcher that to get me going. REALLY appreciate your time as this list is low volume (and i am using foxGUIb) for the screen and window control display which has helped me visualise placement. again many thanks for the time. dave. --- On Thu, 3/12/09, Joey Kinsella wrote: > From: Joey Kinsella > Subject: Re: [fxruby-users] Timer control > To: fxruby-users at rubyforge.org > Received: Thursday, 3 December, 2009, 6:46 AM > Simple, hope this helps... > > class ProgressDlg < FXMainWindow > ? def initialize(app, caption, text) > ??? @app = app > ??? super(@app, caption, :opts => DECOR_NONE, :width > => 520, :height => 40) > > > ??? FXLabel.new(self, text, :opts => LAYOUT_FILL_X | > JUSTIFY_CENTER_X) > ??? @bar = FXProgressBar.new(self, :opts => > PROGRESSBAR_NORMAL | LAYOUT_FILL_X) > ? end > > ? def create > ??? super > ??? show(PLACEMENT_SCREEN) > > ? end > > ? def run(limit = 100) > ??? @bar.setTotal(limit) > ??? @bar.setProgress(0) > > ??? @app.addTimeout(1000, method(:progress_update)) > ? end > > ? def progress_update(sender, selector, data) > ??? @bar.increment(1) > > > ??? if @bar.progress == @bar.total > ????? self.close(true) > ??? else > ????? @app.addTimeout(1000, method(:progress_update)) > ??? end > ? end > end > > On Mon, Nov 2, 2009 at 2:51 AM, > dave L > wrote: > > Was wondering if > anyone could via small piece of code show how a timer is > envoked. > > > Sometimes (at least for me) a worked sample (with some > documentation) is better than having something explained in > words. > > I would be grateful, > > Dave > > > > > > > > > Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New > Zealand's new email address. > _______________________________________________ > > fxruby-users mailing list > > fxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/fxruby-users > > > > -- > If you are not the intended recipient, you are hereby > notified > that any dissemination, distribution, copying or other use > of > this communication is strictly prohibited. If you have > received this communication in error, please notify us > immediately. > > -----Inline Attachment Follows----- > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From jkinsella at ancillaryservices.com Thu Dec 24 10:00:13 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Thu, 24 Dec 2009 10:00:13 -0500 Subject: [fxruby-users] handling both SEL_LEFTBUTTON[PRESS|RELEASE], and SEL_DOUBLECLICK Message-ID: <39b4b9790912240700m71120db2h49cc90786c3443ca@mail.gmail.com> Hello all, Does anyone know if it is possible to connect to both a SEL_LEFTBUTTONPRESS (SEL_BUTTONRELEASE), and still be able to connect to a SEL_DOUBLECLICK? I am using an FXIconList, and I've implemented a basic pseudo `drag-n-drop', kind of thing... using SEL_LEFTBUTTONPRESS, and SEL_LEFTBUTTONRELEASE. I want to also handle a SEL_DOUBLECLICK so that a dialog will popup when they double click on an item. However, it appears that since I am already connecting to SEL_BUTTONPRESS/RELEASE that SEL_DOUBLECLICK is never getting triggered. (or atleast that is my assumption.) Is there a way around this? Or do I have to some how implement my own kind of SEL_DOUBLECLICK based on the FXEvent structure that is passed to SEL_LEFTBUTTONPRESS? (ie: if(data.click_count == 2) ; do_this() ; else ; do_that() ; end) I feel like that is rather hackish, and I'd rather not, if I don't have to. Thanks, Joey -- If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Dec 29 12:08:26 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 29 Dec 2009 11:08:26 -0600 Subject: [fxruby-users] handling both SEL_LEFTBUTTON[PRESS|RELEASE], and SEL_DOUBLECLICK In-Reply-To: <39b4b9790912240700m71120db2h49cc90786c3443ca@mail.gmail.com> References: <39b4b9790912240700m71120db2h49cc90786c3443ca@mail.gmail.com> Message-ID: <57cf8f720912290908p7b58955el790ca951c692a8e9@mail.gmail.com> On Thu, Dec 24, 2009 at 9:00 AM, Joey Kinsella wrote: > Does anyone know if it is possible to connect to both a > SEL_LEFTBUTTONPRESS (SEL_BUTTONRELEASE), and still be able to connect to a > SEL_DOUBLECLICK? I am using an FXIconList, and I've implemented a basic > pseudo `drag-n-drop', kind of thing... using SEL_LEFTBUTTONPRESS, and > SEL_LEFTBUTTONRELEASE. I want to also handle a SEL_DOUBLECLICK so that a > dialog will popup when they double click on an item. However, it appears > that since I am already connecting to SEL_BUTTONPRESS/RELEASE that > SEL_DOUBLECLICK is never getting triggered. (or atleast that is my > assumption.) Is there a way around this? Or do I have to some how implement > my own kind of SEL_DOUBLECLICK based on the FXEvent structure that is passed > to SEL_LEFTBUTTONPRESS? (ie: if(data.click_count == 2) ; do_this() ; else ; > do_that() ; end) I feel like that is rather hackish, and I'd rather not, if > I don't have to. The default SEL_LEFTBUTTONRELEASE handler for the FXIconList is where a SEL_DOUBLECLICKED message is usually generated, and (as you supposed), it's checking the FXEvent struct to see what the click count is. You might be able to get this to work by ensuring that your SEL_LEFTBUTTONRELEASE handler evaluates to false, e.g. iconList.connect(SEL_LEFTBUTTONRELEASE) do # ... something ... false end This will cause the default SEL_LEFTBUTTONRELEASE handler to pick up where you left off. Hope this helps, Lyle