![Profile photo of Andreas Pfeiffer](https://www.omnis.net/community/wp-content/uploads/avatars/15/58453e9b65bfd-bpfull.png)
Andreas Pfeiffer
Forum Replies Created
-
Andreas Pfeiffer
AdministratorOctober 5, 2023 at 7:52 am in reply to: Reference an object in a superclassHi Martin,
There is no difference in the instance if the code is in the inherited form or in its superclass. The instance is the same.
Maybe I understand this wrongly. What exactly do you get back when you debug the code and look at the item reference variable?
Best,
Andreas
-
Awesome! Glad to help.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorOctober 2, 2023 at 11:04 am in reply to: How do I set current field ?Hello Khanh,
You cannot use the Queue commands as those would simply try to do this on the server. But the users cursor is on the client. Instead try this command:
Do $cinst.$setcurfield(fieldRef)
You can pass in the name of the field, the reference or the id. You can also pass in a 2nd parameter if you want to make the content selected.
Hope this helps.
Best,
Andreas
-
If you want to use Omnis Studio 11 please do not replace the HTM file as described in the readme.txt file.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorSeptember 14, 2023 at 1:44 pm in reply to: ‘Millio/en’nium PANE^ ColorHallo Herr Köhler,
Ist das ein doppel Post?
Mit freundlichen Grüßen
Andreas
-
Andreas Pfeiffer
AdministratorSeptember 12, 2023 at 7:07 am in reply to: How can I write/read a file on my phone device?Awesome. Great.
Best,
Andreas
-
Hi Martin,
$cando() is an inbuilt method that proves if a certain method is available. In this specific case it checks if the $getID() of the container can be executed.
The container can be either the container form that contains the subform instance or it can be the form that opened the popup form.
So the $load will be called with an argument that is the id from the container.
I hope that makes sense.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorSeptember 11, 2023 at 7:22 pm in reply to: How can I write/read a file on my phone device?Hi Khanh,
Check out Client Preferences: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#client-preferences
Best,
Andreas
-
This reply was modified 10 months, 1 week ago by
Andreas Pfeiffer.
-
This reply was modified 10 months, 1 week ago by
Andreas Pfeiffer.
-
This reply was modified 10 months, 1 week ago by
-
Andreas Pfeiffer
AdministratorAugust 31, 2023 at 8:43 am in reply to: How can I add new datagrid object to remote form?Hi Khanh,
Again not really recommendable. However under certain circumstances it might be necessary and it is possible.
For example you can have the following code behind a button. When the button is clicked it will generate a copy of the button:
On evClick
Do $cinst.$objs.$add('newButton',$cfield) Returns lNewButtonRef
If lNewButtonRef
Do lNewButtonRef.$top.$assign(30)
Do lNewButtonRef.$left.$assign(250)
Do lNewButtonRef.$text.$assign('I am new')
End IfNote that $cfield is the reference to the field where this code is actually located. In this case it is the button you have clicked on. You can also refer to another object by using this notation:
$cinst.$objs.myOtherField
“lNewButtonRef” is a local variable of type item reference. This is a pointer to the new field and can be checked with the IF statement. It can also be used to assign other properties such as $top, $left, $text etc.
So in theory you could dynamically create your UI but then you will lose the advantage of having a graphical design tool etc. This is one of the strength of Omnis development.
So why not simply drag the desired object from the component store onto the form?
Best,
Andreas
-
This reply was modified 10 months, 2 weeks ago by
Andreas Pfeiffer.
-
This reply was modified 10 months, 2 weeks ago by
-
Andreas Pfeiffer
AdministratorAugust 30, 2023 at 1:56 pm in reply to: How can I add new datagrid object to remote form?Hi Khanh,
with this technique you can copy objects in a remote form.
However the question is if this is a good approach. Designing the remote form by adding objects dynamically will be slow and is not using the remote form class as it has been designed. The class is a kind of a database record that is holding its fields. The whole library is the database that holds the UI and the functions.
If you still need an example how to copy objects in a remote form let me know. I will send some code how to achieve this. I am just afraid that Omnis is then kind of misused by storing the field information somewhere else. I have seen this in other projects which makes things unnecessary complex.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorAugust 25, 2023 at 1:44 pm in reply to: Is there a way to adress #COLORS by code?Hi,
There are color schemes that you can use. Here is the documentation: https://www.omnis.net/developers/resources/onlinedocs/WebDev/03jscomps.html#js-themes
For fat client please see here: https://www.omnis.net/developers/resources/onlinedocs/Programming/01omnistools.html#color-themes-and-appearance
I hope this helps.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorAugust 23, 2023 at 11:47 am in reply to: How can I assign values by “designcol” and “tabcount” with responsive web app ?Hello Khanh,
There is a typo in your code. You would need $designcols (with the “s”).
Best,
Andreas
-
Andreas Pfeiffer
AdministratorAugust 23, 2023 at 8:48 am in reply to: How do I hilite a selected line in a complex grid control?Hi Mischa,
I would recommend using a data grid instead. This one has $multipleselect and if switched on you can select multiple list lines.
The complex grid is designed for always being enterable, hence not really useful for making a user selection.
What you probably could do is adding a control that shows the status of a line. For example you could use a checkbox or an icon to show if a row has been selected. You could also change the text color of certain objects (see here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/03jscomps.html#exceptions) or use a page pane that shows different pages by setting the paged panes $dataname to a column of the list. https://www.omnis.net/developers/resources/onlinedocs/WebDev/03jscomps.html#using-dataname
Best,
Andreas
-
Andreas Pfeiffer
AdministratorOctober 6, 2023 at 12:04 pm in reply to: Reference an object in a superclassHi Martin,
I do not see anything wrong in the reference. It points to the grid component in the instance.
However $designcols is a property that is not accessible in the instance. That is why it is called $designcols.
Best,
Andreas
-
This reply was modified 9 months, 2 weeks ago by
Andreas Pfeiffer.
-
This reply was modified 9 months, 2 weeks ago by
Andreas Pfeiffer.
-
This reply was modified 9 months, 2 weeks ago by
-
Hi Martin,
There is a $iconsets property of your library. This is also documented here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/03jscomps.html#icon-sets
Best,
Andreas