Page 4 of 10

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 5:11 pm
by karinha
Uwe,

Code: Select all  Expand view

Application
===========
   Path and name: C:\Forum4\TEST\XBRWTEST.exe (32 bits)
   Size: 3,504,640 bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20170215)
   FiveWin  version: FWHX 17.01
   C compiler version: Borland/Embarcadero C++ 7.2 (32-bit)
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 07/02/2018, 15:08:28
   Error description: Error BASE/1068  Argument error: array access
   Args:
     [   1] = N   16371319
     [   2] = N   1

Stack Calls
===========
   Called from: .\source\classes\BAR.PRG => GRADIENTFILL( 1250 )
   Called from: .\source\classes\BRUSH.PRG => GRADIENTBMP( 578 )
   Called from: .\source\classes\BRUSH.PRG => TBRUSH:RESIZE( 516 )
   Called from: .\source\classes\WINDOW.PRG => TDIALOG:PAINTBACK( 2488 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ERASEBKGND( 729 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 914 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: .\XBRWTEST.PRG => MAIN( 232 )

 

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 5:18 pm
by ukoenig
Thank You very much,
I will have a look at it maybe something is left from the defines of the original

the source for XBRWTEST.exe is included :!:
It means just add or change anything You like.
If you like to change the colours You can do it in the original < Setup >
after the changes copy the SYSTEM.dbf to the testfolder
XBRWTEST is only included to check and solve any problems :!: :!:

Image

regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 5:35 pm
by karinha
Thanks Uwe, changed nStyle := 1 in DLG_BACK. Many thanks.

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 5:40 pm
by ukoenig
The colors are defined in SYSTEM.dbf

static aVal[32]

SYSTEM->nDStyle = color, gradient, circle or bmp-brush
SYSTEM->nDColorF = 1. gradient-color
SYSTEM->nDColorB = 2. gradient-color
SYSTEM->nDGradPos = gradient-pos
SYSTEM->lDDirect = vertical or horizontal
SYSTEM->cDBrush = bmp brush
SYSTEM->nBSColor = xbrowse-selector
SYSTEM->nBRColor1= 1. row color
SYSTEM->nBRColor2 = 2. row color
SYSTEM->nBRColor3
SYSTEM->nBRColor4
SYSTEM->nBRColor5

FUNCTION READ_SYS(lStart, oTopic, oLink, oTCode, oForum)
LOCAL I, J, X, nAuthorPos := 1

SYSTEM->(DBGOTOP())

IF lStart = .F.
aVal[20] := SYSTEM->nDStyle
aVal[21] := SYSTEM->nDColorF
aVal[22] := SYSTEM->nDColorB
aVal[23] := SYSTEM->nDGradPos
aVal[24] := SYSTEM->lDDirect
aVal[25] := SYSTEM->cDBrush
aVal[26] := SYSTEM->nBSColor
aVal[27] := SYSTEM->nBRColor1
aVal[28] := SYSTEM->nBRColor2
aVal[29] := SYSTEM->nBRColor3
aVal[30] := SYSTEM->nBRColor4
aVal[31] := SYSTEM->nBRColor5
ENDIF
...


Dialog-background
DLG_BACK( oDlg, aVal[20], aVal[21], aVal[22], aVal[24], aVal[23], aVal[25] ) )
You can define values instead of using the vars from SYSTEM.dbf

that is funny :roll:

Error description: Error BASE/1068 Argument error: array access :?:
Args:
[ 1] = N 16371319
[ 2] = N 1

Stack Calls
===========
Called from: .\XBRWTEST.PRG => MAIN( 232 )

regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 5:45 pm
by karinha
Code: Select all  Expand view

aVal[20]    := SYSTEM->nDStyle  -> with 3 no work. With 1 work fine. Thanks Uwe.
 


Regards,

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 5:59 pm
by ukoenig
nStyle 3 is Circle-painting and new :!:

I think Your FWH-version doesn't support it.

circle syntax
IF nStyle = 3 // GRADIENT CIRCLE
aGrad := { nColor1,nColor2 }
DEFINE BRUSH oBrush GRADIENT aGrad
ENDIF

regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 6:24 pm
by karinha
ukoenig wrote:nStyle 3 is Circle-painting and new :!:

I think Your FWH-version doesn't support it.

circle syntax
IF nStyle = 3 // GRADIENT CIRCLE
aGrad := { nColor1,nColor2 }
DEFINE BRUSH oBrush GRADIENT aGrad
ENDIF

regards
Uwe :D



Thank you Uwe. Probably my version of FWH1701 that does not support the command. Many thanks. Regards.

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 6:33 pm
by ukoenig
Yes it is included later
You can test the circle in the main-app button < Setup >

I just found a little bug in changing a file and selecting the area :(
It is ok now

because of all the new included options I will explain the usage and possibilities in detail the next time.

Download :
http://www.service-fivewin.de/DOWNLOADS/Forum4.zip

regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 6:51 pm
by karinha
Perfect!! Many thanks.

Image

Regards,

Re: Mr. Rao's samples collection.

PostPosted: Wed Feb 07, 2018 9:04 pm
by ukoenig
João,

I added some more options from the main-program to the test-source
like the download range
just download again.

regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Thu Feb 08, 2018 8:34 am
by Marc Venken
Hey Uwe,

For the Xbrowse header index :

I noticed that when you select a other file (example ..) AND you hit the reindex key, than the indexes work again on the headers.

In the Prg the function is not included, but maybe you have to look there for a solution.

Re: Mr. Rao's samples collection.

PostPosted: Thu Feb 08, 2018 8:54 am
by ukoenig
Marc,

it is not a real reindex it is a clean reset.
All what I do is closing all areas and deleting the indexfiles.
Next I force a < restart >
There is a small program < restart.exe > from Daniel included.
Because of the missing indexfiles they are new created.

For a test You can include the button in < xBrwtest.prg >
and copy < Restart.exe > from the main-directory to the test-directory.

How it works :

1. save all vars to SYSTEM.dbf
2. close all open areas
3. delete the indexfiles
4. restart

like You can see every position and all values are saved
and the screen looks exactly the same like before.
You can use this little tool for other situations as well.

Code: Select all  Expand view

@ 600, 1040 BTNBMP oBtn[11] OF oDlg ;
SIZE 75, 40 PIXEL 2007 ; // B / H
PROMPT " &Re-" + CRLF + "index " ;
ACTION ( [color=#0000FF]SAVE_END(), DEL_INDEX(), WINEXEC( "restart xBrwtest.exe " + Str( oDlg:hWnd ) , 0 ) [/color]) ;
FILENAME c_path1 + "RESET.bmp" ;
LEFT

// -----------------------------------

FUNCTION SAVE_END()
LOCAL I := 1, X := "1"

SYSTEM->(DBGOTOP())
FOR I := 1 TO 7
   X := LTRIM(STR(I))
   IF nFilename = I
      SYSTEM->(RLOCK())
      SYSTEM->nTForum&X := nForum        
      SYSTEM->nTSelect&X := nTSelect         
      SYSTEM->nTRecord&X := nGoRecord      
    ENDIF
    SYSTEM->nSample := nFilename
    SYSTEM->(DBCOMMIT())
    SYSTEM->(DBUNLOCK())
NEXT       

RETURN NIL

// -------------------

FUNCTION DEL_INDEX()

CLOSE DATABASE
 
DELETE FILE ( c_Path + "Samples1.cdx" )
DELETE FILE ( c_Path + "Samples2.cdx" )
DELETE FILE ( c_Path + "Samples3.cdx" )
DELETE FILE ( c_Path + "Samples4.cdx" )
DELETE FILE ( c_Path + "Samples5.cdx" )
DELETE FILE ( c_Path + "Samples6.cdx" )
DELETE FILE ( c_Path + "Samples7.cdx" )

RETURN NIL
 


regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Mon Feb 12, 2018 7:12 pm
by ukoenig
I finished the translation part..
Now You can translate the mainscreen-text ( says and buttons )
just overwrite the english text and save.
The english text can be restored.

For the xBrowsetest I included my network-tools as a OBJ-file.
If You dont like it You can replace the section with the normal rlock(), unlock() ....

// ---------- NET - FUNCTIONS ---------

// NET_USE ( cFileName, cAlias, nTrials, nTime, lNet )
// NET_RLOCK( nTrials, nTime )
// NET_ULOCK()
// NET_WAIT ( nTrials, nTime )
// NET_DELETE ( nSeconds )
// NET_RECALL ( nSeconds )
// NET_APPEND ( nTrials, nTime )
// NET_PACK( cDBName, cAlias, nTrials, nTime, lNet, lQuite )
// lNet = shared, exclusive
// lQuite = .T. asks if packing is wanted
// nTrials = in case of a error, how often to try
// nTime = message delay
// NET_CLOSE( nTrials, nTime )

As long we cannot connect to a defined forum, You can use the flag-selection as a visual file-splitting
Until now I couldn't detect the reason for the xbrowse seek-problems on filechange.
On restart ( index-rebuild ) it works.

Download :
http://www.service-fivewin.de/DOWNLOADS/Forum5.zip

Image

Image

regards
Uwe :D

Re: Mr. Rao's samples collection.

PostPosted: Mon Feb 12, 2018 8:01 pm
by Marc Venken
Uwe,

Why are there 2 versions ?

The Prg. Is the a full version?

The new version has no yellow seek bar.

Re: Mr. Rao's samples collection.

PostPosted: Mon Feb 12, 2018 8:16 pm
by ukoenig
Marc,

xBrowsetest is only a version ( small in size ) to help to solve any problems.
The service-section is not included.
It is not everything included like in forum.exe ( full ).
The PRG's are included just to show the logic and for testing.

regards
Uwe :D