[Gambas-devel] FFindAdv-092-085 update

ron ronstk at ...124...
Fri Apr 9 20:56:29 CEST 2004


On Friday 09 April 2004 20:17, Benoit Minisini wrote:
> On Monday 05 April 2004 09:37, ron wrote:
> > Hi Benoit,
> >
> > The main change is in the btnFind and btnFindPrevious.
> > In this the part around the search is changed.
> > The result is now that only files with modified set are searched again.
> >
> > The *.Froozen was to prevent the scroll of the text in the editor during
> > the search and the are back in the code, now the right way.
> >
> > Second changes are in the ReadOption for setting a flag that  when it
> > is set a full search is done. Also a change in the Find combo set this
> > flag
> >
> > Marks for this update are '<upd 20040401
> >
> > Thanks for the invitation in the gambas-devel list
> >
> > Regards,
> >
> > Ron
>
> OK! Included for the next version...
>
> Regards,

Thanks but I had a small bug in a special case and could not reproduce it.
Now i have found it. It occurs if the editor is in modified state and the find 
is used the first time after start gambas, the list is empty in that case.

in FFindAdv-092-085 update btnFind_Click()
in FFindAdv-092-085 update btnFindPrevious_Click()

    hForm = Project.ActiveForm
    hEdit = hForm.Editor
    IF hForm.IsModified() THEN 
      cvwFindList.Moveto(hForm.path)
      cvwFindList.Item.Delete '<--------------- error in empty list
    ENDIF 

The fixed code:

    hForm = Project.ActiveForm
    hEdit = hForm.Editor
    IF hForm.IsModified() THEN 
      '20040408 ' on empty list object not found
      IF cvwFindList.Moveto(hForm.path)=FALSE THEN
        cvwFindList.Item.Delete 
      ENDIF  
    ENDIF 
 
This is at both buttons Find and FindPrevious. This fixes the problem.
At the moment there are several other tricks in it so a really upload of the 
file is not  wise I think.






More information about the Devel mailing list