Error Fwh + MinGW ...

Error Fwh + MinGW ...

Postby Rimantas » Sun Nov 13, 2011 2:53 pm

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 )
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Error Fwh + MinGW ...

Postby Antonio Linares » Sun Nov 13, 2011 6:34 pm

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
regards, saludos

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

Re: Error Fwh + MinGW ...

Postby Otto » Sun Nov 13, 2011 10:06 pm

May I ask what is MINGW and what for is it used?
Thanks 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: 6330
Joined: Fri Oct 07, 2005 7:07 pm


Re: Error Fwh + MinGW ...

Postby Rimantas » Mon Nov 14, 2011 6:18 am

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 !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Error Fwh + MinGW ...

Postby Antonio Linares » Mon Nov 14, 2011 12:24 pm

Rimantas,

samples\alert.prg is working fine:

buildg.bat alert

Please try it :-)
regards, saludos

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

Re: Error Fwh + MinGW ...

Postby Rimantas » Mon Nov 14, 2011 3:34 pm

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 !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Error Fwh + MinGW ...

Postby Antonio Linares » Mon Nov 14, 2011 4:46 pm

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! :-)
regards, saludos

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

Re: Error Fwh + MinGW ...

Postby Rimantas » Mon Nov 14, 2011 5:11 pm

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 !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Error Fwh + MinGW ...

Postby Antonio Linares » Mon Nov 14, 2011 10:39 pm

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 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
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 107 guests