Forum Replies Created

Page 13 of 21
  • Andreas Pfeiffer

    Administrator
    December 5, 2023 at 5:43 pm in reply to: Javascript:

    Vielleicht ist das $backpattern ja nicht korrekt gesetzt. Versuchen Sie zunächst die Farbe im Design zu ändern. Können Sie dort die $backcolor ändern, dann sollte es auch im Code klappen. Eventuell geht ja $forecolor.

    Ich verstehe allerdings immer noch nicht warum Sie da unbedingt JavaScript benötigen. Ich würde das zunächst mal in Omnis versuchen.

    Do $cinst.$objs.Top.$backcolor.$assign(kRed)

  • Andreas Pfeiffer

    Administrator
    December 5, 2023 at 3:52 pm in reply to: Javascript:

    Hallo Herr Köhler,

    das verstehe ich nicht. Sie können JavaScript und Omnis Notationen in einer Methode mischen wie in Ihrem Farbbeispiel.

    Mit freundlichen Grüßen

    Andreas H. Pfeiffer

  • Andreas Pfeiffer

    Administrator
    December 1, 2023 at 2:07 pm in reply to: simplifying code…

    Hello Uwe,

    I do not think that will work and this might be for two reasons. A list can have more than one line and therefore when having a list you will always need to tell which line you want the data from. But even then I do not think this will work.

    However to achieve a one liner you could encapsulate the method inside the object:

    1. make a new method in the table class, i.e. $getName

    2. this method should receive your ID and possibly the line number (if it is not a row).

    3. This could be the code:

    Do $cinst.$load(pIdent)

    Quit method $cinst.[pLine].name

    4. Then the code to call this would be like:

    Do myList.$getName(RecID,LineNo) Returns myValue

    or

    Calculate myValue as myList.$getName(RecID,LineNo)

    Does that help?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    November 22, 2023 at 8:08 am in reply to: Export to a file-issues

    Hi Uwe,

    You might want to look at a technical note I wrote a while ago. It provides a tool that generates a CSV file for the client by a given list variable. https://www.omnis.net/developers/resources/technotes/tnjs0011.jsp

    CSV is a standard that should be easy to import in Excel or Numbers.

    Hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    December 7, 2023 at 10:53 am in reply to: Javascript:

    Hallo Herr Köhler,

    um welches Objekt/Control handelt es sich denn und wie wollen Sie es animieren?

    Mit freundlichen Grüßen

    Andreas H. Pfeiffer

  • Andreas Pfeiffer

    Administrator
    December 6, 2023 at 1:43 pm in reply to: Javascript:

    Ich weiß ja immer noch nicht was Sie eigentlich genau erreichen wollen. Aber vielleicht hilft es ja wenn Sie eine Omnis HTML Komponente nehmen. Der können Sie einen CSS Namen mitgeben und über diesen können Sie das Objekt wieder via JavaScript referenzieren.

  • Andreas Pfeiffer

    Administrator
    December 5, 2023 at 6:23 pm in reply to: Javascript:

    also z.B.

    Calculate myField as $cinst.$objs.top

    Schreiben Sie dann “debugger;” in einen JavaScript Befehl:

    JavaScript: debugger;

    .. und sorgen Sie dafür, dass die Entwicklertools des Browsers offen sind. Damit lässt sich dann der Code im Browser debuggen. Dann sollte der WebBrowser bei dem Befehl “debugger;” stehen bleiben und Sie können sich die Referenzen ansehen.

    Das ist auch ganz gut in einer Technical Note erklärt: https://www.omnis.net/developers/resources/technotes/tnjs0006.jsp

  • Andreas Pfeiffer

    Administrator
    December 5, 2023 at 6:01 pm in reply to: Javascript:

    Dann benötigen Sie eine Referenz auf das entsprechende Feld ..

  • Andreas Pfeiffer

    Administrator
    December 5, 2023 at 3:20 pm in reply to: Javascript:

    Hallo Herr Köhler,

    jetzt haben wir uns ihr Bild noch mal genauer angesehen. Wollen Sie in einer client-execute Methode eine Omnis Variable ansprechen?

    Dazu legen Sie bitte eine lokale Variable an in der Methode und sprechen diese dann im JS Code an. Beachten Sie aber bitte, dass Omnis “red” nicht als Farbe akzeptieren wird sondern es wird eine Nummer benötigt. Dazu gibt es ja in Omnis die RGB und RGBA Funktion.

    Mit freundlichen Grüßen

    Andreas H. Pfeiffer

  • Andreas Pfeiffer

    Administrator
    December 5, 2023 at 3:04 pm in reply to: Javascript:

    Hallo Herr Köhler,

    Variablen in Omnis sollten Sie nicht von außen ansprechen. Das widerspricht jedem objektorientierten Programmieransatz. Damit würden Sie die Kapselung aufbrechen. Den einzigen Weg den ich hier sehe ist, etwas in den localstorage zu schreiben und es dann wieder auszulesen. Dazu gibt es einen Client Command in Omnis mit dem man sowohl schreiben als auch lesen kann. Siehe auch: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#client-preferences

    Was genau haben Sie denn vor?

    Mit freundlichen Grüßen

    Andreas H. Pfeiffer

  • Andreas Pfeiffer

    Administrator
    December 4, 2023 at 6:31 pm in reply to: Javascript:

    Hallo Herr Köhler,

    wenn Sie die HTML Tags meinen in den Posts – das habe ich bereits an die Entwickler des Forums weiter geleitet.

    Mit freundlichen Grüßen

    Andreas H. Pfeiffer

  • Andreas Pfeiffer

    Administrator
    December 4, 2023 at 3:51 pm in reply to: Javascript:

    Hello Heiko,

    I am not sure what you are trying to achieve here.

    However if you want to use CSS formatting in your Omnis JS app you could use your own CSS class within the user.css file and assign the CSS class name to the $cssclassname property of your Omnis component. Note that when you want to override an Omnis property it might be required to use !important in some cases.

    See also here: https://www.omnis.net/developers/resources/onlinedocs/WebDev/03jscomps.html#custom-css-styles

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    December 1, 2023 at 2:51 pm in reply to: simplifying code…

    Hi Uwe,

    great! Good idea to put it into the super class.

    Do not forget to consider the line number. If no current line is set it will be null otherwise.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    November 29, 2023 at 9:57 am in reply to: Export to a file-issues

    Great! I am glad it works for you.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    November 8, 2023 at 8:23 am in reply to: How to Retrieve Domain Name of current Windows user in Omnis Studio?

    Hi Roland,

    The Whoami is in the tech note: https://www.technotes.omnis.net/Technical%20Notes/Extending%20Omnis/Using%20the%20oProcess%20Worker/3.Simple%20example%3A%20whoami.html

    Attached please find the zip sample library. Note you can open it with the pro version of Omnis Studio. If you have a community edition check out this tech note: https://www.technotes.omnis.net/Technical%20Notes/Extending%20Omnis/Using%20the%20oProcess%20Worker/4.Complex%20example%3A%20unzipping.html

    Best regards,

    Andreas

Page 13 of 21