Solved -- button instead of tool for run event

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Dale,

I WANT it to be a tool -- it's designed that way and that's the whole point here (to replace a tool I'm missing).

So, no, it needs to be in the tool folder. And by this I'm guessing that it doesn't work for you there, either. And I'm starting to get a very very sick feeling I know EXACTLY what Mike changed (perhaps even because of Lua 5.1) and it will remove functionality from AS 6 that I cannot live without.

This may indeed be the show stopper.
User avatar
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Post by dueyftw »

The file works both ways for me.

Dale
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Really? What version of Windows are you running? (XP Home or Pro?) What service pack? How about Anti-virus, what are you using? Do you have 5.6 also installed on your machine? And this IS the 6.0 Pro demo, right (sorry for all the questions, just trying to narrow this thing down with any possibilities).

It very clearly won't run for me until I switch it to a mouse event, at which point it works fine (but not, of course, how I want it to work). This is driving me crazy (some folks would say short trip).

Just thought of some more -- how are you using this? I'm trying on layer 1 with a few rectangles drawn (brand new file otherwise).
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Aha! Okay, so it's user error (me, but trust me, I'm really really happy about this).

For some reason (um, lack of documentation) I kept thinking this should be a "tool" -- but I note that Vern has said it's a "button". I guess a button is something that enables the run event whereas a tool does not. So changing it to a "button" makes it work.

Now -- in all fairness this isn't true in 5.6. If you mark it as a tool it works just fine. I'm not sure if that's a Lua 5.1 thing or just something Mike wrote, but while there ARE buttons in 5.6 you can use the word "tool" and it still does the run event. So at least I made an honest mistake.

I needed to understand this -- so I'm sorry if I bothered folks here. But thanks for responding to me, Dale. It was your post that made me start to think I MUST be doing something wrong.
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Yeah, I think there's bound to be some confusion over how the tools are combined in 6. In 5.6 the rotate layer x/y are tools, since you have interaction with the rotation, but the flip layer x/y are buttons because they offer no interaction. Granted any button could be made into a tool that does its function upon clicking the workspace, as some have done before.

But you're completely right about the purpose of localization, Mike. The 'localized' strings must have a corresponding library in other languages, so it is a call to that library. Nothing any of us can access, or need to. Just drop the localization like you said.
Post Reply