picyka
-
Posts
1082 -
Joined
-
Last visited
-
Days Won
34
Content Type
Profiles
Forums
Events
Posts posted by picyka
-
-
-
4 horas atrás, sicoobcooplivre disse:
@SherzodFui testar a transmissão na versão atual, apenas para descobrir, e estou recebendo o erro: Leia o tempo limite
Você pode me dizer por quê?Você pode ignorar essa exceção
-
Solved, Thanks for the support.
-
Follow the example. Look at the code in the servermodule -> CustomMeta
Also note the code in the MainModule ExecuteTimerLigacao
Notice the ajax Event on UniFrame1 it never fires -
-
Any tips?
-
TUniFrameGerDadosPadrao = classe(TUniFrame)
TUniFrameGerDadosLigacoes = classe(TUniFrameGerDadosPadrao) -
16 minutos atrás, Sherzod disse:
Olá
Você quer dizer HTMLFrame?
TUniFrame
-
What would be the correct way to trigger the ajaxRequest for a frame?
top.ajaxRequest(UniFrameGerDadosLigacoes0, '_call', ['value=true']);
not work.
-
4 minutes ago, Sherzod said:
Need to set to True...
Doesn't work either, well I'll keep using my workaround.
-
with TUniFormVisualizarTarefa.Create(UniApplication) do begin try ShowForm(lTarefa,lTarefaController); finally Free; end; end;
-
procedure TMainForm.UniTimerTarefasTimer(Sender: TObject); begin UniTimerTarefas.Enabled := False; if UniMainModule.GetFormInstance(TUniFormVisualizarTarefa, False) = nil then Self.LoadTarefas(False); end;
This validation is done within the timer, the FreeOnClose is already set to false.
-
Is there a way to know if a given form is open?
if UniMainModule.GetFormInstance(TUniFormVisualizarTarefa, false) then
I tried this rule but it didn't work. -
function hasTask(host, token) { try { var Http = new XMLHttpRequest(); Http.open("GET", host, false); Http.setRequestHeader('Authorization', 'Bearer ' + token); Http.send(); if (Http.status == 200) { console.log('Buscado tarefa...'); if (Http.responseText.includes("true")) { top.ajaxRequest(top.MainForm.form, '_task', ['value=true']); } } } catch (err) { console.log('Erro Tarefa:' + err); } };
procedure TUniMainModule.ExecuteTimerTarefa; begin {180000 - 3 MINUTOS} try var lUrl := Self.URL_EX_API + 'END POINT'; var lJsString := 'var TimerTarefa = setInterval(function () {hasTask(' + QuotedStr(lUrl) + ',' + QuotedStr(Self.TOKEN_API) + ');}, 180000);'; UniSession.JSCode(lJsString); except on E: Exception do TMessageUtils.Error(E.Message); end;
procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if SameStr(EventName, '_task') then begin TToastUtils.Aviso('Tarefa encontrada, ja vou te mostrar!', False, 'Aviso de Tarefa',8000); UniTimerTarefas.Enabled := True; end; end;
I will post here my solution, as I use API it became easier to solve.
Ajax only fires when it's really needed.
- 1
-
-
I have a team that checks every 5 minutes to see if there is any task to display on the screen.
These timers are dangerous to use because the session may not expire.
Is there any way to take care of this? Another situation, the ChainMode property from my research, this option checked only runs the timer if there is no event being processed, would that be it?
Would it be good to use it in these situations? -
ServerModule->CustomMeta
It's working- 1
-
I have some functions in a js file included in CustomFiles,
it works perfectly.
I would like to put these functions in MainForm.Script but there I had no result.
async function copyText(texto) { try { await navigator.clipboard.writeText(texto); } catch (err) { console.error('Failed to copy: ', err); } }; async function pasteText(jsName) { navigator.clipboard.readText().then(texto => { let cmd = jsName + ".setValue('" + texto + "');"; eval(cmd); }); };
-
Would anyone have any tips?
-
No dia 3/7/2023 às 2:44, Farshad Mohajeri disse:
Há problemas quando o HyperServer é usado. Estamos nos dirigindo a eles. A compilação 1566 está chegando. Há algumas informações faltantes no documento. Tudo será corrigido.
🙏
-
On 3/3/2023 at 2:59 PM, Sherzod said:
Hello,
How is it focused?
It would be the same action as the SelectOnFocus property from UniDBFormattedNumberEdit component.
-
24 minutos atrás, Farshad Mohajeri disse:
Há problemas quando o HyperServer é usado. Estamos nos dirigindo a eles. A compilação 1566 está chegando. Há algumas informações faltantes no documento. Tudo será corrigido.
Is it coming this week?
-
On 11/12/2021 at 1:06 PM, Antonio said:
Very useful, thank you so much for sharing @Hayri ASLAN!!!
The filter is perfect but I have a problem with selection.
1. When I select the first record of the unfiltered grid, I correctly get the ID associated with the first record.
2. Then I filter the ID column by excluding the first record (ID filter: > 1)
3. The problem is that by selecting again the first row of the filtered grid I get the previous value (ID = 1) instead of the correct one (ID = 2).
However, if I select the second row and then again the first, the result is ok.
I tried very hard to fix this behavior but I couldn’t find even a dirty workaround.
In attachment the project I used to replicate this problem.
I am using Delphi 10.2 and UniGui version 1.90.0 build 1545.
Please, any help will be appreciated!!!
Thank you!
UniGuiFilterDBGrid_selection_bug_demo.zipUnavailable
UniGuiFilterDBGrid_selection_bug_demo.zip 60.92 kB · 15 downloads
It would be really cool if this filter options came native to the grid
-
7 minutos atrás, Sherzod disse:
Olá
Como é focado?
When the field gets focus I wanted to select the whole number for easy editing
uNativeXLSExport
in General
Posted
Hi, it's me again.
Does anyone have problems with excel staying in protected mode?