Re: [NTLK] Setting flags in newtscript

From: Adam Ladds (aladds_at_gmail.com)
Date: Wed Feb 02 2005 - 14:55:56 PST


On Wednesday, February 2, 2005, at 10:21 PM, John Charlton wrote:

> I'll start by saying I'm new at this too, so keep that in mind.
>
> I think you need a protoInputLine rather than static text for your
> input. This will allow recognition and all the regular stuff (tapping,
> keyboard input, etc.)

I am, I have a protoInputLine for input, a "next" button and a
statictext output field, and a statictext output line for telling the
user the start of the next line, and a "New Game" button, and a
keyboard button, and the window is a little wider than tall, so the
keyboard fits nicely underneath when active, also, it will work nicely
on the eMate, as it fits with the landscape style.

The game works fine, except for the hiding and showing of this box, the
game works fine with the box showing, but you can see it then, and the
idea is it appears at the end. I have thought about having a variable
which holds the story then setting it at the end, but the variables are
only accessible when the code runs first, even if it is defined in the
open script(? forgot what it's called, and my powermac 7500/120Mhz
604(programming mac) is off) The way I got the thing to remember what
stage it was on was to have a progress bar which has the value stored
as it's value, but it didn't move, although you could read the value
from it, this is another thing that makes me think there is a refresh
or redraw thing somewhere

> Didn't think about the SetValue() function to hide and show a view,
> but you might find that the functions Hide() and Show() do some extra
> work for you. See page 2-23 of the Programmer's Reference. You can
> also play sounds to go with it. They thought of everything.

I only have the NS reference printed off (took ages) but I have the PDF
of the programmers ref. i'll probably print that bit off, but this
sounds more promising.

Another thought I had would be to have two statictext fields, one off
the visible window, and to set the non-visible one to the story's text,
then to "sync" them at the end, taking all the text from the hidden one
and putting it in the main one

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Wed Feb 02 2005 - 15:30:00 PST