fxruby-users Mailing List for FXRuby (Page 11)
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: Jens W. <wes...@so...> - 2004-04-14 20:18:32
|
I am using several listboxes, but when I select an item from one listbox, often another listbox will de-select. Why? How do I make all of the listboxes stay selected? --Jens Wessling -- Jens Wessling Software Engineer - Soar Technology wes...@so... -(734)327-8000x209 |
From: Jordan, T. <Tom...@ca...> - 2004-04-14 19:16:32
|
Hi Jamey: This is a good control. Well done. However, if you double click on the column header portion of the control, the containing window gets called for double click. Is there anyway to ignore double clicks on the listview header and do the call back only when double clicking on an item? Thanks, -- Tom. > -----Original Message----- > From: Jamey Cribbs [mailto:jc...@tw...] > Sent: Monday, April 12, 2004 7:25 PM > To:=20 > Subject: [Fxruby-users] ANN:FXListview >=20 >=20 > Listview.rb is a module containing a class that can be used to create > listviews (multi-column listboxes) in FXRuby. >=20 > Some of the features/advantages of listview over an FXIconList are: >=20 > * Clickable column headers that sort correctly based on data type. > * Left or right justified column data. > * Gridlines > * Custom sort arrow. >=20 > It is sub-classed from FXTable. You can read more about listview at: >=20 http://www.netpromi.com/listview.html and download it at: http://www.netpromi.com/files/listview.zip I would like to thank Jeroen van der Zijp for creating the awesome Fox=20 toolkit and Lyle Johnson for the great FXRuby library. Jamey Cribbs jc...@tw... ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of = GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Fxruby-users mailing list Fxr...@li... https://lists.sourceforge.net/lists/listinfo/fxruby-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.602 / Virus Database: 383 - Release Date: 3/1/2004 =20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.602 / Virus Database: 383 - Release Date: 3/1/2004 =20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.602 / Virus Database: 383 - Release Date: 3/1/2004 =20 This e-mail or the documents accompanying this e-mail contain information that may be confidential and/or privileged. It may also be prohibited from disclosure under applicable law. The information is intended to be for the use of the individual or entity named on this transmission. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is without authorization and is prohibited. If you have received this e-mail in error, please notify us immediately so that we can take action to correct the problem. |
From: Jamey C. <jc...@tw...> - 2004-04-14 01:18:32
|
This version of listview has a few bug fixes (thanks Joel VanderWerf) and a couple of enhancements. The main enhancement is that you can now specify two new column attributes for numeric fields: commas and dollarSign. Setting these attributes to true will cause the listview to automatically add commas and/or a dollar sign to the specified column data. I have updated the sample application to demonstrate this. ----------------- What is listview? Listview.rb is a module containing a class that can be used to create listviews (multi-column listboxes) in FXRuby. Some of the features/advantages of listview over an FXIconList are: * Clickable column headers that sort correctly based on data type. * Left or right justified column data. * Gridlines * Custom sort arrow. * Automatic commas and dollar sign for columns that you specify. It is sub-classed from FXTable. You can read more about listview at: http://www.netpromi.com/listview.html and download it at: http://www.netpromi.com/files/listview_1.1.0.zip I would like to thank Jeroen van der Zijp for creating the awesome Fox toolkit and Lyle Johnson for the great FXRuby library. Jamey Cribbs jc...@tw... |
From: Jamey C. <jc...@tw...> - 2004-04-13 23:43:04
|
Joel VanderWerf wrote: > Jamey Cribbs wrote: > >> Listview.rb is a module containing a class that can be used to create >> listviews (multi-column listboxes) in FXRuby. > > Btw, you may be able to get around that icon problem by explicitly > calling create() on them, instead of setting up the dummy buttons. Thanks, Joel! I added code to call create() on the icons and it fixed the problem. I will post a new version of listview.rb with this and a few other fixes tonight. Jamey |
From: Steve T. <STU...@MU...> - 2004-04-13 14:24:24
|
This is awesome! I have always been annoyed by FXTable's weirdities. I will definitely use this ASAP. Steve Tuckner > -----Original Message----- > From: Jamey Cribbs [mailto:jc...@tw...] > Sent: Monday, April 12, 2004 7:25 PM > To: fxr...@li... > Subject: [Fxruby-users] ANN:FXListview > > > Listview.rb is a module containing a class that can be used to create > listviews (multi-column listboxes) in FXRuby. > > Some of the features/advantages of listview over an FXIconList are: > > * Clickable column headers that sort correctly based on data type. > * Left or right justified column data. > * Gridlines > * Custom sort arrow. > > It is sub-classed from FXTable. You can read more about listview at: > > http://www.netpromi.com/listview.html > > and download it at: > > http://www.netpromi.com/files/listview.zip > > I would like to thank Jeroen van der Zijp for creating the > awesome Fox > toolkit and Lyle Johnson for the great FXRuby library. > > Jamey Cribbs > jc...@tw... > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Fxruby-users mailing list > Fxr...@li... > https://lists.sourceforge.net/lists/listinfo/fxruby-users |
From: Joel V. <vj...@us...> - 2004-04-13 04:19:24
|
Jamey Cribbs wrote: > Listview.rb is a module containing a class that can be used to create > listviews (multi-column listboxes) in FXRuby. That's very nice! I'll probably find a way to use that at some point. Thanks. Btw, you may be able to get around that icon problem by explicitly calling create() on them, instead of setting up the dummy buttons. It's great to see this kind of thing: a library using purely ruby to add new kinds of widgets to Fox/FXRuby. Also good to see lots of comments and a nice sample app :) |
From: Joel V. <vj...@PA...> - 2004-04-13 04:13:24
|
Jamey Cribbs wrote: > Listview.rb is a module containing a class that can be used to create > listviews (multi-column listboxes) in FXRuby. That's very nice! I'll probably find a way to use that at some point. Thanks. Btw, you may be able to get around that icon problem by explicitly calling create() on them, instead of setting up the dummy buttons. It's great to see this kind of thing: a library using purely ruby to add new kinds of widgets to Fox/FXRuby. Also good to see lots of comments and a nice sample app :) |
From: Jamey C. <jc...@tw...> - 2004-04-13 00:25:21
|
Listview.rb is a module containing a class that can be used to create listviews (multi-column listboxes) in FXRuby. Some of the features/advantages of listview over an FXIconList are: * Clickable column headers that sort correctly based on data type. * Left or right justified column data. * Gridlines * Custom sort arrow. It is sub-classed from FXTable. You can read more about listview at: http://www.netpromi.com/listview.html and download it at: http://www.netpromi.com/files/listview.zip I would like to thank Jeroen van der Zijp for creating the awesome Fox toolkit and Lyle Johnson for the great FXRuby library. Jamey Cribbs jc...@tw... |
From: meinrad r. <mei...@gm...> - 2004-04-10 12:38:38
|
Arash Abedinzadeh wrote: > Hi, > > I wonder if there's a way to color specific strings, e.g. I would like to > color the word "bottle" blue and "neck" red. This is what I've tried: > > text = FXText.new(aFrame, nil, 0, TEXT_WORDWRAP|TEXT_READONLY) > text.text = "a lot of text" > text.textColor = 255 > > What I get is the color red for the whole text. > Did I miss something in the API documentation? obviously yes. changeStyle(pos, n, style) Change the style of n characters at position pos in the text buffer to style. Here, style is either an integer into the style table, indicating the new style for all the affected characters; or style is a String… kind regards, - henon > > Regards, > > Arash > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Fxruby-users mailing list > Fxr...@li... > https://lists.sourceforge.net/lists/listinfo/fxruby-users > > |
From: Arash A. <thu...@th...> - 2004-04-10 03:32:54
|
Hi, I wonder if there's a way to color specific strings, e.g. I would like to color the word "bottle" blue and "neck" red. This is what I've tried: text = FXText.new(aFrame, nil, 0, TEXT_WORDWRAP|TEXT_READONLY) text.text = "a lot of text" text.textColor = 255 What I get is the color red for the whole text. Did I miss something in the API documentation? Regards, Arash |
From: Richard <ri...@li...> - 2004-04-09 14:25:36
|
I've looked around a little (admittedly not a lot), but I can't find any reference to minimizing an application to the taskbar in windows (win2000/XP)... It seems like it should be a simple mainwindow_reference.placement (SCREEN_TASKBAR), or mainwindow_reference.minimize_to_taskbar() or something. I've found posts about popups and the taskbar... but it didn't sound like what I wanted. I'm trying to allow the user to minimizze an application to the taskbar in windows (the tiny icons next to the system time), and have a right/left click menu off of the icon in the taskbar that would let the user have the option to 'restore' the application to the desktop among other things. I've been able to 'hide' the application, sleep for a period of time, and then 'show' the application, but that would not let the user call it back at a whim. They'd have to decide before the application dissapeared how long they wanted it to be gone. IMHO that's not a very useable way to go about it. Any suggestions? -Rich |
From: Richard <ri...@li...> - 2004-04-09 14:25:25
|
I've looked around a little (admittedly not a lot), but I can't find any reference to minimizing an application to the taskbar in windows (win2000/XP)... It seems like it should be a simple mainwindow_reference.placement (SCREEN_TASKBAR), or mainwindow_reference.minimize_to_taskbar() or something. I've found posts about popups and the taskbar... but it didn't sound like what I wanted. I'm trying to allow the user to minimizze an application to the taskbar in windows (the tiny icons next to the system time), and have a right/left click menu off of the icon in the taskbar that would let the user have the option to 'restore' the application to the desktop among other things. I've been able to 'hide' the application, sleep for a period of time, and then 'show' the application, but that would not let the user call it back at a whim. They'd have to decide before the application dissapeared how long they wanted it to be gone. IMHO that's not a very useable way to go about it. Any suggestions? -Rich |
From: Richard <ri...@li...> - 2004-04-09 14:19:41
|
I'm trying to figure out how to get the method 'handle' to work. I've done something similar to: test_handle=FXButton.new(mainwin_reference,"Text for button").connect (SEL_COMMAND) { |sen,sel,data| puts "You've pressed me" puts sen puts sel puts data } Then using that same information I call 'handle' using the button as a reference, but it doesn't trigger the "You've pressed me" statement (I don't have the code infront of me and I'd be afraid I'd mess it up.). I know I'm using 'handle' semi-correctly, since I can get the button to look 'pressed' (and not released) I think it was ID_CHECKED or something like that (I went through all of the ID_WHATEVERS from the RDoc page on FXWindow), but I can't get the "You've pressed me" handler to fire. Thanks in advance for any help I get... What am I doing wrong? -Rich |
From: John R. <col...@ya...> - 2004-04-09 02:28:28
|
Im having an issue with 2 things: If I put a line of code in my FXDialogBox initialize def that sets the focus to the first field, then my Ctrl-C menu command which executes ID_CANCEL doesnt work without pressing the tab to go to the next field. Without the set focus on the 1st widget, the Ctrl-C works fine. Is this a bug or is there something else that I need to do in my code. When a message box event gets fired from my FXDialogBox, the focus doesnt return to the FXDialogBox after I close the message box unless I click on it. Is there an event that I can fire that will automatically do this? Thanks for your help. John Reed --------------------------------- Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today |
From: Gilles F. <gil...@fr...> - 2004-04-08 19:05:34
|
Lyle Johnson a =E9crit : >=20 > On Apr 5, 2004, at 10:48 AM, Gilles Filippini wrote: [snip] > OK. I saw the bug reports, but haven't had a chance to run the table=20 > test case yet. Until I can reproduce the treelist-based bug on one of m= y=20 > machines I'm not sure how to proceed. I've been running the tests on my= =20 > Mac OS X box, perhaps I need to see if I can reproduce the crashes unde= r=20 > Linux. Update: * I rebooted my box to give the treelist test case a try using a fresh=20 system: same segfault at count=3D59. * Tried the test case on two other machines (RedHat 7.2 and Debian=20 Woody): no segfault. Since it seems I am for now the only one having this problem I propose=20 setting this bug low priority. I would appreciate if someone using a Debian Sarge would run the test=20 case and report about it. _gilles. [The bug report on SF is updated accordingly to this post] |
From: Lyle J. <ly...@kn...> - 2004-04-07 23:32:10
|
On Apr 5, 2004, at 10:48 AM, Gilles Filippini wrote: > I don't think so: the fact is that it segfaults precisely at count = > 59. Would it be memory related I guess its behavior would be much less > predictible. Yes, on reflection I think you're right that it wouldn't be so easily reproducible on your machine if there were some memory fault. > BTW I have other processes running (Apache, MySQL, Oracle, Mozilla, > aMule, distributed.net, ...) with an uptime of about one week and I > didn't notice anything weird. OK. > I've made another test with GC disabled: no segfault (updated the > sourceforge bug page). > I'll try to run it tomorrow at work on another machine. > Stay tuned... OK. I saw the bug reports, but haven't had a chance to run the table test case yet. Until I can reproduce the treelist-based bug on one of my machines I'm not sure how to proceed. I've been running the tests on my Mac OS X box, perhaps I need to see if I can reproduce the crashes under Linux. |
From: Lyle J. <ly...@kn...> - 2004-04-07 23:27:35
|
On Apr 4, 2004, at 8:49 PM, Daniel Sheppard wrote: > My original problem was with the SEL_UPDATE coming along too slowly and > having a very unresponsive gui unless I was explicitely forcing > updates. > > That was until I looked at the datatarget example and saw this: > > theApp.threadsEnabled = false > > Which I put into my code with much delight. What is the impact of this > flag? What threads are being disabled? Your GUI application usually runs under the main thread in the Ruby interpreter. If we didn't do anything to try to handle Ruby threads, all of the threads other than the main thread would be starved (i.e. they wouldn't get any time scheduled to them). The way that FOX's event loop interacts with Ruby's thread scheduler goes something like this: Whenever there is idle time in the GUI (i.e. all pending events have been processed), a special chore fires that yields a small amount of time to Ruby's thread scheduler. This allows other the other threads to run, but it obviously introduces some overhead into the FOX event loop. You have some control over how much overhead comes into play. One option is to modify the amount of time allocated to the thread scheduler during each idle period by setting the FXApp#sleepTime attribute (in milliseconds). The default "sleep" time (i.e. the amount of time the main loop sleeps while other threads are allowed to run) is 100ms. The other option, if you know that your application doesn't use any other threads, is to disable FXRuby's support for Ruby threads by setting FXApp#threadsEnabled to false. Hope this helps, Lyle |
From: Lyle J. <ly...@kn...> - 2004-04-07 23:16:02
|
On Apr 4, 2004, at 3:25 PM, meinrad recheis wrote: > i studied the FXRuby src and interfaces, because i am going to wrap > some C++ modules derived from Fox classes for ruby. OK. > i am quite new to "wrapping" and SWIG so i would like to ask you the > things that the SWIG docu left unclear to me: > > * why did you prefer writing whole "shadow classes" (i.e FXRbGLCanvas > for FXGLCanvas) rather than using SWIG's typemaps? > * the /FX*Virtuals/ confuse me; why is "re-declaration" of virtual > functions necessary? Both of these are for the same fundamental reason: I wanted the Ruby programmer to be able to override the virtual functions declared in C++ base classes. For example, if you subclass FXMainWindow to make your own main window class: class MyMainWindow < FXMainWindow end and then override the base class create() method with one of your own: def create super puts "Here I am, in MyMainWindow#create!" end this should work exactly as it would in the corresponding C++ code. That is, if you were to construct an instance of your main window class and then call the application's create() method: myMainWin = MyMainWindow.new(theApp, ...) theApp.create It should land in your overridden version of create() instead of FXMainWindow#create. As of the latest SWIG development versions, this capability is built-in using the so-called "director classes" feature; but it was not available in SWIG when I first started developing FXRuby several years ago. Hope this helps, Lyle |
From: Gilles F. <gil...@fr...> - 2004-04-05 15:48:16
|
ly...@kn... a =E9crit : > On Sun, 04 Apr 2004 10:22:47 +0200, Gilles Filippini > <gil...@fr...> wrote : >=20 >=20 >>It takes about 60 iterations on may box. But this problems may eventual= y=20 >>be unrelated to FXRuby: >> >>- the segfault occurs without any Ruby msg. It's a brutal segfault: >>... >>count =3D 58 >>count =3D 59 >>Erreur de segmentation >>maison:~/devel/bug$ >> >>- I've run the very same test case using valgrind and it's gone as far=20 >>as 6000+ before I stop it. >> >>Well... I don't know where to look now :/ >=20 >=20 > Is there any possibility at all that some of this machine's memory (RAM= ) is > going bad? I don't think so: the fact is that it segfaults precisely at count =3D 59= .=20 Would it be memory related I guess its behavior would be much less=20 predictible. BTW I have other processes running (Apache, MySQL, Oracle, Mozilla,=20 aMule, distributed.net, ...) with an uptime of about one week and I=20 didn't notice anything weird. > For what it's worth, I did go back and rebuild FXRuby-1.0.28 from the > sources and ran the test case for several thousand iterations before fi= nally > killing it. So I'm fairly sure there is some other problem afoot. I've made another test with GC disabled: no segfault (updated the=20 sourceforge bug page). I'll try to run it tomorrow at work on another machine. Stay tuned... _gilles. |
From: jeroen <je...@fo...> - 2004-04-05 15:23:20
|
On Monday 05 April 2004 09:48 am, ly...@kn... wrote: > On Sun, 04 Apr 2004 10:22:47 +0200, Gilles Filippini > > <gil...@fr...> wrote : > > It takes about 60 iterations on may box. But this problems may eventualy > > be unrelated to FXRuby: > > > > - the segfault occurs without any Ruby msg. It's a brutal segfault: > > ... > > count = 58 > > count = 59 > > Erreur de segmentation > > maison:~/devel/bug$ > > > > - I've run the very same test case using valgrind and it's gone as far > > as 6000+ before I stop it. > > > > Well... I don't know where to look now :/ > > Is there any possibility at all that some of this machine's memory (RAM) is > going bad? Extremely unlikely. Even if it were the case, your process wouldn't get the same physical pages to run in each time it starts. It *could* be memory related, however. The fact that you can run under valgrind (which subsumes malloc() and free() with its own functions), is a big clue. > For what it's worth, I did go back and rebuild FXRuby-1.0.28 from the > sources and ran the test case for several thousand iterations before > finally killing it. So I'm fairly sure there is some other problem afoot. Let me know if it is in FOX or specific to ruby bindings of FOX; if it is in FOX then I'll try and fix it quickly. By the way, we're at patchlevel 1.0.51 with the stable version, and since the API is the same I suggest people run against that instead of the 1.0.28 version. Regards! - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:50 12/11/2003 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |
From: <ly...@kn...> - 2004-04-05 14:49:54
|
On Sun, 04 Apr 2004 10:22:47 +0200, Gilles Filippini <gil...@fr...> wrote : > It takes about 60 iterations on may box. But this problems may eventualy > be unrelated to FXRuby: > > - the segfault occurs without any Ruby msg. It's a brutal segfault: > ... > count = 58 > count = 59 > Erreur de segmentation > maison:~/devel/bug$ > > - I've run the very same test case using valgrind and it's gone as far > as 6000+ before I stop it. > > Well... I don't know where to look now :/ Is there any possibility at all that some of this machine's memory (RAM) is going bad? For what it's worth, I did go back and rebuild FXRuby-1.0.28 from the sources and ran the test case for several thousand iterations before finally killing it. So I'm fairly sure there is some other problem afoot. |
From: meinrad r. <mei...@gm...> - 2004-04-04 21:11:32
|
hi lyle, i studied the FXRuby src and interfaces, because i am going to wrap some C++ modules derived from Fox classes for ruby. i am quite new to "wrapping" and SWIG so i would like to ask you the things that the SWIG docu left unclear to me: * why did you prefer writing whole "shadow classes" (i.e FXRbGLCanvas for FXGLCanvas) rather than using SWIG's typemaps? * the /FX*Virtuals/ confuse me; why is "re-declaration" of virtual functions necessary? i'd appreciate some hints very much. kind regards, meinrad recheis |
From: Gilles F. <gil...@fr...> - 2004-04-04 08:22:33
|
Lyle Johnson a =E9crit : >=20 > On Apr 2, 2004, at 4:23 PM, Gilles Filippini wrote: >=20 >> It's been long time since I've tried FXRuby intensively :o) >> I'm back with the same kind of segfaults I had then. >=20 >=20 > OK. >=20 >> For example FXEvent appears corrupted after a while in an onPaint=20 >> callback. I don't have a simple test case yet. I'll try to narrow the=20 >> probelm using valgrind. The bug vanishes when GC is disabled. >=20 >=20 > Yes, if you can send me a simple test case for this one, please do. >=20 >> Just to try, I've launched an old test case (not related to the above=20 >> bug) I used when there were problems with TreeList items. Segfault aga= in. >=20 >=20 > Yes, I still have this test case and run it before each release ;) It i= s=20 > the "stress1.rb" case, under the FXRuby tests directory. >=20 > How many iterations did it take for this one to crash on your machine? = I=20 > ask because I'm running it right now (with my development version of=20 > FXRuby) and so far it's gotten to "count=3D1800" without crashing. I wi= ll=20 > go back and build FXRuby-1.0.28 from the earlier sources, but I'm fairl= y=20 > sure I ran this test before releasing that version too. >=20 It takes about 60 iterations on may box. But this problems may eventualy=20 be unrelated to FXRuby: - the segfault occurs without any Ruby msg. It's a brutal segfault: ... count =3D 58 count =3D 59 Erreur de segmentation maison:~/devel/bug$ - I've run the very same test case using valgrind and it's gone as far=20 as 6000+ before I stop it. Well... I don't know where to look now :/ _gilles. |
From: Lyle J. <ly...@kn...> - 2004-04-03 17:33:14
|
On Mar 23, 2004, at 7:34 PM, Hal Fulton wrote: > 1. Given an FXTreeList wherein I add or change an item, how do I get > the > tree to redisplay? If you add an item to a tree list after the program is running, you should call create() on it to ensure that all of the server-side resources associated with that tree item are realized. This is especially important if, for example, you have some special "open" and "closed" icons for the tree item. Now, adding an item to the tree list automatically marks its layout dirty, which means that the layout should be updated during the next GUI update pass in the event loop. If the change in the layout causes things to move around, that would also result in a repaint (which is what I assume you mean by a "redisplay"). One reason that the repaint might get delayed is because you're adding the tree item(s) inside a callback for some other widget. For example, suppose you had this code: addButton.connect(SEL_COMMAND) { 0.upto(10000) { |i| treeList.addItemLast(null, "item#{i}").create } } Now, while that loop is running (adding the 10,000 new items) the main event loop is *not* running. And so you wouldn't see the new items onscreen until this block exits. > 2. Given an MDIClient where I add or resize an MDIChild, how do I get > it > to display? If you're adding a new MDI child, be sure to call create() on it. If you're resizing it, I don't know that that marks the layout dirty. Try calling recalc() on the MDI child after resizing it to see if that makes a difference. > 3. Given an MDIChild with a textbox inside it, can I click on the > window > frame and select the window without giving focus to the textbox? Hmmm, maybe, but I think we'll have to subclass FXMDIChild to do so. Let me investigate and get back to you on that one. |
From: Lyle J. <ly...@kn...> - 2004-04-03 03:30:24
|
On Mar 29, 2004, at 9:06 PM, Daniel Sheppard wrote: > I've been frustrated with the fact that you can't connect multiple > things to an FXObject. Ie. > > target = FXDataTarget.new() > target.connect(SEL_COMMAND) { puts "hello" } > target.connect(SEL_COMMAND) { puts "hello2" } > > The only thing that gets printed when the target is changed is > "hello2". Correct. Each object has exactly one message target, and the way that the connect() method is implemented is that it creates a target behind the scenes. > How do others normally deal with this? Do you have your code such that > all connectors must go through in intermediary? Do you only connect in > the one place? In a lot of cases, multiple "connections" for a command message (as in your example) are used to update the states of different objects based on some event. This is a natural choice for, say, Java programmers, who are used to Swing's model of having multiple listeners for a given event. FOX's approach to this is very different and emphasizes the use of GUI update to update the state of things. So for example instead of something like this: someButton.connect(SEL_COMMAND) { update_the_main_window_title() update_the_selected_text_color() update_the_button_font_size() } you would instead see code like this: main_window.connect(SEL_UPDATE) { update_my_title() } selected_text.connect(SEL_UPDATE) { update_my_color() } button.connect(SEL_UPDATE) { update_font_size() } For more about this, see the FOX documentation at: http://www.fox-toolkit.org. > I've thrown together a module to include in classes that I want to > multi-connect to. <snip> Yes, this looks fine too ;) |