terça-feira, 1 de setembro de 2020

DICAS 3061 -WINDEV TUTORIAL 84 -Licao 7.4-07-09-2020 11hrs-Compilacao Dinamica

https://youtu.be/Ej6LWXpvPkw



DICAS_3061_WINDEV_TUTORIAL_84_Licao_7_4_Compilacao_Dinamica

Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 11:00 do dia 07/09/2020 

DICAS 3061 -WINDEV TUTORIAL 84 -Licao 7.4-07-09-2020 11hrs-Compilacao Dinamica
Tutoriel WINDEV : Leçon 7.4. Programmation avancée - Compilation dynamique

ASSUNTOS

COMPILACAO DINAMICA
VISAO GERAL
EXEMPLO REPOSITORIO
EXEMPLO PCSOFT
  Dynamic compilation
MOSTRANDO 3 EXEMPLOS COMPILE
EXPLICANDO O CODIGO
  

   

Video original da Franca

Playlist Windev Tutorial Amarildo
Playlist windev Franca PcSoft
Amarildo
Windev
WxSolucoes
Matos Informatica
Repositorio Windev
Site forum Google 
Video sobre 3 Mil Videos Windev 
PlayList Pedrosao
Video sobre Alfaserver servidor 




DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C






















Lesson 7.4. Dynamic compilation
This lesson will teach you the following concepts
  • Overview.
  • Drawing a line in dynamic compilation.
Lesson duration

Estimated time: 20 mn
Previous LessonTable of contentsNext Lesson
Overview
The dynamic compilation is used to compile a code at any time in the application. A common example? Your application contains a formula that can be configured. To change the parameters, there is no need to provide the executable again: the modification of a text file is sufficient.
Example
The dynamic compilation will be presented via the unit example named "Dynamic compilation".
The "Dynamic compilation" window explains how to dynamically compile WLanguage code (stored in string format), run the procedure that was dynamically generated and process the possible runtime errors.
  • To run the test of this window:
    1. Open the unit example named "Dynamic compilation".
    2. Run the test of "WIN_DYNAMIC_COMPILATION" window.
    3. Click the different "Run" buttons to see the different cases.
    4. Stop the test.
  • Let's go back to the code editor and study the code of first "Run" Button control.
    1. Display the code of the "Run" Button control (right click on the control, "Code" option). This code calls the CompileDynamicCode procedure.
    2. Position the mouse cursor on the procedure name and press F2. The procedure WLanguage code is automatically displayed in the code editor.
      The code of this procedure can be divided into several sections:
      1. Initializing variables.
      2. Compiling the code.
        sCompilationResult = Compile(DYNAMIC_PROCEDUREEDT_COMPIL_CODE)
        This code contains several important points:
        • The function is compiled by the WLanguage function Compile. The function that is dynamically compiled becomes usable as soon as this function is called (and if no error is returned).
        • This function expects two parameters: the name of compiled procedure ("DYNAMIC_PROCEDURE") and the code to compile. In this case, the code to compile is found in the EDT_COMPIL_CODE edit control.
        • The compilation result is assigned to a sCompilationResult string.
      3. Checking the compilation result.
        // Checks the compilation result
        SWITCH sCompilationResult
        // No error
        CASE ""
        bCompilationResult = True
        STC_ERROR_CODE_COMPILE = ""

        // Fatal compilation error
        CASE "ERR"
        bCompilationResult = False
        STC_ERROR_CODE_COMPILE = ErrorInfo()
        // Incorrect code
        OTHER CASE
        bCompilationResult = False
        STC_ERROR_CODE_COMPILE = sCompilationResult
        END
    3. Press Ctrl + F2. The "Click" event of the "Run" Button control re-appears in the code editor. In the rest of this code, you can see that the function that is dynamically compiled is run by Execute.

Teste

Teste
teste