Clipper On Line • Ver Tópico - erro call from _definewindow(83),calle from empresa(35)

erro call from _definewindow(83),calle from empresa(35)

Projeto MiniGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

 

erro call from _definewindow(83),calle from empresa(35)

Mensagempor jcsprog » 08 Jun 2009 17:46

criei o menu de entrada em harbour testei funcionou legal crieia primeira tela de entrada de dados empresa.prg compilei roda legal sem erros , junto tudo p/ gerar o executavel da esse erro ai estou compilando com o compila.bat que vem com o harbour e bliblioteca minigui , estou enviando os dois prgs p/ ver o que ta errado gostaria de usar a hbmake aonde encontro explicacao? os fontes estao ai, agradeço desde ja a atenção

#include "MiniGUI.ch"

******** jcssoft -

FUNCTION Main()

Define window Form_10 ;
       At 0, 0 ;
       Width 400 ;
       Height 200 ;
       Title 'Ciec Vidros e Espelhos Convexos Ltda' ;
       Icon 'ciec.ico' ;
       Main ;
       NotifyIcon 'ciec.ico'

   Define main menu

      Popup 'Cadastros'

        Item 'Empresa '  Action empresa()

        Popup 'Clientes'
          Item 'Cadastro de Clientes  ' Action empresa()
          Item 'Clientes/Produtos     ' Action MsgInfo ( 'Item 3.2')
          Item 'Mala Direta           ' Action MsgInfo ( 'Item 3.3')
          Item 'Relat¢rio de Clientes ' Action MsgInfo ( 'Item 3.4')
          Item 'Confirmacao de Pgtos  ' Action MsgInfo ( 'Item 3.5')
          Item 'Alteracao de Fantasia ' Action MsgInfo ( 'Item 3.6')
          Item 'Consulta de Pedidos   ' Action MsgInfo ( 'Item 3.7')

        end popup

        Popup 'Fornecedores'

          Item 'Cadastro Fornecedores   ' Action MsgInfo ( 'Item 3.1')
          Item 'Fornecedores e Produtos ' Action MsgInfo ( 'Item 3.2')

        end popup

        Item 'Produtos       ' Action MsgInfo ( 'Item 3.3')
        Item 'Itens          ' Action MsgInfo ( 'Item 3.4')
        Item 'Tabela de ICMS ' Action MsgInfo ( 'Item 3.5')
        Item 'Formas         ' Action MsgInfo ( 'Item 3.6')

        Popup 'Funcionarios'
          Item 'Funcionarios       ' Action MsgInfo ( 'Item 3.1')
          Item 'Creditos/Debitos   ' Action MsgInfo ( 'Item 3.2')
          Item 'Recibo Mensal      ' Action MsgInfo ( 'Item 3.3')
          Item 'Recibo Vale        ' Action MsgInfo ( 'Item 3.4')
          Item 'Tabela de Encargos ' Action MsgInfo ( 'Item 3.5')
        end popup

        Item 'Descricao &Faturamento' Action MsgInfo ( 'Item 3.6')

*        Item 'Save As...'  Action MsgInfo ( 'File:Save As' ) Disabled
        Separator
        Item 'Fim' Action Form_10.Release Image 'Exit.Bmp'

      End Popup

      Popup 'Processos Diarios'

        Popup 'Pedidos'
          Item 'Lancamento Pedido    ' Action MsgInfo ( 'Item 3.1')
          Item 'Baixa Pedido         ' Action MsgInfo ( 'Item 3.2')
          Item 'Confirmacao Pronto   ' Action MsgInfo ( 'Item 3.3')
          Item 'Relatorio de Pedidos ' Action MsgInfo ( 'Item 3.4')
          Item 'Etiquetas p/ Pedidos ' Action MsgInfo ( 'Item 3.5')
          Item 'Orcamentos WORD      ' Action MsgInfo ( 'Item 3.6')

        end popup

        Item 'Consulta de Estoque       ' Action MsgInfo ( 'Item 3.7')
        Item 'Controle A Pagara/Receber ' Action Msginfo ( 'item 3.8')
        Item 'Tranf.Pedido Outro Cliente' Action MsgInfo ( 'Item 3.9')

      end popup

      Popup 'Relatorios'

        Item 'Metragens           ' Action MsgInfo ( 'File:Open'  ) Image 'Check.Bmp'
        Item 'Faturamento         ' Action MsgInfo ( 'File:Save'  ) Image 'Free.Bmp' 
        Item 'Formas              ' Action MsgInfo ( 'File:Print' ) Image 'Info.Bmp' 
