you wrote:
> For me, it is rather confusing because of the end of section
> "30.1.3.ItemList" :
>
> "At preparation, this set is initialised to the set of references listed in
> the <I>TokenGroupItems</I> attribute."
>
> Even if I understand well that item in listGroup is item of the itemList,
> this particular sentence make confusion for me because it tends to say that
> the initial set of references of the itemList can be specified by the
> tokenGroupItems and the standard never says that the number of
> tokenGroupItems MUST BE equal to the number of cells (positions).
According to the last paragraph of ItemList in 30.1.3, the initial
list of ItemList is initialized by the TokenGroupItems. It doesn't
say "can be". So, definitely, the initial list of ItemList is equal
to the TokenGroupItems.
And according to the last sentence in Positions in 30.1.2, each cell
defined by Positions has an index equal to the logical position
defined in TokenMovementTable. And TokenMovementTable defines the
number of logical positions that should be equal to TokenGroupItems.
Otherwise, it doesn't make any sense.
> Suppose an author who wants to make a listGroup with 5 cells and 8 known
> items. When reading the standard, he is encouraged to use the
> tokenGroupItems set of visible to fill the itemList with its 8 items. Well,
> but it is impossible following what you say because the tokenGroupItems
> must have 5 items, not more, not less. If I understand well, he should
> instead fill the tokenGroupItems with the first 5 items he know. Then he
> has to add the 3 further items in the startup using AddItem actions. Am I
> right ?
I think so.
> Now, suppose that he doesn't know how many items he will have in its 5
> cells listGroup. (the items should come from a regularly updated database
> using some program). He wants to build an empty listGroup but he would also
> like to use some action-slots. Is it possible ? How ? TokenGroupItems must
> define object-reference. Theoritically, tokenGroupItems can not be filled
> with null for visible. Consequently, should he fill it with useless visible
> and then delete all items in the startup ?!!! Perhaps null should be
> accepted in the tokenGroupItems definition...
I think your scenario does work. But the standard doesn't allow null
reference for the TokenGroupItems. Then, you may have to specify some
dummy or whatever else. Since you cannot create new ActionSlot nor
cannot add/delete ActionSlot, you have to prepare it in advance. If
you don't have any valid references at the time of ListGroup
activation, you may have to specify some dummies. But please remind
that the initialization of ItemList is done at the time of Preparation,
not at Activation. Therefore, without disturbing to show some useless
visibles or non-existent visibles, you can apply AddItem() and
DelItem() to your ListGroup. Then, simply apply Run() to it. I
think, the visible reference in the TokenGroup should be valid when
its RunningStatus is True. And that's enough.
I've enclosed a ListGroup test object which I created and used for
testing my engine. Please feed it to your engine, or you may download
my engine which is available at http://www.gctech.co.jp/.
> >> >> 6.2. Behaviour when TextData is longer than maxLength
> If it is right and OK for all MHEG group members, then I suggest that the
> text of the standard at section "43.2.EntryFieldFull" should be changed a
> bit.
> Now it is :
> "... it is generated when the number of characters in the EntryField
> reaches MaxLength."
>
> It should rather be :
> "... it is generated each time a character is entered, when the new number
> of characters in the EntryField is higher than or equal to MaxLength."
Your suggestion is fine and clarifies the point. If everybody agrees,
I think it should go in the standard.
Regards,
** Wataru KAMEYAMA, Graphics Communication Laboratories, JAPAN
** TEL: +81 3 5351 0181
** FAX: +81 3 5351 0185
** wak@gctech.co.jp ($B55;3!!>D!w#G#C#L(B in KANJI)
----- startup -----
{:Application ("~/startup" 0)
:OnStartUp (:TransitionTo (("~/myScene" 0)))
}
----- myScene -----
{:Scene ("~/myScene" 0)
:Items (
{:Text 1
:CHook 1
:OrigContent "1"
:OrigBoxSize 100 20
:OrigPosition 500 20
:CharacterSet 1
}
{:Text 2
:CHook 1
:OrigContent "2"
:OrigBoxSize 100 20
:OrigPosition 500 70
:CharacterSet 1
}
{:Text 3
:CHook 1
:OrigContent "3"
:OrigBoxSize 100 20
:OrigPosition 500 120
:CharacterSet 1
}
{:Text 4
:CHook 1
:OrigContent "4"
:OrigBoxSize 100 20
:OrigPosition 500 170
:CharacterSet 1
}
{:Text 5
:CHook 1
:OrigContent "ADD"
:OrigBoxSize 100 20
:OrigPosition 500 220
:CharacterSet 1
}
{:Rectangle 11
:OrigBoxSize 120 40
:OrigPosition 90 10
:OrigLineWidth 10
:OrigLineStyle 1 // solid
:OrigRefLineColor "Green"
}
{:ListGroup 101
:MovementTable (
( 1 1 2 3 ) // Up
( 2 3 4 4 ) // Down
)
:TokenGroupItems (
(1 :ActionSlots (
(:SetPosition (11 90 10))))
(2 :ActionSlots (
(:SetPosition (11 90 60))))
(3 :ActionSlots (
(:SetPosition (11 90 110))))
(4 :ActionSlots (
(:SetPosition (11 90 160))))
)
:Positions (
(100 20)
(100 70)
(100 120)
(100 170)
)
:WrapAround false // You may change it to true
}
{:Link 1001
:EventSource 0
:EventType UserInput
:EventData 1 // Up
:LinkEffect (
:Move (101 1)
:CallActionSlot (101 1)
)
}
{:Link 1002
:EventSource 0
:EventType UserInput
:EventData 2 // Down
:LinkEffect (
:Move (101 2)
:CallActionSlot (101 1)
)
}
{:Link 1101
:EventSource 0
:EventType UserInput
:EventData 3 // Right
:LinkEffect (
:ScrollItems(101 1)
)
}
{:Link 1102
:EventSource 0
:EventType UserInput
:EventData 4 // Left
:LinkEffect (
:ScrollItems(101 -1)
)
}
{:Link 1003
:EventSource 0
:EventType UserInput
:EventData 15 // Select
:LinkEffect (
:AddItem(101 5 5)
)
}
{:Link 1003
:EventSource 0
:EventType UserInput
:EventData 17 // Help
:LinkEffect (
:DelItem(101 5)
)
}
{:Link 1004
:EventSource 0
:EventType UserInput
:EventData 5 // Key 0
:LinkEffect (
:SetFirstItem(101 0)
)
}
{:Link 1005
:EventSource 0
:EventType UserInput
:EventData 6 // Key 1
:LinkEffect (
:SetFirstItem(101 1)
)
}
{:Link 1006
:EventSource 0
:EventType UserInput
:EventData 7 // Key 2
:LinkEffect (
:SetFirstItem(101 2)
)
}
{:Link 1007
:EventSource 0
:EventType UserInput
:EventData 8 // Key 3
:LinkEffect (
:SetFirstItem(101 3)
)
}
{:Link 1008
:EventSource 0
:EventType UserInput
:EventData 9 // Key 4
:LinkEffect (
:SetFirstItem(101 4)
)
}
{:Link 1009
:EventSource 0
:EventType UserInput
:EventData 10 // Key 5
:LinkEffect (
:SetFirstItem(101 5)
)
}
{:Link 1010
:EventSource 0
:EventType UserInput
:EventData 11 // Key 6
:LinkEffect (
:SetFirstItem(101 6)
)
}
{:Link 1011
:EventSource 0
:EventType UserInput
:EventData 12 // Key 7
:LinkEffect (
:SetFirstItem(101 7)
)
}
{:Link 1012
:EventSource 0
:EventType UserInput
:EventData 13 // Key 8
:LinkEffect (
:SetFirstItem(101 8)
)
}
{:Link 1013
:EventSource 0
:EventType UserInput
:EventData 14 // Key 9
:LinkEffect (
:SetFirstItem(101 9)
)
}
)
:InputEventReg 1
:SceneCS 600 400
}