Forum Replies Created

Page 13 of 21
  • Andreas Pfeiffer

    Administrator
    December 11, 2023 at 11:20 am in reply to: $currentlayoutbreakpoint in a jsForm

    I would like to recommend for the first test using an instance variable and show it in an entry field in that subform to proof what layout breakpoint you are in.

    On the other hand why do you assign column widths and the width of the component at all?

    You can set $columnwidthsarepercentage=kTrue and then make sure each column has the right percentage width. The width property of the control should then automatically be controlled by the layout breakpoint the form is in. So no need to assign it at all.

  • Andreas Pfeiffer

    Administrator
    December 11, 2023 at 10:38 am in reply to: $currentlayoutbreakpoint in a jsForm

    Hi Martin,

    override the $event method of the subform like this:

    On evLayoutChanged

    Calculate iLayout as pBreakpoint ## iLayout is an integer instance variable.

    Then you could add a method to the subform that returns that value:

    $getLayout

    Quit Method iLayout

    So if you want to know in which layout the subform is from your main form you can then send a message to the subform like this:

    Do $cinst.$objs.mySubformField.$subinst().$getLayout() Returns lSubformLayout

    However I wonder why the main form supposed to bother in which layout breakpoint the subform is. Shouldn’t it organise by itself?

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    December 7, 2023 at 1:22 pm in reply to: Javascript:

    Hallo Herr Köhler,

    Zu Ihrer bisherigen Frage:

    >>Im Moment, „nur“, den Hintergrund eines Textfeldes.

    Bauen Sie doch einfach hinter Ihrem Label Control eine Animation ein und setzen Sie $backalpha des Textfeldes auf 0. Die Animation könnten Sie mit einer HTML Komponente einbinden.

    ————

    Zu Ihrer neuen Frage:

    wie ich das sehe, fragen Sie ob man Methoden ausgliedern soll. Das ist natürlich sinnvoll. Insbesondere sollte man nicht alles im Form selber programmieren sondern je nach Verwendungszweck in Table Klassen, Object Klassen oder auch Remote Object Klassen.

    In Ihrem konkreten Anwendungsfall verstehe ich allerdings nicht warum Sie die $text Eigenschaft des Label Controls zuweisen anstatt einfach eine Instanzvariable verwenden und dieser der Eigenschaft $dataname zuweisen?

    Mit freundlichen Grüßen

    Andreas H. Pfeiffer

  • 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 11, 2023 at 12:10 pm in reply to: $currentlayoutbreakpoint in a jsForm

    ha -ha. Why is that? Omnis Studio 11 has a lot of bugfixes and new features.

  • Andreas Pfeiffer

    Administrator
    December 11, 2023 at 11:27 am in reply to: $currentlayoutbreakpoint in a jsForm

    That should be fine. Though why not using Omnis Studio 11?

  • Andreas Pfeiffer

    Administrator
    December 11, 2023 at 10:53 am in reply to: $currentlayoutbreakpoint in a jsForm

    Do you put the breakpoint after the evLayoutChanged?

  • Andreas Pfeiffer

    Administrator
    December 11, 2023 at 10:52 am in reply to: $currentlayoutbreakpoint in a jsForm

    that is weird. Which build do you use?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    December 11, 2023 at 8:32 am in reply to: Contacts Web Application

    Hi Phil,

    Yes – please contact the support for this.

    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

Page 13 of 21