• 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: Using an Applescript xcode plugin to access data from the folders under Groups&Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using an Applescript xcode plugin to access data from the folders under Groups&Files


  • Subject: Re: Using an Applescript xcode plugin to access data from the folders under Groups&Files
  • From: Chris Espinosa <email@hidden>
  • Date: Sat, 4 Jun 2005 08:39:27 -0700


On Jun 4, 2005, at 7:26 AM, Tommy Krul wrote:

I'm trying to write an applescript xcode plugin that, when activated, displays the contents of one of the Smart Groups (thus one of the (smart) folders under Groups&Files) in its own table view (on a separate window). I managed to create the plug-in, the interface and connect all event handlers. But I don't know how to access data from the Groups&Files using applescript... Any ideas?



Try something like this:

tell application "Xcode"
    set theCollection to my collect(project document 1)
end tell

to collect(theItem)
    tell application "Xcode"
        set rl to {}
        repeat with i in every item reference of theItem
            try
                set l to {name:name of i, contents:my collect(contents of i)}
            on error
                set l to {name:name of i, contents:contents of i}
            end try
            set end of rl to l
        end repeat
    end tell
    return rl
end collect

This gives you a list of {name: "string", contents: <some Xcode object> | <list of contents of the object>} pairs.

You can't access SmartGroup contents this way, but this will give you all the actual project items and groups.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Using an Applescript xcode plugin to access data from the folders under Groups&Files (From: Tommy Krul <email@hidden>)

  • Prev by Date: Using an Applescript xcode plugin to access data from the folders under Groups&Files
  • Next by Date: Re: Const qualifier conversion warnings
  • Previous by thread: Using an Applescript xcode plugin to access data from the folders under Groups&Files
  • Next by thread: Re: Using an Applescript xcode plugin to access data from the folders under Groups&Files
  • Index(es):
    • Date
    • Thread