• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
does property exists in a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

does property exists in a record


  • Subject: does property exists in a record
  • From: Adam Hinshaw <email@hidden>
  • Date: Fri, 10 Aug 2001 23:40:23 +1000

Hi,
im currently stumped with records.

i want to be able to test that a property exists first before trying to set
it.

If its does not exists i will concatenate it to the record otherwise i want
to add stuff to its value (another record)

my current attempt as test (that is failing)
-------------
set x to {hello:"world", goodbye:"cruel world"}

propertyExists(x, "hello" as data)

on propertyExists(inRecord, theProp)
--does a property:theProp exist in a record:theRecord
set val to true
try
set test to theProp of inRecord
on error
set val to false
end try
return (val)
end propertyExists
------------

can any one see a way, (with out non standard osax ??)

thanks
adam.


  • Follow-Ups:
    • Re: does property exists in a record
      • From: Paul Skinner <email@hidden>
    • Re: does property exists in a record
      • From: Adam Hinshaw <email@hidden>
  • Prev by Date: Re: How do you check the equivalency of references?
  • Next by Date: Re: does property exists in a record
  • Previous by thread: Re: Getting list of open files in Excell
  • Next by thread: Re: does property exists in a record
  • Index(es):
    • Date
    • Thread