On Friday 26 April 2002 04:43 pm, Charles Samuels wrote: > fredag 26 april 2002, 03:15 pm, skrev Jay Cornwall: > > Hi > > > > Is there a way to synchronously request a directory listing from a > > kioslave, in a similar way to the methods that KIO::NetAccess provides? > > > > I ask, because my program needs to check the contents of a directory wh= en > > the user selects a menu item (it's a bit more complicated than that, but > > that's the general idea). > > > > KIO::listDir() suggests an asynchronous slot-based system, but this is > > difficult to fit into my program design. I'd have to start the request, > > leave my slot (which is called when the menu item is selected), somehow > > stop the user from issuing further GUI requests until the listDir() is > > complete, and finish the request in a different slot. > > > > It would be easier if I could just start the request and wait for > > completion in the menu slot (there isn't a lot else my program can do in > > the mean time). Any ideas how I might implement this? > > You could call processEvents() until KIO is done. It just screams HACK, > however :) KIO::NetAccess has an "official hack" for this in NetAccess::enter_loop(),= =20 maybe that concept could be generalized a bit. Something like=20 "NetAccess::runJob(KIO::Job *job)" Cheers, Waldo =2D-=20 bastian@kde.org | SuSE Labs KDE Developer | bastian@suse.com >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<