Re: Re: [Fxruby-users] Default associations in FXFileList and FXDirList
Status: Inactive
Brought to you by:
lyle
|
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
|