*        Item 'Agenda Recebimentos ' Action MsgInfo ( 'File:Save As' ) Disabled

      End Popup

      Popup 'Utilitarios'

        Item 'Senhas Usuarios ' Action MsgInfo ( 'File:Open'  ) Image 'Check.Bmp'
        Item 'Graficos        ' Action MsgInfo ( 'File:Save'  ) Image 'Free.Bmp' 
        Item 'Reorganizacao   ' Action MsgInfo ( 'File:Print' ) Image 'Info.Bmp' 

      End Popup

      Popup 'Help'

        Item 'About' Action MsgInfo ( MiniGuiVersion() )

      End Popup

   End Menu

   Define context menu

      Popup "Context item 1"
         Item "Context item 1.1" Action MsgInfo( "Context item 1.1!" )
         Item "Context item 1.2" Action MsgInfo( "Context item 1.2!" )

         Popup 'Context item 1.3'
           Item "Context item 1.3.1" Action MsgInfo( "Context item 1.3.1!" ) Image 'Info.Bmp'
           Separator
           Item "Context item 1.3.2" Action MsgInfo( "Context item 1.3.2!" ) Checked
         End Popup

      End Popup

      Item "Context item 2 - Simple " Action MsgInfo( "Context item 2 - Simple!" ) Checked
*     Item "Context item 3 - Disabled" Action MsgInfo( "Context item 3 - Disabled" ) Disabled
      Separator
      Popup "Context item 4"
         Item "Context item 4.1" Action MsgInfo( "Context item 4.1!" )
         Item "Context item 4.2" Action MsgInfo( "Context item 4.2!" )
*         Item "Context item 4.3" Action MsgInfo( "Context item 4.3!" ) Disabled
      End Popup
   End Menu

   Define notify menu
     Item 'About...' Action MsgInfo ( MiniGuiVersion() )
     
     Popup 'Options'
       Item 'Autorun' Action ToggleAutorun() Name SetAuto Checked
     End Popup
     
     Popup 'Notify Icon'
       Item 'Get Notify Icon Name' Action MsgInfo ( Form_10.NotifyIcon )
       Item 'Change Notify Icon' Action Form_10.NotifyIcon := 'Demo2.ico'
     End Popup
     Separator   
     Item 'Exit Application' Action Form_10.Release
   End Menu

End Window

Center window Form_10
Activate window Form_10

# include "jcsget.prg"
Return

Static Procedure ToggleAutorun
Local lChecked := Form_10.SetAuto.Checked

If lChecked
   Form_10.SetAuto.Checked := .F.
   MsgInfo( 'nao abilitado 1' )
Else
   Form_10.SetAuto.Checked := .T.
   MsgInfo( 'nao abilitado 2' )
Endif

Return

empresa.prg
#Include "minigui.ch"
#define BLUE { 0, 0, 128 }

