-
Posts
170 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Posts posted by AntonioCuomo
-
-
-
Unfortunately I return to the problem that I thought solved. Scenario: There are two applications on the server (with different ports). The first desktop version, the other mobile version.
After a (random) time, the error is signaled: Could not lok session and the application remains blocked.
The desktop version has 5 or 6 active clients while the mobile version 20, 30 logins.
The version of unigui is the last version.
If I close the application it is not removed from the activities and I have to do it manually.
in log:
TwMobile.exe: 00001B44: 19:15:40 [127.0.0.1]:Processed: Id: 6720, Evt: timer, [9vzvtc2ELi10A5B6B33]
TwMobile.exe: 00001B44: 19:15:40 [127.0.0.1]:Processing: Id: -1, Evt: timer
TwMobile.exe: 00001B44: 19:15:40 [127.0.0.1]:Processed: Id: -1, Evt: timer, [9vzvtc2ELi10A5B6B33]
TwMobile.exe: 00001B74: 19:16:46 [127.0.0.1]:Failed Sequence Recovery: SeqId: 6727, Event: timer
TwMobile.exe: 00001B74: 19:16:48 [127.0.0.1]:Sequence sent from cache: SeqId: 6727
TwMobile.exe: 00001B74: 19:16:48 [127.0.0.1]:Processed: Id: 6727, Evt: timer, [9vzvtc2ELi10A5B6B33]
TwMobile.exe: 00001B74: 19:16:48 [127.0.0.1]:Processing: Id: -1, Evt: timer
TwMobile.exe: 00001B74: 19:16:48 [127.0.0.1]:Processed: Id: -1, Evt: timer, [9vzvtc2ELi10A5B6B33]
TwMobile.exe: 00002A88: 19:17:53 [127.0.0.1]:Failed Sequence Recovery: SeqId: 6734, Event: timer
TwMobile.exe: 00002A88: 19:17:56 [127.0.0.1]:Sequence sent from cache: SeqId: 6734
TwMobile.exe: 00002A88: 19:17:56 [127.0.0.1]:Processed: Id: 6734, Evt: timer, [9vzvtc2ELi10A5B6B33]
TwMobile.exe: 00002A88: 19:17:56 [127.0.0.1]:Processing: Id: -1, Evt: timer
TwMobile.exe: 00002A88: 19:17:56 [127.0.0.1]:Processed: Id: -1, Evt: timer, [9vzvtc2ELi10A5B6B33]Unfortunately I cannot identify the problem and this is creating a lot of problems for me with the customer ...
I have recompiled the applications several times but the problem remains.
One note from November 2021 to March has always worked well.
What can I do?
TwMobile.exe: 00001EB0: 19:19:01 [127.0.0.1]:Failed Sequence Recovery: SeqId: 6741, Event: timer -
I think I have solved. Reboot the server ...
-
3 hours ago, Sherzod said:
Note we are using this code at the end:
....getWin().getSelection().removeAllRanges()
j have this code
JSCall('relayCmd', ['selectAll']);
JSCallDefer('relayCmd', ['copy'], 200);
JSCode('Ext.defer(function(){ajaxRequest('+ JSName +', "getSelection", ["selectedText="+'+ JSName +'.getWin().getSelection().getRangeAt(0).toString()]); '+ JSName +'.getWin().getSelection().removeAllRanges()}, 600);'); -
I resume the post with the reported error. Unfortunately, the whole application blocks me and all users (5 or 6) cannot access the main menu functions.
It is a very serious problem as the client has several operators working. the application worked well for months now.Only change: inclusion of Tidimap component to read mails (which works). the component was added on a form. Previously using a Tidpop3 this component was on the server module
-
I made the change but am forced to reclick on unihtmlmemo to deselect the text
-
I have also updated unigui to the latest version but there is always the message that I cannot block the session.
Any suggestions? -
after saving in the clipboard tunihtmlmemo remains selected. Is it possible to deselect the text?
-
Perfect. you are great, thank
-
I have html text in Tunihtmlmemo and I want to copy it back to Tunimemo without the HTML tags. with the Keys Ctrl-A and Ctrl-V in Tunihtmlmemo and then with Ctrl-V in unimemo I get what I wanted. These operations must be performed by a Button event.
scheme:
Tunimemohtml.selectall;
Tunimemohtml.copytoclipborad;
Tunimemo.lines.loadfromclipboard;
It doesn't matter if it runs server-side or client-side.
-
J have modified the code with thtmlframe:
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
spdCopy.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
' { '+
' var textarea = document.getElementById("'+ UniHTMLFrame1.JSName +'_id-iframeE1"); '+ //'_id-inputEl"); '
// ' textarea.select(); '+
' try { '+
' var successful = document.execCommand(''copy''); '+
' if(successful) {var text=textarea.value; ajaxRequest(sender, "customEvent", {name: text})} '+
' else {var text = ''Unable to copy!''; ajaxRequest(sender, "customEvent", {name: text})} '+
' } catch (err) { '+
' var text = ''Unsupported Browser!''; ajaxRequest(sender, "customEvent", {name: text})'+
' } '+
' }';
end;but display this message:
-
17 minutes ago, Sherzod said:
Okay, thanks.
I will try to check a bit later.
thank
-
I attach simple test case
-
with tunimemo run ok. with unidbhtmlmemo not run.
-
i changed the code and it works (with tuniedit). On the form I added a Thtmlmemo and modified the code by changing the name from edttext to htmlmemo1. The event is not detected and the copy does not work.
procedure TMainForm.spdCopyAjaxEvent(Sender: TComponent; EventName: string;
Params: TUniStrings);
begin//showmessage(EventName);
if SameText(EventName, 'customEvent') then begin
ShowMessage(Params['name'].AsString + ' ' + Params['width'].AsString);
// sashow(sa, params['name'].AsString, NIL, atInfo, 'OK', '', 'Information');
end;end;
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
spdCopy.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
' { '+
' var textarea = document.getElementById("'+htmlmemo1.JSName+'_id-inputEl"); '+
' textarea.select(); '+
' try { '+
' var successful = document.execCommand(''copy''); '+
' if(successful) {var text=''Copied!''; ajaxRequest(sender, "customEvent", {name: text})} '+
' else {var text = ''Unable to copy!''; ajaxRequest(sender, "customEvent", {name: text})} '+
' } catch (err) { '+
' var text = ''Unsupported Browser!''; ajaxRequest(sender, "customEvent", {name: text})'+
' } '+
' }';
end; -
Basically I want to copy the text displayed by dbhtmlmemo into a unimemo. if I do it manually with ctrl-A, ctrl-C and ctrl-V it works perfectly as I expected. the idea is to use a button to automate the operation, it can also be performed only on the server.
-
On 4/19/2022 at 4:33 PM, AntonioCuomo said:
i need to copy the contents of unidbhtmlmemo and i tried the code proposed above but it doesn't work. With the testcase downloaded with uniedit it works but replacing it with the memo doesn't work.
procedure TMainForm.UniFormCreate(Sender: TObject);
beginspdCopy.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
' { '+
' var textarea = document.getElementById("'+memo1.JSName+'_id-inputEl"); '+
' textarea.select(); '+
' try { '+
' var successful = document.execCommand(''copy''); '+
' if(successful) console.log(''Copied!''); '+
' else console.log(''Unable to copy!''); '+
' } catch (err) { '+
' console.log(''Unsupported Browser!''); '+
' } '+
' }';
end; -
no... never
-
what is this error?
-
Fixed mancava re-reading the message:
//------------------------------------------------------
// Legge body
//------------------------------------------------------
IdIMAP41.UIDRetrieve(TheUID, MSG);
MSG.MessageParts.CountParts;
pp := msg.MessageParts.TextPartCount;
try... -
I try to read the content of the emails downloaded with tidimap4:
//--------------------------------------------------------
for i := 0 to TCount-1 do
begin
IdIMAP41.GetUID(i+1, TheUID);
IdIMAP41.UIDRetrieveFlags(TheUID, TheFlags);
IdIMAP41.UIDRetrieveHeader(TheUID, MSG);
MSG.MessageParts.CountParts;
pp := msg.MessageParts.TextPartCount;
if NOT (mfSeen in TheFlags) then
begin // UnRead message!
if not(FDTHeader.FindKey([MSG.MsgId])) then
begin
//------------------------------------------------------
// Legge body
//------------------------------------------------------try
if pp > 0 then
begin
for var k := 0 to msg.MessageParts.Count - 1 do
begin
if msg.MessageParts[k] is TIdText then
begin
S := S + TIdText(msg.MessageParts[k]).Body.Text;
endelse
begin
s := msg.body.text;
end;
end;
end;
finally
bodytext := s;with vcl application it works fine, but with unigui I can't read the number of parts of the message.
In practice the function msg.messageparts.countparts in unigui gives me as a result 0. -
Mea culpa: Wrong file name in the table.... sorry
-
This works perfectly :
procedure TMainForm.UniButton1Click(Sender: TObject);
var s1 : string;
begin
UniHTMLFrame1.HTML.Clear;
unilabel1.Caption := Format(s,[fdtable1Voce.asstring]);
s1 :='13882870_1645790550.mp3'; //fdtable1Voce.asstring ;
UniHTMLFrame1.HTML.Text := Format(s,[s1]);end;
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
s:= '<audio controls autoplay id="player3" src="files/%s"></audio>';
end;Instead this doesn't work:
procedure TMainForm.UniButton1Click(Sender: TObject);
var s1 : string;
begin
UniHTMLFrame1.HTML.Clear;
unilabel1.Caption := Format(s,[fdtable1Voce.asstring]);
s1 := fdtable1Voce.asstring ; //'13882870_1645790550.mp3';
UniHTMLFrame1.HTML.Text := Format(s,[s1]);end;
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
s:= '<audio controls autoplay id="player3" src="files/%s"></audio>';
end;from debug both htmlfram1.htm.text of the first example and that of the second are the same ...
the idea is to have a table with the mp3 file name and have the reading by passing the filename field.
-
In this case the customer must be connected...
Serious problem with sessions
in General
Posted
This is log Mobile
A2022-05-06_MObile.log