Forum Replies Created

Page 3 of 3
  • Götz Krija

    Member
    August 18, 2023 at 1:03 pm in reply to: Python Worker : sendError() calls

    Hi Nathanaël,

    I do not have much experience with Python, but the manual says you can import omnis_calls in your main.py and use sendResponse or sendError if required. So you are probably right and the oPyWorker.$methoderror() method should receive the error in this case.

    I have put in a fault for engineering to investigate further. The reference is ST/EC/1804

    As a workaround you can probably raise an exception in the Python script:

    raise Exception(“this is an error”)

    Götz

  • Götz Krija

    Member
    August 18, 2023 at 9:27 am in reply to: Browser or Proxy error when trying Python Worker

    Hello Nathanaël,

    Did you test the demo library in the Omnis Studio HUB > Samples > Python Worker

    The library works fine for me on Windows 11:

    1. Installed Python 3.11.4 (in the installer checked the box ‘Add python.exe to PATH’)

    2. In command line executed: pip install -r “C:\Users\[USER]\AppData\Local\OS 11 35439 x64\pyworker\requirements.txt”

    3. Tested the Python Worker sample in HUB and the result was successfully returned in the $pyWorkerComplete method

    Götz

  • Götz Krija

    Member
    May 17, 2023 at 9:27 am in reply to: O$11 modify Keys

    Hello Franco,

    Unfortunately, this seems to be a bug, so I have raised a fault for it under the reference ST/HE/1912

    As a workaround you can change the keyboard shortcuts directly in the keys.json file in the Omnis data folder (e.g. on Windows: C:\Users\[USER]\AppData\Local\Omnis Software\OS 11 x64\studio\).

    Götz

  • Götz Krija

    Member
    March 3, 2023 at 11:09 am in reply to: Push with XAMPP

    Hi,

    You would need to setup the RESTful Web server plugin. See: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#push-connections

    […] if you are using a Web server to pass JavaScript client requests to the
    Omnis server, you need both the standard Web server plugin, and the
    RESTful Web server plugin to be installed with the Web server […]

    Götz

  • Götz Krija

    Member
    March 3, 2023 at 11:01 am in reply to: Displaying Document Previews – with picture control?

    Hi,

    I do not think that PDF files can be displayed in the picture control. Instead you could use the HTML control in the JS Client and the oBrowser control in the Thick Client.

    Götz

  • Götz Krija

    Member
    January 17, 2023 at 2:37 pm in reply to: What carriage return works for remote form tooltips?

    Hi Felipe,

    You need to add the tooltip by code, e.g.:

    Do $classes.myRemoteForm.$objs.myEditControl.$tooltip.$assign(con(‘tooltip line 1′,kCr,’tooltip line 2’))

    Götz

  • Götz Krija

    Member
    September 28, 2022 at 9:12 am in reply to: keyboard state

    Hi Joel,

    On Windows platform you can use:

    Register DLL (‘user32′,’GetKeyState’,’JJ’)
    Call DLL (‘user32′,’GetKeyState’,20) Returns lCapsLock
    If lCapsLock
    OK message {Caps Lock pressed}
    End If

    Götz

  • Götz Krija

    Member
    September 28, 2022 at 9:04 am in reply to: Quitting Omnis when started

    Hi Tom,

    This error is probably caused by using non-unicode data with an Omnis unicode version.

    I could imagine that you are using a report class with non-unicode page setup data in $pagesetupdata. Clearing $pagesetupdata should solve the issue.

    Götz

    • This reply was modified 3 years ago by  Götz Krija.
  • Götz Krija

    Member
    July 8, 2022 at 2:11 pm in reply to: Multi Threading with Omnis

    Hi,

    You can probably use the “Do async method” command for this purpose: https://www.omnis.net/developers/resources/technotes/tnwe0014.jsp

    Götz

  • Götz Krija

    Member
    June 7, 2023 at 2:45 pm in reply to: O$11 modify Keys

    Hello Franco,

    I think the keys.json file is only created when you change any keyboard shortcut in the Property Manager for the very first time (in $root.$prefs.$keys). The file should then be created in: /Users/[USER]/Library/Application\ Support/Omnis/Omnis\ Studio\ 11/studio/

    Götz

  • Götz Krija

    Member
    March 7, 2023 at 3:08 pm in reply to: Displaying Document Previews – with picture control?

    Hi Uwe,

    So the PDF file is stored as binary? In this case you probably need to create the PDF file temporarily in the web server’s file system (e.g. by using FileOps.$createtmpfile if the Omnis server and the web server are running on the same computer).

    You can then display the PDF in the HTML control using the assignpdf $clientcommand or getpdf command.

    Please note that the pdf folder must be specified in getpdfFolders config.json item. See here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#setting-pdf-folders

Page 3 of 3