Forum Replies Created

Page 6 of 21
  • Andreas Pfeiffer

    Administrator
    October 8, 2024 at 9:53 am in reply to: jsProgressBar Control – not really controlling progress…

    Hi Uwe,

    You would need to do the assignment of the progress bar in a client side method. The solution is to start with a client side method and then calling the server method that would execute the REST call. Just make sure you do not run the worker on a background thread. So use $run.

    Then implement a client side method that has the very same name as the server method but an extension “_return”. This method can then set the value of the progress bar and again trigger the server method. Omnis will automatically call the client method after the server method has been finished if the client method has the same name as the server method with that extension and the original call came from the client. So make sure the buttons $event is also set to client. See also the documentation here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#return-methods

    I will attach a simple example that demonstrates this.

    Hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    October 8, 2024 at 9:15 am in reply to: File upload/download

    Hi Martin,

    This would be very scary if a web application would be able to access the local file system of the client without permission.

    No – you cannot upload a file in a web application without user permission and this is for a good reason.

    Imagine you visit any site on the internet and suddenly your files are uploaded from your machine.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 13, 2024 at 2:52 pm in reply to: REST API Client – POST file

    calculate iLength as len(iContentChar)

    And then add this to the header

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 13, 2024 at 2:40 pm in reply to: REST API Client – POST file

    Hi Uwe,

    I am not sure but could it be that the content-length is required in the header? You could use the Omnis len() function to find out the length.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 10, 2024 at 12:09 pm in reply to: Subform Set Panel

    Thank you Martin!

    Have a good day!

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 10, 2024 at 12:00 pm in reply to: Remote form vertical scroll bar

    Hi Martin,

    How about making the subform field using as much as space as possible?

    You could do the following:

    1. Add a container and give it $edgefloat=kEFPosnTopToolbar
    2. Place your buttons into that controller
    3. Make $edgefloat of the subform kEFPosnClient

    That way the subform will use the entire space but the container will give you space for your controls.

    Does that help?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 12:04 pm in reply to: Subform Set Panel

    Hi Martin,

    Thanks for providing the sample library.

    I changed a couple of things though:

    1. Added “Do inherited” in the $construct of jsSubformSetPanels to make sure that the $construct of the superclass is alway executed.
    2. I added a Dummy remote form “jsDummy” to allow to properly close the existing instance.
    3. I changed the code in $event of the back button in the superclass to use $cinst.$container:

    On evClick

    Do $cinst.$container().$objs.subformpanelsset.$classname.$assign(“jsDummy”)

    # this will close the existing instance because the main form would assign an empty form to the subform component. I would probably make a new method in the main form that does this for better encapsulation. So for example you could have a $goback method in your main form that assigns the dummy form and then simply call this from your back button like this:

    Do $cinst.$container().$goback()

    4. Finally I moved the code to remove the subformset to the back button in the concrete form jsSubformSetPanels because if you do this in the $destruct it is apparently too late. So I overrode the $event method if the back button of the concrete class like this:

    On evClick

    Do $cinst.$clientcommand(“subformset_remove”,row(‘SubformPanelsSet’))

    Do inherited

    Attached please find the corrected Omnis Studio 11.1 library.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    October 8, 2024 at 9:57 am in reply to: Subform Set Panel

    Hi Martin,

    I would think you would need to do this in a CSS class.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    October 8, 2024 at 9:56 am in reply to: File upload/download

    Yes – you can allow to upload multiple files if using Omnis Studio 10 or later.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 30, 2024 at 9:29 am in reply to: Best IDE for Mobile App Development

    Yes – with Omnis Studio you can create x-platform applications for iOS and Android mobile phones.

  • Andreas Pfeiffer

    Administrator
    September 11, 2024 at 4:48 pm in reply to: Remote form vertical scroll bar

    Martin,

    obviously you would need to adapt the components inside your subform as well. Attached please find a 10.22 library. I changed the following:

    1. added a container field (page pane) in the superclass that will hold the back button and assigned $edgefloat=kEFTopToolbar
    2. made the $edgefloat for the page pane that will hold the subformset panel to kEFPosnClient
    3. switched on $autoscroll of the page pane that holds the subformset panel
    4. Overrode the $init method of the first subform to set the cursor in the first field

    The latter is necessary as otherwise the last subform (number 4) will receive the cursor and thus it scrolls so that the first few panels cannot be seen.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 11, 2024 at 2:35 pm in reply to: Remote form vertical scroll bar

    Martin,

    So what is the question?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 12:20 pm in reply to: Subform Set Panel

    Martin,

    Ok – I made the changes in the 10.22 for you. Please see attached.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 8:32 am in reply to: Subform Set Panel

    Sorry – without having more information it is quite impossible to say what you are trying to achieve. Could you upload a sample library for testing?

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 8:25 am in reply to: Subform Set Panel

    However you could use a dummy form when the user clicks the back button.

Page 6 of 21