• 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
Re: resetting record values to ""
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting record values to ""


  • Subject: Re: resetting record values to ""
  • From: Bryan <email@hidden>
  • Date: Tue, 02 Jan 2001 01:17:50 -0500
  • Organization: Apex Radiology

Yes, you're right John, that was the problem. The copy method solved the
problem.
(even though I never mentioned it was a problem, it must be quite common.)

I had been using the method Victor mentioned and it was writing back to
the original
record. I am not quite sure how this can happen though.

Thanks everyone for the help.

Bryan Kaufman

John W Baxter wrote:

> Victor Yee <email@hidden> wrote
>
> >Hi Bryan,
> >
> >Would this work for you?
> >
> >property defaultRecord : {a:"", b:"", c:""}
> >
> >set thisRecord to {a:"A", b:"B", c:"C"}
> >
> >thisRecord -->{a:"A", b:"B", c:"C"}
> >
> >set thisRecord to defaultRecord
> >
> >thisRecord -->{a:"", b:"", c:""}
>
> I think this is one of the places where I would prefer copy over set...
>
> Same code except
> --not this: set thisRecord to defaultRecord
> copy defaultRecord to thisRecord
>
> Doing it this way will preclude accidental changes to defaultRecord.
>
> Michelle Steiner wrote:
> >BTW, it looks like you'll have to change the names of the "state" and
> >"month" fields because they are already used by Applescript.
>
> Perhaps not...
> copy {state:"a", month:"b"} to x
> x's month
>
> seems to work.
>
> --John
>
> --
> John Baxter email@hidden Port Ludlow, WA, USA
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


References: 
 >Re: resetting record values to "" (From: John W Baxter <email@hidden>)

  • Prev by Date: Re: resetting record values to ""
  • Next by Date: Re: applescript-users digest, Vol 2 #174 - 12 msgs
  • Previous by thread: Re: resetting record values to ""
  • Next by thread: Re: resetting record values to ""
  • Index(es):
    • Date
    • Thread