Setting a Standard

Setting a Standard

Postby arthursilvestre » Thu Jul 18, 2013 7: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
User avatar
arthursilvestre
 
Posts: 32
Joined: Thu Sep 20, 2012 7:29 pm

Re: Setting a Standard

Postby sambomb » Thu Jul 18, 2013 8: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
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Setting a Standard

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Setting a Standard

Postby arthursilvestre » 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
User avatar
arthursilvestre
 
Posts: 32
Joined: Thu Sep 20, 2012 7:29 pm

Re: Setting a Standard

Postby nageswaragunupudi » 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: Select all  Expand view

#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: Select all  Expand view

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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Setting a Standard

Postby arthursilvestre » Fri Jul 19, 2013 1: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: Select all  Expand view

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,,
 
User avatar
arthursilvestre
 
Posts: 32
Joined: Thu Sep 20, 2012 7:29 pm

Re: Setting a Standard

Postby Antonio Linares » Fri Jul 19, 2013 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 100 guests