Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Euromnis 2018 Writing Javascript Controls session update

  • Euromnis 2018 Writing Javascript Controls session update

    Posted by Michael Monschau on November 27, 2018 at 12:26 pm

    Hi $all,
    I am using the Omnis list in the hope that I will at least reach some of you who attended this session. I will also post this message on the Omnis Developer Portal.
    In this years Writing JS-Controls session, we encountered some problems with event handling when using the Studio JSON Control Editor. Unfortunately, I was not able to resolve it to a satisfactory end during the session, although I hope that I still have provided everyone with sufficient insight into what’s required. After having communicated with Omnis, I have narrowed down the problem. It appears that custom event constants are correctly encoded in the javascript when used within the $event method, i.e. custom event constants as strings and build-in event constants as integers. But when used in other methods, i.e. the class methods of the remote form, executed on the client, the javascript that is produced does not encode the custom event constants correctly, i.e. custom event constants where encoded as integer value zero. As far as I am aware this applies to Studio 9 beta as well as Studio 8.1.6 and previous versions of Studio.
    This issues has been reported (Reference: ST/EM/214). In the meantime, the work-around is to specify the names of the custom events as strings within case statements, if the code is external to the $event method of the control.
    I will upload the new example library (which I will modify with the work-around), JSON definition and javascript, to Github, as soon as I have a spare moment.
    My apologies again for the issues that we encountered and the time that was wasted. This was entirely my fault as I should have tested the examples more thoroughly prior to the session.
    I still have to further investigate the issue whether to specify or not to specify a ‘p’ within event parameters versus method parameters, before reporting any inconsistencies I may find. The ‘pp’ problem was the funniest mishap of any session I have given to date 🙂
    Michael Monschau (Director)
    Brainy Data Limited
    Reply To:
    Phone: +44 (0)870 474 0708
    Web: the home of Omnis Components and Developer Services

    Michael Monschau replied 5 years, 3 months ago 1 Member · 1 Reply
  • 1 Reply
  • Michael Monschau

    November 27, 2018 at 1:12 pm

    Sorry the first line should have said…
    I am using the Omnis Developer Portal in the hope that I will at least reach some of you who attended this session. I have also posted this message on the Omnis List.

Log in to reply.