Re: Practical joke help
Re: Practical joke help
- Subject: Re: Practical joke help
- From: "Clark Cox" <email@hidden>
- Date: Mon, 17 Dec 2007 06:48:03 -0800
your problem is the [MyWindowController showWindow]
First: the method is "showWindow:", not "showWindow" (ie it takes a parameter)
Second: it is an instance method, not a class method (ie you need to
send it to an instance of your class)
On 12/16/07, Evan Chaney <email@hidden> wrote:
> Disclaimer: the code you are about to view is not well-formed or well-
> written.
>
> Good evening.
>
> I am trying to create an application that will perform a practical
> joke on a co-worker. I know my way around AppleScript fairly well,
> but my needs for this joke require the use of something more
> substantial, hence Cocoa. This I do not know.
>
> The app is intended to listen for the user to press the A, O or N
> keys. When one of these keys is pressed an image is to appear over
> all other windows for a brief second, then fade away. I have managed
> to pull together an event tap to listen for the key presses, create
> the window with image in it and wire up the interface with a controller.
>
> I have gotten stuck, however, and am not sure how to proceed. The app
> builds okay, but within about 2 minutes of running exits with status
> 5. In the run log are several warnings about the lack of an
> autorelease pool and a message regarding an uncaught exception in the
> window controller. I do not understand what the messages about the
> pool are. I have ambiguous thoughts about the uncaught exception
> which I might be able to solve with hours of tinkering and googling.
>
> My questions are these: how can I resolve these entries in the run
> log; how can I get the showWindow method to fire correctly?
>
> http://pastie.caboo.se/129542
>
> Evan
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden