Jump to content

docjones

uniGUI Subscriber
  • Posts

    117
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by docjones

  1. Same problem.

     

    i'm doing a new proyect that allow payments with paypal and credit cards.  

    it's stay at initial state, but the main problem is do the payment ,capture the paypal response and integrate it width unigui application.

     

    there are several ways to do this, like using an asp.net or php script that do capture the payment and store the result on a database.

    Peharps best method is using a thirty party components like http://www.nsoftware.com/ibiz/paypal/technologies.aspx?sku=bld5-a to control the payment.

     

    Some advice will be appreciated.

  2. In unigui applications, each user session can't share same vars/objects, becouse each user session have her own thread, then better way is create ojects/vars into unimainmodule.

     

    Remove ClientModule1 from autocreate, declare public var on mainmodule class, and create it on mainmodule.oncreate

     

    procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);
    begin
     Client:=TClientModule1.Create(self);
    end;

     

    then, in mainform you must access UnimainModule.Client

     

    Procedure TMainForm.UniBitBtn1Click(Sender: TObject);
    var
     i,x: Integer;
    begin
     UniListBox1.Clear;
     for I := 1 to 10 do begin
       x:= UniMainModule.Client.ServerMethods2Client.RetValue(i);
       UniListBox1.Items.Add(IntToStr(x));
     end;
    end;

  3. 404 it's a generic error that webservers send when file page not found.

     

    using IIS you can personalize your own error page message.

     

    But if your are not using IIS, you need know that unigui use a indy's http server modified version.

     

    for doing this, simplest solution is modify the \UniGUI\uIndy\uIdCustomHTTPServer.pas, catch the error after FOnCommandGet event, and put your html code or load it from file.

     

    it's not best elegant solution, but it works !

     

    procedure TIdCustomHTTPServer.DoCommandGet(AContext: TIdContext;
     ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
    begin
     if Assigned(FOnCommandGet) then begin
       FOnCommandGet(AContext, ARequestInfo, AResponseInfo);
       if AResponseInfo.ResponseNo=404 then
         AResponseInfo.ContentText:='PUT YOUR HTML CODE HERE';
     end;
    end;
    

  4. Hi all.

     

    If i call to unifileupload.execute, it open's a new Uniform dialog, then user need click a button to browse file and when selected, then click to another button to upload.

     

    It's possible do this in one operation without intermediate uniform dialog?

     

    example, calling unifileupload.run, user browse file, and then when user select browsed file, file will be uploaded automatically.

     

    i'm trying to do this, accessing UniSession.FormsList.Last,and calling the buttons, but cant see the way.

     

    UniFileUpload1.Execute;
    F:=TUniForm(UniSession.FormsList.Last);
    F.Hide;
    //how to do that ?
    //F.SelectButton.Click;
    //F.UploadButton.Click;
    

     

     

    thanks.

  5. This can not be done with unigui. You need use Indy, or another http/sockets library

     

     

    procedure TForm1.Button1Click(Sender: TObject);
    var
     http: TIdHttp;
     params: TStrings;
     Response: string;
    begin
     http := TIdHTTP.Create(Self);
     params := TStringList.Create;
     try
       params.Add('var1=value1');
       params.Add('var1=value2');
       Response := http.Post('http://dec.clubdelphi.com/temporales/pruebas-post.php', params);
       ShowMessage('Response: ' + Response);
     finally
       http.Free;
       params.Free;
     end;
    end;

  6. It is related to way browser handle images. Some browsers clear the image place holder before loading a new one.

     

    Instead of uniImage you can use TUniCanvas to render images. It should resolve flickering.

     

    thaks Farshad , but using unicanvas, painting every 100ms, cpu goes 100% and it's too slow. i will try with some html/javascript or ussing an applet and load on uniurlframe.

     

    thanks.

  7. Hi

     

    I'm loading a secuence of images on unimage (from a camera ip) , but a molest flicker is produced when loading the image. tested with iexplorer 9, and firefox.

     

    in my uniapplication, i have a unitimer (interval=100), that get jpg frame from a remote camera ip, and load it on a unimage, but a molest flicker produced.

    same problem using UniImage1.Picture.Assign(JpeGImg) or using uniImage1.url=xxx.

     

    ¿ any sugestion to remove the molest image flicker ?.

    //my code.
    Procedure TFramePreviewCore.GetFrame2; 
    var url:string;
    Begin
       URL:='http://localhost:'+IntToStr(RemoteHttpPort)+'/image.cgi'+'?random='+inttostr(Random(200000));
       UniImage1.Url:=url;
    End;
    
    procedure TFramePreviewCore.UniTimer1Timer(Sender: TObject);
    begin
       try GetFrame2; except end;
    End;
    

     

     

    thanks.

  8. you can't not do it on client. client browser segurity dont allow it.

     

    in spanish, sorry bad english.

     

    no puedes ejecutar un archivo directamente en el navegador cliente, pero puedes generar un link html en un label y que el usuario se descargue y ejecute el programa. Busca en el foro porque esto ya se ha preguntado y respondido un monton de veces.

  9. I think that if you want more control segurity, create unigui as ISAPI, and use ISS.

     

     

    i don't kwnow if it's possible, but if you need unigui app as service and you don't want use ISS, perhaps you can create a windows user, start service with this user, and grant file permissions to this user only for the files/folders that you allow to access.

  10. I know there is a solution of Callback for Dialogs. But how to show the forms in sequence?

     

    procedure TFrmClientFindPages.BtnClick(Sender: TObject);

    begin

    Form1.ShowModal;

    Form2.ShowModal;

    end;

     

     

    Thanks for your answer!

     

    Same method

     

    define a funcion on TfrmClient that will be the callbacks like

     

    Procedure TFrmClient.Callback1(ModalResult:Integer);
    Begin
    If ModalResult=MrOk then Form2.ShowModalCallback(callback2);
    else Donothing;
    End;

     

    and pass it on a new function when call form1.

     

    Form1.ShowModalCallback(Callback1);
    

     

    then, when form1 onclose, call to callback.

     

    see this

     

    http://forums.unigui.com/index.php?/topic/1473-modal-forms-how-to/page__p__5588__hl__showmodal__fromsearch__1#entry5588

  11. You can use another vcl componentes on unigui applications, but they not show on unigui client web interface, becouse then run on server, and not on web client. Only unigui components can show on web client interface.

     

    For load an url on unigui app, use uniframeurl.

  12. you must provide a link, in a label, then user must be click, and download & execute downloaded application.

     

       
    Var s:string
    Begin
     s := ServerModule.LocalCache + 'Myfile.exe';
     UniLabel12.Caption := '<a href="'+s+'" target=_blank>Download File</a>';
    End;
    

     

    another solution is creating an activex, embedded on an html, and load it on an uniurlframe, but this only work on iexplorer.

  13. i think that simple way is

     

    - capture codebar image file on client side (don't know how you do that, and it can be the problem).

    - upload captured file to the server using tunifileupload and store it on temp server folder.

    - on uploadfile, server process the uploaded file image, using FineOCR (using com, activex,etc) , and show result to the client.

     

     

    if you are using a usb/keyboard codebar scanner on client side, you only need capture keyboard keys and don't need process the image file with FineOCR.

    what kind of device are you using to capture image codebar ?.

  14. Just do what you would do in a regular VCL app. Use findfirst, findnext, etc.. There are no shell components in uniGui.

     

    Yes, but this only get server files (where unigui application is running).

    and we want browse client files. :(.

×
×
  • Create New...