How to make the MallSearchFrame look for "every item":
Code:
Run KoLmafia
Login
Go to the Mall Search Frame
In the "Item to Find" field - which has keyboard focus - hit the "return" key.
(You get a list for all items in the mall.)
Something else I noticed:
I have "cachedMallSearches" set to true. This controls the Purchase frame's "searchField".
That means that every time I do a search, it adds it to the "Item to Find" combo box, which is an EditableAutoFilterComboBox
If false, that would be an AutoHighlightTextField
The gCLI has an "entryField" which is an AutoHighlightTextField
Both the gCLI and Purchases frame have a "FocusListener" which will select their respective input fields when they get focus.
Ii stuck in logging for MallSearchFrame and AutoFilterComboBox for focusGained and focusLost
From AdventureFrame, select the Purchases tab:
Code:
Focus gained
NameInputListener focus gained
NameInputListener focus lost
NameInputListener focus gained
Go to Terminal window to copy the output:
Code:
NameInputListener focus lost
Go back to KoLmafia GUI (Purchase tab is selected)
Code:
NameInputListener focus gained
Go to gCLI tab
Code:
NameInputListener focus lost
Go back to Purchases tab:
[
Code:
Focus gained
NameInputListener focus gained
NameInputListener focus lost
NameInputListener focus gained
That is just what you (I'd) expect: The Purchases frame detects when it gains or loses focus and so does its input field.
Back to gCLI tab:
Code:
NameInputListener focus lost
execute "timein"
Back to Purchases tab:
Whoah. The "Item to find" field is still selected - blinking cursor - but it did not get a focus event.
I typed in "stolen accordion". I also was logging "key events" - and none were logged.
I ended with the "return" key - and instead of executing the search, it cleared the input field.
I typed "stolen accordion" again again and hit the "search" button:
It cleared the Item to Find field and the following logging in the Purchases frame:
Code:
Action Confirmed on search field
eac.getSelectedItem() = null
eac.getText() = null
eac.getSelectedItem() = null
The EditableAutoFilterComboBox widget was no longer connected after the timein; it did not accept text, it did not handle the "return" key, and when I had text and used to "search" key, that button got a "null" for the text and decided that meant it should search for all items.
I'm going to try the same thing with "cachedMallSearches" set to false.