RE: I need a example using Variable clas

Grassel Guido NRC/Hki (guido.grassel@research.nokia.com)
Thu, 06 Nov 1997 13:00:19 +0200

Dear Choi Jong Hyuk

You are missing the ':GInteger' keyword in your example. Pls. find an
example below:

BR - Guido

-----------------------------------------------------------------
Guido Grassel guido.grassel@research.nokia.com
Nokia Research Center tel/fax: +358 9 4376-6827/6855

mailing address: location:
P.O. Box 422 Itälahdenkatu 22b
FIN-00045 Nokia Group 00210 Helsinki-Lauttasaari
Finland

{:Scene
("ivar0/scene1" 0)
:Items
(
{:IntegerVar
1
:InitiallyActive true
:OrigValue 100
}
{:IntegerVar
2
:InitiallyActive true
:OrigValue 200
}
{:Link
10
:InitiallyActive true
:Shared false
:EventSource 0
:EventType IsRunning
:LinkEffect
(
:TestVariable (1 1 :GInteger 100)
:TestVariable (1 2 :GInteger :IndirectRef 1)
:TestVariable (1 3 :GInteger :IndirectRef 2)
:TestVariable (1 4 :GInteger :IndirectRef 1)
:TestVariable (1 5 :GInteger 100)
:TestVariable (1 6 :GInteger :IndirectRef 2)
)
}

{:Link
11
:InitiallyActive true
:Shared false
:EventSource 1
:EventType TestEvent
:EventData True
:LinkEffect
(
:SetData (13 "1. Test: The Result is True")
:Deactivate (11)
:Deactivate (12)
:Activate (21)
:Activate (22)
)
}
{:Link
12
:InitiallyActive true
:Shared false
:EventSource 1
:EventType TestEvent
:EventData False
:LinkEffect
(
:SetData (13 "1. Test: The Result is False")
:Deactivate (11)
:Deactivate (12)
:Activate (21)
:Activate (22)
)
}
{:Text
13
:InitiallyActive true
:CHook 1
:OrigContent "Computing ...."
:OrigBoxSize 290 40
:OrigPosition 80 100
:TextColour "White"
:BackgroundColour "#a0a0ff"
:HJustification start
:VJustification start
}

{:Link
21
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData True
:LinkEffect
(
:SetData (23 "2. Test: The Result is True")
:Deactivate (21)
:Deactivate (22)
:Activate (31)
:Activate (32)
)
}
{:Link
22
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData False
:LinkEffect
(
:SetData (23 "2. Test: The Result is False")
:Deactivate (21)
:Deactivate (22)
:Activate (31)
:Activate (32)
)
}
{:Text
23
:InitiallyActive true
:CHook 1
:OrigContent "Computing ...."
:OrigBoxSize 290 40
:OrigPosition 80 150
:TextColour "White"
:BackgroundColour "#a0a0ff"
:HJustification start
:VJustification start
}

{:Link
31
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData True
:LinkEffect
(
:SetData (33 "3. Test: The Result is True")
:Deactivate (31)
:Deactivate (32)
:Activate (41)
:Activate (42)
)
}
{:Link
32
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData False
:LinkEffect
(
:SetData (33 "3. Test: The Result is False")
:Deactivate (31)
:Deactivate (32)
:Activate (41)
:Activate (42)
)
}
{:Text
33
:InitiallyActive true
:CHook 1
:OrigContent "Computing ...."
:OrigBoxSize 290 40
:OrigPosition 80 200
:TextColour "White"
:BackgroundColour "#a0a0ff"
:HJustification start
:VJustification start
}

{:Link
41
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData True
:LinkEffect
(
:SetData (43 "4. Test: The Result is True")
:Deactivate (41)
:Deactivate (42)
:Activate (51)
:Activate (52)
)
}
{:Link
42
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData False
:LinkEffect
(
:SetData (43 "4. Test: The Result is False")
:Deactivate (41)
:Deactivate (42)
:Activate (51)
:Activate (52)
)
}
{:Text
43
:InitiallyActive true
:CHook 1
:OrigContent "Computing ...."
:OrigBoxSize 290 40
:OrigPosition 80 250
:TextColour "White"
:BackgroundColour "#a0a0ff"
:HJustification start
:VJustification start
}

{:Link
51
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData True
:LinkEffect
(
:SetData (53 "5. Test: The Result is True")
:Deactivate (51)
:Deactivate (52)
:Activate (61)
:Activate (62)
)
}
{:Link
52
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData False
:LinkEffect
(
:SetData (53 "5. Test: The Result is False")
:Deactivate (51)
:Deactivate (52)
:Activate (61)
:Activate (62)
)
}
{:Text
53
:InitiallyActive true
:CHook 1
:OrigContent "Computing ...."
:OrigBoxSize 290 40
:OrigPosition 80 300
:TextColour "White"
:BackgroundColour "#a0a0ff"
:HJustification start
:VJustification start
}

{:Link
61
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData True
:LinkEffect
(
:SetData (63 "6. Test: The Result is True")
:Deactivate (61)
:Deactivate (62)
)
}
{:Link
62
:InitiallyActive false
:Shared false
:EventSource 1
:EventType TestEvent
:EventData False
:LinkEffect
(
:SetData (63 "6. Test: The Result is False")
:Deactivate (61)
:Deactivate (62)
)
}
{:Text
63
:InitiallyActive true
:CHook 1
:OrigContent "Computing ...."
:OrigBoxSize 290 40
:OrigPosition 80 350
:TextColour "White"
:BackgroundColour "#a0a0ff"
:HJustification start
:VJustification start
}
{:Link
1999
:EventSource 0
:EventType UserInput
:EventData 16
:LinkEffect
(
:Quit (("ivar0/startup" 0))
)
}
)
:InputEventReg 1
:SceneCS 720 576
:AspectRatio 4 3
:MovingCursor false
}

----------
::>From: Choi Jong Hyuk
::>To: mheg-ug
::>Subject: I need a example using Variable class & Action
::>Date: 6. Novemberta 1997 19:19
::>
::>
::>
::>I am Choi in Sogang univ.
::>I have a problem that I can't solve.
::>
::>My problem is as follow:
::>
::>I want to use ':SetVariable' and ':TestVariable' action!
::>
::>But it is not work, in textual notation, It arise
::>parameter error!
::>
::>I wrote like this:
::>
::>{:IntegerVar
::> 10
::> :OrigVar 0
::>}
::>
::>{:Link
::> ....
::> :SetVariable ( 10 3 )
::> :TestVariable ( 10 1 3 )
::>}
::>
::>Error: illegal NewVariableValue..... etc
::>
::>I think it is the problem owing to wrong parameter type. ???
::>In DIS version, TestVariable Parameter is as follows:
::> :test-variable( 11 :new-boolean true ...
::>
::>I think 'new-boolean' is for conversion of type.
::>Does "IS version" need this?
::>
::>Can you tell me the reason and
::>can I get the example using this action( well working example in
::>MHEG-Enge )?
::>
::>Thank you very much and bye!
::>
::>---------------------------------------------------------------
::>e-mail: jhchoi@pljuno.sogang.ac.kr
::> URL : http://plstar.sogang.ac.kr/~jhchoi (-:
::>
::>