ISelectAction Class

14 views
Skip to first unread message

G. B.

unread,
May 17, 2013, 4:12:10 AM5/17/13
to sc2ge...@googlegroups.com
Hello,

I have some problems with the ISelectAction class. In fact, i don't understand the return of these functions :
- getRetainIndices
- getRemoveIndices

When i try to call getRemoveIndices for example, the length of the array returned is different from the return of getDeselectionnedUnitCounts. Is it a bug, or i just miss the point ?



Thank you for your help,

András Belicza

unread,
May 17, 2013, 4:33:00 AM5/17/13
to sc2ge...@googlegroups.com
Hi,

The getRemovedIndices() only returns an array if the select action was recorded to deselect units by id. In this case the getRemovedIndices() will return an array having the length exactly of getDeselectedUnitsCount().

But this is not the only way to deselect units, units can be deselected by a bitmap, or by a flag stating to deselect all units. In case of deselecting all units, the removed indices might be null.


--
You received this message because you are subscribed to the Google Groups "sc2gearsdev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sc2gearsdev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

G. B.

unread,
May 22, 2013, 8:50:50 AM5/22/13
to sc2ge...@googlegroups.com
Hi,

Ok thank you for your help.
I have a new question, I don't understand the role of the ICustomAction class. What is its goal ?

GB

András Belicza

unread,
May 22, 2013, 9:09:43 AM5/22/13
to sc2ge...@googlegroups.com
The ICustomAction is used to describe custom actions.

A custom action is created and added to the action list of a replay for example if the replay is constructed from a ReplaySpecification which contains invalid strings (input). In this case a custom action is created and added to give information about which input line contains the parse/syntax error.
Reply all
Reply to author
Forward
0 new messages