Migrate to Harbour

Re: Migrate to Harbour

Postby cnavarro » Sat Jul 05, 2014 8:36 am

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

Code: Select all  Expand view  RUN
#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 view  RUN
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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Postby Enrico Maria Giordano » Sat Jul 05, 2014 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrate to Harbour

Postby Enrico Maria Giordano » Sat Jul 05, 2014 9: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
[/quote]

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrate to Harbour

Postby cnavarro » Sat Jul 05, 2014 9: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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Postby Enrico Maria Giordano » Sat Jul 05, 2014 9:21 am

Thank you, Cristobal. Any solutions? :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrate to Harbour

Postby Antonio Linares » Sat Jul 05, 2014 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migrate to Harbour

Postby cnavarro » Sat Jul 05, 2014 9: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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Migrate to Harbour

Postby Enrico Maria Giordano » Sat Jul 05, 2014 10:20 am

Friends,

I'm using this:

Code: Select all  Expand view  RUN
SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3


and getting this:

Code: Select all  Expand view  RUN
Warning W0004  Codeblock parameter 'OMENUITEM' declared but not used in function 'MAIN'


In xHarbour I used this:

Code: Select all  Expand view  RUN
SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3 /wb-


but Harbour doesn't support /wb-.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrate to Harbour

Postby cnavarro » 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: Select all  Expand view  RUN

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

Re: Migrate to Harbour

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migrate to Harbour

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

Re: Migrate to Harbour

Postby Enrico Maria Giordano » 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: Select all  Expand view  RUN

#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: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrate to Harbour

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

Re: Migrate to Harbour

Postby cnavarro » Sat Jul 05, 2014 10:42 am

Enrico, look the .ppo

Code: Select all  Expand view  RUN

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

Re: Migrate to Harbour

Postby Enrico Maria Giordano » Sat Jul 05, 2014 12:49 pm

Cristobal,

cnavarro wrote:Enrico, look the .ppo

Code: Select all  Expand view  RUN

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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests