Post by chrissi75 on May 23, 2018 16:50:07 GMT
Hello guys,
I am new to programming and JustBASIC. At the moment I try to write my own little database using the database framework provided by Stefan Pendl.
I try to use a texteditor-control to edit an Item, but it does not work. I can't use the enter-key. If I do, the dialog closes and I get this error message:
Runtime error: Falscher Parameter. OS error 16r57
This is the code I use
sub DisplayDialog Caption$, ItemNumber
WindowWidth = 450
WindowHeight = 350
UpperLeftX = 1
UpperLeftY = 1
statictext #item.Schlagwort, "Schlagwort:", 10, 7, 80,25
statictext #item.Inhalt, "Text: ", 10, 42, 80, 25
textbox #item.SchlagwortBox, 105, 7, 300, 25
texteditor #item.InhaltBox, 105, 42, 300, 150
button #item.cancel, "Close", [quit.item], UL, 255, 210, 63, 25
button #item.default, "Apply", [apply], UL, 328, 210, 75, 25
open Caption$; " - "; ItemNumber for dialog_modal as #item
print #item, "font ms_sans_serif 10"
print #item, "trapclose [quit.item]"
if ItemNumber <> MaxItems then
#item.SchlagwortBox word$(einleitungitem$(ItemNumber), 1, chr$(0))
#item.InhaltBox word$(einleitungitem$(ItemNumber), 2, chr$(0))
end if
#item.SchlagwortBox "!setfocus"
wait
[apply]
'notice "MaxItems = ";MaxItems; " und ItemNumber = "; ItemNumber
#item.SchlagWortBox "!contents? Number$"
#item.InhaltBox "!contents? Name$"
einleitungitems$(ItemNumber) = trim$(Name$); chr$(0); trim$(Number$)
notice einleitungitems$(ItemNumber)
call ApplyItemData
wait
[quit.item]
close #item
end sub
What am I doing wrong?
Thanks for your help.
Thanks for your help.
Chris