Checking for functions from an action

Looking at one of my old actions I can see that I went to some lengths to see if the host application supported fwLaunchURL(). I did this by sniffing the fwFreewayVersion and excluding users who didn’t make the grade.

However, I’d much rather just wrap this in an if block;

if (fwLaunchURL){

do stuff

} else {

do other stuff

}

This fails as Freeway complains about fwLaunchURL in pre v5 versions. I’ve also attempted try, catch blocks but these also fail to run without error.

Any ideas how this can be done - if at all?

I’d rather not have to build a matrix of functions and the application version they all appeared in! :slight_smile:

Thanks,
Tim.


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

Why couldn’t you run a conditional like:

if(typeof(fwLaunchURL) == 'undefined'){
	alert('function not found');
}

This appears to function without trouble in both FW4 and FW5


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

Thanks Weaver I’ll give that a go.
Regards,
Tim.

Quoting Weaver email@hidden:

Why couldn’t you run a conditional like:

if(typeof(fwLaunchURL) == 'undefined'){
	alert('function not found');
}
This appears to function without trouble in both FW4 and FW5


Extend Freeway the way you want with FreewayActions.com
http://www.freewayactions.com


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