Search the Community
Showing results for tags 'listener'.
Found 2 results
So, I have a customer that copy/paste info on the memo that a client of his always send to them whenever they want to buy something. Problem is, this info is separated by line breaks, and my client doesn't want it to. I saw a lot of techniques using event listeners and alikes but I couldn't figure out how to make it work with unigui. This is a js fiddle that I found (changed a bit) with exactly how I want my memo to behave. I don't know, nor did I found out, how to translate this to use in unigui and where/when to put it. My application is desktop based.
andyhill posted a topic in uniGUI MobileI have searched the forum and found some entries that dont' work for me (Self.OwnerWebForm.JSInterface etc. I want to add a Listener to a form, simulate the event call (in code) and then catch the event and do something - please advise - thanks. // Listener procedure TMainmForm.UnimFormReady(Sender: TObject); begin //Self.OwnerWebForm.JSInterface.JSAddListener('camera', JSFunction('me', 'var frmWin=' + MainmForm + '.window; ajaxRequest(frmWin, "_photo", )')); MainmForm.JSInterface.JSAddListener('camera', JSFunction('me', 'var frmWin=' + MainmForm + '.window; ajaxRequest(frmWin, "_photo", )')); end; ... // Simulate UniSession.AddJS('Ext.form.Panel.form.ajaxCallback(MainmForm, ''_Photo'');'); ... // Catch procedure TMainmForm.UnimFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if SameText(EventName, 'camera') then begin // do something here if 'camera' end; if SameText(EventName, '_photo') then begin // do something here if '_photo' end; end;