action-file and fwInterface

I want to make a checkbox visible based on the current file value of
an action-file parameter. All works at a basic level – I can tell
pretty well whether the action-file has a current file attached or not
– but I can’t seem to reliably switch based on the string value of
that file. (I’m trying to show or hide a control that only applies to
QuickTime movies.)

This will definitely work the first time the element is modified. And
if you change the file selector to None, then it properly disappears.
But if you switch to a different file-type, you can get it stuck with
the checkbox showing or not showing, and nothing further will budge
it, short of editing the Action to force the page tree to rebuild.

I’ve tried adding a fwParameterChanged() callback with the same
function in it, but that makes things worse.

Any thoughts?

Walter


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,
Try this;
http://freewayactions.com/code/?f=action-file-fwInterface-test.fwaction

There were a couple of things in your code that I think were getting this confused;

  1. The value of myFile was getting returned as null (fwParameters.original.toString()) so I swapped it for fwFileName (line 8)
  2. The file extension match was returning either an array of matches or null rather than true or false which I would imagine is required for fwVisible. I’ve added an explicit “!= null” in the check (line 9) which appears to do the job.

Regards,
Tim.

On 10 Jun 2011, at 20:13, Walter Lee Davis wrote:

This will definitely work the first time the element is modified. And if you change the file selector to None, then it properly disappears. But if you switch to a different file-type, you can get it stuck with the checkbox showing or not showing, and nothing further will budge it, short of editing the Action to force the page tree to rebuild.

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

Thanks so much, Tim. I was looking in the wrong place entirely for the
problem.

Walter

New Version 0.5.1 with your patch: ScriptyLightbox2 - ActionsForge

On Jun 13, 2011, at 6:15 AM, Tim Plumb wrote:

Hi Walter,
Try this;
http://freewayactions.com/code/?f=action-file-fwInterface-
test.fwaction

There were a couple of things in your code that I think were getting
this confused;

  1. The value of myFile was getting returned as null
    (fwParameters.original.toString()) so I swapped it for fwFileName
    (line 8)
  2. The file extension match was returning either an array of matches
    or null rather than true or false which I would imagine is required
    for fwVisible. I’ve added an explicit “!= null” in the check (line
  1. which appears to do the job.

Regards,
Tim.

On 10 Jun 2011, at 20:13, Walter Lee Davis wrote:

This will definitely work the first time the element is modified.
And if you change the file selector to None, then it properly
disappears. But if you switch to a different file-type, you can get
it stuck with the checkbox showing or not showing, and nothing
further will budge it, short of editing the Action to force the
page tree to rebuild.

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


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options