procedure empresa

        i := 0

   SET DELETED ON
   SET CENTURY ON

        Use ARQEMP Alias EMP new shared
        EMP->(DBSetIndex( 'Agenda1'))
        EMP->(DBSetIndex( 'Agenda2'))
   
        cCodigo := emp->codigo
        cdescr  := emp->descr
        cEnd    := emp->End
        cCep    := emp->Cep
        cCidade := emp->Cidade
        cuf     := emp->uf
        cTel    := emp->tel
        ccgc    := emp->cgc
        cEmail  := emp->vEMail
        cped    := str(emp->Nped,10)

   DEFINE WINDOW Form_2   ;
                     At 0, 0 ;
                     Width 490 ;
                     Height 300 ;
                     Title 'Cadastro de Empresa- Alteracao';
                     main        ;
                     Icon 'DEMO2.ICO' ;
                     NOMAXIMIZE  ;
                     NOSIZE      ;     
                           BACKCOLOR WHITE
                   

                     @ 10,10 LABEL Label_Codigo ;
                            VALUE 'Codigo'    ;
                            WIDTH 60           ;
                            HEIGHT 30           ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                     @ 40,10 LABEL Label_Nome   ;
                            VALUE 'Descricao'   ;
                            WIDTH 60           ;
                            HEIGHT 30           ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                @ 70,10 LABEL Label_Endereco   ;
                  VALUE 'Endereço'      ;
                            WIDTH 60           ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                     @100,10 LABEL Label_Cidade ;
                            VALUE 'Cidade'              ;
                            WIDTH 60           ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                @100,360 LABEL Label_Cep      ;
                  VALUE 'Cep'      ;
                            WIDTH 29                    ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                     @130,10 LABEL Label_CGC ;
                            VALUE 'CGC'              ;
                            WIDTH 60           ;
                            HEIGHT 30           ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                     @130,345 LABEL Label_ESTADO        ;
                            VALUE 'Estado'              ;
                            WIDTH 45                    ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                @160,10 LABEL Label_Fone1   ;
                            VALUE 'TeleFone'            ;
                            WIDTH 60                    ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                     @160,305 LABEL Label_PED ;
                            VALUE 'Pedido'    ;
                            WIDTH 45                    ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                @190,10 LABEL Label_Email   ;
                  VALUE 'e-mail'      ;
                            WIDTH 60           ;
                  HEIGHT 30      ;
                             FONT 'Arial' SIZE 09      ;
                             BACKCOLOR WHITE   ;
                             FONTCOLOR BLUE BOLD

                @ 13,70 TEXTBOX T_Codigo      ;
                   WIDTH 40         ;
                             VALUE ccodigo          ;
                             TOOLTIP 'Codigo do Contato'

      @ 43,70 TEXTBOX T_Nome      ;   
                    OF Form_2      ;
                    WIDTH 400      ;
                              VALUE cdescr               ;
                              TOOLTIP 'Descricao' ;
                              MAXLENGTH 45              ;
                    UPPERCASE      ;
         ON ENTER Iif( ! Empty( Form_2.T_Nome.Value ) , Form_2.T_Endereco.SetFocus , Form_2.T_Nome.SetFocus )

                           @ 73,70 TEXTBOX T_Endereco   ;
                   OF Form_2      ;
                              WIDTH 400      ;
                                   VALUE cEnd           ;
                                   TOOLTIP 'Endereço ';
                              MAXLENGTH 40      ;
                              UPPERCASE      ;
                                   ON GOTFOCUS Form_2.Btn_Salvar.Enabled := .T.  ;
                                   ON ENTER Form_2.T_CIDADE.SetFocus

                           @103,70 TEXTBOX T_CIDADE   ;
                              OF Form_2          ;
                                 WIDTH 250         ;
                                 VALUE cCIDADE     ;
                                 TOOLTIP 'Cidade'       ;
                                 MAXLENGTH 20              ;
                                 UPPERCASE         ;
                                 ON ENTER Form_2.T_Cep.SetFocus           

                           @103,390 TEXTBOX T_Cep   ;
                              OF Form_2             ;
                    WIDTH 80      ;
                              VALUE cCep                ;
                              TOOLTIP 'Cep '  ;
                              MAXLENGTH 09              ;
                    UPPERCASE      ;   
                        ON ENTER Form_2.T_CGC.SetFocus

                           @133,70 TEXTBOX T_CGC ;
                    OF Form_2      ;
                    WIDTH 250      ;
                              VALUE cCGC         ;
                              TOOLTIP 'N.CGC'       ;
                              MAXLENGTH 18              ;
                    UPPERCASE      ;
         ON ENTER Form_2.T_Estado.SetFocus          

                           @133,390 TEXTBOX T_Estado   ;
                    OF Form_2      ;
                    WIDTH 30      ;
                              VALUE cuf        ;
                              TOOLTIP 'Estado';
                    MAXLENGTH 02      ;
                    UPPERCASE      ;
         ON ENTER Form_2.T_Fone1.SetFocus

                           @163,70 TEXTBOX T_Fone1      ;
                               OF Form_2      ;
                    WIDTH 110      ;
                              VALUE ctel              ;
                              TOOLTIP 'Telefone ';
                              MAXLENGTH 15              ;
                    UPPERCASE      ;   
                        ON ENTER Form_2.T_ped.SetFocus

                           @163,360 TEXTBOX T_PED     ;
                              OF Form_2         ;
                              WIDTH 80          ;
                              VALUE cPED       ;
                              TOOLTIP 'PEDIDO ';
                              MAXLENGTH 10              ;
                              UPPERCASE         ;
                           ON ENTER Form_2.T_Email.SetFocus

                           @193,70 TEXTBOX T_Email ;
                               OF Form_2      ;
                    WIDTH 400      ;
                              VALUE cEmail              ;
                              TOOLTIP 'E-mail do Contato';
                    MAXLENGTH 40      ;
                    LOWERCASE      ;
         ON ENTER Form_2.Btn_Salvar.SetFocus

                @ 232,70 BUTTON Btn_Salvar Of Form_2   ;
                              CAPTION '&Salvar'             ;
                              ACTION Salvar_Registro()            ;       
                               WIDTH 120 HEIGHT 27         ;
                               FONT "Arial" SIZE 09          ;
                               TOOLTIP "Salvar Registro" ;
                            FLAT

                 @ 232,346  BUTTON Btn_Cancelar Of Form_2   ;
                        CAPTION '&Cancelar'      ;
             ACTION Sair_do_Form2()      ;       
             WIDTH 120 HEIGHT 27      ;
                        FONT "Arial" SIZE 09      ;
                                              TOOLTIP "Cancelar Operação"   ;
             FLAT

   END WINDOW

        CENTER WINDOW   Form_2
        ACTIVATE WINDOW Form_2
   Return

