The action-appliesto tag works in two modes. In one mode it should prevent the user from selecting the action if set up correctly as it tells Freeway to exclude the item from the list of available actions to add to the menu.
For example;
<action-appliesto layer>
will only show the action when a layered item is selected.
Also some of the appliesto values are informational so;
<action-appliesto applescript>
will prompt the user in the actions palette to turn AppleScript support on for actions if the feature is currently switched off.
You can stack values to combine requirements;
<action-appliesto applescript layer>
but it can be a bit clunky as the user has to address each requirement separately before they can use the action.
The fwApplyError function on the other hand is a lot more powerful although it runs after the action has been applied.
function fwApplyError()
{
if(doCheck())
return "You can't use this action here. Go away!";
else
return "";
}
This allows you to do a custom check to see if all of the environment requirements are met and display your own message in the actions palette. A blank returned string will let the user use the action.
This is the closest I can get to what you want Max although it won’t stop users from applying it in inappropriate places;
<action name="inline test">
<action-javascript>
function fwApplyError()
{
if(!fwItem.fwIsInlined)
return "You can't use this action here. Go away!";
else
return "";
}
</action-javascript>
</action>
Regards,
Tim.
On 18 Mar 2011, at 15:35, Walter Lee Davis wrote:
No, I think that the inline Action is coded <action>
just like the draw-on-the-page Action. You might be able to add some restrictions through the appliesto attribute, but that’s bolting the door after the horse has fled – it doesn’t keep people from making the mistake, only yells at them later.
FreewayActions.com - Freeware and commercial actions for Freeway Express & Pro.
…
Protect your mailto links from being harvested by spambots with Anti Spam.
Only available at FreewayActions.com
…
http://www.freewayactions.com
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options