awakefromnib in applescript application

Discussion in 'Mac Programming' started by trainguy77, Jul 27, 2006.

  1. macrumors 68040


    Nov 13, 2003
    How would I go about running some objective-C lines which need to run in awakefromnib in an applescript application?
  2. macrumors 68040


    Sep 13, 2003
    Its not so much where you are as when you are.
    You could put them in the awakeFromNib method of custom class and have that instantiated in the nib.


    call method "foo" of class "bar"

    inside of the awakeFromNib of the AppleScript and attach that to some object
  3. thread starter macrumors 68040


    Nov 13, 2003
    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
    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.

    - (void)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?

Share This Page