
Andreas Pfeiffer
Forum Replies Created
-
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
-
Hi Martin,
subformset_add() does not open a subform. It adds a subform set. subformset_formadd() opens a subform. That said you would need to use subformset_formremove() to remove the subform from the subformset.
However if you prefer using those popup forms for modeless forms I would recommend subformdialogshow instead. In that case you do not need to deal with a subformset but the form is modal only. Closing such a subform can then be done using subformdialogclose.
Best,
Andreas
-
This reply was modified 1 year ago by
Andreas Pfeiffer.
-
This reply was modified 1 year ago by
-
Hi Martin,
I wonder why you would want to close the Omnis server? That means someone would need to re-start it again when the next user wants to connect to your application.
If you just want to log out from the application and your first form is the logon form why not simply refreshing the browser using a button? You could do the following in a $event method of a button: Make the $event method client executed (context menu) and use this code:
On evClick
JavaScript:location.reload();
That would refresh the browser and hence it would go into the first form, which is hopefully the logon form.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorAugust 15, 2024 at 10:06 am in reply to: Error: Exception occurred/Cannot read propertiesHi Allan,
I would try to run this in Omnis Studio 11.1. As far as I know the error handling has improved there. I could imagine that one of the objects might complain that there is no data to be shown.
I hope this helps.
Best,
Andreas
-
This reply was modified 1 year ago by
Andreas Pfeiffer.
-
This reply was modified 1 year ago by
-
Andreas Pfeiffer
AdministratorAugust 9, 2024 at 12:24 pm in reply to: Remove Tab From Within Tab PaneYou are welcome!
-
Andreas Pfeiffer
AdministratorAugust 8, 2024 at 2:55 pm in reply to: Remove Tab From Within Tab PaneKevin,
Yes – I always assume that you are using the latest Omnis Studio version when you do not specify in your question.
There are some new properties in Omnis Studio 11.1 that did not exist in 10.22. You could upgrade couldn’t you?
Otherwise you could do it manually and drag the objects from the panes right to the one you want to remove onto a 2nd page pane temporarily page by page and moving them one page to the left.
I would not just hide the page because if you know you do not want to have them anymore it would clutter your code by still having them.
I hope this helps.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorAugust 7, 2024 at 3:27 pm in reply to: Remove Tab From Within Tab PaneDo you want to hide the tab or remove it entirely?
If you just want to hide the tab a quick way would be to add a $construct to the tab pane with the following code:
Do $cfield.$showpane(2,kFalse) ## hides tab number 2
If you want to remove a tab in-between you can use the movetab property in the property manager to move all panes to the left from the one that you want to remove, so that the one is the last pane. Then you can delete all objects on that pane and set the tabcount to tabcount-1.
Make sure to remove the objects in that tab before you reduce the tabcount.
Hope this helps.
Best,
Andreas
-
This reply was modified 1 year, 1 month ago by
Andreas Pfeiffer.
-
This reply was modified 1 year, 1 month ago by
-
Martin,
Yes. It works like any other forum.
It helps people to find this forum when they use a search engine.
Best,
Andreas
-
Hi Martin,
Do not prefix an instance variable with „$cinst“. Than it should be save to use the command to remove unused variables.
Best,
Andreas
-
This reply was modified 1 year, 1 month ago by
Andreas Pfeiffer.
-
This reply was modified 1 year, 1 month ago by
-
Andreas Pfeiffer
AdministratorJuly 15, 2024 at 12:38 pm in reply to: Renaming objects – missing prompt for search and replaceHi Uwe,
I don’t think there was ever a prompt when you rename a method name. This is only when you rename a class name as far as I know.
Best,
Andreas
-
Awesome! This is great!
Have a nice evening then.
Best,
Andreas
-
subformset_remove
This is documented here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#subform-sets-1
Best,
Andreas
-
Martin,
This is because closing the form does not close the subformset. You also would need to close the subformset.
Best,
Andreas
-
Martin,
sure subformset_formremove does not remove the subformset. it is not supposed to remove the subformset. Only the subform within the set.
If you use this command you would need to specify the subformset name and the form id as a row parameter so that subformset_formremove understands which form in within subformset to be removed.
Best,
Andreas
-
Martin,
Yes – when your code is inside the table class you can refer to that same instance using $cinst. For example: $cinst.name refers to the name column of your row or list variable if your code is inside that table class.
But when you want to refer to the instance variable outside of that table class, i.e. from within the form, I would recommend not to prefix the instance variable. For example:
$cinst.iDataRow.name ## would certainly refer to the name column within iDataRow but you lose the tokenisation of that variable. It is better to omit $cinst for this matter.
The same is true for task variables. Some people prefix a task variable with $ctask which is also not a good idea for the same reason.
Hope this explanation helps.
Best,
Andreas