Error after calling the DC_GetRefresh() function

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:

Error after calling the DC_GetRefresh() function

#1 Post by Eugene Lutsenko »

An error occurs after accessing the DC_Get Refresh() function. I don't understand something and I'm doing it wrong. Tell me?

Code: Select all

@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| TXTtoBMPMess(cOutString),               DC_GetRefresh(GetList) }
* * * * * * 
DCGETOPTIONS SAYWIDTH 76 SAYRIGHTBOTTOM

DCREAD GUI FIT TITLE '(C°) Crypton-messenger' ;
   OPTIONS GetOptions ;
   EVAL {||PostAppEvent(xbeP_Activate,,,oButton)}
Attachments
Безымянный.jpg
Безымянный.jpg (95.33 KiB) Viewed 2146 times

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

Re: Error after calling the DC_GetRefresh() function

#2 Post by Wolfgang Ciriack »

Seems, that in your Getlist is a var, that is not initialised correct or the value of that var is changed to a wrong type somewhere in your dialog
(DCMULTILINE ?)
_______________________
Best Regards
Wolfgang

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

Re: Error after calling the DC_GetRefresh() function

#3 Post by rdonnay »

You must make sure that the variable bound to the DCMULTILINE (XbpMle) is a character string.
Somewhere in your code you are changing that value.
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: Error after calling the DC_GetRefresh() function

#4 Post by Eugene Lutsenko »

I tried to use DC MULTI LINE as a simple text line editor. A number of functions are called from this editor that can change this line. It turns out, but the above error occurs. Is this how it should be if I change the line outside of DC MULTI LINE? Maybe try using another function like MemoEdit()?

Code: Select all

************************************************************************************************
********* Простой текстовый редактор для работы с сообщениями: Crypton-messenger
************************************************************************************************
FUNCTION Messenger()
LOCAL cText, GetList[0], GetOptions, nWidth, cFont, cOutString, oMemo, oButton

************************************************************************************************
***** Текстовый редактор сообщений *************************************************************

CrLf   = CHR(13)+CHR(10)     // Конец строки (записи)

IF .NOT. FILE('Message.txt')
   cOutString = REPLICATE('=',170)                                                  + CrLf +;
               'Это файл сообщения, которое можно зашифровать и послать в облако.'  + CrLf +;
               'Дата и время сообщения: '+DTOC(DATE())+"-"+TIME()                   + CrLf +;
                REPLICATE('=',170)                                                  + CrLf
   StrFile(cOutString, 'Message.txt')                         // Запись файла обсуждения в папку Inp_data
ELSE
   cOutString = ALLTRIM(FILESTR('Message.txt'))               // Считывание файла обсуждения для редактирования
   cOutString = cOutString + CrLf + CrLf + REPLICATE('-',25)+DTOC(DATE())+"-"+TIME()+REPLICATE('-',126)   + CrLf
ENDIF

cFont  = Pad('12.Courier',40)
nWidth = 1500

@2.7, 0 DCMULTILINE cOutString  SIZE 248,40 FONT Alltrim(cFont) OBJECT oMemo

d = 5
w = 2

mStr = IF(mLanguage=1,'Помощь','Help')
@43.3, 0           DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := MessHelp(),               DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Создать ключ','Create key')                                                                                      
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := CreateKey(),              DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Показать ключ','View key')                                                                                       
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := ViewKey(),                DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Каталог сообщений','Message catalog')                                                                            
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := HypLinksMess(),           DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Стереть','Erase')                                                                                                
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := Erase(),                  DC_GetRefresh(GetList) }  
mStr = IF(mLanguage=1,'Зашифровать в TXT','Encrypt in TXT')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := CryptonMess(cOutString),  DC_GetRefresh(GetList) }   
mStr = IF(mLanguage=1,'Закодировать в BMP','Encode in BMP')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| TXTtoBMPMess(cOutString),               DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Показать BMP','View BMP')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| ViewBMP(),                              DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Записать в облако','Write to the cloud')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| SaveCloud(cOutString),                DC_GetRefresh(GetList) }
*********************************
mStr = IF(mLanguage=1,'Скачать из облака','Download from the cloud')
@43.3, DCGUI_COL+d+20 DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w, 1.5 OBJECT oButton ACTION {|| cOutString := LoadCloud(),             DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Форматировать текст','Format Text')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {||cOutString := DC_FormatMemoToWidth(cOutString,248,cFont), DC_GetRefresh(GetList), oMemo:setFontCompoundName(Alltrim(cFont))}
mStr = IF(mLanguage=1,'Расшифровать из TXT','Decrypt from TXT')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := DecipherMess(),           DC_GetRefresh(GetList) }
mStr = IF(mLanguage=1,'Расшифровать из BMP','Decrypt from BMP')
@43.3, DCGUI_COL+d DCPUSHBUTTON CAPTION mStr SIZE LEN(mStr)+w,    1.5 OBJECT oButton ACTION {|| cOutString := BMPtoTXTMess(),           DC_GetRefresh(GetList) }
*********************************
*DCGETOPTIONS SAYWIDTH 76 SAYRIGHTBOTTOM
DCREAD GUI FIT TITLE '(C°) Crypton-messenger' ;
   OPTIONS GetOptions ;
   EVAL {||PostAppEvent(xbeP_Activate,,,oButton)}
************************************************************************************************
RETURN NIL
************************************************************************************************

Post Reply