How to avoid duplicating methods
Martin Obongita
martin.obongita at yahoo.com
Fri Jan 6 20:12:50 UTC 2023
Rocco,
I notice that the doc says I'm 13 years back in Omnis Studio programming.
Thanks anyway, for the technote from Andreas, my first Omnis Studio Instructor.
Martin O.
Sent from Yahoo Mail on Android
On Fri, 6 Jan 2023 at 20:43, Rocco [KUNVI]<r.ventura at kunvi.it> wrote: Hi Doug and Martin,
There is also a techNote which point on it…
https://www.omnis.net/developers/resources/technotes/tnsq0027.jsp
Bye
Rocco
Il giorno ven 6 gen 2023 alle 18:31 Doug Easterbrook <doug at artsman.com> ha scritto:
hi Martin
not to make too fine a point of it. Table classes are a a specialized object class that is bound to a table.
meaning, you can do almost anything with a table class that you can do with an object class and vice versa after you have instantiated the object or table class
the only difference is how you instantiate either.
eg:
do list.$defineFromTableClass(’table’)
then you can use
do list.$doSomething
for objects
do object.$newref()
do object.$DoSomething
so they are the same.
in your subwindow, you don’t need to go to the hassle of making an object if your main window has a table class that it is buld from AND your subwindow is using variables from that table class.
if you have a $save or $dowork in your table class you can call it from the main window and the subwindow. you just need to have a reference to the list.
Doug EasterbrookArts Management Systems Ltd.mailto:doug at artsman.comhttp://www.artsman.comPhone (403) 650-1978
On Jan 6, 2023, at 8:40 AM, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
Rocco,
In the save method I call the verify method which validates and returns errors to the entry fields.
Moving the verify method to table class would break the Do $cinst.$clientcommand.
So moving the save method to an object makes better sense.
Regards,
Sent from Yahoo Mail on Android
On Fri, 6 Jan 2023 at 19:30, Rocco [KUNVI]<r.ventura at kunvi.it> wrote: Is it possible move the method to a table-class so you can call it from
everywhere, from the row/list 😉?
Bye
Rocco
Il giorno ven 6 gen 2023 alle 14:01 Martin Obongita via omnisdev-en <
omnisdev-en at lists.omnis-dev.com> ha scritto:
Hi All,
I have a sub window that fetches a list from a table class by calling a
method in the main window.
$cwind.$getDataList
I would wish to fetch the same list from the same table but in a different
sub window.
I do not want to copy the method from one window to another.
Is there a function that can call a method in a main window(A) from a sub
window of main window (B)?
I cannot inherit the window because Window (B) is performing a different
function.
Kind regardsMartin Obongita
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
--
_________________________________
Distinti saluti. Best regards.
*Rocco Dr. Ventura*
WMS Analist and Software Developer
*KUNVI srl - **Experiences Holding *(G)* - www.kunvi.it
<http://www.kunvi.it>*
Email: r.ventura at kunvi.it - Mobile: +39 348 5186051
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
--
_________________________________
Distinti saluti.Best regards.
Rocco Dr. Ventura
WMSAnalist and Software Developer
KUNVI srl - Experiences Holding (G) - www.kunvi.it
Email: r.ventura at kunvi.it - Mobile: +39 3485186051
More information about the omnisdev-en
mailing list