Forum Replies Created

Page 6 of 20
  • 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
    September 9, 2024 at 7:53 am in reply to: Subform Set Panel

    and this one does not run into $destruct once you are assigning another form to the $classname of the subform field?

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 7:48 am in reply to: Subform Set Panel

    Martin,

    I think we are confusing ourselves right now. Let me point out. The subformset does not have to do anything with using a subform control.

    I am assuming that one of your subforms that you are using within the subform field is then itself using a subformset panel. Is this correct?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 7:43 am in reply to: Subform Set Panel

    Do you open the same or another form?

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 7:37 am in reply to: Subform Set Panel

    $multipleclasses is set to kFalse and the $destruct is not executed of the formerly used subform when you assign another $classname?

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 7:15 am in reply to: Subform Set Panel

    So if I understand you right you are using a subform component to display different subforms there. And within that form you are using a subformset. But for some reason it does not run into the $destruct method of the subform?

    Please check if $multipleclasses of the subform field is set to kTrue. Make it kFalse and you should then then see the $desctruct of the subform to be executed when you assign a new $classname.

    If $multipleclasses is kTrue that would mean that you can maintain several instances at the very same time. So any instance that has been constructed will stay alive until you either close it manually or close the main form that contains the subform component. That means in return that when re-assigning a classname that has been used before will also not execute the $construct of that subform either.

    I figured it is easier in most cases to leave this property to kFalse.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2024 at 6:58 am in reply to: Subform Set Panel

    Hi Martin,

    Not sure what you are trying to do. Are you saying that you are executing the subformset_remove within the $construct of a form? If so, why?

    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.

  • Andreas Pfeiffer

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

    Martin,

    You cannot assign the same form into $classname as before. It must be a different in order to change the form. Therefore it will not destruct and not construct.

  • Andreas Pfeiffer

    Administrator
    September 6, 2024 at 5:01 pm in reply to: Subform Set Panel

    Awesome! This is great!

    Have a nice evening then.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 6, 2024 at 4:44 pm in reply to: Subform Set Panel

    subformset_remove

    This is documented here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#subform-sets-1

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 6, 2024 at 4:38 pm in reply to: Subform Set Panel

    Martin,

    This is because closing the form does not close the subformset. You also would need to close the subformset.

    Best,

    Andreas

Page 6 of 20