• 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
AppleWorks database bugs and work-arounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleWorks database bugs and work-arounds


  • Subject: AppleWorks database bugs and work-arounds
  • From: Cornwall <email@hidden>
  • Date: Sun, 11 Aug 2002 20:07:53 -0700

(*Start with a statement that works right*)
tell application "AppleWorks 6"
activate
every record of database of document 1
end tell
-->{{|Titles|:"Just So Stories", |Elapsed Time|:25.0, |Pages|:30.0}, {etc}}
--(field & value pairs for every record)

tell application "AppleWorks 6"
activate
id of every record of database of document 1
end tell
-->49 (id of first record)

(*work around*)
tell application "AppleWorks 6"
activate
id of (every record whose index > 0) of database of document 1
end tell
-->{49, 50, 52, 53, etc} (list of ids of every record)

tell application "AppleWorks 6"
activate
index of every record of database of document 1
end tell
-->1 (index of first record)

(*work around*)
tell application "AppleWorks 6"
activate
index of (every record whose id > 0) of database of document 1
end tell
-->{1, 2, 3, etc} (list of every record's index)

(*this works*)
tell application "AppleWorks 6"
activate
count of every record of database of document 1
end tell
-->47 (count of every record)

(*Every record whose visible is true bug.*)
tell application "AppleWorks 6"
activate
count of (every record whose visible is true) of database of document 1
end tell
-->36 (that is the count of hidden records!)

tell application "AppleWorks 6"
activate
count of (every record whose visible is false) of database of document 1
end tell
-->36 (that's correct at least)

(*Doesn't matter if 'id', 'index' or 'object specifier' is used below*)
tell application "AppleWorks 6"
activate
id of (every record whose visible is true) of database of document 1
end tell
-->list of id numbers of the hidden records!

(*Trying 'selection' - also broken*)
tell application "AppleWorks 6"
activate
select (every record whose visible is true) of database of document 1
end tell
-->list of references to the set of hidden records!

(*work around (whose purpose, in this case, is to print the
slected record of a visible set of records, and return to the
original visible set of records)*)
tell application "AppleWorks 6"
activate
tell database of document 1
set selectid to id of selection --remember selected record
set recref to (id of every record whose visible is false)
--get the hidden records' id's - since thst is all we can* get
hide every record
repeat with arec in recref --show every hidden rec
show record id arec
end repeat
set recref to (id of every record whose visible is false)
--gets id's of the 'original' visible records (finally!)
hide every record
show record id selectid --isolate the selected record
end tell
print document 1 --print only the selected record
tell database of document 1
hide every record
repeat with arec in recref --return to original visible recs
show record id arec
end repeat
end tell
end tell

Corny
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Display dialog Return - Bug or Feature?
  • Next by Date: Re: Ragtime
  • Previous by thread: Re: Display dialog Return - Bug or Feature?
  • Next by thread: Re: Ragtime
  • Index(es):
    • Date
    • Thread