Page 1 of 2

IDE and variable

Posted: Fri Apr 11, 2014 1:34 am
by bzncrew
Sorry for all the newb questions.

I really like the IDE. It allows me to design my form with all its components.

However, when I try to set an initial VALUE to a variable, it changes it to a constant.

eg: VALUE cVar

Becomes VALUE "cVar"

Is there a way to change the IDE so it doesn't treat everything as a constant string in quotes?


--Russ

Re: IDE and variable

Posted: Fri Apr 11, 2014 2:36 am
by Javier Tovar
Hola,

Creo que no amigo!, incluso si modificas aparte el archivo *.FMG y después lo quieres modificar el IDE te lo cambia, entonces la forma de proceder es, has todo lo necesario en el IDE y después lo modificas aparte.

Saludos

Re: IDE and variable

Posted: Tue Apr 15, 2014 11:37 am
by luisvasquezcl
Hi,
you can write &cVar and out problem.
best regards,
Luis Vasquez.

Re: IDE and variable

Posted: Tue Apr 15, 2014 5:53 pm
by Javier Tovar
Hola Luis Vazquez,

Creo que bzncrew lo que quiere es que desde el IDE se pueda poner la sentencia cVar en el valor del Label, pero esto en el IDE lo pone como "&cVar" que sigue siendo una cadena de caracteres y no una variable.

Code: Select all

    DEFINE LABEL Label_2
        ROW    130
        COL    100
        WIDTH  120
        HEIGHT 24
        VALUE "&cValor"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL
Lo que le sugiero es que después de generar el Form con el IDE haga la modificación en el NotePad++.

Saludos

P.D.: Si estoy en un error hasmelo saber. :D

Re: IDE and variable

Posted: Wed Apr 16, 2014 11:56 am
by luisvasquezcl
Estimado
Prueba lo que estoy proponiendo. resulta.
Saludos cordiales,
Luis Vasquez

IDE and variable

Posted: Wed Apr 16, 2014 4:11 pm
by Pablo César
luisvasquezcl wrote:Estimado
Prueba lo que estoy proponiendo. resulta.
Saludos cordiales,
Luis Vasquez
Si Luis, tenés razón. Eso que indicaste, tiene que funcionar. Tu estás correcto y gracias por sugerirlo. Pero lo que Javier alega es que talvez el colega quiera es que la IDE interprete como variable en lugar de string.

Lo que pasa que para que esto ocurra, la IDE deberia detectar: si se trata de una variable o string. Porque la IDE SIEMPRE irá tratar-la como string.

Image
luisvasquezcl wrote:you can write &cVar and out problem.
..//..
It's works !

Luis Vasquez.
Yes Luis, you're right. What you have indicated, must work properly. You are correct and thank you for suggesting it. But what is that maybe Javier alleges the bzncrew colleague wants is that the IDE must be interpreted: as variable instead of string.

What happens is that for this to occur, the IDE should detect if it is a variable or string. Because the IDE will ALWAYS treat the as-string.

Re: IDE and variable

Posted: Wed Apr 16, 2014 4:15 pm
by Javier Tovar
Pablo César wrote:Si Luis, tenés razón. Eso que indicaste, tiene que funcionar. Tu estás correcto y gracias por sugerirlo. Pero lo que Javier alega es que talvez el colega quiera es que la IDE interpreta como variable en lugar de string. Lo que pasa que para que esto ocurra, la IDE deberia detectar, si se trata de una variable o string. Porque la IDE SIEMPRE irá tratar-la como string.
+1

Re: IDE and variable

Posted: Wed Apr 16, 2014 7:06 pm
by mol
In my opinion, it should stay as it is now.
It's good to do not mix definitions with code (problem with debugging wrong code).
You can always put this line after loading window:

Code: Select all

  Form_1.Label_2.Value := cVar
or

Code: Select all

  SetProperty("Form_1", "Label_2","Value", cVar)

IDE and variable

Posted: Wed Apr 16, 2014 7:31 pm
by Pablo César
There is not another way Marek... because there are many most important pendings to be solved in our IDE. Now we have to use like as:

Form_1.Label_2.Value := cVar

or

SetProperty("Form_1", "Label_2","Value", cVar)

or

DEFINE LABEL ...
     ROW ...
     COL ...
     WIDTH ...
     HEIGHT ...
     VALUE "&cValor"

For now, we only have to conform like as is now... :cry:

Re: IDE and variable

Posted: Wed Apr 16, 2014 7:42 pm
by Javier Tovar
Pablo César wrote: because there are many most important pendings to be solved in our IDE.
+1