Jump to content

DidierXT

Members
  • Content count

    50
  • Joined

  • Last visited

About DidierXT

  • Rank

Profile Information

  • Gender
    Male

Business

  • Sector
    Information technology

Smart Mobile Studio

  • Edition
    Enterprise

Recent Profile Visitors

147 profile views
  1. DidierXT

    RemObjects and WebWorkers

    Seems the RO interface need an update following changes in RTL files organization. To be able to execute run a TWebWorkerThread, I had to remove SmartCL.System and W3System units from RemObjectsSDK.pas Unknown "window" error. But now calling RO services still fail with this message: Uncaught ReferenceError: RemObjects is not defined
  2. DidierXT

    Using WriteLn in WebWorkerThread

    SmartCL.System is required to use WriteLn. But this unit is not allowed inside a WebWorkerThread unit. Is there another way to output logs?
  3. I didn't find where to customize colors for block delimiters: begin, end, (, [, { Also "lambda" is not included, neither associated with "end".
  4. DidierXT

    File tabs

    Better distinguish the active tab.
  5. DidierXT

    WebWorker project template

    Change the default Javascript file name to worker.js
  6. DidierXT

    WebWorker demo

    Excellent, works fine! A suggestion for our better understanding (and for the fun): Add a "Disconnect" button. procedure TForm1.W3Button1Click(Sender: TObject); begin // if not properly destroyed // the worker thread may continue its life in parallel of new ones // and still report its work! FWorker := nil; EnableButtons; end;
  7. DidierXT

    Working with images in the file system? 

    Was the previous code (with asm) worked for you? Can you try into TForm1.InitializeForm?
  8. DidierXT

    Working with images in the file system? 

    W3C.File
  9. DidierXT

    Working with images in the file system? 

    And shorter without asm: edPhoto1.InputType := itFile; edPhoto1.Handle.ReadyExecute( procedure () begin w3_setAttrib(edPhoto1.Handle, 'accept', 'image/*'); w3_setAttrib(edPhoto1.Handle, 'capture', ''); edPhoto1.OnChanged := procedure(sender:TObject) begin var reader := JFileReader.Create; reader.onload := lambda imgPhoto1.handle.src := reader.result; end; reader.readAsDataURL(JBlob(edPhoto1.handle.files[0])); end; end);
  10. DidierXT

    WebWorker demo

    I've updated to 3.0.0.206 yesterday. I've also deleted WebWorker directory and updated again. Only manipulation is: copy worker.js from \output to \www folder.
  11. DidierXT

    WebWorker demo

    worker.js:3422 Uncaught ReferenceError: window is not defined (anonymous) @ worker.js:3422 InitAnimationFrameShim @ worker.js:3429 (anonymous) @ worker.js:4593
  12. DidierXT

    WebWorker demo

    The project is defined with "customer server" option, and my default browser is chrome. I tried Mozilla too.
  13. DidierXT

    Working with images in the file system? 

    @lynkfs helped me with this procedure: edPhoto1.InputType := itFile; edPhoto1.Handle.ReadyExecute( procedure () begin w3_setAttrib(edPhoto1.Handle, 'accept', 'image/*'); w3_setAttrib(edPhoto1.Handle, 'capture', ''); edPhoto1.OnChanged := procedure(sender:TObject) begin var reader: variant; asm @reader = new FileReader(); end; reader.onload := lambda imgPhoto1.handle.src := reader.result; end; reader.readAsDataURL(edPhoto1.handle.files[0]); end; end);
  14. DidierXT

    WebWorker demo

    I'm trying to run the WebWorker main sample without success. OnMessage is never triggered. Any idea?
  15. DidierXT

    TypeError - Converting circular structure to JSON 

    Hum, seems I misunderstood the whole webworker process... I have to implement the "webworker.js" But I'm unable to have the OnMessage triggered in the démo project. Any idea ?
×