FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Migrate to Harbour
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 08:36 AM
Enrico Maria Giordano wrote:The following sample gives a warning:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

聽 聽 LOCAL oWnd, oMen

聽 聽 MENU oMen
聽 聽 聽 聽 MENUITEM "Test" ACTION MSGINFO( "OK" )
聽 聽 ENDMENU

聽 聽 DEFINE WINDOW oWnd;
聽 聽 聽 聽 聽 聽MENU oMen

聽 聽 ACTIVATE WINDOW oWnd

聽 聽 RETURN NIL


Warning message:

Code (fw): Select all Collapse
Warning W0004 聽Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'


I use /wb- in xHarbour. Any replacement in Harbour or any other solution?

EMG


Enrico

Compiling...
Harbour 3.2.0dev (r1307082134)
Copyright (c) 1999-2013, http://harbour-project.org/
Compiling 'enr1.prg' and generating preprocessed output to 'enr1.ppo'...
Lines 4218, Functions/Procedures 1
Generating C source output to 'enr1.c'... Done.
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
enr1.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
* Application successfully built *


using BuildH.bat
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 09:00 AM
Antonio,

Antonio Linares wrote:
When I've seen the first message asking about OleDefaultArg()
I thought it's a joke and for sure harbour-devel list it's
not the place to ask about some basic OLE functionality in
Harbour. Please send such messages to harbour-user list in the
future.


As far as I can see, he's attitude is not changed in the last years, it became even worst. :-)

He could be the best programmer in the world but how we can trust him?

EMG
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 09:04 AM
Cristobal,

cnavarro wrote:

Compiling...
Harbour 3.2.0dev (r1307082134)
Copyright (c) 1999-2013, http://harbour-project.org/
Compiling 'enr1.prg' and generating preprocessed output to 'enr1.ppo'...
Lines 4218, Functions/Procedures 1
Generating C source output to 'enr1.c'... Done.
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
enr1.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
* Application successfully built *


using BuildH.bat


Full warning level is not activated in BuildH.bat. I absolutely can't do my work without full warning level.

EMG
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 09:19 AM

Enrico, now I understand

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 09:21 AM

Thank you, Cristobal. Any solutions? :-)

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 09:28 AM
Enrico,

have you tried using /w flag in Harbour ?

/w[<level>] set warning level number (0..3, default 1)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 09:55 AM

Antonio
Enrico use /w3, no?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:20 AM
Friends,

I'm using this:

Code (fw): Select all Collapse
SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3


and getting this:

Code (fw): Select all Collapse
Warning W0004  Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'


In xHarbour I used this:

Code (fw): Select all Collapse
SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3 /wb-


but Harbour doesn't support /wb-.

EMG
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:21 AM
Enrico, modify



