There is an error in the dialogue

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

There is an error in the dialogue

#1 Post by Eugene Lutsenko »

There is an error in the dialogue:
to fragment "dialog 13 'everything works fine, but on this fragnmente an error:

Code: Select all

                @ 0,0 DCGROUP oGroup1 CAPTION 'Задайте параметры синтеза модели:' SIZE 88, 22
                
                PUBLIC Arg_MinV := 0, Arg_MaxV := 360, Arg_Delta := 1
                Mess1 = 'Начальное значение аргумента:'
                Mess2 = 'Конечное  значение аргумента:'
                Mess3 = 'Шаг изменения аргумента:'
                @ 1, 1 DCSAY Mess1 PARENT oGroup1
                @ 2, 1 DCSAY Mess2 PARENT oGroup1
                @ 3, 1 DCSAY Mess3 PARENT oGroup1
                @ 1,40 DCSAY "" GET Arg_MinV  PARENT oGroup1 PICTURE "###############"
                @ 2,40 DCSAY "" GET Arg_MaxV  PARENT oGroup1 PICTURE "###############"
                @ 3,40 DCSAY "" GET Arg_Delta PARENT oGroup1 PICTURE "#######.#######"

*********************************
* Diaolog 13

                PUBLIC Ampl := 1
                Mess = 'Начальная амплитуда свип-сигнала:'
                @ 5, 1 DCSAY Mess PARENT oGroup1
                @ 5,40 DCSAY "" GET Ampl PARENT oGroup1 PICTURE "###############"
Image

Than it can be caused and how to fix it?

Line at which this error occurs:
@ 5, 1 DCSAY Mess PARENT oGroup1

Wolfgang Ciriack
Posts: 484
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: There is an error in the dialogue

#2 Post by Wolfgang Ciriack »

Try to change the var to Mess1.
_______________________
Best Regards
Wolfgang

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: There is an error in the dialogue

#3 Post by Eugene Lutsenko »

Wolfgang Ciriack wrote:Try to change the var to Mess1.
Thank you!
Cool, but your advice all happened. And what, you can not use a variable Mess?

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: There is an error in the dialogue

#4 Post by Tom »

"MESS(AGE)" is a reserved keyword. The PP tries to interpret this.

Besides, if a DCSAY ... GET doesn't have a SAY portion, you may do this:

Code: Select all

@ 1,1 DCGET nValue PROMPT ... 
All options like SAYSIZE, SAYFONT, GETSIZE a.s.o. work without the prefixes SAY/GET then (@ 1,1 DCGET nValue SIZE 10,1 ...)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: There is an error in the dialogue

#5 Post by rdonnay »

This is one of the limitations of the pre-processor.

A simple workaround is to place the variable in parenthesis.

Code: Select all

#INCLUDE "dcdialog.ch"

FUNCTION Main()

LOCAL GetList[0], mess := 'Message', oGroup

@ 0,0 DCGROUP oGroup SIZE 10,10

@ 1,1 DCSAY (mess) PARENT oGroup

DCREAD GUI FIT TITLE 'Message test'

RETURN nil

PROC appsys ; return
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: There is an error in the dialogue

#6 Post by Eugene Lutsenko »

Clearly, thanks!

It's funny that there are such moments, and the compiler does not issue in such cases any reasonable comments, which would allow the developer himself to figure out what's wrong and what to do

Post Reply