[Gambas-user] Release of gambas 1.9.42

Benoit Minisini gambas at ...1...
Thu Sep 14 19:22:00 CEST 2006


On Wednesday 13 September 2006 19:19, Ron Onstenk wrote:
> On Tuesday 12 September 2006 19:44, Benoit Minisini wrote:
> > On Tuesday 12 September 2006 12:37, rolf wrote:
> > > Hi Benoit
> > >
> > > > This release has many changes in the gb.qt component and gb.settings
> > > > that will break your projects:
> > >
> > > What has happend with the TreeView control?
> > > In my applicatin a click does not expand the item - the cursor keys
> > > must been used. The cursor keys only expand an entry, but cannot been
> > > used to move to the next element.
> >
> > Do you have more details? A project excerpt for example. Do you use
> > Expand, Collapse or Select event handlers?
>
> I do use it.
>
> The treeview/columnview points to a bunch of subfolders.
> I do read subfolders in the parent folder (the root line) only
> if I expand the folder (clicking on the plus).
> The SELECT is used to fill the listview part of the columnview.
> The collapse is used to free the used memory of control data
> which is used when the folder is EXPANDed.
>
> i.e. root has 10 group folders
> every group has 25 subfolders.
> Those subfolders have between 10 and 2000 subfolders below.
>
> More visible for you is when it is the root of the disk and
> you click on the plus to expand the /usr directory.
> Should I traverse the whole /usr and /usr/share, /usr/lib, usr/include
> on start and I only need the /usr/local/bin map?
>
> Do I understand that I have to traverse all!!!! those folders
> now on start of the application and be not able to only
> read those folder on 'SELECT' or 'EXPAND' events by choise of the
> user ??????
> Cant store all folder names, now stored in mysql, in memory of the box.
>
> Then it will be the end of gambas for me, at least the project I
> working on for my employer is over.
>
> Sad Ron.
>

Sorry to say that, but this is always the risk when using a development 
version.

But don't worry, there is always a solution, and I don't want you to be 
sad. :-)

There was a change in the Select event. It is now deferred, i.e. sent at the 
return of the event loop. Maybe this is the source of the problem, I don't 
know.

I have to that, because sometimes events sent immediately makes the underlying 
QT widget behave badly, or even crash!

Anyway, the DirView control does exactly what you need: it reads the directory 
contents only if you expand it, not before. 

So I suggest you read the source code that manage the directory tree of 
DirView to understand what is wrong. The file is FDirChooser, and is located 
in the gb.form component project.

You can send me your project too, or the part of your project that manages the 
directory view. If I have time, I will look at it.

Otherwise, why don't you use directly the DirView control?

Regards,

-- 
Benoit Minisini





More information about the User mailing list