Well, you could first pre-process the string and strip out any spaces, as in:

on compress stringData
   newString =""
   strLen =length(stringData)
   repeat with x=1 to strLen
     thisChar =char x of stringData
     if (thisChar <> " ") then
       newString =newString & thisChar
     end if
   end repeat
   return(newString)
end


So, symbol(member("teamname").text) 
becomes  symbol(compress(member("teamname").text))

However, I would say (1) there are other ways of invalidating the symbol 
besides just spaces, and (2) properties DON'T HAVE TO BE symbols.  They 
could be just strings.  Although this slows down the processing and 
increases the memory requirements, if you just have a small number (couple 
hundred, tops) then it wouldn't really matter.  In that case, just do:

setaprop(member("teamname").text, ... etc.

- Tab


At 03:36 AM 5/8/01 +0100, Alan Robinson wrote:
>Hi all
>I am trying to create a data structure from a data entry screen by setting
>the property as a symbol and the value based on the names entered in a field
>using this code:
>mainlist.sub1.teams.setaprop(symbol(member("teamname").text),[#name:member("
>teamname").text,#group:member("teamgroup").text])
>It appears that anything typed after a space in the field is ignored as the
>property. Consequently if two names begin with the same initial then only
>one appears in the database. Is there a way to create symbol properties that
>will ignore the space typed in the field. If not any suggestions on
>alternative solutions much appreciated.
>Alan


[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