Introducing FiveTech's fivedit

Re: Introducing FiveTech's fivedit

Postby James Bott » Tue Jan 20, 2015 4: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) }) )
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Introducing FiveTech's fivedit

Postby cnavarro » Tue Jan 20, 2015 4:57 pm

or

Linea 835
Code: Select all  Expand view  RUN

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

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5:06 pm

James,

What about this way:

Code: Select all  Expand view  RUN
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: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5:08 pm

Its failing to properly jump

Still something to fix...
regards, saludos

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

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5:10 pm

Fixed :-)

Code: Select all  Expand view  RUN
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: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5:12 pm

regards, saludos

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

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5:15 pm

Last locals were not needed:

Code: Select all  Expand view  RUN
METHOD FillFuncList() CLASS TFivedit

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

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

Re: Introducing FiveTech's fivedit

Postby James Bott » Tue Jan 20, 2015 5: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?
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing FiveTech's fivedit

Postby James Bott » Tue Jan 20, 2015 5: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.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Tue Jan 20, 2015 5:48 pm

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

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

Re: Introducing FiveTech's fivedit

Postby Marc Vanzegbroeck » Tue Jan 20, 2015 6: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
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Introducing FiveTech's fivedit

Postby Antonio Linares » Wed Jan 21, 2015 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Introducing FiveTech's fivedit

Postby Otto » Wed Jan 21, 2015 6: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6334
Joined: Fri Oct 07, 2005 7:07 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests