Verfasste Forenbeiträge
-
AutorBeiträge
-
Entwarnung! Problem gelöst!
Okay, ich hätte selbst ein wenig länger nachdenken sollen, bevor ich meine Frage hier reinstelle. Ich habe eine für mich zufriedenstellende Lösung gefunden – dank Haukes Buch.
Liebe Grüße und bis zum nächsten Mal
GeorgDanke fuer die rasche Antwort Klaus. Hast recht im Inspector geht’s flott und sicher. Fuer “dayNames” klappt es. Wahrscheinlich ist es nicht gut, wenn “monthNames” fuer zwei unterschiedliche Zwecke verwendet wird – einmal im System als Funktion zur Ausgabe der Monatsnamen und dann noch als Eigenschaft des Kalender-Widget.
Liebe Gruesse,
Georg
PS.: Hast Du selbst Aenderungen am Kalender-Widget vorgenommen, da Du von einer leicht veraenderten Version schreibst?Wieder einmal vielen Dank Klaus für diesen 1A Tipp! Damit klappt es so wie ich mir das vorgestellt hatte.
liebe Grüße,
GeorgHabe da ein kleines Beispiel probiert, das aber nicht macht was ich mir erwartet hätte.
zwei Felder: myField, myText
ein Button: addmyText2myField
die 3 Elemente zu einer Gruppe zusammengefasst und hier die beiden Skripts:
im Button:on mouseUp if fld "myText" is not empty then if fld "myField" is not empty then put the text of fld "myField" into tTemp put tTemp & return & the text of fld "myText" into fld "myField" changeFldHeight else put the text of fld "myText" into fld "myField" changeFldHeight end if end if end mouseUp
und in der Gruppe (habe zuvor im Feld “myField” mit on textChanged versucht auf Änderungen zu reagieren, aber die Message wird scheinbar nicht ausgelöst!?):
command changeFldHeight put the topLeft of fld "myField" into tTL put the number of lines of fld "myField" into tN put return & tN after msg put the textHeight of fld "myField" into tTxHg put 0 into tNewHg if tN > 1 then repeat with x = 1 to tN put the textSize of line(x) of fld "myField" into tTxSz put the spaceBelow of line(x) of fld "myField" into tSpBw put the spaceAbove of line(x) of fld "myField" into tSpAb add (tTxSz + tSpBw + tSpAb) to tNewHg put return & "Neue Höhe: " & tNewHg & " nach Zeile: " & x after msg end repeat else put the textSize of line 1 of fld "myField" into tTxSz put the spaceBelow of line 1 of fld "myField" into tSpBw put the spaceAbove of line 1 of fld "myField" into tSpAb add (tTxSz + tSpBw + tSpAb) to tNewHg put return & "Neue Höhe: " & tNewHg & " nach Zeile 1." after msg end if --set the height of fld "myField" to tNewHg --set the topLeft of fld "myField" to tTL end changeFldHeight
die neue Zeilenhöhe bleibt immer bei 0?! Sieht jemand von Euch was ich falsch gemacht habe?
Wieder zähle ich auf euer Feedback und eure Unterstützung.
Gruß
GeorgMärz 21, 2019 um 23:40 Uhr als Antwort auf: Ist das Verhalten einer Radio Button Group auf andere Objekte uebertragbar? #13682Danke Torsten für deine Antworten! Liebe Grüße
März 20, 2019 um 17:21 Uhr als Antwort auf: Ist das Verhalten einer Radio Button Group auf andere Objekte uebertragbar? #13658Hallo Torsten,
ich wollte eine einfache Möglichkeit finden, um abhängig von einem String x eines von mehreren SVG Widgets anzeigen zu lassen – die anderen jedoch verstecken. Da dachte ich an etwas wie “Set the visible of all widgets in group X to the disabled behaviour of option buttons group” 🙂
Aber ich habe eine Lösung gefunden. Zuerst verstecke ich alle und setze dann das entsprechende auf sichtbar.Wie geht’s dir und deinem Startup? Hast du eine Lösung zur Versionskontrolle gefunden?
Liebe Grüße, GeorgMärz 18, 2019 um 20:41 Uhr als Antwort auf: Ist das Verhalten einer Radio Button Group auf andere Objekte uebertragbar? #13631Schade, waere aber cool – danke fuer die rasche Antwort Klaus.
liebe GruesseDanke Klaus jetzt klappt es! “Send” und “Private” vertragen sich scheinbar (noch) nicht (oder nicht mehr) in der aktuellen LC stable Release.
schönen Abend
GeorgSoryy computer says no! 🙂
Danke Klaus – hat aber im Moment eher “kosmetischen” Charakter. Obwohl, es würde mich schon interessieren, warum es nicht klappt. Theoretisch sollte es doch möglich sein, oder bin ich da am Holzweg?
liebe Grüße und einen schönen Abend
GeorgDanke Klaus, das werde ich noch durchführen.
liebe Grüße
GeorgErfolg!
Habe die Minimum Android Version auf 7.0 gestellt und siehe da es funktioniert!
Wäre interessant ab welcher Android Version es nicht mehr klappt -> darüber konnte ich in der Release Note keinen Hinweis finden.Liebe Grüße,
GeorgMöglicherweise mache ich etwas falsch? Aber ich schaffe es mit LC 9.0.2 nicht eine funktionierende Android-App zu erstellen, die nur ein Native Android Button Widget und ein Field hat. Minimum Version ist auf Android 4.3 eingestellt (sollte von LC 9.0.2 noch unterstützt werden). Die App sollte nichts anderes tun als bei Klick auf das Button-Widget einen Text in das Field schreiben. Die App lässt sich erstellen aber am Handy nicht starten. Die Fehlermeldung erscheint wie zuvor: “Leider wurde die MeinAppName beendet.”
Hat jemand hier schon erfolgreich Native Android Button Widgets in einer App eingesetzt? Welche Minimum Version habt ihr da eingestellt? Musstet ihr Includes von Hand setzen?
Ich würde mich über ein Feedback freuen!
liebe Grüße
GeorgMärz 15, 2019 um 22:48 Uhr als Antwort auf: Buttongruppe auf Handy – anderes Verhalten als in der IDE #13583Hallo Klaus,
Danke für die Tipps, mit dem short name of the target bzw. word 2 of the target.
Wegen “this card” und me:
das habe ich nach langer Fehlersuche hinzugefügt, da es ohne diese Zusätze immer wieder an diversen Stellen zu Abstürzen und Errors kam.
Ich werde das mal mit native android buttons probieren. Dazu muss ich mich aber erst mal einlesen.Auf jeden Fall, danke dass du dir die Zeit genommen hast und dir meinen Code durchgesehen hast.
Liebe Grüße,
GeorgMärz 15, 2019 um 22:21 Uhr als Antwort auf: Buttongruppe auf Handy – anderes Verhalten als in der IDE #13579Okay Klaus,
danke für den Hinweis. Habe die Änderung im Code durchgeführt und aufs Handy gebracht. Die Wiedergabe funktioniert wie zuvor. Am Verhalten der Buttons hat sich dadurch jedoch leider nichts geändert.
Liebe Grüße,
GeorgMärz 15, 2019 um 22:00 Uhr als Antwort auf: Buttongruppe auf Handy – anderes Verhalten als in der IDE #13573Werde da mal die Skripte posten:
Das ist im Stack:
global preRecPath global appMode global soundList on openStack setPath2preRec fillSoundList end openStack on setPath2preRec if the environment is "mobile" then put specialFolderPath("engine") into thisAppPath else put the filename of this stack into thisAppPath set the itemDelimiter to "/" delete the last item of thisAppPath end if put thisAppPath&"/wav/" into preRecPath end setPath2preRec on fillSoundList put files(preRecPath) into soundList end fillSoundList
Und das in der Card:
global preRecPath global appMode global listOfButtons global exitLearning global stopListening global startTest -- Modes: learn, checkMe on openCard put false into exitLearning put false into stopListening put false into startTest initStartView fillBtnList end openCard on initStartView put "learn" into appMode set the hilitedItem of widget "navBar" of me to 1 setDisplayToLearnMode end initStartView on setDisplayToLearnMode set the visible of group "grpPlayAll" of me to true set the visible of group "grpPlaySingle" of me to true put empty into field "LetterOutput" of me set the visible of field "LetterOutput" of me to true set the visible of field "userInstructions" of me to false set the visible of field "myGuess" of me to false set the visible of field "correctLetter" of me to false set the visible of group "cyrillicKeyboard" of me to true disable group "cyrillicKeyboard" of me set the visible of field "inCorrect" of me to false set the visible of field "inTotal" of me to false set the visible of field "outFrom" of me to false set the visible of field "outRight" of me to false set the visible of group "grpStartTest" of me to false set the visible of field "numOfTriesLabel" of me to false set the visible of field "numOfTry" of me to false end setDisplayToLearnMode on setDisplayToTestMode set the visible of group "grpPlayAll" of me to false set the visible of group "grpPlaySingle" of me to false set the visible of field "userInstructions" of me to false set the visible of field "myGuess" of me to true set the visible of field "correctLetter" of me to true set the visible of group "cyrillicKeyboard" of me to true enable group "cyrillicKeyboard" of me set the visible of field "inCorrect" of me to true put 0 into field "inCorrect" of me set the visible of field "inTotal" of me to true put 0 into field "inTotal" of me set the visible of field "outFrom" of me to true set the visible of field "outRight" of me to true set the visible of field "LetterOutput" of me to false put empty into field "myGuess" of me put empty into field "correctLetter" of me set the visible of group "grpStartTest" of me to true set the visible of field "numOfTriesLabel" of me to true set the visible of field "numOfTry" of me to true put 0 into field "numOfTry" of me end setDisplayToTestMode on fillBtnList set the itemDelimiter to space put 0 into tX repeat with x = 1 to the number of buttons of me put the name of btn(x) into tN --put tN after msg if item 2 of tN contains "LETTER_" then add 1 to tX if tX = 1 then put item 2 of tN into tLi replace quote with empty in tLi put tLi into listOfButtons else put item 2 of tN into tLi replace quote with empty in tLi put return & tLi after listOfButtons end if enable button tLi of me end if end repeat --put listOfButtons end fillBtnList on modeChanged if appMode is "learn" then setDisplayToLearnMode else setDisplayToTestMode end if end modeChanged on mouseUp if appMode is "learn" then if "LETTER_" is in the target then set the itemDelimiter to space put item 2 of the target into tBtn replace quote with empty in tBtn --put tBtn after msg put preRecPath & tBtn & ".wav" into tSound set the backgroundColor of button tBtn of this card to "#A0FFA0" put the label of the target into field "LetterOutput" of this card play tSound wait until the sound is done with messages set the backgroundColor of button tBtn of this card to empty end if end if if appMode is "checkMe" then if "LETTER_" is in the target then put the label of the target into field "myGuess" of this card end if end if end mouseUp
Damit schalte ich zwischen den beiden Modi um mittels Navigation Bar Widget:
global appMode on hiliteChanged put the hilitedItemName of me into appMode send "modeChanged" to me end hiliteChanged
Damit schalte ich im Lernmodus die Wiedergabe aller Buchstaben ein. Dazu habe ich eine Gruppe aus einem Button und einem SVG Widget erstellt und das Skript ist in der Gruppe plaziert:
global preRecPath global listOfButtons global exitLearning on mouseUp if not exitLearning then put true into exitLearning set the backgroundColor of button "btnPlayAll" of me to empty else put false into exitLearning set the backgroundColor of button "btnPlayAll" of me to "#A0FFA0" repeat for each line tL in listOfButtons --put line(tL) of listOfButtons into tBtn put preRecPath & tL & ".wav" into tSound put the label of button tL of this card into field "LetterOutput" of this card set the backgroundColor of button tL of this card to "#A0FFA0" play tSound wait until the sound is done with messages set the backgroundColor of button tL of this card to empty if exitLearning then put empty into field "LetterOutput" of this card exit repeat end if end repeat end if end mouseUp
Ebenso im Lernmodus jene Funktion, mit der ich auf Tastendruck den Buchstaben vorgelesen bekomme, wieder als Gruppe von Button und SVG Widget. Skript befindet sich in der Gruppe:
global preRecPath global listOfButtons global exitLearning global stopListening on mouseUp if not stopListening then put true into stopListening disable group "cyrillicKeyboard" of this card set the backgroundColor of button "btnPlaySingle" of me to empty put empty into field "LetterOutput" of this card else put false into stopListening enable group "cyrillicKeyboard" of this card set the backgroundColor of button "btnPlaySingle" of me to "#A0FFA0" end if pass mouseUp end mouseUp
Hier noch die Funktionalität des Testmodus. Wieder als Gruppe von Button und SVG Widget. Skript ist wieder in dieser Gruppe abgelegt:
global preRecPath global startTest on mouseUp put files(preRecPath) into tRecordedLetters sort lines of tRecordedLetters by random(500) if startTest then put false into startTest set the backgroundColor of button "btnStartTest" of me to empty disable group "cyrillicKeyboard" of this card set the visible of field "userInstructions" of this card to false else put true into startTest set the backgroundColor of button "btnStartTest" of me to "#A0FFA0" set the visible of field "userInstructions" of this card to false disable group "cyrillicKeyboard" of this card put the number of lines in tRecordedLetters into field "inTotal" of this card put 0 into tX repeat for each line tSoundFile in tRecordedLetters put empty into field "myGuess" of this card put empty into field "correctLetter" of this card add 1 to tX put tX into field "numOfTry" of this card put tSoundFile into tLetter replace ".wav" with empty in tLetter put the label of button tLetter of this card into tLetter --put return & tLetter after msg put preRecPath & tSoundFile into tSound --put return & tSound after msg play tSound wait until the sound is done with messages enable group "cyrillicKeyboard" of this card show field "userInstructions" of this card wait 3 seconds with messages disable group "cyrillicKeyboard" of this card hide field "userInstructions" of this card put tLetter into field "correctLetter" of this card wait 0.5 seconds with messages if not startTest then put empty into field "myGuess" of this card put empty into field "correctLetter" of this card put 0 into field "inCorrect" of this card put 0 into field "inTotal" of this card put 0 into field "numOfTry" of this card exit repeat end if if field "myGuess" of this card is not empty then put field "myGuess" of this card into tUsersGuess if tUsersGuess = tLetter then add 1 to field "inCorrect" of this card end if end if end repeat end if end mouseUp
cyrillicKeyboard fasst alle 32 Buchstabenbuttons zu einer Gruppe zusammen.
liebe Grüße,
Georg -
AutorBeiträge