Can someone please confirm that on the latest version of the SDK for iPhone (1.4.2 as of now), the variables passed to sub-contexts are passed as value instead of as reference ?
I've been struggling with this feature for Android (and had to upgrade to a 1.5 snapshot) and now everything suggests that the iPhone SDK has the same problem.
I'd like to avoid having to use events to update variable values between my different contexts… ;-)
Not sure what you mean by "value instead of reference" in this case with regard to windows (I'm assuming we're talking variables passed to a window on creation, as in this example). What are you getting in your window variable that you don't expect?
If separate contexts are becoming a problem for you, consider ditching them altogether and breaking up your code using Ti.include - we generally do all our pro services apps in a single context.
I mean that I can access my variables in the subcontexts, but any update to their value is not "propagated".
This is not the case on Android with 1.4 (but 1.5 fixes the problem), and as it seems it doesn't work either with iPhone and 1.4.2.
I'll study the option to use just one single context.