• 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: Is this a major bug or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this a major bug or not?


  • Subject: Re: Is this a major bug or not?
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 31 May 2009 16:34:17 +0200


Le 31 mai 2009 à 15:52, Deivy Petrescu a écrit :

tell application "TextEdit" to tell document 1 to tell word1 of paragraph 1 of its text to set g to its properties


I continue to think that you are wrong.

Whe I run:

tell application "TextEdit" to tell document 1 to tell word 1 of paragraph 1 of its text to set g to its properties

I get this log report:

tell application "TextEdit"
get properties of word 1 of paragraph 1 of every text of document 1
{size:10.0, color:{0, 0, 0}, font:"Monaco", class:text}
end tell

which clearly show that the result is a record.

Your error is that when you ask for class of g, you are assuming that you will get the class of the object g.
The truth is that you get the property 'class' embedded in the record.
If you run this script :
tell application "TextEdit"
tell document 1
set g to properties of word 1 of paragraph 1
log class of g
end tell
end tell

tell application "AppleWorks 6"
set props to (get properties of document 1)
log class of props
end tell

It will be more clear:

tell application "TextEdit"
get properties of word 1 of paragraph 1 of document 1
{size:10.0, color:{0, 0, 0}, font:"Monaco", class:text}
(*text*)
end tell
tell application "AppleWorks 6"
get properties of document 1
{class:text document, name:"sans titre", index:1, modified:true, title:"", margins:{72, 72, 72, 72}, author:"", version:"", keywords:"", category:"", description:"", autohyphenate:false, file:false, merge file:false, date format:numeric date, fractional character widths:false, smart quotes:true, side handles:true, polygon autoclose:false, show invisibles:false, smooth fonts:true, word wrap:true, autosmooth:true, shift constraint:45}
(*text document*)
end tell

The record sent by TextEdit contains the property: class:text
The one sent by AppleWorks contains the property: class:text document.
I don't want to be rude but what is buggy is your analysis, not the behavior.

Yvan KOENIG (from FRANCE dimanche 31 mai 2009 16:33:01)


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Is this a major bug or not?
      • From: Deivy Marck Petrescu <email@hidden>
    • Re: Is this a major bug or not?
      • From: Deivy Marck Petrescu <email@hidden>
References: 
 >Re: Is this a major bug or not? (From: "Nigel Garvey" <email@hidden>)
 >Re: Is this a major bug or not? (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Is this a major bug or not?
  • Next by Date: Re: Is this a major bug or not?
  • Previous by thread: Re: Is this a major bug or not?
  • Next by thread: Re: Is this a major bug or not?
  • Index(es):
    • Date
    • Thread