Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiger Intel AS Studio, eSellerate Integrated to Embedded transition



> @interface NSApplication (myTestInAppController)
> - (void)testFunction;
> @end
> 
> And then I add the following to AppController.m:
> 
> @implementation NSApplication (myTestInAppController)
> - (void)testFunction {
> NSRunAlertPanel(@"TEST FUNCTION", @"", @"Ok", nil, nil);
> }
> @end

Hi Graham,

Well I hope you are having better luck on the AppleScript list. AppleScript
development is beyond my knowledge.  But if you can get the above to work, I
would suggest wrapping the new Esellerate functions in your own methods.
Keep the testFunction as is and instead of calling NSRunAlertPanel add your
Esellerate code and return information for success.

@interface NSApplication (myTestInAppController)
- (BOOL)myEsellerateMethod:(NSString *)key;
@end

And then I add the following to AppController.m:

@implementation NSApplication (myTestInAppController)
- (BOOL)myEsellerateMethod:(NSString *)key {

NSString *publisherID = @"1234";
NSString *activationID = @"ACT1234";


NSString *pathToEngine = [[NSBundle mainBundle]
pathForResource:@"EWSMacCompress.tar.gz" ofType:nil];
 OSStatus error =  eWeb_InstallEngineFromPath([pathToEngine UTF8String]);
    
 if ( error < E_SUCCESS) {
     NSLog(@"Esellerate engine install failed with code: %d",
engineStatus);
     return NO;
 }

OSStatus validSN = eWeb_ActivateSerialNumber ([publisherID UTF8String],
[activationID UTF8String], [key UTF8String], 1);

If ( validSN > 0 )
return YES;
else
return NO;

}
@end

But as I mentioned before that is a shot in the dark, not knowing about
AppleScript development I just assume this is something that should work.

Conor


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.