say "Demonstration von Pop-Up-Fenstern" /* arguments: message, title, messageType */ .bsf.dialog~messageBox("Achtung, hier kommt Gruppe 03", "Ank��ndigung") .bsf.dialog~messageBox("Durch Fehler lernen wir!", "Fehlermeldung", "error") say "Demonstration Fehlermeldung - Ende" /* arguments: message, title, messageType, optionType, icon, textOfButtons, defaultButton */ res=.bsf.dialog~dialogBox("Werden wir jemals Programmiererinnen?", "Lebensfrage" , "question", "YesNoCancel") txtButtons=.list~of("Choose ooRexx", "Choose Python", "Choose Java") defButton ="Choose ooRexx" res=.bsf.dialog~dialogBox("Please pick a language", , "question", , , txtButtons, defButton) /* arguments: message, title, messageType, icon, textOfOptions, defaultValue */ res=.bsf.dialog~inputBox("Enter your name:") say "inputBox: your name is:" pp(res) ::requires BSF.CLS ***** if BsfInvokedBy()=1 then say "This Rexx program was invoked by Java!" else if BsfInvokedBy()=2 then say "This Rexx program was invoked by Rexx, JVM loaded by Rexx!" else say "No JVM present, we got troubles ..." .bsf~bsf.import("org.oorexx.datergf.DateTimeRGF", "DateTimeRGF") /* bsf.import the Java class*/ .bsf~bsf.import("org.oorexx.datergf.DateFormatRGF", "DateFormatRGF") /* bsf.import the Java class*/ dt1 = .DateTimeRGF~new /* create and get a DateTimeRGF object */ dt1~update /* set to now */ say dt1~toString /* show the values */ i=3 say "Welche Uhrzeit ist in" i", 2, 1 Sekunden?" call bsf 'sleep', i /* sleep i seconds using bsf4rexx */ dt1~update /* set to now */ say dt1~toString /* show the values */ say date1 = dt1~bsf.getFieldValue("date") /* get DateRGF field */ /* determine ISO-week, using a public static field of the interface "DTC" */ week=date1~get(.bsf~bsf.getStaticValue("org.oorexx.datergf.DTC", "WEEK") ) say "Die aktuelle Kalenderwoche lautet#" week time1 = dt1~bsf.getFieldValue("time") /* get TimeRGF field */ easter = date1~easter(date1) /* get Easter sunday for this year */ week=easter~get(.bsf~bsf.getStaticValue("org.oorexx.datergf.DTC", "WEEK") ) say "Ostersonntag war im Jahr 2022 in Kalenderwoche #:" week say say "Wollt Ihr mehr ��ber Ostern erfahren? Dann folgt dem Link" say " https://de.wikipedia.org/wiki/Osterdatum" ::requires BSF.CLS -- get the direct Object Rexx BSF support