Thought I could migrate my project from MacOS to Windows without issue.
My project successfully built and executed on Windows, but EVERY combobox I’m using in the software is BROKEN. Nothing I type appears in the combobox. The handler searches for items that match the alpha, when I select one from the popup list, it does not appear visibly in the field. I can’t tell whether a loop situation with selectionChanged has occurred, there’s no code written in that event..
There may be something I’ve created in my code causing this. The code, in the combobox, works on Mac. The notebook I purchased a 2023 running Win11-Home.
This code works fine in the Mac build. No idea what I’m missing to see it working on Windows:
Var i as integer
Var j as integer
Var nameArray(0) as string
Var isNewName as Boolean
if not suppressSelChange then
suppressSelChange=true
me.text = UpperCase(left(me.text,1))+right(me.text,len(me.text)-1)
suppressSelChange=false
nameChars = me.text
me.RemoveAllRows
if len(nameChars) > 0 then
for i = 0 to LedgerWindow.Cash.RowCount-1
if Left(LedgerWindow.Cash.cellTextAt(i,1),Len(nameChars))=nameChars then
isNewName=true
for j = 0 to nameArray.LastIndex
if nameArray(j) = nthField(LedgerWindow.Cash.cellTextAt(i,1),chr(9),1) then
isNewName = false
end if
next
if isNewName = true then
nameArray.Add nthField(LedgerWindow.Cash.cellTextAt(i,1),chr(9),1)
end if
end if
next
nameArray.sort
for i = 0 to nameArray.LastIndex
if nameArray(i)<>“” then
me.addRow nameArray(i)
end if
next
isThere(namechars)
end if
me.SelectionStart = len(nameChars)
end if
Note: the suppressSelChange property I created was so I could capitalize the first character in the entry:
suppressSelChange=true
me.text = UpperCase(left(me.text,1))+right(me.text,len(me.text)-1)
suppressSelChange=false
If I remove the suppressSelChange property the code between them fails. I’ve moved my code between the selectionChanged and the TextChanged events. It’s in the TextChanged event because when in SelectionChanged the code goes into an infinite loop.
I’m hoping someone may notice something I haven’t learned about yet. I’ve did not expect this when I ran my project on a Windows box.
Pretty sure I need to provide more clarity here, but I’ve described this best I can. I know when there is no code entered in the combobox, what I type will appear (running on Windows). If comboboxes are broken, I wish I’d heard about that one before upgrading to create a Windows build. I know I had trouble on the Mac with combobox, not surprised this is happening.
An additional request, how does AutoCompletion work? I had nothing but difficulty understanding it, so I kept it disabled.