hiding multiple items in the palette

Hello everyone
I have just a quick question.
Is there shorthand way of making menu items visible/invisible?

In the Javascript reference it shows an example like this:

  function fwInterface()
  { var visible = fwParameters["enable"].fwBoolValue;
  fwParameters["param1"].fwVisible = visible;}

and what I was hoping was that i would be able to turn on and of multiple parameters without duplicating a lot of the code, my idea was something like

  function fwInterface()
  { var visible = fwParameters["enable"].fwBoolValue;
  fwParameters["param1","param2","param3"].fwVisible = visible;}

but unfortunately all it does is effect the last param

So I suppose my question is: is there a way to hide multiple elements within action palette in a simple way or do I have to do it line by line like this which I know works but will make my action quite long:

  function fwInterface()
  { var visible = fwParameters["enable"].fwBoolValue;
  fwParameters["param1"].fwVisible = visible;
  fwParameters["param2"].fwVisible = visible;
  fwParameters["param3"].fwVisible = visible;}

thank you in advance
Pems


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

You might try this:

function fwInterface(){
	var visible = fwParameters["enable"].fwBoolValue;
	var params = ["param1","param2","param3"];
	for (var i=0; i < params.length; i++) {
		fwParameters[params[i]].fwVisible = visible;
	};
}

It’s a little longer than yours, but I think it’s as short as it can
be and work in Freeway.

Walter

On Dec 30, 2010, at 11:52 PM, pems wrote:

 function fwInterface()
 { var visible = fwParameters["enable"].fwBoolValue;
 fwParameters["param1","param2","param3"].fwVisible = visible;}

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

HI Pems although not as small you could always do this:

function fwInterface()
fwP = fwParameters;
{ var visible = fwP["enable"].fwBoolValue;
fwP["param1"].fwVisible = visible;
fwP["param2"].fwVisible = visible;
fwP["param3"].fwVisible = visible;}

or I think this too although I havent checked it

function fwInterface()
fwP = fwParameters;
fwP['param1'].fwVisible = fwP['param2'].fwVisible = fwP['param3'].fwVisible = (fwP['enable'].fwBoolValue);

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

Actually talking about this… has any one been successful with an interface: Visible which hid and revealed a Disclosure and its contents without disabling the actual disclosure

I have tried all sorts of ways, but when ever I introduce a drop-down choice which should trigger a fwVisible which inturn include a set of interface parameters, the damn disclosures stop doing there bizness!!
Anyone had the same problem and did you get around the problem… oh one more complication I have an overall Active button and elements within the disclosure only become active if other items are populated. Anyway its the disclosures which never seem to work after the introduction of visible…

I suppose I could try CalVisibility and see if that helps but in the meantime if someone does know and can put me on the true path then I would be eternally grateful. :o)
All the best max


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

Pems,
Just to throw yet another option into the mix, the following can be
done as long as the parameters are the same name and numbered, e.g.
like your example, I don’t know of any less code to do this.

function fwInterface()
for (var x = 0; x <= 2; x++) {
fwParameters[“param”+x].fwVisible = true;
}
}

HTH

On Dec 31, 2010, at 5:52 AM, pems wrote:

Hello everyone
I have just a quick question.
Is there shorthand way of making menu items visible/invisible?

In the Javascript reference it shows an example like this:

 function fwInterface()
 { var visible = fwParameters["enable"].fwBoolValue;
 fwParameters["param1"].fwVisible = visible;}

and what I was hoping was that i would be able to turn on and of
multiple parameters without duplicating a lot of the code, my idea
was something like

 function fwInterface()
 { var visible = fwParameters["enable"].fwBoolValue;
 fwParameters["param1","param2","param3"].fwVisible = visible;}

but unfortunately all it does is effect the last param

So I suppose my question is: is there a way to hide multiple
elements within action palette in a simple way or do I have to do it
line by line like this which I know works but will make my action
quite long:

 function fwInterface()
 { var visible = fwParameters["enable"].fwBoolValue;
 fwParameters["param1"].fwVisible = visible;
 fwParameters["param2"].fwVisible = visible;
 fwParameters["param3"].fwVisible = visible;}

thank you in advance
Pems


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

Sorry, or rather in your case x would start at 1 and not 0:

function fwInterface()
	for (var x = 1; x <= 3; x++) {
            fwParameters["param"+x].fwVisible = true;
        }
}

On Dec 31, 2010, at 10:29 AM, Mike B wrote:

Pems,
Just to throw yet another option into the mix, the following can be
done as long as the parameters are the same name and numbered, e.g.
like your example, I don’t know of any less code to do this.

function fwInterface()
for (var x = 0; x <= 2; x++) {
fwParameters[“param”+x].fwVisible = true;
}
}

HTH

On Dec 31, 2010, at 5:52 AM, pems wrote:

Hello everyone
I have just a quick question.
Is there shorthand way of making menu items visible/invisible?

In the Javascript reference it shows an example like this:

function fwInterface()
{ var visible = fwParameters["enable"].fwBoolValue;
fwParameters["param1"].fwVisible = visible;}

and what I was hoping was that i would be able to turn on and of
multiple parameters without duplicating a lot of the code, my idea
was something like

function fwInterface()
{ var visible = fwParameters["enable"].fwBoolValue;
fwParameters["param1","param2","param3"].fwVisible = visible;}

but unfortunately all it does is effect the last param

So I suppose my question is: is there a way to hide multiple
elements within action palette in a simple way or do I have to do
it line by line like this which I know works but will make my
action quite long:

function fwInterface()
{ var visible = fwParameters["enable"].fwBoolValue;
fwParameters["param1"].fwVisible = visible;
fwParameters["param2"].fwVisible = visible;
fwParameters["param3"].fwVisible = visible;}

thank you in advance
Pems


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


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

Thank you everyone, as usual, you have all chipped in and helped me out enormously. :slight_smile:

Have a happy new year.

Pems


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