FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Setting a Standard
Posts: 32
Joined: Thu Sep 20, 2012 07:29 PM
Setting a Standard
Posted: Thu Jul 18, 2013 07:54 PM

Well folks, I need to set a standard for the entire system that is like that.

In my case is the vlthumbtrack of xbrowser.

It comes default false xbrowser in all, I would let him true.

from already thank you

Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Setting a Standard
Posted: Thu Jul 18, 2013 08:45 PM

Defina uma diretiva de compilação para o seu projeto e altere a classe com essa diretiva.

Exemplo:
Diretiva -> MEUPROJETO

IFDEF MEUPROJETO

::vlthumbtrack := .T.

ENDIF

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Setting a Standard
Posted: Fri Jul 19, 2013 12:56 AM
arthursilvestre wrote:Well folks, I need to set a standard for the entire system that is like that.

In my case is the vlthumbtrack of xbrowser.

It comes default false xbrowser in all, I would let him true.

from already thank you


Setting lVThumbTrack to .t. works well with fast access data sources. For slow access datasources, it is not desirable to set this data to .t.

For Array and Recordset browses, lVThumbTrack is set to .t. by default in the SetArray() and SetADO() methods, because in both cases the data resides in the memory.

Because it is not possible for xbrowse to decide the data access speeds in case of DBFs the choice is left to the programmer who alone can decide the suitability on the basis of the size of the DBF, location of the file ( local or network ), network speeds etc.
Regards



G. N. Rao.

Hyderabad, India
Posts: 32
Joined: Thu Sep 20, 2012 07:29 PM
Re: Setting a Standard
Posted: Fri Jul 19, 2013 11:41 AM

Good morning, I thank everyone's attention.

Sambomb what you said I oughta add prg xbrowse.prg in my project right? But I do not wish it, since I want to avoid that prg's more to be added in my project.

I would like to recompile the lib FiveWin? trough of the source folder? as if someone could give me a light?

thks

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Setting a Standard
Posted: Fri Jul 19, 2013 12:29 PM
Better way is to use your own derived class for all your projects.

Actually we advise not to use TXBrowse class directly. But to have your own derived class and use it across your projects. That's what I do too.
A template for the derived class is given in \fwh\samples\xbrchild.prg.

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "xbrowse.ch"
//------------------------------------------------------------------//
CLASS MyBrowse FROM TXBrowse
   CLASSDATA lRegistered AS LOGICAL // This is compulsory for derived classes
   DATA bColClass INIT { || MyXBrCol() }
   METHOD New( oWnd ) CONSTRUCTOR
ENDCLASS

METHOD New( oWnd ) CLASS MyBrowse
   Super:New( oWnd )
   ::lVThumbTrack := .t.
return Self
//------------------------------------------------------------------//
CLASS MyXbrCol FROM TXBrwColumn
ENDCLASS


We include this module in our project and then at the beginnning of the function Main()

Code (fw): Select all Collapse
function Main()

  <code>
   SET XBROWSE TO MyBrowse()
  <other code>


After this there is no need for any change in the code in the project.
All commands like @ r,c, XBROWSE, REDEFINE XBROWSE, XBROWSER, etc will use our personal derived class instead of the main xbrowse.

We can choose our favourite naem for the derived class instead of MyBrowse.

Notes:
1. There need not be any change in the code if COMMAND syntax is used.
2. In Ooops syntax, we need to use TXBrows():New( oWnd ) instead of TXBrowse():New(). (Advised in whatsnew.txt and in the forums years back)
3. In all RC files we need to use MyBrowse instead of TXBrowse
4. Name of the derived class should contain "browse" as part of the name for older versions.
Regards



G. N. Rao.

Hyderabad, India
Posts: 32
Joined: Thu Sep 20, 2012 07:29 PM
Re: Setting a Standard
Posted: Fri Jul 19, 2013 01:28 PM
Guys, I got a bat from a topic antonio atraz a few years, but it seems it does not work with the latest versions as FWH not handle all functions, dabe someone say something?

follows the bat:

Code (fw): Select all Collapse
for %%f in (*.prg) do c:\xhb121\bin\harbour %%f /n /ic:\fwh.13.02\include;c:\xhb121\include 
for %%f in (*.c) do c:\bcc582\bin\bcc32 -c -Ic:\bcc582\include;c:\xhb121\include %%f 
for %%f in (*.obj) do c:\bcc582\bin\tlib fiveh.lib -+ %%f /0 /P32,,
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Setting a Standard
Posted: Fri Jul 19, 2013 02:31 PM

Arthur,

If you run that batch file on source/classes, source/function and source/winapi, you will rebuild the library, except some internals modules whose source code is not provided, so you can not erase the lib and rebuild it from scratch, but you can update it as many times as needed.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion