And just for the sake of completion, here's the solution:

  repeat with i = 1 to fieldCount
    addProp fieldList, member(i,2).name.symbol, member(i,2).text
  end repeat

By appending .symbol to member(i,2).name, it generates the necessary #
syntax for PostNetText.

What started this morning as 24 pages of code is down to a mere 8 lines of
Lingo!

Thanks, everyone, for your help.

-Ian

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Ian Lloyd
Sent: Thursday, July 19, 2001 12:33 PM
To: [EMAIL PROTECTED]
Subject: RE: <lingo-l> multi-page forms


Okay, I'm really close to figuring out this problem. I sort of decided to
back up and punt, as it were...

I've moved all of the fields from the multi-page form into their own cast,
which we'll call "Application Fields". I have abandoned the internal,
pre-made Lingo (from Library > Internet > Forms) in favour of this approach.
My thought, at this point, is that I can use the names and contents of the
fields to generate my property list, which I can then pass to my database
via PostNetText.

So, here's my current state:

I'm using a counter to step through the members of the cast and extract the
information I need, using the following code:

  fieldCount = the number of members of castlib("Application Fields")

  fieldList = [:]

  repeat with i = 1 to fieldCount
    addProp fieldList, member(i,2).name, member(i,2).text
  end repeat

Where 2 (in member(i,2).name, etc.) is the number of the cast. The problem
I'm having now is that member(i,2).name is being treated as a string, rather
than a property and is, therefore, not being handled correctly by
PostNetText.

So, any clues? My first thought was that putting the names into a linear
list would remove the offending double-quotes (what _seems_ to be causing
the data to be interpreted as a string), but that didn't work. I then tried
to just cut the quotes out, using:

  delete char 1 of nameList[i]

Which was in a repeat loop similar to the one above, and where nameList was
a linear list that held the names of the fields, but Director just choked.

Whoa... didn't mean for this to get so long. Anyhoo, any help is greatly
appreciated.

Thanks!
Ian



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of [EMAIL PROTECTED]
Sent: Thursday, July 19, 2001 8:22 AM
To: [EMAIL PROTECTED]
Subject: RE: <lingo-l> multi-page forms




From: Roy C. Crisman

Ian, I haven't used the behaviors you are talking about, but maybe try this:

Have the Fields that are filled in by the user as single, long sprites.  As
you
come to page one, you fill in page one's sprites.  As you go to page two,
those
sprites are still there, but you've moved them off the screen (still a
single
sprite span), and the page two fields start.  Page three has page one and
page
two sprites moved off screen and new page three field sprites.  Then when
the
submit behavior fires, it gets the field information from ALL the sprites,
cause
they're all still on the page, just off screen.

Or you could write some custom lingo to store all the field information as
you
go, but you didn't sound too confident about programming custom Lingo, which
is
why I suggest this work-around.

roymeo



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to