Page 1 of 1

Error Fwh + MinGW ...

PostPosted: Sun Nov 13, 2011 2:53 pm
by Rimantas
Hi !

At last I'm giving working exe . But exe return error :

Code: Select all  Expand view

Application
===========
   Path and name: C:\A\Amdi2\engel.exe (32 bits)
   Size: 3,574,407 bytes
   Compiler version: Harbour 3.0.0 (Rev. 16951)
   FiveWin  Version: FWH 11.10
   Windows version: 5.1, Build 2600 Service Pack 3

   Time from start: 0 hours 0 mins 12 secs
   Error occurred at: 2011.11.13, 16:36:25
   Error description: Error BASE/1004  No exported method: SETBRUSH
   Args:
     [   1] = U  
     [   2] = O   TBRUSH

Stack Calls
===========
   Called from:  => SETBRUSH( 0 )
   Called from: .\source\function\ALERT.PRG => DLGINIT( 0 )
   Called from: .\source\function\ALERT.PRG => (b)ALERT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 0 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 0 )
   Called from: .\source\function\ALERT.PRG => ALERT( 0 )
   Called from: engel.prg => MSGINF( 0 )
   Called from: engel.prg => EXITWND( 0 )
   Called from: engel.prg => (b)MAIN( 0 )
   Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:END( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:SYSCOMMAND( 0 )
   Called from:  => TMDIFRAME:HANDLEEVENT( 0 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 0 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 0 )
   Called from: engel.prg => MAIN( 0 )
 


I'm using alert function for my variuos choices . Here is a line ( 95 ) : oIcon:SetBrush( TBrush():New( "NULL" ) )

Added : this error occurs only for exernals icons in alert function . With IDI_x icons all is working OK .

How to solve this ?

Regards !

Fwh 11.10 + MinGW + Harbour 3.1 ( 17025 )

Re: Error Fwh + MinGW ...

PostPosted: Sun Nov 13, 2011 6:34 pm
by Antonio Linares
Rimantas,

Are you trying to set a brush to an icon ?

Why do you need it for ? Anyhow the icon is nil, see the error.log info

Re: Error Fwh + MinGW ...

PostPosted: Sun Nov 13, 2011 10:06 pm
by Otto
May I ask what is MINGW and what for is it used?
Thanks in advance
Otto

Re: Error Fwh + MinGW ...

PostPosted: Sun Nov 13, 2011 10:07 pm
by Enrico Maria Giordano
It's a C compiler.

EMG

Re: Error Fwh + MinGW ...

PostPosted: Mon Nov 14, 2011 6:18 am
by Rimantas
Antonio Linares wrote:Rimantas,

Are you trying to set a brush to an icon ?

Why do you need it for ? Anyhow the icon is nil, see the error.log info


Antonio , I'm not trying to set brush to icon. It's your "alert.prg" function . Line no. 95 . If direct to alert function to use icon file , not resource , then it return error . I didn't changed any line .
Simply try to do something that : alert( "My text", { "OK" }, "My title", 1, cMyIconPath + "myicon.ico" ) . Then you will get error .

Regards !

Re: Error Fwh + MinGW ...

PostPosted: Mon Nov 14, 2011 12:24 pm
by Antonio Linares
Rimantas,

samples\alert.prg is working fine:

buildg.bat alert

Please try it :-)

Re: Error Fwh + MinGW ...

PostPosted: Mon Nov 14, 2011 3:34 pm
by Rimantas
Antonio Linares wrote:Rimantas,

samples\alert.prg is working fine:
buildg.bat alert
Please try it :-)


Antonio , now please try you this code :

Code: Select all  Expand view

// FiveWin Clipper Alert replacement
#include "FiveWin.ch"
//-----------------------------------------------------------------//
function Main()
   local nOption
   nOption = Alert( "take an option",;
                    { "&One", "&Two", "T&hree" },;
                    "Please, select" )

   MsgInfo( nOption )

   // added outside icon ...
   nOption =  Alert( "take an option",;
                    { "&One", "&Two", "T&hree" },;
                    "Please, select",, "..\icons\face.ico" )

   MsgInfo( nOption )
return nil
//-----------------------------------------------------------------//
procedure AppSys  // XBase++ requirement
return
 


I'm explaining again : in alert function ( \source\function\alert.prg ) is possibility to use own icon

function Alert( cMsg, aOptions, cTitle, nDefault, xIcon ) - xIcon , can be directed as outside icon
...
Here is line 95 : oIcon:SetBrush( TBrush():New( "NULL" ) )

It's not working with outside icons .

Regards !

Re: Error Fwh + MinGW ...

PostPosted: Mon Nov 14, 2011 4:46 pm
by Antonio Linares
Rimantas,

These changes are required in function Alert():

lines 80 and 82
Code: Select all  Expand view

            @ 20/14, 18/8 ICON oIcon FILE xIcon OF oDlg
         ELSE
            @ 20/14, 18/8 ICON oIcon RESOURCE xIcon OF oDlg
 


Thanks! :-)

Re: Error Fwh + MinGW ...

PostPosted: Mon Nov 14, 2011 5:11 pm
by Rimantas
Antonio Linares wrote:Rimantas,

These changes are required in function Alert():

Thanks! :-)


Thanks ! :-)

Antonio , exist another problem - error codeblock . With Bcc if error occur , then I can quickly detect error . But MinGW return log , from this I can't image there is the error . Tha last error.log :

Code: Select all  Expand view

   Error description: Error BASE/1003  Variable does not exist: DLG

Stack Calls
===========
   Called from: alrt.prg => ALRT( 0 )
   Called from: engel.prg => MSGINF( 0 )
   Called from: engel.prg => EXITWND( 0 )
   Called from: engel.prg => (b)MAIN( 0 )
   Called from: .\source\classes\WINDOW.PRG => (b)TWINDOW( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:LVALID( 0 )
   Called from: .\source\classes\WINDOW.PRG => (b)TWINDOW( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:END( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:SYSCOMMAND( 0 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 0 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 0 )
   Called from: engel.prg => MAIN( 0 )
 


Form first line I understand that directed bad var "dlg" instead 'oDlg' , but after that I must search through all the code . Because it return only (0) line numbers in error block . How to do like Bcc return ?

Regards !

Re: Error Fwh + MinGW ...

PostPosted: Mon Nov 14, 2011 10:39 pm
by Antonio Linares
Rimantas,

Please check that you are not using the flag "/l" (L) when you call Harbour or lines numbers info will be supressed.

If you run FWH\samples\buildg.bat testerro with this little change, you will see that the lines numbers are properly reported:
Code: Select all  Expand view
// Testing the FiveWin error system - Check generated Error.log file !

#include "FiveWin.ch"

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

function Main()

   MsgInfo( "An error is going to be generated", "Press to continue" )

   USE NotFound

return nil

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


Stack Calls
===========
Called from: => DBUSEAREA( 0 )
Called from: testerro.prg => MAIN( 11 )