/*
*/
Function Salvar_Registro()
               
        If BloqueiaRegistroNaRede( "emp" )
           emp->codigo     := Form_2.T_Codigo.Value
           emp->descr      := Form_2.T_Nome.Value
           emp->End        := Form_2.T_Endereco.Value
           emp->nped       := val(Form_2.T_ped.Value)
           emp->Cep        := Form_2.T_Cep.Value
           emp->Cidade     := Form_2.T_Cidade.Value
           emp->uf         := Form_2.T_Estado.Value
           emp->tel        := Form_2.T_Fone1.Value
           emp->cgc        := Form_2.T_cgc.Value
           emp->vEMail     := Form_2.T_Email.Value
           emp->(DBUnlock())
        EndIf

        MsgInfo( "Registo Alterado!!" )
   
   Form_2.Release

   Return Nil

/*
*/
Function Sair_do_Form2()
        Form_2.Release   
   Return Nil

Function Finaliza_Sistema()   
              emp->(DBCloseArea())
   
/*
*/
Function BloqueiaRegistroNaRede( cArea )
    Do While ! (cArea)->(RLock())
            If ! MSGRetryCancel("Registro em Uso na Rede Tenta Acesso??","EMP")
          Return .F.
       EndIf
    EndDo
    Return .T.


---
Nota da Moderação (Maligno):
A presente mensagem foi editada para inserir o código postado dentro de tags de visualização de código. Por favor, no futuro, use essas tags, pois se já é difícil ler o código alheio, pior fica sem a devida indentação.
jcsprog
Usuário Nível 2

Usuário Nível 2
 
Mensagens: 56
Data de registro: 27 Abr 2005 12:04
Cidade/Estado: sao paulo - jd.brasil
Curtiu: 1 vez
Mens.Curtidas: 2 vezes

Re: erro call from _definewindow(83),calle from empresa(35)

Mensagempor jcsprog » 09 Jun 2009 09:57

na functions seguintes nao podem conter a funcao main que é do define windos

------------------------------------
Nota da Moderação (Sygecom):
Topico movido para a sessão Minigui por está relacionado a Biblioteca Visual minigui.
jcsprog
jcsprog
Usuário Nível 2

Usuário Nível 2
 
Mensagens: 56
Data de registro: 27 Abr 2005 12:04
Cidade/Estado: sao paulo - jd.brasil
Curtiu: 1 vez
Mens.Curtidas: 2 vezes




Retornar para MiniGui

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 8 visitantes


Ola Amigo, espero que meu site e forum tem lhe beneficiado, com exemplos e dicas de programacao.
Entao divulgue o link da Doacao abaixo para seus amigos e redes sociais ou faça uma doacao para o site forum...
MUITO OBRIGADO PELA SUA DOACAO!
Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro