Closed Bug 284554 Opened 19 years ago Closed 12 years ago

Enable preference panes to use applescript studio

Categories

(Camino Graveyard :: Preferences, defect, P3)

All
macOS
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: me, Unassigned)

Details

Attachments

(3 files)

Use ASKApplicationSuite classes in Camino.scriptsuite instead of NSCoreSuite so
AppleScriptKit can be used within prefpane bundles. This allows AppleScript
Studio to be used for the development of prefpanes.
Attachment #176107 - Flags: review?(sfraser_bugs)
Attachment #176107 - Attachment mime type: application/octet-stream → text/plain
Can I see this as a diff?
Here it is as a diff
Is there a downside to this?
Priority: -- → P3
Target Milestone: --- → Camino1.0
Since Geoff is off bugmail at the moment, is there any way this change will get in? If we're unaware what the downsides to this are, I'd be queasy making this change this late in the game.

Thoughts?
Target Milestone: Camino1.0 → Camino1.1
Component: General → Preferences
QA Contact: preferences
Now that we're past 1.0, can we look into landing this on trunk to see if there *are* any downsides to it? :)

Simon, do you know any Applescript folks at FruitCo who might know an answer to this?

cl
Assignee: mikepinkerton → nobody
Target Milestone: Camino1.1 → Camino2.0
This seems like it could be a cool thing for fostering community add-ons... assuming there aren't downsides.
Well, per this short tutorial, it look like it's what needs to be done, though I'll admit to not being entirely certain how the whole thing works:

<http://www.apple.com/applescript/studio/tutorials/addtoapp/pg01.html>

Page 5 has the bit we really care about.  The tutorial is on how to edit the TextEdit Xcode project to add a menu that calls some Applescripts, and on page 5 it says:

"The last step in the initial setup of the host project is only necessary if your application is already scriptable and has a <*.scriptSuite*> file. Since TextEdit is indeed scriptable, it’s necessary to edit the project’s <*.scriptSuite*> file to link the application and document objects to the NSAppleScriptKit suites instead of the NSCoreSuite suites."

Not very enlightening.  I think the point is that NSAppleScriptKit.* define the AppleScriptStudio handlers.  BTW, do we link against AppleScriptKit.framework? We may need to do that too.  Or it may be enough to let the prefPanes do that.
Comment on attachment 176110 [details] [diff] [review]
Attaching as a diff instead

Ping. Would it kill us to bake this on trunk and see what happens?
Attachment #176110 - Flags: superreview?(mikepinkerton)
Attachment #176110 - Flags: review+
Comment on attachment 176107 [details]
replace NSCoreSuite with ASKApplicationSuite

Clearing review flag on XML file.
Attachment #176107 - Flags: review?(sfraser_bugs)
Comment on attachment 176110 [details] [diff] [review]
Attaching as a diff instead

rs=pink
Attachment #176110 - Flags: superreview?(mikepinkerton) → superreview+
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This broke what limited AppleScript support we already had (e.g., "URL of window 1").
(In reply to comment #8)

> Not very enlightening.  I think the point is that NSAppleScriptKit.* define the
> AppleScriptStudio handlers.  BTW, do we link against AppleScriptKit.framework?
> We may need to do that too.  Or it may be enough to let the prefPanes do that.

I don't believe we do, but I do believe that we need to, otherwise our application script stuff breaks.
It sounds like we need to back this out OR fix things, ASAP.
(In reply to comment #13)
> This broke what limited AppleScript support we already had (e.g., "URL of
> window 1").

That's broken on branch, too, so it must be something else, since this only landed on trunk.
Actually, I think it's just URL related AS that's busted.  I filed Bug 366413 on that.
Reopening; Wevah's right (and I was seeing the 10.3.x .rsrc bug, for which our FAQ completely sucks).

So, we either need to to back out this change, or figure out how to fix it.  I'd prefer we do the former until we know how to do the latter.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: Enable preference panes to use applescript studio → Enable preference panes to use applescript studio [AppleScript currently broken on trunk]
Since I think we should back this out until we understand how to fix it, here's a backout patch.
Attachment #250983 - Flags: review?(stridey)
(In reply to comment #8)
> BTW, do we link against AppleScriptKit.framework?
> We may need to do that too.  Or it may be enough to let the prefPanes do that.

Linking against that framework doesn't seem to fix the problem.
Comment on attachment 250983 [details] [diff] [review]
patch for backout

r=me.  Sorry it took so long for me to get to it.
Attachment #250983 - Flags: review?(stridey)
Attachment #250983 - Flags: review?(mozilla)
Attachment #250983 - Flags: review?(mikepinkerton)
Attachment #250983 - Flags: review+
Attachment #250983 - Flags: review?(mikepinkerton) → superreview?(mikepinkerton)
Attachment #250983 - Flags: superreview?(mikepinkerton) → superreview+
Backed out on trunk.  Kicking to future, since presumably we do want this if we can do it without h0rking AppleScript.
Target Milestone: Camino2.0 → Future
Summary: Enable preference panes to use applescript studio [AppleScript currently broken on trunk] → Enable preference panes to use applescript studio
Also note that when we do this again, we should watch for/fix the console stuff philippe mentions in bug 365635 comment 0.
Do we really care that much about this now that we're close to having some workable Objective-C preference pane development docs?

Also, do we have *any* idea what might need to be done to make this work, since it clearly wasn't as simple as we thought?
Hardware: Macintosh → All
(In reply to comment #20)
> (In reply to comment #8)
> > BTW, do we link against AppleScriptKit.framework?
> > We may need to do that too.  Or it may be enough to let the prefPanes do that.
> 
> Linking against that framework doesn't seem to fix the problem.

In the event we ever come back to this bug and try to figure out how to make it work, dcj points out linking ASK is bad news: http://openradar.appspot.com/radar?id=232401
AppleScript Studio is dead.  Requiescat in pace.
Status: REOPENED → RESOLVED
Closed: 18 years ago12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: