Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 27, 2006, 07:54 PM   #1
trainguy77
macrumors 68040
 
trainguy77's Avatar
 
Join Date: Nov 2003
Send a message via AIM to trainguy77 Send a message via MSN to trainguy77 Send a message via Yahoo to trainguy77
awakefromnib in applescript application

How would I go about running some objective-C lines which need to run in awakefromnib in an applescript application?
trainguy77 is offline   0 Reply With Quote
Old Jul 27, 2006, 09:01 PM   #2
MongoTheGeek
macrumors 68040
 
MongoTheGeek's Avatar
 
Join Date: Sep 2003
Location: Its not so much where you are as when you are.
Send a message via MSN to MongoTheGeek Send a message via Yahoo to MongoTheGeek
Quote:
Originally Posted by trainguy77
How would I go about running some objective-C lines which need to run in awakefromnib in an applescript application?
You could put them in the awakeFromNib method of custom class and have that instantiated in the nib.

-or-

call method "foo" of class "bar"

inside of the awakeFromNib of the AppleScript and attach that to some object
__________________
The future ain't what it used to be.
MongoTheGeek is offline   0 Reply With Quote
Old Jul 27, 2006, 10:13 PM   #3
trainguy77
Thread Starter
macrumors 68040
 
trainguy77's Avatar
 
Join Date: Nov 2003
Send a message via AIM to trainguy77 Send a message via MSN to trainguy77 Send a message via Yahoo to trainguy77
Ok I am trying one thing but it does not seem to work. I have set it up so this line is run in applescript
Code:
on awake from nib theObject
	call method "awake"
end awake from nib
This runs fine as when I remove the brackets it errors.
However the Code does not execute. I think its something wrong with the way I set the code up.

Code:
- (void)awake
{
	NSLog(@"awake");
	
}
The actual stuff that does the work is cut out. However that code is placed in my custom class in between @implemention and @end. I think it should work. Its probably something really straight forward. It in the custom class called customWindow. What am I doing wrong?
trainguy77 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Applescript Application icon won't change Link1010 Mac Programming 9 Jun 12, 2014 03:48 AM
[AppleScript] Check what application is running in the foreground Amad3U5 Mac Programming 2 Jan 27, 2013 01:16 PM
AppleScript Application MacGeekJunior Mac Programming 2 Sep 2, 2012 02:12 PM
Applescript application not working within Automator Jeshua Mac Programming 0 Aug 3, 2012 06:41 PM
Find Apple Identifier of AppleScript Application webMan1 Mac Basics and Help 0 Jul 21, 2012 08:56 PM

Forum Jump

All times are GMT -5. The time now is 12:22 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC