Controlling interface enabled via Region code

Hi everyone I am trying to control two interface buttons with a combination of region code and a checkbox and for the life of me I cant work it out.

the idea is if freeway is in German then the German button is enabled and the English button is disabled but if freeway is in English or any other language then vice versa the German button is disabled and the English button is enabled but if the check box called “advanced” is checked then both buttons must be enabled.

I was trying something like this:

  fwParameters['ENGLISH BUTTON'].fwEnable = (fwRegion != 3) 

But alas this doesn’t seem to control the interface so I am not sure where to go with this… it’s probably the wrong approach as well!!
So has anyone worked with region codes which in turn control the actions interface?
If anyone could cast a light over the murky waters then I would be very grateful…
cheers for any pointers and all the best Max


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

Hi Max,
I’ve just tried this with the following bare bones Action and it appears to work as expected when I switch the language to German in the Language and Text section of the System Preferences;
http://www.freewayactions.com/code/fwregion-test.fwaction

Normally I’d suggest adding localised content using the methods outlined in this tech note;
http://www.softpress.com/kb/questions/32/Tech+Note+18+-+Localizing+Actions+II
although if you did you may have to duplicate the German button so it appears in the English interface.

Something like this example should switch the UI based on the language code of the application;
http://www.freewayactions.com/code/fwregion-test2.fwaction
You should be aware that this only looks for English and German version of Freeway and should fall back to something if the app is running in another language.
Regards,
Tim.

On 31 Oct 2011, at 23:06, max wrote:

Hi everyone I am trying to control two interface buttons with a combination of region code and a checkbox and for the life of me I cant work it out.

the idea is if freeway is in German then the German button is enabled and the English button is disabled but if freeway is in English or any other language then vice versa the German button is disabled and the English button is enabled but if the check box called “advanced” is checked then both buttons must be enabled.

I was trying something like this:

 fwParameters['ENGLISH BUTTON'].fwEnable = (fwRegion != 3) 

But alas this doesn’t seem to control the interface so I am not sure where to go with this… it’s probably the wrong approach as well!!
So has anyone worked with region codes which in turn control the actions interface?
If anyone could cast a light over the murky waters then I would be very grateful…


Tim Plumb
Creative Director
Softpress Systems

Follow us on Twitter: http://www.softpress.com/tny/064
Join us on Facebook: Redirecting...
Looking for a webhost? We love these guys: Softpress » Web Hosting Partners


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

Thanks tim this works, and I thought thats what I had written but I must have made a mistake somewhere because I just couldn’t see what I had written incorrectly… thanks for this
all the best Max


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