Last change
on this file since 271 was 34, checked in by Nicholas Riley, 22 years ago |
Changes for Pester 1.1d1.
|
File size:
765 bytes
|
Line | |
---|
1 | //
|
---|
2 | // PSScriptAlert.m
|
---|
3 | // Pester
|
---|
4 | //
|
---|
5 | // Created by Nicholas Riley on Sat Oct 26 2002.
|
---|
6 | // Copyright (c) 2002 Nicholas Riley. All rights reserved.
|
---|
7 | //
|
---|
8 |
|
---|
9 | #import "PSScriptAlert.h"
|
---|
10 | #import "BDAlias.h"
|
---|
11 | #import "NDAppleScriptObject.h"
|
---|
12 |
|
---|
13 | @implementation PSScriptAlert
|
---|
14 |
|
---|
15 | + (PSScriptAlert *)alertWithScriptFileAlias:(BDAlias *)anAlias;
|
---|
16 | {
|
---|
17 | return [[[self alloc] initWithScriptFileAlias: anAlias] autorelease];
|
---|
18 | }
|
---|
19 |
|
---|
20 | - (id)initWithScriptFileAlias:(BDAlias *)anAlias;
|
---|
21 | {
|
---|
22 | if ( (self = [super init]) != nil) {
|
---|
23 | alias = [anAlias retain];
|
---|
24 | }
|
---|
25 | return self;
|
---|
26 | }
|
---|
27 |
|
---|
28 | - (void)triggerForAlarm:(PSAlarm *)alarm;
|
---|
29 | {
|
---|
30 | NDAppleScriptObject *as = [NDAppleScriptObject appleScriptObjectWithContentsOfFile: [alias fullPath]];
|
---|
31 |
|
---|
32 | if (as != nil) {
|
---|
33 | [as execute];
|
---|
34 | }
|
---|
35 | }
|
---|
36 | @end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.