Forum Replies Created

Page 17 of 20
  • Andreas Pfeiffer

    Administrator
    August 10, 2023 at 7:10 am in reply to: Explain the reason why cannot use the build tool

    Hi Khanh,

    As said the deployment tool is meant to create a fat client application.

    If you want to deploy an Omnis JS web application the documentation is here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/07Deployment.html#chapter-7deploying-your-web-mobile-apps

    There is also a tech note that guides you through the process step-by-step which is probably easier: https://www.omnis.net/developers/resources/technotes/tnjs0003.jsp

    In that tech note you can then choose what platform and web server you want to use.

    Hope that helps. Please let me know if you have any further questions.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 10, 2023 at 7:02 am in reply to: Retrieve current list

    Hi Martin,

    I do not think there is one.

    When using the new notational way of coding there is no need to set the current list because all functions are used directly on the list, i.e.

    Do myList.$search($ref.$city=’Paris’,kTrue,kFalse,kFalse,kFalse)

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 9, 2023 at 7:07 am in reply to: Explain the reason why cannot use the build tool

    Hello Khanh,

    There is a chapter in the online documentation that explains the deployment tool. Note this is for fat client applications only.

    https://omnis.net/developers/resources/onlinedocs/Programming/17Deployment.html#deployment-tool

    Maybe this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 8, 2023 at 6:32 pm in reply to: Hourly notifications in my web app

    Awesome. Let me know if you have any further questions.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 8, 2023 at 6:13 pm in reply to: Hourly notifications in my web app

    On the other hand I wonder why you actually need a timer though.

    What is the purpose of this function?

    Do you want to refresh the data if there are new data in the database? If that is the case and if you use PostgreSQL you could use the PostgreSQL notification and then use the push to the client without using a timer. For example if you create a trigger within PostgreSQL that is executed you could then push Omnis through the session object and Omnis could then send a push to the client that new data have been arrived. This is a little bit more advanced but then code is only executed when new data are stored. In contrary to the timer which will also try to load new data even if there are none. Ok, this might probably depend on how often the data are inserted. If we are talking about lots of new data and you are just loading a total result set then the timer is probably the way to go.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 8, 2023 at 6:05 pm in reply to: Hourly notifications in my web app

    No worries. Have fun.

    Let me know if you have further question.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 8, 2023 at 5:50 pm in reply to: Hourly notifications in my web app

    Your code is a little bit confusing.

    The “open push” is required on the client. It is for opening the push channel. You do not need to do this for every push.

    However I wonder why you would need to push from the server if you are using a timer. So what would you do if the client connection is broken?

    Wouldn’t it be easier using a client side timer and then simply call the method that loads the new data? See here: https://omnis.net/developers/resources/onlinedocs/WebDev/03jscomps.html#timer-control

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 8, 2023 at 5:13 pm in reply to: Hourly notifications in my web app

    Hi Greg,

    What kind of notification do you mean?

    Omnis supports push notification which is documented here: https://omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#push-connections

    But also notifications for the JS Wrapper. Please see here: https://filestore.omnis.net/temp/230808180805/PushNotifications.3.0.x.pdf

    There is also notification in the session object of the PostgreSQL Omnis DAM: https://omnis.net/developers/resources/onlinedocs/Programming/09serv.html#notification-channels

    Does this help?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 31, 2023 at 7:46 am in reply to: Omnis Studio Community macOS no longer starts after "Force Quit"

    Hello David,

    It could be that if you accidentally created some code, i.e. an infinity loop in a $construct that Omnis will just show a spinning wheel, i.e. and seems unresponsive.

    However there are several techniques you can use to come around such a situation.

    By default Omnis Studio 11 will open all libraries that have not been closed the last time when Omnis has been shut down. That said it will then also try to run the library that might have the tricky loop. You can change this in the config.json file that sits inside the Omnis /studio folder in the application support folder. See also: https://www.omnis.net/developers/resources/onlinedocs/Programming/02libsandclasses.html#starting-omnis-with-a-file

    Another way to not run any code in the library is holding down the “option” key when opening the library.

    There is also a keyboard shortcut “Cmnd+Opt+I” that would allow to interrupt code execution in an endless loop. See also https://www.omnis.net/developers/resources/onlinedocs/Programming/04debug.html#keyboard-shortcuts

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 31, 2023 at 7:30 am in reply to: Enhancement request

    Hi Franco,

    There is a property in the config.json file which you can change either in the file directly or using the new editor that opens when you click on “Edit configuration” in the lower left corner of the Omnis Studio browser.

    It is in the IDE section and is called “restoreOpenLibsAtStartup”. Just set it to kFalse and you have the previous behaviour.

    There is also a “openStartupTaskWhenRestoringOpenLibrary” which allows you to not instantiate the Startup_Task if the library is automatically opened.

    Also see page 91 of the Whatsnew.pdf file: https://www.omnis.net/developers/resources/download/manuals/Whatsnew11.pdf

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 19, 2023 at 2:47 pm in reply to: Subform questions

    Hi Mischa,

    If the subform field width is smaller than 768 it will take the next smaller layout breakpoint.

    Regarding your code generation I thought it might be worth to put an interface into a superclass of your subforms. Without any coding in the main form you could probably do something like this:

    in the $construct of your subform (or better its superclass) put the following code:

    Set reference lClassRef to $cinst.$container().$class

    Calculate iDataName as lClassRef.$objs.[$cinst.$field].$dataname

    Now you have the $dataname which could be used like this:

    Calculate iTest as $cinst.$container().[iDataName]

    From now on you could use $cinst.$container().[iDataName] to get or set the value.

    I hope that makes any sense.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 19, 2023 at 7:31 am in reply to: Subform questions

    Hi Mischa,

    The layout breakpoint is the minimum size of your layout. That means when the width of the browser reaches the next layout breakpoint it will change to the next layout breakpoint. So for example if you have a 320 and a 768 layout breakpoint then the 320 is shown until the browser reaches 768. Once the browser widths is 768 minimum it will use that one.

    Regarding the automated creation of a method it actually has two sides of a coin. I would assume that this code is harder to maintain. You could think of the Omnis class that the method definitions will already be stored in the library and the elegance of Omnis is that it exposes the methods graphically that are linked to the object. When you do this dynamically you remove this feature. But anyhow, I am glad that it works for you now. 🙂 There is also another downside to this. If you need to make a method client executed then you cannot create it dynamically because Omnis translates those methods into JavaScript in that moment when the class is saved (Cmd/Ctr-S).

    Regarding the click event behind the label field please check if the label is active and enabled.

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 18, 2023 at 7:00 am in reply to: Subform questions

    Hi Mischa,

    How many layout breakpoints does the subform have? Maybe worth deleting the bigger one?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 25, 2023 at 1:35 pm in reply to: Subform questions

    Hi Mischa,

    I did enter an ER.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 20, 2023 at 9:37 am in reply to: Subform questions

    Hi Mischa,

    Yes – if you have only one layout breakpoint it will always use this one.

    Before Omnis Studio 11 the minimum number of layout breakpoints was two. For this purpose you could have changed the $layouttype property to kLayoutTypeSingle. However I think with Omnis Studio 11 it is kinda obsolete now because we can now have only one layout even though the $layouttype is set to kLayoutTypeResponsive. The beauty of this approach is that your subforms can share the same super classes. If the layout type is not the same you can actually not.

    One more about $cclass. It will work – but when it comes to inheritance you might get the wrong class. So $cinst.$class is probably what you want to get the reference of the class. Otherwise if your code is within the superclass you would get the reference to the superclass.

    I also tested making a reference variable that points to the variable that is used in the main form in the $dataname of the subform component. Unfortunately this is not supported. You cannot assign an item reference to the $dataname of a component. However you can have the reference and then have some code to assign or read from that item reference.

    I am glad that your issues are now resolved.

    Best regards,

    Andreas

Page 17 of 20