problem with popup buttons

Hi… I am trying to allow my script to be affected by the choices of popup buttons…

I have the applescript section of Interface builder set so that the button is checked for ACTION, and choose menu item-- and my script file is checked below…

Yet in my script, if I write:

on action theObject end action
I cannot compile, it says failed, because it will not accept “on action”

If I get rid of my on clicked theobject handler then it will work! But i can’t have both??? What is going on here???


Well, I got my app to work without using the on action setting-- but I am really interested to know why it wouldn’t let me use that handler when i’ve seen other scripts that use both action and clicked handlers and it compiles fine…

Anyway… if anyone can shed some light on this, I would be forever in your debt.

And I want to say that I do appreciate everyone’s help who posts on this board-- I know I may be posting a lot for everyone’s taste-- but I am just in hyper learn XCODE / AS studio mode… and I just want to be able to understand how things work and accomplish my application missions…

Thank you to everyone.

I don’t think anyone cares HOW MUCH you post.

I have noticed, though, that you do not regularly post your appreciation to those who’ve responded with answers in the threads you start… only your questions. I feel that if I continuously reply with sound assistance to posters’ questions, and they do not take the time to write a “Great, thanks… that did it.” post, I start to feel that my time is wasted on someone who is unappreciative and just taking advantage of my input. If I had chosen not to read this post, I would have never recieved your blanket statement of appreciation.

Also, because this is an archive of information, it is often unclear to readers if replies are actually useful if there is no post at the end which states that the problem has been solved. Some forums encourage editing the subject of the posts to something like “My problem is Blah Blah - SOLVED” after a solution has been found to the original post, but in this forum the final post is often the indicator that the original poster has found the answer they were looking for.

As you’ve seen, I’ve continued posting replies to your other questions, because it is nice to see someone with enthusiasm about applescript. I wish I had more time to help you with all of your questions, but helping out often means creating a whole test project just to figure out your question… which isn’t always possible. This forum has a good group of people who are nothing but willing to help out… no matter how many questions you have. I’m here primarily to help out others, and the gratitude of those I help out is the fuel that keeps me going.

Take care, and don’t lose that interest…