played that include that tile and pass to new util_cellSquareHeld()
method. In java implementation of that method, use existing lookup
activity code to display list of words. Enabled on the C side by a
compile-time flag in case it has problems. Right now the time spent
saving a game before launching the lookup activity, and reloading it
after, is pretty apparent, but that's in emulator which is slow.
I had to pass the score into draw_trayBegin since
draw_drawPendingScore() isn't called until the first tile's placed.
Note: as long as I'm messinng with this menuitem it should be disabled
when it's not the player's turn.
util_userQuery(QUERY_ROBOT_MOVE) with new util_informMove(), into
which the number of words formed and the words themselves are passed.
The process of consing up the score explanation was already passing
over the model, so storing the words is very little effort, and will
save a call back into the model where the user actually wants to do
the lookup.
another to pick the URL. Hacky code takes us back to the first after
the second is dismissed while only showing either if there's a choice
to be made. Also add menu item to lookup all words in the game --
useful for testing when robot refuses to play multiple words but maybe
also worth shipping.
French or German in use. Disable button if I don't know how to look a
word up. Later will want to have multiple URLs available, falling
back to googling for the word if I don't know about an online
dictionary.
jni, and when it calls back with it launch the browser directly if
there's only one, otherwise put up a choice list. Currently the list
dismisses after launching the browser once: need to fix that, probably
with a custom View. And need to deal with non-English games, and
maybe add other choices for lookup than dictionary.com.
uses existing stack and undo features to run a WordNotifierInfo over
some number of scoring passes to gather the words seen. Seems to work
as tested from gtk version. Now need to try from android....
use English. (Specifically, they've been played in English until now
and played letters will be reinterpreted in the right language for the
first time.)
AndroidManifest rather than created programatically: only with this
can I get EJECT events to work. Replacement class has static
register/unregister methods which DictsActivity uses.
'commit exchange' button when there's nothing to commit, and get rid
of error message used when committing nothing since it's now
impossible (on Android).
summaries DB list of dicts in the game and a method that queries that.
Pick delete-confirmation message based on the language of dict,
whether there are others in the same language, and whether games are
using that language or that dict.
correctly with having the same dict stored in more than one place.
Added DictAndLoc with members name and loc to support this, and used
in a bunch of places in place of mere strings, including
DictsActivity. Also removed code warning when you're deleting a dict
that's not the last in its lang, which incorrectly warned that the
dict was in use when in fact I can't tell that. The warning "might be
in use" sounds dumb so it's gone for now.
local/pending changes. Fixes bug where you change language, then
choose "download more..." from a player's dict choice spinner and find
on returning to GameConfig that the language has reverted.
it; add boolean, now always passed as false, to code printing names
for game config list of players to include the dictionary. It's
useful for debugging, and I think it'd make a good optional setting,
but nobody else thinks so. Once it's checked in the change can go if
I'm not using it.
dicts passed when opening a game was based on defaults, not read in
from the game data. Oops. So now it's a two-step process: open the
data, read in the game info, generate list of dicts from that, and
open full game with list of dicts. (TODO: optimize by caching game
data across multiple reads.)
version of the list user saw when choosing the index. Fix is to use
same list. Cancel after selecting dict didn't work as the selection
listener had already copied the selected dict name over. Now the
listener leaves that for the Ok button's onclick listener.
one and changing the site that used it to use the other. Not visible
outside of common, but should make it easier to harvest a list of all
words for one move or the entire game.
error message on Android); don't block trade if pending tiles are on
board; instead undo them. There's redo now so there's no need to
confirm, no data loss.
stuff. In java, respond to util_playerScoreHeld() and
util_bonusSquareHeld() by putting up toasts with existing strings.
For util_setInTrade(), fix exchange mode. Add two buttons at bottom
that replace toolbar (and corresponding buttons on menu). Redraw
scoreboard and board with high transparency to make it clear they're
disabled. Still to do: deal with case where ability to switch which
player's tray is visible is enabled.
with ncurses. The goals to make it easier to include watch on pipes
for incoming messages to better model Android -- and to be a bit more
modern. Works for one run of test script but needs more testing to be
turned on.
scheme as the rest of DlgDelegate. I'm still using a single ivar for
all dialogs, meaning they can't stack, but except for duplicate
showNotAgainDlgThen calls (where the message can be ignored) it
doesn't seem to be happening. Asserts are still in place to tell me
if I'm wrong.
crashes internally, and googling finds lots of reports/questions and
no answers. It appears NBS is broken on Android, at least for CDMA.
Might want to revisit on a newer OS version that the 2.1 I'm running
now.
listeners. They wind up getting called with mixed DlgDelegate.this
values, including one belonging to an Activity that's long-since
stopped and so the wrong ids are getting passed back.
button! Also assert the heck out of callbackIds to see if Android is
guaranteeing that no two dialogs can be up at once. I'm counting on
that, and need to know if it's not true.
button rather than just boolean. Add onDismissListener so can tell if
whole thing was backed-out of (since that's a different choice from
the two buttons "text" and "html" used in one case.) Fix compile
error that slipped by earlier: frequent clean builds required with
java.
from AndroidManifest.xml). Problem was that managed dialogs are
recreated between onStart() and onResume() yet onResume() was where
ivars (specifically m_gi) were set. Can't just set them in onStart()
because then I'd want to save state them in onStop() which isn't
guaranteed to be called. So create a function loadGame() and call it
from both, using a flag to prevent its running twice (which flag is
cleared in onPause())
dialogs depend only on bundleable ivars -- ints and strings, not Views
-- and bundle them. Don't use onPrepareDialog, only onCreateDialog,
and so call removeDialog() every time one's dismissed. Do some
refactoring to support this.
doing anything with it yet because any scheme to survive
OS-restoration has to deal with the Runnables I'm saving that can't be
bundled. Work in progress....