Forum Replies Created

Page 1 of 21
  • Andreas Pfeiffer

    Administrator
    August 7, 2025 at 2:07 pm in reply to: Parsing OBrowser HTML content

    Hi Nathanaël,

    You could read the URL and use the HTTPParse, HTTPPage or any of those commands. Alternatively you can use the HTTP client worker object and fire up a get to the URL.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 4, 2025 at 8:28 am in reply to: SubForms

    Kevin,

    and yes – you would need a home button. Although the home is just a page that more or less does not have much content. It is more or less the landing page that is show after the user logged on.

    For example you could have a container (page pane) that has $edgefloat = kEFPosnToolbar and inside the container you have your menu and the home button. I pretty much have it this way. The home button is also when the user clicks on the logo svg icon that sits inside that container on the left side.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 4, 2025 at 8:23 am in reply to: SubForms

    Kevin,

    No worries. I am glad to help.

    Yes, in a sense the application is a single page application. However sometimes (i.e. printing result, prompts) I use modal forms with the client command “subformdialogshow”. For example:

    Do $cinst.$clientcommand("subformdialogshow",row('jsPrint', etc.))

    Also a word about record locking. This is something you’d better avoid. Always keep in mind that a connection can break and therefore the lock on the record will stay there forever.

    In practice it is very seldom that two users work on the very same record. And if so you could alert them when hitting the “save” button (“record has been modified 2 mins ago, do you want to override or re-load it?”). So I wouldn’t worry much about it. I also have all my forms always in enter data mode which is much more up-2-date behaviour than the old “prepare for” stuff.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 2, 2025 at 11:15 am in reply to: SubForms

    Hello Kevin,

    For navigation my advice would be to use a main remote form that has i.e. a navigation menu bar, or something like that. That element gets $edgefloat = kEFPosnMenuBar. In addition there is only one more component, that is on single subform with $edgefloat = kEFPosnClient. That means it will take the rest of the space completely for the working area. The navigation control simply assigns the $classname of the subform control. This is for the part of navigation of an Omnis JS app. That way the user can simply navigate between different modules of your application.

    Each form that is shown inside the main subform component then should act by its own and can also use subforms. Whenever those subforms need to talk to its container form you can use $cinst.$container to reference the outer form and get i.e. the ident from the container in order to fetch the data for the subform. This part is very much as in the sample library I pointed to. For example:

    Do $cinst.$container().$getIdent() Returns myIdent
    Do iDataList.$load(myIdent) ## if you have a $load in your table class that can deal with the ident

    There are not many cases why one would use task variables. I only have two in my applications. One is the session object and the other one is a user object. Use this object for the logon remote form and hold any user information within that object. BTW. the logon remote form would then use

     $ctask.$changeform('jsMain') 

    to switch to the main navigation form. The object should then have $get… methods that may return the user id, user name etc. whenever required.

    For example you could have overridden the $insert method of your super table class and then use the user object to put the user id into a certain field of your table:

    i.e. Calculate $cinst.user_id as tUserObj.$getIdent()

    To make it clear: every class, field etc. has a $userinfo property which is simply a property to store any data. So not really useful in that context you described.

    If you need more assistance please contact your local sales rep. Omnis Software is happy to offer you consulting/training to help you getting on the right track.

    I hope this helps.

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 31, 2025 at 7:32 am in reply to: SubForms

    Hi Kevin,

    very well spotted. Yes Omnis Studio allows you to have multiple subforms on a form and you are able to address them from outside once they are constructed. For performance reason the subform on the pages that are initially not visible are constructed once they become visible the first time.

    You could check if the instance is there using a $cando property on the method. For example:

    If $cinst.$objs.sub.$subinst().$load.$cando
    Do $cinst.$objs.sub.$subinst().$load(myID)
    End if

    The $loadfinished is not something you would call. This method is automatically executed once all subforms have been loaded. The problem you face here is that it won’t be executed until you make all subforms become visible – meaning you would need to change the paged pane. You can see $loadfinished like the $construct. You override it and then this code will be executed once all subforms are loaded. It would be much easier if you do not control the behaviour from the outside of the subform. Let the subform do its own job. Once it becomes constructed it could call a method in the container form.

    Btw. this difference behaviour of the remote classes did lead me into slightly different development paradigm and in return it led me change my development style for fat client windows as well. I discovered that it is much more OO when bringing the power to the subwindows/forms rather trying to control everything from the outside.

    I hope this helps you.

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 30, 2025 at 7:30 am in reply to: Button event for Hold-Remote forms Omnis Studio 11

    Hi Sameera,

    Sorry for the late answer. For some reason your post stuck in the inbox and we were not be alerted. However for other users to see the solution I will post the answer we sent you directly from the German support team:

    Unfortunately there is no built-in/native On evLongPress or evHold in Omnis Studio or even in JavaScript.
    We have now been able to build our own “evLongPress” event with the JavaScript events “mousedown”, “touchdown”, “mouseup” and “touchend”.
    The whole thing involves some JavaScript on the client side.
    An example library is attached to this email. To implement the whole thing for you, you would need to adjust the reference to your button in the $init and then implement the client method $onlongpress to your button. So that the click is not triggered after the LongPress, you would then have to copy the code from our “onlongpress”. Then another click will be prevented after a long press.
    I hope this helps you.

    Library attached.

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 30, 2025 at 7:12 am in reply to: SubForms

    Hi Kevin,

    I assume the subform on the next page is not instantiated yet when you are trying to send a message. Therefore you will not be able to get a reference to that instance. Only when the page will become visible it will create the instance inside the subform field.

    My advice is to get rid of the page pane and use one subform that loads the data itself. Add a control (i.e. tab strip) that simply assigns the $classname of the subform. Every time you do this its $construct will be executed and from there you can call a method in the main form to get information from it and rebuild its own data. Note that $multipleclasses needs to be kFalse. Otherwise the instance will stay alive and you cannot rely on having its $construct executed when the the $classname is assigned.

    You may want to check out the contacts web application sample library that I posted in this forum. It uses this technique. It does use a paged pane. However there is only one sub window on page two and this one gets dynamically assigned.

    Hope this helps.

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 29, 2025 at 8:38 am in reply to: 4 to 11 getting started

    Hi Bill,

    From Omnis Studio 10 onwards it comes with a true type editor only.

    When you start typing, the code assistant will popup and give you suggestions that you can confirm using the tab key or navigating with the arrow keys first. That way you will be even faster entering code with the new editor.

    I’ll promise, once you get the hang of it – it is hard to work with the old click&point editor again.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 14, 2025 at 2:17 pm in reply to: Issues with oBrowser in a Complex Grid

    Hello Rui,

    You could possible use the oBrowser control and display a remote form there. The remote form could then itself have a complex grid with either a picture control or a background component to display the picture.

    The remote form can use $cwind.$getData to receive data from the current window.

    Does that help?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 8, 2025 at 2:14 pm in reply to: Issues with oBrowser in a Complex Grid

    Hi Rui,

    I do not think the Complex Grid is designed to hold the oBrowser in its record section. Can you give more background what are you trying to achieve?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 23, 2025 at 8:44 am in reply to: Check Out & Toggle

    Rui,

    very good idea!

    I will vote for it too.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 23, 2025 at 8:39 am in reply to: Future of Omnis Community Edition

    Uwe,

    have a look at the Omnis.net website. Click onto the Store button in the top right corner. You will see that there are actually two Community Editions now.

    Hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 4, 2025 at 9:50 am in reply to: Check Out & Toggle

    Hi Rui,

    What are you referring to?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    August 4, 2025 at 10:01 am in reply to: Issues with oBrowser in a Complex Grid

    Hi Rui,

    Excellent solution, Rui! Now your pictures are consistent and there is no hassle in synchronising two different elements. Great job!

    Have a nice day!

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 17, 2025 at 7:15 am in reply to: Issues with oBrowser in a Complex Grid

    Hi Rui,

    Honestly I do not think synchronising of the two is a good idea. You will always end up having both scrolling slightly differently. Also what do you do if you have more records in the complex grid than you have oBrowser components in the scrollbar?

    What if you have just one oBrowser outside the complex grid and you update it with the picture when the user clicks on a line or a button within the complex grid?

    Best,

    Andreas

Page 1 of 21