
Andreas Pfeiffer
Forum Replies Created
-
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 11 months ago by
Andreas Pfeiffer.
-
This reply was modified 11 months 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 11 months, 3 weeks ago by
Andreas Pfeiffer.
-
This reply was modified 11 months, 3 weeks 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 12 months ago by
Andreas Pfeiffer.
-
This reply was modified 12 months 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 ago by
Andreas Pfeiffer.
-
This reply was modified 1 year 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
-
Andreas Pfeiffer
AdministratorJune 17, 2024 at 10:23 am in reply to: How to Improve Page Load Times in Omnis Studio Web Applications?Hi Smith loo,
When using Omnis remote forms we already take care with the controls that only those data will be loaded that are shown on the page. For example the data grid control only shows the data that are visible plus a few lines when the user start scrolling and is dynamically loading the next data to be shown.
Also when you use subforms to switch between different remote forms it will only load the subform part. You can also cache the subform.
So it should not be slow at all using the Omnis Studio remote form technology.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorJune 4, 2024 at 3:00 pm in reply to: Opening new links in a web application.Hi Allan,
I suppose you are talking about an Omnis JS application?
You have several options:
1. Do $cinst.$showurl(‘http://someURL’) .. will open a new browser instance (or tab) and point to the given URL. This only makes sense if you want to refer to a URL outside of the current Omnis app.
2. Do $cinst.$clientcommand(“subformdialogshow”,row(jsNextForm,300,600)). .. this will open a dialog window inside the current Omnis remote task instance and you can communicate between the main form and the subform by using $cinst.$container, i.e.
Do $cinst.$container().$getID() .. will call the $getID from the main form
3. You can use a main form that has a subform field. This can than be used to switch between several other remote forms assigning the $classname of the subform field.
I hope this helps.
Best,
Andreas
-
Hi Francesco,
Check out the Samples section in the HUB. There you go to “Object orientation” group. You will find a sample library for the SMTP worker there.
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
-
Wonderful!
Have a great day Francesco!
Best,
Andreas