Introducing FiveTech's fivedit

User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Introducing FiveTech's fivedit

Post by James Bott »

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) }) )
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Introducing FiveTech's fivedit

Post by cnavarro »

or

Linea 835

Code: Select all

         AAdd( aTemp, { Upper( cLine ), n, n } )
 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

James,

What about this way:

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

Its failing to properly jump

Still something to fix...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

Fixed :-)

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

New version already available from:

https://bitbucket.org/fivetech/fivewin- ... ivedit.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

Last locals were not needed:

Code: Select all

METHOD FillFuncList() CLASS TFivedit

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

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Introducing FiveTech's fivedit

Post by James Bott »

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?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

James,

http://forums.fivetechsupport.com/viewt ... 60#p147360

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

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Introducing FiveTech's fivedit

Post by James Bott »

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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: Introducing FiveTech's fivedit

Post by Marc Vanzegbroeck »

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
Image

and this after dragging
Image

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Introducing FiveTech's fivedit

Post by Antonio Linares »

Marc,

Fixed. Please download the new Fivedit version from here:

https://bitbucket.org/fivetech/fivewin- ... ivedit.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Introducing FiveTech's fivedit

Post by Otto »

Dear Antonio,

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

Thank you in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Post Reply