Migrate to Harbour

User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Post by cnavarro »

Enrico Maria Giordano wrote:The following sample gives a warning:

Code: Select all

#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

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
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrate to Harbour

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrate to Harbour

Post 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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Post by cnavarro »

Enrico, now I understand
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrate to Harbour

Post by Antonio Linares »

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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Post by cnavarro »

Antonio
Enrico use /w3, no?
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrate to Harbour

Post by Enrico Maria Giordano »

Friends,

I'm using this:

Code: Select all

SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3
and getting this:

Code: Select all

Warning W0004  Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'
In xHarbour I used this:

Code: Select all

SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3 /wb-
but Harbour doesn't support /wb-.

EMG
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Post 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

#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

 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrate to Harbour

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

Antonio Linares
www.fivetechsoft.com
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Post 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
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrate to Harbour

Post 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

#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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrate to Harbour

Post 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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Post by cnavarro »

Enrico, look the .ppo

Code: Select all

    oMen := MenuBegin( .F.,,, .F., .F. )
        MenuAddItem( "Test",, .F.,, {|oMenuItem|MSGINFO( "OK" )},,,,,,, .F.,,, .F. )
    MenuEnd()

 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrate to Harbour

Post by Enrico Maria Giordano »

Cristobal,
cnavarro wrote:Enrico, look the .ppo

Code: Select all

    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
Post Reply