-
Posts
166 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Events
Posts posted by robinhodemorais
-
-
Hello, how does it work or export dynamic grid, I didn't find demo and example how to use it in the forum.
-
I got....
function painted(sender, eOpts) { $('#'+sender.inputElement.id).mask("(99) 99999-9999"); }
-
got this link
https://cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.min.js
is inside the files folder and configured, see the image that it is also loading on the console.
-
an error has occurred
-
try the following format, download jquery.maskedinput.min.js and jquery.min.js, in custom files declared as not ClientEvents> UniEvents should not be placed beforeInit:beforeInit function (sender, configuration) { Ext.onReady (function () { $ ("#" + sender.id + "- inputEl"). mask ("(99) 9999-9999? 9"); }); }
but it didn't work, how can I do that?
-
it worked perfectly, thank you very much.
-
I have the StringGrid already configured to contain 24 columns and 40 rows through RowCount and ColCount of StringGrid, to write these values and make a query in my table and perform a loop in quary to pass the values to each cell of the stringgrid.
Anyway that is filled by the StringGrid, is there no way to change the height of the line? because passing this stringgrid.ColWidths [0] value: = 0; I can hide the column but passing stringgrid.RowHeights [0]: = 0; it does not change the Heights of line 0;
-
Just now, Sherzod said:
Do you mean the first two rows?
yes.
-
4 minutes ago, Sherzod said:
Can you please explain in more detail?!
For example, forming an image, without a red rectangle, is two lines of line grid, it is a line 0 and a line 1, how do I hide these lines? if I can pass the height: = 0 parameter how to do the width: = 0 columns, it would work, but we cannot change the height of the specific stringgrid line.
-
At this moment when we are entering, it would be a good option, we already have the client canceling the system and the values of the server windows are high to remain as affecting others too, Farshad as we are in this great evolution?
- 1
-
I have a report that I set up on StringGrid, because it got better on it with the manipulation of cores and data by cells, I have 2 first columns that already hide them by passing or colWidth: = 0; however, I need to do this in 2 lines as well, like the first two lines, they use their value for account reports, but they should not be visible to the user, so how can you hide these two lines?
A single alternative that is done for now changes the value of the blank, but it remains two lines of the string drop. -
Hello I managed to solve, I put the calls of js in html, thanks.
-
14 hours ago, azago said:
Starting an exe is a purely delphi language solution (no UniGUI).
It all depends on whether you need a return output from running the process.
In the latter case you have to use a semaphores management (also via file).However I have used it in UNIGUI in this way:
// call
var
NameExec : string;
NameFileJSON : string;
rc : word;
begin
// exec process
if dmDataset.ExecFile(NameExec, NameFileJSON, rc) then begin
// timer OnThreadTerminate type TUniTimer for file response
OnThreadTerminate.Enabled := True;
end;
end;// function in Datamodule
function TdmDataset.ExecFile(const sComand, sParameter : string; var rc : word) : boolean;
var
SI : TStartupInfo;
PI : TProcessInformation;
sCmd : string;
begin
Result := True;FillChar(SI, SizeOf(SI), 0);
SI.cb := SizeOf(SI);
SI.wShowWindow := SW_SHOWMINNOACTIVE;sCmd := sComand;
if sParameter > '') then sCmd := sCmd + ' ' + sParameter;if (Not CreateProcess(Nil, PChar(sCmd), Nil, Nil, False,
Normal_Priority_Class, Nil, Nil, SI, PI)) then begin
rc := GetLastError;
Result := (rc = 0);
exit;
end;CloseHandle(PI.hThread);
end;procedure OnThreadTerminateTimer(Sender: TObject);
var
FFolder : string;
Sr : TSearchRec;
FileDownload: string;
SearchStr : string;
begin
// Response dir
FFolder := IncludeTrailingPathDelimiter(UniMainModule.Configurazione.PathLocal);SearchStr := '*.json';
if SysUtils.FindFirst(FFolder + SearchStr, faAnyFile, Sr) = 0 then
begin
repeat
if Sr.Attr and faDirectory = 0 then begin
if UpperCase(ExtractFileName(ChangeFileExt(Sr.Name, ''))) = 'RESPONSE' then begin
// fistr disable
OnThreadTerminate.Enabled := False;// action business -- download -- other ---
UniSession.SendFile(IncludeTrailingPathDelimiter(UniMainModule.Configurazione.PathLocal) + ExtractFileName(Sr.Name), FileDownload);// send message
dmToast.Success('Download. Scarico eseguito.');Break;
end;
end;
until SysUtils.FindNext(sr) <> 0;
SysUtils.FindClose(sr);
end;
how do i call a stick or pass a command with that function you did?
-
Boa tarde,
O Unigui roda somente na web ou mobile, porém o que você poderia fazer é rodar o unigui standalone e criar um browser com o delphi abrindo o localhost:8077, dessa forma você terá um executavel chamando a aplicação.
- 1
-
-
-
Looking for how to run a stick with a single topic from that topic http://forums.unigui.com/index.php?/topic/3356-how-to-call-a-executable-file-on-server-side-within- unigui / where mhmda passes a procedure to execute, but I'm trying to implement it in my application and I'm not getting it ...
when I'm in the development environment running autonomously, I need to execute a stick that is at the root of the root, this type of stop starts the service node of the service, or what I notice is that it appears quickly or that closes but I I can see something.in the bat file is in the following configuration
Quotecd E: \ Delphi Projects \ socket
server.js nodebat name startNodeJS.bat
-
16 minutes ago, Farshad Mohajeri said:
You can review HTTP Basic Authentication demo for sample usage.
I saw Farshad here, but can I create an api with the post for these events?
-
5 minutes ago, Farshad Mohajeri said:
Hi,
They can bu used to capture incoming HTTP traffic into your uniGUI server. You can perform special tasks or ignore the incoming request. You can also use them to capture REST requests and handle them.
Thanks for the return Farshad ...
can I post?
have an example to help me? because I can't find anything -
someone please ?
Administrators?
Farshad? -
What are the functionality of ServerModule's onHttpDocument and onHttpCommand events?
Does anyone have any examples?
No example or demonstration was found ..... -
9 hours ago, JarekZ said:
const
SERVER_PORT='888';
SERVER_ROOT='api';type
TSQLRestServerTest = class(TSQLRestServerDB)published
procedure Sum(Ctxt: TSQLRestServerURIContext);
procedure MaxId(Ctxt: TSQLRestServerURIContext);end;
....
var
SerwerXL: TSerwerXL;
aModel: TSQLModel;
aProps: TSQLDBConnectionProperties;
aRestServer:TSQLRestServerTest;
aHttpServer: TSQLHttpServer;procedure TSQLRestServerTest.Sum(Ctxt: TSQLRestServerURIContext);
var a,b: double;
res: ISQLDBRows;
beginif UrlDecodeNeedParameters(Ctxt.Parameters,'A,B') then begin
while Ctxt.Parameters<>nil do begin
UrlDecodeDouble(Ctxt.Parameters,'A=',a);
UrlDecodeDouble(Ctxt.Parameters,'B=',b,@Ctxt.Parameters);
end;
Ctxt.Results([a+b],HTTP_SUCCESS,TEXT_CONTENT_TYPE_HEADER);end;
procedure TSQLRestServerTest.MaxId(Ctxt: TSQLRestServerURIContext);
var a,b: Integer;
res: ISQLDBRows;
id:Int64;
beginif UrlDecodeNeedParameters(Ctxt.Parameters,'idpos,rodzaj') then
begin
a:=Ctxt.InputInt['idpos'];
b:=Ctxt.InputInt['rodzaj'];
if (a<>0) and (b<>0) then
begin
res:=aProps.ExecuteInlined('Exec NSMaxNumer '+IntToStr(a)+','+IntToStr(b),true);Ctxt.Returns(res.FetchAllAsJSON(true),HTTP_SUCCESS,TEXT_CONTENT_TYPE_HEADER);
end
else
Ctxt.Returns('Error',HTTP_SUCCESS,TEXT_CONTENT_TYPE_HEADER);end else
begin
Ctxt.Returns('Error',HTTP_SUCCESS,TEXT_CONTENT_TYPE_HEADER);
end;end;
procedure TSerwerXL.ServiceStart(Sender: TService; var Started: Boolean);
begin
try
CoInitialize(nil);
SQLite3Log.Family.Level := LOG_VERBOSE;// STACKTRACE;
SQLite3Log.Family.PerThreadLog := ptIdentifiedInOnFile;aProps := TOleDBMSSQL2012ConnectionProperties.Create(AdresIP
,DataBase
,DBUser
,DBPassword);
aModel := DataModel(SERVER_ROOT);
VirtualTableExternalRegisterAll(aModel,aProps);
try
// create the main mORMot server
aRestServer := TSQLRestServerTest.Create(aModel,true);
// TSQLRestServerDB.Create(aModel,false); // authentication=false
try
// create tables or fields if missing
try
aRestServer.CreateMissingTables;
exceptend;
aRestServer.AcquireExecutionMode[execORMWrite]:=amBackgroundThread;
aProps.ConnectionTimeOutMinutes:=10;
aRestServer.DB.Synchronous:=smOff;
aRestServer.DB.LockingMode:=lmExclusive;aHttpServer := TSQLHttpServer.Create(SERVER_PORT,[aRestServer],'+',HTTP_DEFAULT_MODE,32,secSynShaAes);
try
aHttpServer.AccessControlAllowOrigin := '*'; // allow cross-site AJAX queries
finally
end;finally
end;finally
end;
finally
end;
Started:=true;
end;in uDataModel.pas
type TSQLSTORNO=class(TSQLRecord)
private
fID_KASJERA :INTEGER;
fID_TOWARU :Int64;
fILOSC :real;
fCENA :real;
fRODZAJ :RawUtf8;
fID_PARAGONU :Int64;
fID_POZYCJI :Int64;
fDATA :TDatetime;
fWYSLANE :INTEGER;
fID_POS :Integer;
published
property ID_KASJERA :INTEGER read fID_KASJERA write fID_KASJERA;
property ID_TOWARU :Int64 read fID_TOWARU write fID_TOWARU;
property ILOSC :real read fILOSC write fILOSC;
property CENA :real read fCENA write fCENA;
property RODZAJ :RawUtf8 read fRODZAJ write fRODZAJ;
property ID_PARAGONU :Int64 read fID_PARAGONU write fID_PARAGONU;
property ID_POZYCJI :Int64 read fID_POZYCJI write fID_POZYCJI;
property DATA :TDatetime read fDATA write fDATA;
property WYSLANE :INTEGER read fWYSLANE write fWYSLANE;
property ID_POS :Integer read fID_POS write fID_POS;
end;function DataModel(const RootURI: RawUTF8): TSQLModel;
function DataModel(const RootURI: RawUTF8): TSQLModel;
begin
result := TSQLModel.Create(TSQLSTORNO[ ],RootURI);
end;http://localhost:888/api/sum?a=1&b=2.44
or
http://localhost:888/api/storno
this is how it looks in general. Launched as a widows service together with unigui.
This will not work with hyperserverThanks for the help, you will do some tests, but it will not work with Hypper Server, you will not be able to put it into production, but in any case it will be used for studies .....
A doubt, do you know the features of the onHttpDocument and onHttpCommand events?
-
1 hour ago, JarekZ said:
What is the API supposed to do? Give a specific example of a function.
i need to set up an api that will receive a post, this post will be a json of some information
-
5 hours ago, MOGSY said:
This is very usful for many situations.
Regards
I really need it too and if the unigui naturally has this feature it will be fantastic, but I didn't find anything helping with these servermodule resources
Set opacity in uniPanel
in General
Posted
I tried to do the same in version 1531 but it didn't work ....