fxruby-users Mailing List for FXRuby (Page 24)
Status: Inactive
Brought to you by:
lyle
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(75) |
Jul
(90) |
Aug
(61) |
Sep
(56) |
Oct
(56) |
Nov
(39) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(56) |
Feb
(45) |
Mar
(61) |
Apr
(40) |
May
(95) |
Jun
(79) |
Jul
(63) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
From: SIMOKAWA h. <h-s...@aa...> - 2003-10-21 06:58:40
|
Hello all, I am trying to do something with FxRuby, but it is not working for me. I want to scroll to bring a item into view, but I cannot it. Below is my code. Thanks for the help in advance SIMOKAWA, hajime (male,japan) require 'fox' include Fox class ListTestWindow < FXMainWindow def initialize(app) super(app, "fxtest", nil, nil, DECOR_ALL, 0, 0, 100, 100) @lst = FXList.new(self,4,nil,0,LIST_NORMAL |LAYOUT_FILL_X) @lst.appendItem '0' @lst.appendItem '1' @lst.appendItem '2' @lst.appendItem '3' @lst.appendItem '4' @lst.appendItem '5' @lst.appendItem '6' @lst.appendItem '7' @lst.appendItem '8' @lst.appendItem '9' @lst.makeItemVisible 7 end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 app = FXApp.new("FoxTest", "FoxTest") ListTestWindow.new(app) app.create app.run end |
From: Dalibor S. <da...@in...> - 2003-10-17 15:45:21
|
I would like to announce availability of DbTalk 0.74 preview. DbTalk is GUI SQL shell written in Ruby and FXRuby. You can find more information and downloadable archives at http://www.insula.cz/dbtalk/ Although the presented version is not yet ready to release it contains several new enhancements that I would like others to test. Main changes: - multiple result tables now supported - cleaner GUI, some icons - much improved clipboard and DND support (use middle mouse button) - both database tree and result table can now be a data source for clipboard or DND operation Thanks. -- Dalibor Sramek http://www.insula.cz/dali | In the eyes of cats, dal...@in... | all things belong to cats. |
From: Lyle J. <jl...@cf...> - 2003-10-16 22:33:00
|
meinrad recheis wrote: > after some testing, i think it's like that. if widgets have been created > by hand (that is, after the application.create statement) the tooltip > times seem to slow down as i reported. If you have a specific test case that demonstrates the problem (either for tooltips, or for the repainting of GL canvases), please do submit it to the bug list at SourceForge and I'll take a look. [Right offhand I can't think of any reason why instantiating and calling create() on a widget after the initial call to FXApp#create should have any effect on the time it takes to display its tooltip.] |
From: meinrad r. <mei...@gm...> - 2003-10-16 19:47:41
|
meinrad recheis wrote: [...] > > can it be possible that a too large widget hierarchy influences the > tooltip times? after some testing, i think it's like that. if widgets have been created by hand (that is, after the application.create statement) the tooltip times seem to slow down as i reported. if the whole application was created by the application the tooltips work fine. i also found out that sometimes glcanvases that were created by hand get the sel_paint in too slow intervals so that rendering slows down. i will try to track it down. regards, -- henon |
From: Lyle J. <ly...@kn...> - 2003-10-16 02:08:21
|
Dalibor Sramek wrote: > Could it be something similar to the LF/CRLF UNIX/Windows difference? Not that, but a platform dependency nonetheless ;) It turns out that for Windows, string data placed on the clipboard in the standard format must end with a null terminator. In other words, for a string like "foo" we actually want to store 4 bytes (where the last byte is zero). In contrast, X expects just the string data without the null terminator (e.g. just 3 bytes for "foo"). So a workaround for that previous example I sent you is to replace this line in the SEL_CLIPBOARD_REQUEST handler: @treelist.setDNDData(FROM_CLIPBOARD FXWindow.stringType, currentItemText) with something like: if /mswin/ =~ PLATFORM @treelist.setDNDData(FROM_CLIPBOARD FXWindow.stringType, currentItemText + "\0") else @treelist.setDNDData(FROM_CLIPBOARD FXWindow.stringType, currentItemText) end but I will try to come up with a more palatable solution for the next release. Maybe the best thing is to add a pair of module methods, like the existing fxencodeColorData() and fxdecodeColorData(), for working with strings going to or coming from the clipboard. Hope this helps, Lyle |
From: meinrad r. <mei...@gm...> - 2003-10-14 17:20:23
|
hi, what influences the tooltipPause = time to wait until the tooltip raises? i played around with some fxruby sample scripts and the tooltips are coming as expected. however in my very large GUI's the tips need up to 10 seconds to come regardless what tooltipPause i set (the first one comes as expected, all others take about 10 seconds). can it be possible that a too large widget hierarchy influences the tooltip times? regards, -- henon -------------- % cat "food in cans" cat: can't open food in cans |
From: Brett S H. <dra...@im...> - 2003-10-13 22:56:38
|
Thanks for your example -- works very nicely now !! -- I was trying to attach the SEL_CONFIGURE "to close to the table" By the way how do I attach a reply to your reply ? I seem to be able to only send original messages !! |
From: Lyle J. <jl...@cf...> - 2003-10-13 16:30:42
|
meinrad recheis wrote: > i wonder that the constructor of FXOption (descendant of FXLabel) takes > the flag MENUBUTTON_DOWN as default option, must be a copy-paste error. Yes, probably a typo carried over from the FOX header files. Thanks for noting this one. |
From: Lyle J. <ly...@kn...> - 2003-10-12 23:12:39
|
Phil Sharp wrote: > After adding an FXLabel to a FXHorizontalFrame, I destroyed the label, > then attempted to add a new one. The new one was created ok except that > it's placement was offset as if the one that I just deleted was still > there. > > Is there another step that must be taken to cause the frame to "forget" > about the just deleted widget? The correct way to cause a parent frame to forget about one of its child widgets is to use the removeChild() method: aHorizontalFrame.removeChild(aLabel) Calling destroy() on the label widget destroys the server-side representation (i.e. the X window or Windows HWND associated with the label) but it doesn't destroy the client-side representation, namely the C++ or Ruby object associated with the label. Calling removeChild() is the proper approach because it takes care of all of the bookkeeping associated with "forgetting" a child widget. First, it removes the widget from the parent's list of child widgets and nulls out any references to the child widget. Next, it calls recalc() on the parent (as suggested by Henon) to mark the parent's layout as dirty. Finally, it calls destroy() on the widget, to destroy the server-side resource. |
From: Lyle J. <ly...@kn...> - 2003-10-12 21:12:14
|
meinrad recheis wrote: > MenuButton has two style methods, but the docu only lists style flags > for the menubutton. where is the list of flags that popupStyle takes? > i took a look at FXPopup, but there i only found a list of popup > orientation flags. Thanks, this is an excellent question. I will update the documentation, but here is the summary: The options associated with the "buttonStyle" attribute are MENUBUTTON_AUTOGRAY, MENUBUTTON_AUTOHIDE, MENUBUTTON_TOOLBAR and MENUBUTTON_NOARROWS. The options associated with the "popupStyle" attribute are MENUBUTTON_UP, MENUBUTTON_DOWN, MENUBUTTON_LEFT and MENUBUTTON_RIGHT. The options associated with the "attachment" attribute are MENUBUTTON_ATTACH_LEFT, MENUBUTTON_ATTACH_RIGHT, MENUBUTTON_ATTACH_TOP, MENUBUTTON_ATTACH_BOTTOM, MENUBUTTON_ATTACH_CENTER and MENUBUTTON_ATTACH_BOTH. Thanks for pointing out this omission, Lyle |
From: Lyle J. <ly...@kn...> - 2003-10-12 21:02:29
|
Dalibor Sramek wrote: > I have just spent couple of hours tracking an error causing my application to > segfault. > > Finally I have found following construction in my code: > > @widget.handle(@widget, MKUINT(Widget::ID_SEL_COPY, SEL_COMMAND), nil) > > The sender (first argument) is the same object that should receive the message. > After replacing sender with "self" the error (which demonstrated itself in > completely unrelated part of code) went away. > > I just want to be sure it was the reason. The receiver does not suppose the > message sender to be itself, right? When you send a FOX message by calling the handle() method, the receiver of that message is the object on which you call handle(). The 'sender' argument is a reference to the object that is sending the message. With FOX, messages are bidirectional and it is common to see one FOX object "A" send a message to "B": B.handle(A, ..., ...) only to have the receiver (B) turn around and send a message back to the sender: def onHandleMessageFromA(sender, sel, ptr) sender.handle(self, ..., ...) end Given this, it wouldn't usually make sense for the sender of the message to be the same object as the receiver, although that's not specifically forbidden. Regardless, I want to avoid any potential bugs in FXRuby that cause the Ruby interpreter to seg fault, so if you can file a bug report about how to reproduce the crash that would be great. Hope this helps, Lyle |
From: meinrad r. <mei...@gm...> - 2003-10-12 15:59:43
|
Brett S Hallett wrote: > Thanks for your input, however I cant find any documentation on > SEL_CONFIGURE in my FXRuby docs, > could you drop ina little sample code ? i was thinking of this. it is very easy: untested code ahead: #this is the frame holding your table only with padding 0 h=FXVerticalFramme.new parent t=FXTable.new(h, ...) h.connect(SEL_CONFIGURE) { puts [h.width, h.height].join ' ' t.resize(h.width, h.height) } > > Thanks > hope it helps, -- henon -------------- % cat "food in cans" cat: can't open food in cans |
From: Brett S H. <dra...@im...> - 2003-10-12 12:12:45
|
Thanks for your input, however I cant find any documentation on SEL_CONFIGURE in my FXRuby docs, could you drop ina little sample code ? Thanks |
From: meinrad r. <mei...@gm...> - 2003-10-11 14:52:09
|
Brett S Hallett wrote: > Hi, I have a small form with predefined dimensions, however I would like > to allow the user to resize for their > convienence -- that' s easy enough, and all the widgets react > accordingly however how do I get the FXTable columns to also resize in > the correct proportions ? > > ie: col 1 = 5% ( of total width), col 2 = 10%, col 3 = 55% .. etc > > I currently re-compute these sizes based on getWidth() when the form is > loaded , but of course this does not work on a user resizing the form. > > So how do I detect & react to this ? > connect SEL_CONFIGURE to the tables parent. this will always be called when the frame was resized. cheers, -- henon -------------- % cat "food in cans" cat: can't open food in cans |
From: Brett S H. <dra...@im...> - 2003-10-11 00:13:39
|
Hi, I have a small form with predefined dimensions, however I would like to allow the user to resize for their convienence -- that' s easy enough, and all the widgets react accordingly however how do I get the FXTable columns to also resize in the correct proportions ? ie: col 1 = 5% ( of total width), col 2 = 10%, col 3 = 55% .. etc I currently re-compute these sizes based on getWidth() when the form is loaded , but of course this does not work on a user resizing the form. So how do I detect & react to this ? |
From: Phil S. <ps...@oz...> - 2003-10-10 13:58:28
|
On Fri, 10 Oct 2003, Meinrad Recheis wrote: > Phil Sharp wrote: > > > After adding an FXLabel to a FXHorizontalFrame, I destroyed the label, > > then attempted to add a new one. The new one was created ok except that > > it's placement was offset as if the one that I just deleted was still > > there. > > > > Is there another step that must be taken to cause the frame to "forget" > > about the just deleted widget? > > i think again recalc will do the job. > you might want to go to the fox-toolkit site and read the faq. there is > an entry about update, recalc and forceRefresh. > > > > > Thanks. > > > > cheers, > henon > I had only been reading the docs available at fxruby.sourceforge.net so I will be sure to check the fox-toolkit site as well. I did discover that if I did a .hide, before the .detach and .destroy it worked as expected. Phil Sharp |
From: Meinrad R. <mei...@av...> - 2003-10-10 09:22:53
|
Joel VanderWerf wrote: > I'm probably missing something in the docs or examples, but I'm > wondering if it is possible to display tick marks along a slider with > numeric values as accompanying text labels. If so, would it be possible > to adapt this "fixed point" slider to display the correct labels? > you can display tick marks (see SLIDER_... flags) but no labels with FXSlider. - henon |
From: Meinrad R. <mei...@av...> - 2003-10-10 09:11:28
|
Phil Sharp wrote: > After adding an FXLabel to a FXHorizontalFrame, I destroyed the label, > then attempted to add a new one. The new one was created ok except that > it's placement was offset as if the one that I just deleted was still > there. > > Is there another step that must be taken to cause the frame to "forget" > about the just deleted widget? i think again recalc will do the job. you might want to go to the fox-toolkit site and read the faq. there is an entry about update, recalc and forceRefresh. > > Thanks. > cheers, henon |
From: Phil S. <ps...@oz...> - 2003-10-09 15:18:55
|
After adding an FXLabel to a FXHorizontalFrame, I destroyed the label, then attempted to add a new one. The new one was created ok except that it's placement was offset as if the one that I just deleted was still there. Is there another step that must be taken to cause the frame to "forget" about the just deleted widget? Thanks. |
From: Robert M. <ro...@ta...> - 2003-10-09 07:58:14
|
|| hi, || hey! you are using ruby. you can adopt nearly everything to your needs. Thanks Meinrad, I keep forgetting that I can do things like you proposed. Many thanks! Rob |
From: meinrad r. <mei...@gm...> - 2003-10-08 20:56:35
|
lyle: hi, i wonder that the constructor of FXOption (descendant of FXLabel) takes the flag MENUBUTTON_DOWN as default option, must be a copy-paste error. new(p, text, ic=nil, tgt=nil, sel=0, opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, ... ) after a little investigation i come to the conclusion: it's a bug with no effects due to the fact that MENUBUTTON_DOWN has the value 0 which is the same as JUSTIFY_NORMAL. irb(main):003:0> MENUBUTTON_DOWN => 0 irb(main):005:0> JUSTIFY_NORMAL => 0 ciao, -- henon -------------- % cat "food in cans" cat: can't open food in cans |
From: meinrad r. <mei...@gm...> - 2003-10-08 20:15:30
|
hi, i see that many people downloaded the fox-tool preview and hopefully also launched it. i am very interested in what you think about it. i think it might be best if i would see the tool a bit from your point of view, so that i can focus on the most criticised things in an early state of development and not wasting a lot of energy for a tool that nobody is going to use. just tell me your true opinion. i appreciate any critics. that would help me alot making the tool more useful for the community. cheers, -- henon -------------- % cat "food in cans" cat: can't open food in cans |
From: meinrad r. <mei...@gm...> - 2003-10-08 19:56:03
|
lyle: MenuButton has two style methods, but the docu only lists style flags for the menubutton. where is the list of flags that popupStyle takes? i took a look at FXPopup, but there i only found a list of popup orientation flags. FXMenuButton buttonStyle [RW] Menu button style [Integer] popupStyle [RW] Popup style [Integer] -- henon -------------- % cat "food in cans" cat: can't open food in cans |
From: Dalibor S. <da...@in...> - 2003-10-08 16:52:12
|
I have just spent couple of hours tracking an error causing my application to segfault. Finally I have found following construction in my code: @widget.handle(@widget, MKUINT(Widget::ID_SEL_COPY, SEL_COMMAND), nil) The sender (first argument) is the same object that should receive the message. After replacing sender with "self" the error (which demonstrated itself in completely unrelated part of code) went away. I just want to be sure it was the reason. The receiver does not suppose the message sender to be itself, right? Comments? Thanks Dalibor -- Dalibor Sramek http://www.insula.cz/dali | In the eyes of cats, dal...@in... | all things belong to cats. |
From: meinrad r. <mei...@gm...> - 2003-10-08 15:34:35
|
Phil Sharp wrote: > Thank you. > > I have been struggling with this *much* longer than I would care to admit. > it is an unecessary complication or even a design error of the fox-tk that has troubled everyone of us once. did you allready happen to have some segmentation faults? this is the other thing that troubles fxruby users much. for instance: if you call create in the wrong place you will definitely have some. good luck, -- henon -------------- % cat "food in cans" cat: can't open food in cans |