1. iro-iro
- Posted by Michael Sabal <mjs at OSA.ATT.NE.JP>
May 30, 1998
-
Last edited May 31, 1998
[Mendokusai]
I've been having some trouble with NTT (Japan's domestic telephone =
company), which has been very inconvenient for connecting to the =
Internet. Since I can't check my email so often, I will have to leave =
the list for a while. I'll still be checking developments on the newly =
established thread page, so if you need to respond to something I've =
posted, I'll still get it. Or if you need to contact me directly, the =
best bet is to send a message from my homepage (address below). =
Hopefully this problem will be fixed soon, but I doubt it. Can't stand =
monopolies
[Dialogs]
I've been looking at the source for Win32Lib, and I think this might =
work for dialogs: Set the modal flag to WS_DLGFRAME, set the parent =
field to zero (why you can't declare it as a child is beyond me. I =
never would've thought it w/o Dave's suggestion), and set some boolean =
flags so the dialog isn't recreated if a user tries to change focus and =
reactivate the dialog. Or, instead of setting flags, trap all focus =
events to "lock" the dialog box. =20
[Modals]
I'm not quite sure what you mean by a window being modal. Do you mean =
that it looks like a separate window, or do you mean a locked or =
unlocked window?
[Hint for newbies (QBasic flavor)]
The biggest thing that sets Euphoria apart from other languages is the =
use of sequences. This means the old "DIM" statement in Basic is =
vanquished. It also means you can't initialize a variable at the same =
time you declare it. For example, "atom that =3D 4" is invalid. I need =
two statements: "atom that" and "that =3D 4". This could take some =
getting used to. Fixed length arrays are no good either. So if I want =
to set a limit for a card game, it might look like this:
constant NUMCARDS =3D 52
constant SUITES =3D {'h','d','c','s'}
constant CARDS =3D {'2','3','4',...,'A'} -- you get the idea
object deck
deck =3D {} -- this MUST be initialized, or you can't add to it
-- this is another trick: you MUSTN'T declare the variable used in a =
"for" loop
for a =3D 1 to 4 do -- the suites
for b =3D 1 to 13 do -- the cards
deck =3D append(deck,SUITES[a]&CARDS[b])
end for
end for
if length(deck) > NUMCARDS then -- because the values in the
-- for loop are hard coded, this is unnecessary, except
-- for example.
abort(1)
end if
--OR--
if length(deck) > NUMCARDS then
deck =3D deck[1..NUMCARDS]
end if
Anyway, catch you on the rebound.
Michael J. Sabal
http://home.att.ne.jp/gold/mjs/index.html