fxruby-users Mailing List for FXRuby (Page 26)
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: Joel V. <vj...@PA...> - 2003-09-29 21:27:37
|
Joel VanderWerf wrote: > I think that's the same bug that I reported here about a month ago, but > couldn't isolate very well. Attached is Lyle's response. Well, now it is :) |
From: Joel V. <vj...@PA...> - 2003-09-29 21:19:50
|
Kevin Burge wrote: > To All, > > I'm having a problem with using descedants of FXTreeItem. Whatever is > causing the problem is hosing FXTreeList::removeItem. I think that's the same bug that I reported here about a month ago, but couldn't isolate very well. Attached is Lyle's response. In my case also, selecting a root node avoids the segfault, while selecting a child causes the segfault. Also, I am subclassing FXTreeItem, so it seems quite possibly the same bug. Another thing that might confirm: Ctrl-Q and Alt-F4 both cause the segfault Alt-F-Q and File->Quit do not Does this happen for you, Kevin? All my Quit command does is getApp().exit. |
From: Kevin B. <kev...@sy...> - 2003-09-29 19:28:21
|
To All, I'm having a problem with using descedants of FXTreeItem. Whatever is causing the problem is hosing FXTreeList::removeItem. Environment: ruby 1.8.0 (2003-09-29) [i686-linux] (though I've used several 1.8 versions) fox 1.0.46 FXRuby 1.0.26 Source that causes the bug is at the end of this message. The problem appears in FXTreeList::removeItem, whenever a child item has focus: // Deleted current item if(currentitem && item==olditem){ if(hasFocus()){ currentitem->setFocus(TRUE); } if((options&SELECT_MASK)==TREELIST_BROWSESELECT && currentitem->isEnabled()){ selectItem(currentitem,notify); } } currentItem->setFocus ends up calling an already destroyed object or something. I traced which pointers were being freed, and it looked okay, so I'm not sure what's going on. I'm guessing that memory is getting trashed. Any help on this would be appreciated. I'm trying to get a ruby/fox/FXRuby app completed very quickly. My workaround right now is to change the focus to another control in onCmdQuit. Kevin ------------------------- require 'fox' include Fox class MyTreeItem < FXTreeItem end class MyMainWindow < FXMainWindow def initialize(app) super(app, 'Bug', nil, nil, DECOR_ALL, 0, 0, 600, 400) tree = FXTreeList.new(self, 0, nil, 0, TREELIST_NORMAL|TREELIST_SHOWS_LINES|TREELIST_SHOWS_BOXES|TREELIST_ROOT_BOXES|LAYOUT_FILL_X|LAYOUT_FILL_Y) item = tree.addItemLast(@tree, MyTreeItem.new('Select and close - just fine')) item = tree.addItemLast(item, MyTreeItem.new('Select and close - choke')) end def create super show(PLACEMENT_SCREEN) end end app = FXApp.new('bug', 'bugtest') MyMainWindow.new(app) app.create app.run |
From: Lyle J. <ly...@kn...> - 2003-09-29 15:18:31
|
Brett S Hallett wrote: > I'm have managed to build a FXTable in a form, load some SQL and > display some data therein, however I cannot figure out how to > select and move the content of a table entry into a FXText field for > later processing. > > The example FXRuby (table.rb) program appears to use Menu 'clicks' to > manipulate FXTable data, I wish to access the field directly by > simply clicking on the desired field -- can this be done ?? I have the feeling I'm misunderstanding your question, but I'll give it a shot anyways ;) When the user clicks on a table cell, the FXTable sends a SEL_COMMAND message to its target. So for starters you'd want to catch that: theTable.connect(SEL_COMMAND) { |sender, sel, tablePos| ... do something in response ... } Now, you say that you want to access the contents of this table cell and move (copy?) them into a text field. So you might do this in the handler: theTable.connect(SEL_COMMAND) { |sender, sel, tablePos| tableItem = theTable.getItem(tablePos.row, tablePos.col) aTextField.text = tableItem.text } Hope this helps, Lyle |
From: Dalibor S. <da...@in...> - 2003-09-29 14:31:17
|
Quoting Brett S Hallett: > I'm have managed to build a FXTable in a form, load some SQL and > display some data therein, however I cannot figure out how to > select and move the content of a table entry into a FXText field for > later processing. I have asked this question before. One way is asking Jeroen (main Fox author) to add the clipboard capability to FXTable. As we are at least two who would like to see it maybe we have a chance. Meanwhile you can look at my simple workaround. See http://www.insula.cz/dbtalk/ and find onPasteFromTable method in the source file 'dbtalk.rb '. Regards, Dalibor Sramek -- Dalibor Sramek http://www.insula.cz/dali | In the eyes of cats, dal...@in... | all things belong to cats. |
From: Brett S H. <dra...@im...> - 2003-09-29 12:28:44
|
I'm have managed to build a FXTable in a form, load some SQL and display some data therein, however I cannot figure out how to select and move the content of a table entry into a FXText field for later processing. The example FXRuby (table.rb) program appears to use Menu 'clicks' to manipulate FXTable data, I wish to access the field directly by simply clicking on the desired field -- can this be done ?? Thanks |
From: Lyle J. <jl...@cf...> - 2003-09-24 15:30:59
|
Recheis Meinrad wrote: > as posted before i think, > something is fishy with ScrollArea#positon > i'm getting the error > `position': wrong # of arguments(0 for 4) (ArgumentError) > while trying to access my (FXScrollWindow) scrollwindow.position. > i wonder, because fox C++ documentation does not contain this method. This sounds like a bug. The position() method is overloaded in the C++ FOX library. If you look at the FXWindow class (an ancestor of FXScrollWindow) you'll see one version of position that takes four arguments (x, y, w, h). That version is for setting the window's position and dimensions inside its parent window. The other version of position, as you have noted, is found in the FXScrollArea class, and takes zero arguments. It should return the current position of the scroll window's contents. My intention was that if you call FXScrollWindow#position with four arguments, you get the first version; if you call it with zero arguments, you get the second version. Obviously, something is broken and so I'll try to get this fixed promptly. Thanks, Lyle |
From: Recheis M. <Mei...@av...> - 2003-09-24 11:47:46
|
sorry for my last post in html (f**k MSExchange).... now in plain text: as posted before i think, something is fishy with ScrollArea#positon=20 i'm getting the error=20 `position': wrong # of arguments(0 for 4) (ArgumentError)=20 while trying to access my (FXScrollWindow) scrollwindow.position.=20 i wonder, because fox C++ documentation does not contain this method.=20 - Henon=20 |
From: Recheis M. <Mei...@av...> - 2003-09-24 10:29:20
|
hi, something is fishy with ScrollArea#positon i'm getting the error `position': wrong # of arguments(0 for 4) (ArgumentError) while trying to access my scrollwindow.position. i wonder, because fox C++ documentation does not contain this method. - Henon |
From: Bil <bi...@vi...> - 2003-09-19 20:24:21
|
>Recheis Meinrad wrote: > > what i want is simply a glcanvas that has a fixed size. when bigger than the holding window then i want scrollbars to appear. >[...] You are in luck, I have only recently wrestled with the same problem with= scrolling an FXCanvas (not an FXGLCanvas - should be the same, though).= This is how I finally got it to work, after many gruelling trials. Hope it= is helpful. Not sure if it is the *correct* way though... -------------------- @scrollWindow =3D FXScrollWindow.new aFrame, 0, LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT # Make it fill up the space in its frame each time we resize. @scrollWindow.connect(SEL_CONFIGURE) { frameThickness =3D 2 # Otherwise scrollbars cover frame. @scrollWindow.resize @scrollWindow.parent.width - frameThickness, @scrollWindow.parent.height - frameThickness } canvasFrame =3D FXHorizontalFrame @scrollWindow canvas =3D FXCanvas.new canvasFrame, messageTarget, 0, LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0, 0, 5000, 5000 ------------------- I know my version works OK, so if this 'cut and paste' code doesn't then= hassle me again. -- Bil Bas |
From: Recheis M. <Mei...@av...> - 2003-09-19 20:01:11
|
| Bil [mailto:bi...@vi...] wrote: |=20 | >Recheis Meinrad wrote: | > | > what i want is simply a glcanvas that has a fixed size. when bigger | than the holding window then i want scrollbars to appear. | >[...] |=20 | You are in luck, I have only recently wrestled with the same problem = with scrolling an FXCanvas (not an FXGLCanvas - should be the same, = though). This is how I finally got it to work, after many gruelling = trials. Hope it is helpful. Not sure if it is the *correct* way = though... | -------------------- | @scrollWindow =3D FXScrollWindow.new aFrame, 0, | LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT |=20 | # Make it fill up the space in its frame each time we resize. | @scrollWindow.connect(SEL_CONFIGURE) { | frameThickness =3D 2 # Otherwise scrollbars cover frame. | @scrollWindow.resize @scrollWindow.parent.width - frameThickness, | @scrollWindow.parent.height - frameThickness | } |=20 | canvasFrame =3D FXHorizontalFrame @scrollWindow |=20 | canvas =3D FXCanvas.new canvasFrame, messageTarget, 0, | LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, | 0, 0, 5000, 5000 | ------------------- |=20 | I know my version works OK, so if this 'cut and paste' code doesn't = then hassle me again. |=20 | -- Bil Bas =20 thanks,=20 the solution looks fairly simple, if you look at it afterwards, but there are many holes to fall into on the way there ;) regards,=20 - Henon |
From: Lyle J. <jl...@cf...> - 2003-09-18 20:09:46
|
Recheis Meinrad wrote: > can i send ruby object instances via DND? I haven't actually tried it, but it seems like to should be able to marshall the Ruby instance to sequence of bytes (or a YAML string if you prefer) and then that becomes the DnD data. Before you try this, *please* read the drag-and-drop tutorial here: http://www.fxruby.org/doc/dragdroptut.html to make sure that you understand the basics of how DnD works. Hope this helps, Lyle |
From: Recheis M. <Mei...@av...> - 2003-09-18 19:04:26
|
can i send ruby object instances via DND?=20 - Henon |
From: Recheis M. <Mei...@av...> - 2003-09-18 19:00:26
|
Lyle Johnson [mailto:jl...@cf...] wrote: >Recheis Meinrad wrote: > >| what i want is simply a glcanvas that has a fixed size. when bigger >than the holding window then i want scrollbars to appear. [...] > >This always confuses me too; this time I'm going to write it down >somewhere so I don't have to dig through the FOX source code the next >time it comes up ;) > >You want to use FXScrollWindow, but there is a trick for some kinds of >content widgets (including FXGLCanvas). You need to put a "dummy" >container frame of some kind as the child of the FXScrollWindow: > >~ scrollWindow =3D FXScrollWindow.new(...) >~ canvasFrame =3D FXPacker.new(scrollWindow, >~ LAYOUT_FILL_X|LAYOUT_FILL_Y) > >and then put the fixed-size FXGLCanvas inside the frame: > >~ glCanvas =3D FXGLCanvas.new(canvasFrame, glVisual, nil, 0, >~ LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT) >~ glCanvas.width =3D 1024 # or whatever... >~ glCanvas.height =3D 1024 > >Hope this helps, > >Lyle first thanks for the reply using your code the canvas doesn't show up. it starts with = width=3D=3Dheigth=3D=3D1.=20 but it will show up when setting LAOUT_FILL_X/Y. you got to connect a sel_map with the glcanvas to set LAYOUT_FIX_X/Y = later. but unfortunately this doesn't solve my problem.=20 the scrollwin still doesn't scroll the much larger dummy containing a = glcanvas. maybe i write a *little* demonstration script next week to show the = problem. have a nice weekend, - Henon |
From: Recheis M. <Mei...@av...> - 2003-09-18 13:20:23
|
hi, what i want is simply a glcanvas that has a fixed size. when bigger = than the holding window then i want scrollbars to appear. * now what should i use: scrollarea or scrollwindow scrollarea fails to show my content. so i am using scroll window. * scrollwindow doesn't scroll, even if i force the canvas' size to be = bigger. * also having a frame between scrollwindow and canvas doesn't help. i messed around a lot and didn't get scrolling working. with = H/VSCROLLERS_ALWAYS i get scrollers, but can't scroll. * then i tried to instantiate the canvas as a child of = scrollwindow.contentWindow, but this yields a segfault! so i am a bit confused about this. what did i miss? - Henon |
From: Kristoffer Lund <kun...@ho...> - 2003-09-17 10:52:42
|
Thanks a lot! I'll try it out when I have the possibility. I'm sitting on w= ebmail at a school at the moment, hoping to be up and running with my own= computer soon again... Will tell you how it went. Thanks! -- Kristoffer -----Original Message----- From: Lyle Johnson <jl...@cf...> To: jeroen <je...@fo...>, kun...@ho... Date: Mon, 15 Sep 2003 09:58:34 -0500=20 Subject: Re: [Fxruby-users] Default associations in FXFileList and FXDirLis= t Kristoffer Lund=E9n wrote: > Then it would seem that it is either my code or FXRuby that is broken,=20 > here is a minimal example that only displays the C:\ drive (and I have=20 > drives up till I:\) <snip> > On my machine, all of those combinations display an unexpanded C:\=20 > drive, and when I start to navigate the tree, it is indeed C:\. Jeroen: Kristoffer is absolutely correct, there is a bug in the=20 FXDirList widget, at least for the fox-1.0.x series. Have not checked it=20 on fox-1.1.x. The problem is that if you call FXDirList::setDirectory()=20 before calling create() on the directory list widget, the call to=20 scanRootDir() in FXDirList::create() blows away the previous tree structure= . Kristoffer: Based on that, the workaround for your program is to first=20 save a reference to the directory list in an instance variable after=20 constructing it, i.e. @dirlist =3D FXDirList.new(...) and then set the directory in your MainWindow#create method, *after*=20 calling the base class version of create(), i.e. class MainWindow def create # Do base class create first super # Now set the desired directory @dirlist.directory =3D 'D:\\music' # and show the main window show(PLACEMENT_SCREEN) end end Hope this helps, Lyle ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Fxruby-users mailing list Fxr...@li... https://lists.sourceforge.net/lists/listinfo/fxruby-users |
From: Lyle J. <jl...@cf...> - 2003-09-16 15:19:10
|
Recheis Meinrad wrote: > alias.rb > class FXGLCanvas > def context; getContext(); end > end > > obviously the !documented alias > > def current?; isCurrent(); end > > is missing. Thanks very much! Just added this. |
From: jeroen <je...@fo...> - 2003-09-16 12:50:17
|
On Monday 15 September 2003 09:58 am, you wrote: > Kristoffer Lund=E9n wrote: > > Then it would seem that it is either my code or FXRuby that is broken= , > > here is a minimal example that only displays the C:\ drive (and I hav= e > > drives up till I:\) > > <snip> > > > On my machine, all of those combinations display an unexpanded C:\ > > drive, and when I start to navigate the tree, it is indeed C:\. > > Jeroen: Kristoffer is absolutely correct, there is a bug in the > FXDirList widget, at least for the fox-1.0.x series. Have not checked i= t > on fox-1.1.x. The problem is that if you call FXDirList::setDirectory() > before calling create() on the directory list widget, the call to > scanRootDir() in FXDirList::create() blows away the previous tree > structure. > > Kristoffer: Based on that, the workaround for your program is to first > save a reference to the directory list in an instance variable after > constructing it, i.e. > > @dirlist =3D FXDirList.new(...) > > and then set the directory in your MainWindow#create method, *after* > calling the base class version of create(), i.e. > > class MainWindow > def create > # Do base class create first > super > > # Now set the desired directory > @dirlist.directory =3D 'D:\\music' > > # and show the main window > show(PLACEMENT_SCREEN) > end > end > > Hope this helps, > > Lyle I see. In my opinion, there may be another workaround which is perhaps simpler: call setDirectory() TWICE. What happens is the scanRootDir() switches to the current drive. However, setDirectory SETS the current drive, except for the first time, when the toplevel FXDirItem doesn't exist yet. FOX 1.1's FXDirList works much differently internally, so I don't think=20 it has the same problem. - Jeroen --=20 +------------------------------------------------------------------------= ----+ | Copyright (C) 20:40 09/15/2003 Jeroen van der Zijp. All Rights Reserv= ed. | +------------------------------------------------------------------------= ----+ |
From: Recheis M. <Mei...@av...> - 2003-09-16 10:28:28
|
alias.rb class FXGLCanvas def context; getContext(); end end obviously the !documented alias=20 def current?; isCurrent(); end is missing.=20 regards,=20 -Henon |
From: Lyle J. <jl...@cf...> - 2003-09-15 14:44:44
|
Kristoffer Lund=E9n wrote: > Then it would seem that it is either my code or FXRuby that is broken,=20 > here is a minimal example that only displays the C:\ drive (and I have=20 > drives up till I:\) <snip> > On my machine, all of those combinations display an unexpanded C:\=20 > drive, and when I start to navigate the tree, it is indeed C:\. Jeroen: Kristoffer is absolutely correct, there is a bug in the=20 FXDirList widget, at least for the fox-1.0.x series. Have not checked it=20 on fox-1.1.x. The problem is that if you call FXDirList::setDirectory()=20 before calling create() on the directory list widget, the call to=20 scanRootDir() in FXDirList::create() blows away the previous tree structu= re. Kristoffer: Based on that, the workaround for your program is to first=20 save a reference to the directory list in an instance variable after=20 constructing it, i.e. @dirlist =3D FXDirList.new(...) and then set the directory in your MainWindow#create method, *after*=20 calling the base class version of create(), i.e. class MainWindow def create # Do base class create first super # Now set the desired directory @dirlist.directory =3D 'D:\\music' # and show the main window show(PLACEMENT_SCREEN) end end Hope this helps, Lyle |
From: Dalibor S. <da...@in...> - 2003-09-15 09:40:53
|
Quoting Lyle Johnson <jl...@cf...>: > > 2, Is there any source of GPLed, public domain etc. icons on the web? (Yes, > I > > have googled for a couple of minutes...) > > I am interested in the answer to this question too. It has come up before ;) OK I spent a bit more time googling and here is what I have found: Anthony's Icon Library http://www.sct.gu.edu.au/~anthony/icons/index.html The Icon Browser http://www.ibiblio.org/gio/iconbrowser/ Realm Graphics http://www.ender-design.com/rg/ http://iconlibrary.com/ The majority should be public domain but I would recommend reading copyright notices for each site. Enjoy Dalibor Sramek -- Dalibor Sramek http://www.insula.cz/dali | In the eyes of cats, dal...@in... | all things belong to cats. |
From: <kun...@ho...> - 2003-09-13 08:31:34
|
Sander Jansen wrote: > In the past I created a little app which did that actually. Anyone interested > can download it here: http://sxj.raafje.com/software.html > Note that is not finished yet (doesn't extract icons yet etc). But should do > some basic stuff. I lost interest since I'm not working on windows anymore. > Looks interesting. Sadly, I'm in the middle of moving to a new town, but I'll have a look when online again. Maybe that'll solve some of the tedious work of populating such a list. :) -- Kristoffer -- Sent using: Mozilla Thunderbird 0.2 (20030901) http://www.mozilla.org/projects/thunderbird/ |
From: <kun...@ho...> - 2003-09-13 08:29:08
|
jeroen wrote: > Well, I only fix what's known to be broken, and AFAIK, it isn't... I just > checked again; a call to > > dirbox->setDirectory("d:\"); > > switches FXDirList's display to that of the D: drive as expected (FXDirDialog > has a drive box and switching drive letters with it works). > Then it would seem that it is either my code or FXRuby that is broken, here is a minimal example that only displays the C:\ drive (and I have drives up till I:\) #################################### #!/usr/bin/env ruby require 'fox' include Fox class MainWindow < FXMainWindow def initialize(app) # Invoke base class initialize first super(app, 'FXDirList Test case', nil, nil, DECOR_ALL, 100, 100, 800, 600) contents = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH) dirlist = FXDirList.new(contents, 0, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT) # All of these result in just C:\ being displayed, closed, and when one navigates # it is indeed the C:\ drive. D:\music exists. dirlist.directory = 'd:/' #dirlist.directory = 'd:' #dirlist.directory = 'd:\\' #dirlist.directory = 'd:/music' #dirlist.directory = 'd:\\music' end def create super show(PLACEMENT_SCREEN) end end application = FXApp.new mainWindow = MainWindow.new(application) application.create application.run ########################## On my machine, all of those combinations display an unexpanded C:\ drive, and when I start to navigate the tree, it is indeed C:\. FXRuby does not seem to have a setDirectory method for that widget, and that would probably be a bit unrubyish, but I did try with several such calls too, with no result. Anybody see anything immediately wrong with the above code, so I can correct it? :) I would rather have the "all drives" widget, but getting this to work is definitely good enough. (Btw, any unrelated code errors is also up for critisism, I'm here to learn :) Still Windows XP, ruby 1.8.0 and FXRuby 1.0.22. Thanks, -- Kristoffer -- Sent using: Mozilla Thunderbird 0.2 (20030901) http://www.mozilla.org/projects/thunderbird/ |
From: jeroen <je...@fo...> - 2003-09-13 05:22:34
|
On Friday 12 September 2003 11:13 am, you wrote: > On Fri, 12 Sep 2003 18:10:19 +0200, Kristoffer Lund=E9n <kung.stoffe@ho= me.se> > > wrote : > > So, this means I'm out of luck with the "fixed" FXDirList widget then= ? > > Yes, unless Jeroen chooses to back-port the fix(es) to the FOX 1.0 bran= ch. Well, I only fix what's known to be broken, and AFAIK, it isn't... I just checked again; a call to dirbox->setDirectory("d:\"); switches FXDirList's display to that of the D: drive as expected (FXDirDi= alog has a drive box and switching drive letters with it works). - Jeroen --=20 +------------------------------------------------------------------------= ----+ | Copyright (C) 21:40 09/12/2003 Jeroen van der Zijp. All Rights Reserv= ed. | +------------------------------------------------------------------------= ----+ |
From: Sander J. <sx...@cf...> - 2003-09-12 17:53:43
|
In the past I created a little app which did that actually. Anyone intere= sted=20 can download it here: http://sxj.raafje.com/software.html Note that is not finished yet (doesn't extract icons yet etc). But should= do=20 some basic stuff. I lost interest since I'm not working on windows anymor= e. =09Sander > > Yeah, I've seen how the system works, and I think I can manage to bui= ld > > my own associations if I have to. The thing I'd really like though wa= s > > to steal any system associations, if available, at least to provide = a > > start. :) > > That certainly seems to be an argument for building a separate tool to > populate the registry. > |