Páginas

segunda-feira, 3 de agosto de 2020

DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1



https://youtu.be/cHMputQ45IE


Esse Ao Vivo vai estrear as 20:00 do dia 08/09/2020 TERCA


Bom Dia/Boa Tarde/Boa Noite

DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1 

Tutoriel WINDEV : Leçon 2.5.a. Questions-Réponses

ASSUNTOS

(Ctrl + Alt + F2) - Voltar para tela window
pressione Ctrl + P - Imprimir Codigo
Como executar uma "localização e / ou substituição"?
Ctrl + F - pesquisa
mostrar + - nos codigos
ctrl * -ou+ para expandir ou recolher
F6 Mostrar data e autor
ajuda sintaxe
na barra de satus editor é exibido sintaxe funcao
com mouse em cima do comando ver instrucoes
F1 para pedir ajuda
atalhos úteis no editor de código
Ctrl + F2 é usado para voltar ao processo ou evento inicial.
evento para outro, pressione F2 repetidamente
Ctrl + L exclui a linha atual.
Ctrl + D duplica a linha atual
Tab (tecla tab) e Shift + Tab recuo linhas
Ctrl + / converte as linhas selecionadas em comentários,
Ctrl + Shift + / remove os comentários
-Cuidado: tecla / no teclado numérico).
Ctrl + R é usado para re-recuar automaticamente o código exibido


https://windevdesenvolvimento.blogspot.com/2020/08/dicas-2994-windev-tutorial-17-perguntas.html
https://youtu.be/cHMputQ45IE

https://doc.windev.com/en-US/?1410087518&name=lesson_25_questionsanswers

Video original da Franca

https://youtu.be/uv9C6zrC4EA


Playlist Windev TUTORIAL

https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE













Is there a way to easily get syntax or help on a WLanguage function?
When entering a WLanguage function in the code editor:
  • the name of each parameter is displayed in a tooltip for the code line currently in edit. For the parameter currently in edit, hovering the parameter name with the mouse is used to display the parameter details in a tooltip.
    If several syntaxes are available, it is possible to switch from one syntax to another using Ctrl + up arrow or down arrow.
  • the syntax of the WLanguage function is displayed in the status bar of the editor.
In the help, the parameters enclosed between [ and ] are optional parameters.
For WLanguage functions that require names of data files, controls, windows or reports, the assisted input is used to display the list of project elements corresponding to the parameter of the function currently typed.
Examples of assisted input for HReadFirst: the <Wizard> option is used to start a code wizard. This wizard asks you questions regarding the function use and automatically generates the corresponding code.
A help page is associated with each WLanguage function and property. This help page can be directly accessed from the editor by pressing F1 on the name of requested function or property.


What are the useful shortcuts in the code editor?
  • To display the events of a control, method, class, procedure or report block, press F2 while on the name of the desired element.
  • Ctrl + F2 is used to go back to the initial process or event.
    To move from one process/event to another, press F2 repeatedly. To go back to the initial process or event, press Ctrl + F2 the same number of times.
  • Ctrl + L deletes the current line.
  • Ctrl + D duplicates the current line (or the selected lines) on the line below.
  • Tab (tab key) and Shift + Tab are used to manage the indent for the selected lines.
  • Ctrl + / converts the selected lines into comments, Ctrl + Shift + / removes the comments (Caution: / key on the numeric keypad).
  • Ctrl + R is used to automatically re-indent the displayed code.



DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
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 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5



https://youtu.be/L4ngEc2ToMw


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


Bom Dia/Boa Tarde/Boa Noite

DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
Tutoriel WINDEV : Leçon 2.4.e. Procédures - Exemples

ASSUNTOS

Criando Janela nova procedure exemplos
Criando os edt, o  combox e o botao calcula
vamos fazer o codigo de calcula
simplificando o codigo com procedure

https://windevdesenvolvimento.blogspot.com/2020/08/dicas-2993-windev-tutorial-16.html
https://youtu.be/L4ngEc2ToMw

https://doc.windev.com/en-US/?1410087517&name=lesson_24_the_procedures

Video original da Franca

https://youtu.be/ttK7eNy5-DE


Playlist Windev TUTORIAL
https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE













Creating and using a procedure
  • To create the procedure for calculating the amount IOT:
    1. Click the window background.
    2. Display the events associated with the window (F2).
    3. In the code editor, on the "Code" pane in the ribbon, in the "Procedures" group, expand "New" and select "New local procedure".
    4. In the window that is displayed, type the name of local procedure ("Calc_IOT") and validate ("Add" button).
    5. The new procedure local to the window is automatically created and its code is displayed in the code editor.
    6. Write the following WLanguage code:
      PROCEDURE Calc_IOT(PriceBTVATRate)
      cyIOT is currency
      cyIOT = PriceBT * (1 + VATRate/100)
      RESULT cyIOT
      Let's take a look at this WLanguage code:
      • The Calc_IOT procedure expects 2 parameters: the price before tax and the VAT rate.
      • This procedure declares a currency variable. This variable is used to store the calculated price IOT.
      • This procedure calculates the price IOT and returns the calculated value.
    7. Close the code window (click X at the top right corner of code editor).
