Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Targetting SplitView window from another js file

Hi there in my app.js I have a splitView with a masterWindow and detailWindow

in the masterWindow (left column) I have a table view with a list of rss feeds. When I click on one of the rows it displays the rss feed. The code for the rss display is in another .js file.

When trying to target the detailWindow from that .js file I get an error:

> message = "Can't find variable: detailWindow";

Can anyone advise how we target a window (or SplitView window) when called from another js file

If this doesn't make sense I can provide code, but thought I'd explain it better.

— asked August 2nd 2010 by Paul Pounder
  • splitview
  • window

2 Answers

  • Accepted Answer

    You can always pass a variable to a window by assigning a variable to the window like this:

    win.somevar = somevalue;

    then read it from the external js.

    — answered August 2nd 2010 by Sj Singh
  • I think you might have an issue with the scope of the variables, once the detailView is not found, or you are trying to access detailWindow in a wrong way. Post some code.

    — answered August 2nd 2010 by Dan Tamas
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.