> I agree that direct declaration of initial value to a reference outside
> the
> application scope is not allowed, following chapter 51 rules.
>
> Though, it seems absolutely feasible to me that this variable can later
> store a reference like the one above.
>
I agree. But to do that, you must rewrite the startup file because this
piece of code
was not valid.
If the startup file is :
{:Application
( '~/startup' 0 )
:Items (
{:ObjectRefVar
103
:Shared true
:OrigValue :ObjectRef ( '~/startup' 23 )
// ------- change here : now in the scope ---------
}
{:Link
1
:EventSource 0
:EventType IsRunning
:LinkEffect (
:TransitionTo (( '~/scene1.mhg' 0 ) )
)
}
{:Text
23
:CHook 1001
:OrigContent '-'
:OrigBoxSize 585 30
:OrigPosition 260 300
:FontAttributes 'plain.24.30.0'
}
)
}
Then this application will work.
> Once scene1 is active, it seems to me that nothing prevents using
> SetVariable action targeted on the shared application's objectRefVar to
> set
> it to an active and visible reference ('~/scene1.mhg' 23).
>
Without this modification, I disagree because as the declaration is not
allowed (that's in the standard), the
scene1 won't be active without a correction on the startup file.
> Moreover, I expect that this variable keep its value when scene1 is
> destroyed and could still be used if I come back to scene1 later.
>
I agree. As a shared variable, this variable is not destroyed and keeps its
value.
> Even more importantly, I expect to be able to set a shared variable as an
> objectRef to a scene object itself ('~/scene1.mhg' 0) and being able to
> use
> it as a indirect target for a transitionTo action from any active scene of
> the application.
>
I agree even I didn't test it. In chapter 51, this case is handled by II.B
Mickael
--------------------------------------------------------------
Mickaël Bouloux - tel: +33 (0)2 99 12 45 66 - CNET DSM/TAM/MMA
FRANCE TELECOM - mailto:mickael.bouloux@cnet.francetelecom.fr
--------------------------------------------------------------