Remark
When creating a procedure, comments are automatically generated BEFORE the procedure code. These comments are mainly used to specify the content of parameters and return value.
It is important to fill these comments. Indeed, they will be automatically displayed in a tooltip when typing the call to the procedure in the code editor.

  • Let's now call the procedure from the calculation Button control.
    1. Select the "Calculate" Button control.
    2. Display the events associated with the Button control (press F2, for example).
    3. In the "Click" event, replace the existing code with the following code:
      SWITCH COMBO_VAT..DisplayedValue
      // 5.5 %
      CASE 5.5
      EDT_PriceIOT = Calc_IOT(EDT_PriceBT5.5)
      // 10 %
      CASE 10
      EDT_PriceIOT = Calc_IOT(EDT_PriceBT10)
      // 20 %
      CASE 20
      EDT_PriceIOT = Calc_IOT(EDT_PriceBT20)
      END
      This code calls the Calc_IOT procedure to calculate the amount IOT. Two parameters are passed to the procedure: the price BT and the VAT rate. The result returned by the procedure is assigned to the EDT_PriceIOT control.
    4. Close the code window (click X at the top right corner of code editor).
  • Let's now run the window test:
    1. Run the window test ( Run the test of a window among the quick access buttons). Give a price BT. Select the different values in the Combo Box control and click "Calculate".
    2. The amount IOT is displayed.
    3. Close the test window.



DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
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 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4



https://youtu.be/zo3u0T3YcL8


Esse Ao Vivo vai estrear as 20:00 do dia 04/09/2020 SEXTA

Bom Dia/Boa Tarde/Boa Noite

DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
Tutoriel WINDEV : Leçon 2.4.d. Procédures - Facultatif ou obligatoire

ASSUNTOS:

Explicando procedure obrigatoria
mostrando erro quando nao preenche os parametros
alterando a procedure para ser opcional

https://windevdesenvolvimento.blogspot.com/2020/08/dicas-2992-windev-tutorial-15.html

https://doc.windev.com/en-US/?1410087517&name=lesson_24_the_procedures

Video original da Franca

https://youtu.be/n4-1bUTJm4E


Playlist Windev TUTORIAL

https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE














Mandatory or optional parameters?
The parameters received in the procedure can be mandatory or optional parameters. A mandatory parameter must be filled during the call to the procedure while an optional parameter can be omitted: in this case, it will take the default value defined when declaring the procedure parameters.
Remark
When declaring a procedure, the optional parameters are the last parameters (they are always specified after all mandatory parameters).
In the following example, the Multiplication procedure uses an optional parameter, Nb2. This optional parameter is indicated after the mandatory parameters, by specifying its default value. In this example, the default value of optional parameter is set to 10.
PROCEDURE Multiplication(Nb1 is intNb2 is int=10)
MyResult is int
MyResult = Nb1 * Nb2
RESULT MyResult
The code used to call the procedure is as follows:
res is int
res = Multiplication(6)
// Res is equal to 60



DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
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 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3



https://youtu.be/Lh99xH8rDHc


Esse Ao Vivo vai estrear as 20:00 do dia 03/09/2020 QUINTA


Bom Dia/Boa Tarde/Boa Noite

DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3

Tutoriel WINDEV : Leçon 2.4.c. Procédures - Référence ou valeur

ASSUNTOS:

1. CRIANDO PROCEDURE POR REFERENCIA
2. MOSTRANDO QUE A VARIAVEL DE PARAMETRO É ALTERADA
3. MOSTRANDO COMO NAO ACONTECER, USANDO LOCAL
4. achei MUITO LEGAL ESSE TUTORIAL, POR MUITAS VEZES NAO SABER SOBRE MEMORIA

https://windevdesenvolvimento.blogspot.com/2020/08/dicas-2991-windev-tutorial-14.html

https://doc.windev.com/en-US/?1410087517&name=lesson_24_the_procedures

Video original da Franca

https://youtu.be/H58TlmgTvFE


Playlist Windev TUTORIAL
https://www.youtube.com/playlist?list=PLwJwZaqiZW-lxU1XF0M0htb5S5f8pavuE

========================
  • The WLanguage code of the procedure is:
    PROCEDURE Test_Reference(P1)
    P1 = P1 * 2
  • The WLanguage code used to call the procedure is:
    T is int
    T = 12 // T is equal to 12 before the call
    Test_Reference(T)
    // T is equal to 24 after the call

  • Example:
    • The WLanguage code of the procedure is:
      PROCEDURE Test_value(LOCAL P1)
      // Local indicates that the parameter will be passed by value
      P1 = P1 * 2
    • The WLanguage code used to call the procedure is:
      T is int
      T = 12 // T is equal to 12
      Test_value(T)
      // T does not change















DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
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