Andreas Pfeiffer
Forum Replies Created
-
Andreas Pfeiffer
AdministratorDecember 11, 2023 at 11:20 am in reply to: $currentlayoutbreakpoint in a jsFormI 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
AdministratorDecember 11, 2023 at 10:38 am in reply to: $currentlayoutbreakpoint in a jsFormHi 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
-
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
-
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)
-
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
AdministratorDecember 11, 2023 at 12:10 pm in reply to: $currentlayoutbreakpoint in a jsFormha -ha. Why is that? Omnis Studio 11 has a lot of bugfixes and new features.
-
Andreas Pfeiffer
AdministratorDecember 11, 2023 at 11:27 am in reply to: $currentlayoutbreakpoint in a jsFormThat should be fine. Though why not using Omnis Studio 11?
-
Andreas Pfeiffer
AdministratorDecember 11, 2023 at 10:53 am in reply to: $currentlayoutbreakpoint in a jsFormDo you put the breakpoint after the evLayoutChanged?
-
Andreas Pfeiffer
AdministratorDecember 11, 2023 at 10:52 am in reply to: $currentlayoutbreakpoint in a jsFormthat is weird. Which build do you use?
Best,
Andreas
-
Hi Phil,
Yes – please contact the support for this.
Best,
Andreas
-
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
-
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.
-
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
-
Dann benötigen Sie eine Referenz auf das entsprechende Feld ..
-
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
-
This reply was modified 2 years ago by
Andreas Pfeiffer.
-
This reply was modified 2 years ago by