FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Introducing FiveTech's fivedit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 04:46 PM

Sorry I am not fully awake yet. This is not valid syntax:

::oFunList:SetItems( ASort( Upper( aFuncs ) ) )

What I meant was that we cannot just convert all the data in aFuncs to uppercase before sorting because it will then be displayed in all uppercase which is not what we want.

I think this will do it:

::oFunList:SetItems( ASORT(aFuncs,,, { |x, y| UPPER(x) < UPPER(y) }) )

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 04:57 PM
or

Linea 835
Code (fw): Select all Collapse
         AAdd( aTemp, { Upper( cLine ), n, n } )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:06 PM
James,

What about this way:

Code (fw): Select all Collapse
METHOD FillFuncList() CLASS TFivedit

   local nLines := ::oEditor:GetLineCount(), n 
   local aFuncs := {}, aTemp := {}, cToken, cLine
   local a, nItem := 0
    
   ::aFunLines = {}

   for n = 1 to nLines
      cToken = Lower( Left( cLine := LTrim( ::oEditor:GetLine( n ) ), 4 ) )
      if cToken $ "static func,func,proc,clas,meth,hb_f"
         AAdd( aTemp, { cLine, n, n, Upper( cLine ) } )
      endif
      if cToken $ "retu" .or. Left( cToken, 1 ) == "}"
         if ! Empty( ATail( aTemp ) )
            ATail( aTemp )[ 3 ] = n
         endif   
      endif
   next
   
   ASort( aTemp,,, { | x, y | x[ 1 ] < y[ 1 ] } )
   for n = 1 to Len( aTemp )
     AAdd( ::aFunLines, { aTemp[ n ][ 2 ], aTemp[ n ][ 3 ] } )
   next     

   ASort( aTemp,,, { | x, y | x[ 4 ] < y[ 4 ] } )
   for n = 1 to Len( aTemp )
     AAdd( aFuncs, aTemp[ n ][ 1 ] )
   next     

   ::oFunList:SetItems( aFuncs )
   
return nil


Please try it and let me know if that is what you meant, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:08 PM

Its failing to properly jump

Still something to fix...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:10 PM
Fixed :-)

Code (fw): Select all Collapse
METHOD FillFuncList() CLASS TFivedit

   local nLines := ::oEditor:GetLineCount(), n 
   local aFuncs := {}, aTemp := {}, cToken, cLine
   local a, nItem := 0
    
   ::aFunLines = {}

   for n = 1 to nLines
      cToken = Lower( Left( cLine := LTrim( ::oEditor:GetLine( n ) ), 4 ) )
      if cToken $ "static func,func,proc,clas,meth,hb_f"
         AAdd( aTemp, { cLine, n, n, Upper( cLine ) } )
      endif
      if cToken $ "retu" .or. Left( cToken, 1 ) == "}"
         if ! Empty( ATail( aTemp ) )
            ATail( aTemp )[ 3 ] = n
         endif   
      endif
   next
   
   ASort( aTemp,,, { | x, y | x[ 4 ] < y[ 4 ] } )
   for n = 1 to Len( aTemp )
     AAdd( ::aFunLines, { aTemp[ n ][ 2 ], aTemp[ n ][ 3 ] } )
     AAdd( aFuncs, aTemp[ n ][ 1 ] )
   next     

   ::oFunList:SetItems( aFuncs )
   
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:12 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:15 PM
Last locals were not needed:

Code (fw): Select all Collapse
METHOD FillFuncList() CLASS TFivedit

   local nLines := ::oEditor:GetLineCount(), n 
   local aFuncs := {}, aTemp := {}, cToken, cLine
    
   ::aFunLines = {}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:15 PM

I am getting an error when trying to compile the editor.

Error prsht.h 1081 1: '#endif' before '#if'

This file is part of Borland 582.

I am using FWH ver 13.04

Any ideas?

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:20 PM

James,

viewtopic.php?p=147360#p147360

You need FWH 15.01 to build Fivedit, as new methods and enhancements were needed.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:31 PM

OK, I already have it downloaded but I haven't installed it yet.

The sorting works great now.

When looking a the jumplist I notice that all methods are listed twice--once for the class definition and once again for the actual method code. I think other editors ignore the keyword triggers (function, method, etc) when they are indented, thus the class definition method is ignored. This would be a nice feature to add.

I like the addition of the "class" keyword in the jumplist. I have not seen this with my other editors, but I have missed not having it.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:46 PM

James,

I think it is quite usefull to have methods listed twice, one for the Class header and another for the implementation.

Using that, I just found that method BuildProject() was missing lDebug parameter in the Class header :-)

Its a great way to check that the Class header methods and the implemented methods names match.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 05:48 PM

Hey, testing it I just found some more to fix :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Introducing FiveTech's fivedit
Posted: Tue Jan 20, 2015 06:41 PM
Antonio,

I installed Fivedit, but have a problem running in on a dual-screen.
The screen where the programs starts, has a higher resolution then the screen I want it to use in on.

The program loog like this a startup


and this after dragging


So after dragging, you should recalculate the screen.
What I also do with in my programs, is saving on the screen the programs was running the last time it was used. So it start up on the same screen again.
If the screen doesn't exist anymore (after undocking the laptop), then I start the program on screen 0 again.
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Introducing FiveTech's fivedit
Posted: Wed Jan 21, 2015 05:12 AM
Marc,

Fixed. Please download the new Fivedit version from here:

https://bitbucket.org/fivetech/fivewin-contributions/downloads/fivedit.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Introducing FiveTech's fivedit
Posted: Wed Jan 21, 2015 06:51 AM

Dear Antonio,

For learning purpose:
would you be so kind to post the part where you handle the resizing.

Thank you in advance
Otto