Page 5 of 6
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 8:36 am
by cnavarro
Enrico Maria Giordano wrote:The following sample gives a warning:
Code: Select all | Expand
#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: Select all | Expand
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
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 9:00 am
by Enrico Maria Giordano
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
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 9:04 am
by Enrico Maria Giordano
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
[/quote]
Full warning level is not activated in BuildH.bat. I absolutely can't do my work without full warning level.
EMG
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 9:19 am
by cnavarro
Enrico, now I understand
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 9:21 am
by Enrico Maria Giordano
Thank you, Cristobal. Any solutions?
EMG
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 9:28 am
by Antonio Linares
Enrico,
have you tried using /w flag in Harbour ?
/w[<level>] set warning level number (0..3, default 1)
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 9:55 am
by cnavarro
Antonio
Enrico use /w3, no?
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:20 am
by Enrico Maria Giordano
Friends,
I'm using this:
and getting this:
Code: Select all | Expand
Warning W0004 Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'
In xHarbour I used this:
but Harbour doesn't support /wb-.
EMG
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:21 am
by cnavarro
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: Select all | Expand
#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
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:27 am
by Antonio Linares
Enrico,
But this is what you wanted to get, right ?
Warning W0004 Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:31 am
by cnavarro
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
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:31 am
by Enrico Maria Giordano
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: Select all | Expand
#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
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:32 am
by Enrico Maria Giordano
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
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 10:42 am
by cnavarro
Enrico, look the .ppo
Code: Select all | Expand
oMen := MenuBegin( .F.,,, .F., .F. )
MenuAddItem( "Test",, .F.,, {|oMenuItem|MSGINFO( "OK" )},,,,,,, .F.,,, .F. )
MenuEnd()
Re: Migrate to Harbour
Posted: Sat Jul 05, 2014 12:49 pm
by Enrico Maria Giordano
Cristobal,
cnavarro wrote:Enrico, look the .ppo
Code: Select all | Expand
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