#xcommand MENUITEM [ <oMenuItem> PROMPT ] [<cPrompt>] ;
[ MESSAGE <cMsg> ] ;
[ <checked: CHECK, CHECKED, MARK> ] ;
[ <enable: ENABLED, DISABLED> ] ;
[ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
[ <resource: RESOURCE, RESNAME, NAME> <cResName> ] ;
[ ACTION <uAction,...> ] ;
[ BLOCK <bAction> ] ;
[ <of: OF, MENU, SYSMENU> <oMenu> ] ;
[ ACCELERATOR <nState>, <nVirtKey> ] ;
[ <help: HELP> ] ;
[ <HelpId: HELP ID, HELPID> <nHelpId> ] ;
[ WHEN <uWhen> ] ;
[ <break: BREAK> ] ;
=> ;
[ <oMenuItem> := ] MenuAddItem( <cPrompt>, <cMsg>,;
<.checked.>, [ Upper(<(enable)>) == "ENABLED" ],;
[\{|<oMenuItem>| <uAction>\}],; /// AQUI
<cBmpFile>, <cResName>, <oMenu>, <bAction>, <nState>, <nVirtKey>,;
<.help.>, <nHelpId>, [<{uWhen}>], <.break.> )




Code (fw): Select all Collapse
#include "Fivewin.ch"

#xcommand MENUITEM [ <oMenuItem> PROMPT ] [<cPrompt>] ;
聽 聽 聽 聽 聽 聽 聽[ MESSAGE <cMsg> ] ;
聽 聽 聽 聽 聽 聽 聽[ <checked: CHECK, CHECKED, MARK> ] ;
聽 聽 聽 聽 聽 聽 聽[ <enable: ENABLED, DISABLED> ] ;
聽 聽 聽 聽 聽 聽 聽[ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
聽 聽 聽 聽 聽 聽 聽[ <resource: RESOURCE, RESNAME, NAME> <cResName> ] ;
聽 聽 聽 聽 聽 聽 聽[ ACTION <uAction,...> ] ;
聽 聽 聽 聽 聽 聽 聽[ BLOCK <bAction> ] ;
聽 聽 聽 聽 聽 聽 聽[ <of: OF, MENU, SYSMENU> <oMenu> ] ;
聽 聽 聽 聽 聽 聽 聽[ ACCELERATOR <nState>, <nVirtKey> ] ;
聽 聽 聽 聽 聽 聽 聽[ <help: HELP> ] ;
聽 聽 聽 聽 聽 聽 聽[ <HelpId: HELP ID, HELPID> <nHelpId> ] ;
聽 聽 聽 聽 聽 聽 聽[ WHEN <uWhen> ] ;
聽 聽 聽 聽 聽 聽 聽[ <break: BREAK> ] ;
聽 聽 聽 聽=> ;
聽 聽 聽 聽 聽 [ <oMenuItem> := ] MenuAddItem( <cPrompt>, <cMsg>,;
聽 聽 聽 聽 聽 聽 聽<.checked.>, [ Upper(<(enable)>) == "ENABLED" ],;
聽 聽 聽 聽 聽 聽 聽[\{|<oMenuItem>| <uAction>\}],;
聽 聽 聽 聽 聽 聽 聽<cBmpFile>, <cResName>, <oMenu>, <bAction>, <nState>, <nVirtKey>,;
聽 聽 聽 聽 聽 聽 聽<.help.>, <nHelpId>, [<{uWhen}>], <.break.> )

FUNCTION MAIN()

聽 聽 LOCAL oWnd, oMen

聽 聽 MENU oMen
聽 聽 聽 聽 MENUITEM "Test" ACTION MSGINFO( "OK" )
聽 聽 ENDMENU


聽 聽 DEFINE WINDOW oWnd;
聽 聽 聽 聽 聽 聽MENU oMen

聽 聽 ACTIVATE WINDOW oWnd

聽 聽 RETURN NIL
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:27 AM
Enrico,

But this is what you wanted to get, right ?

Warning W0004 Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:31 AM
Antonio

Enrico Maria Giordano wrote:Cristobal,

Full warning level is not activated in BuildH.bat. I absolutely can't do my work without full warning level.

EMG
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:31 AM
Cristobal,

cnavarro wrote:Enrico, modify



#xcommand MENUITEM [ <oMenuItem> PROMPT ] [<cPrompt>] ;
[ MESSAGE <cMsg> ] ;
[ <checked: CHECK, CHECKED, MARK> ] ;
[ <enable: ENABLED, DISABLED> ] ;
[ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
[ <resource: RESOURCE, RESNAME, NAME> <cResName> ] ;
[ ACTION <uAction,...> ] ;
[ BLOCK <bAction> ] ;
[ <of: OF, MENU, SYSMENU> <oMenu> ] ;
[ ACCELERATOR <nState>, <nVirtKey> ] ;
[ <help: HELP> ] ;
[ <HelpId: HELP ID, HELPID> <nHelpId> ] ;
[ WHEN <uWhen> ] ;
[ <break: BREAK> ] ;
=> ;
[ <oMenuItem> := ] MenuAddItem( <cPrompt>, <cMsg>,;
<.checked.>, [ Upper(<(enable)>) == "ENABLED" ],;
[\{|<oMenuItem>| <uAction>\}],; /// AQUI
<cBmpFile>, <cResName>, <oMenu>, <bAction>, <nState>, <nVirtKey>,;
<.help.>, <nHelpId>, [<{uWhen}>], <.break.> )




Code (fw): Select all Collapse
#include "Fivewin.ch"

#xcommand MENUITEM [ <oMenuItem> PROMPT ] [<cPrompt>] ;
聽 聽 聽 聽 聽 聽 聽[ MESSAGE <cMsg> ] ;
聽 聽 聽 聽 聽 聽 聽[ <checked: CHECK, CHECKED, MARK> ] ;
聽 聽 聽 聽 聽 聽 聽[ <enable: ENABLED, DISABLED> ] ;
聽 聽 聽 聽 聽 聽 聽[ <file: FILE, FILENAME, DISK> <cBmpFile> ] ;
聽 聽 聽 聽 聽 聽 聽[ <resource: RESOURCE, RESNAME, NAME> <cResName> ] ;
聽 聽 聽 聽 聽 聽 聽[ ACTION <uAction,...> ] ;
聽 聽 聽 聽 聽 聽 聽[ BLOCK <bAction> ] ;
聽 聽 聽 聽 聽 聽 聽[ <of: OF, MENU, SYSMENU> <oMenu> ] ;
聽 聽 聽 聽 聽 聽 聽[ ACCELERATOR <nState>, <nVirtKey> ] ;
聽 聽 聽 聽 聽 聽 聽[ <help: HELP> ] ;
聽 聽 聽 聽 聽 聽 聽[ <HelpId: HELP ID, HELPID> <nHelpId> ] ;
聽 聽 聽 聽 聽 聽 聽[ WHEN <uWhen> ] ;
聽 聽 聽 聽 聽 聽 聽[ <break: BREAK> ] ;
聽 聽 聽 聽=> ;
聽 聽 聽 聽 聽 [ <oMenuItem> := ] MenuAddItem( <cPrompt>, <cMsg>,;
聽 聽 聽 聽 聽 聽 聽<.checked.>, [ Upper(<(enable)>) == "ENABLED" ],;
聽 聽 聽 聽 聽 聽 聽[\{|<oMenuItem>| <uAction>\}],;
聽 聽 聽 聽 聽 聽 聽<cBmpFile>, <cResName>, <oMenu>, <bAction>, <nState>, <nVirtKey>,;
聽 聽 聽 聽 聽 聽 聽<.help.>, <nHelpId>, [<{uWhen}>], <.break.> )

FUNCTION MAIN()

聽 聽 LOCAL oWnd, oMen

聽 聽 MENU oMen
聽 聽 聽 聽 MENUITEM "Test" ACTION MSGINFO( "OK" )
聽 聽 ENDMENU


聽 聽 DEFINE WINDOW oWnd;
聽 聽 聽 聽 聽 聽MENU oMen

聽 聽 ACTIVATE WINDOW oWnd

聽 聽 RETURN NIL


I don't want to keep a modified fivewin.ch. :-)

EMG
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:32 AM
Antonio,

Antonio Linares wrote:Enrico,

But this is what you wanted to get, right ?

Warning W0004 Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'


No, as I don't see any OMENUITEM in my code.

EMG
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:42 AM
Enrico, look the .ppo

Code (fw): Select all Collapse
聽 聽 oMen := MenuBegin( .F.,,, .F., .F. )
聽 聽 聽 聽 MenuAddItem( "Test",, .F.,, {|oMenuItem|MSGINFO( "OK" )},,,,,,, .F.,,, .F. )
聽 聽 MenuEnd()
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 12:49 PM
Cristobal,

cnavarro wrote:Enrico, look the .ppo

Code (fw): Select all Collapse
聽 聽 oMen := MenuBegin( .F.,,, .F., .F. )
聽 聽 聽 聽 MenuAddItem( "Test",, .F.,, {|oMenuItem|MSGINFO( "OK" )},,,,,,, .F.,,, .F. )
聽 聽 MenuEnd()


If you are suggesting to change tons of lines of code, well, it's not an option.

EMG