Warning when upgrading to Spotfire 10

TIBCO has deprecated the JQueryUI Javascript library in the latest Spotfire 10.0 release

TIBCO Community pages show us how to use JQuery properly

How to tell if Spotfire is running from Web Player

script (versions prior 7)
from System import Environment
isWebPlayer = Environment.CommandLine.Contains("w3wp.exe")

script (vrsions 7+)
from System import Environment
isWebPlayer = Environment.CommandLine.Contains("SpotFire.Dxp.Worker.Host.exe")
#isWebPlayer = Environment.CommandLine.Contains("WEB_PLAYER")

#Optionally run this on webplayer to see what the actual command line was use to launch webplayer:
from System import Environment
Document.Properties["whatInstance"] = Environment.CommandLine 


Arthur said...

Code is no longer valid in Spotfire 7.6

Jose Leviaguirre said...

Arthur, you are right. The architecture on 7+ is different as it pushes the instance via node manager so the process name is different.

Did you try looking what the actual process is before checking if it contains w2wp.exe?

from System import Environment
whatInstance = Environment.CommandLine#.Contains("w3wp.exe")
Document.Properties["isWebPlayer"] = whatInstance