Skip to main content
Known Participant
September 6, 2010
Question

How to get Table's keyValuePairs?

  • September 6, 2010
  • 1 reply
  • 400 views

I have an observer that observes tables. I manage to get ITableSuite interface when a user selects table-cell.

InterfacePtr<ITableSuite> tableSuite(fCurrentSelection, UseDefaultIID());

I generate IDML myself and I've attached custom KeyValuePairs (script labels) for a table element as below:

<Table Self="table17250" HeaderRowCount="0" FooterRowCount="0" BodyRowCount="3" ColumnCount="13" AppliedTableStyle="TableStyle/Datatable" TableDirection="LeftToRightDirection">

<Properties>

  <Label>

    <KeyValuePair Key="tabletype" Value="BT_PA_WA_6_16A" />

    <KeyValuePair Key="pg" Value="17250" />

    <KeyValuePair Key="pg2" Value="" />

  </Label>

</Properties>

...

How can I get an access to those KeyValuePairs from the observer?

I know I need to get IScript interface somehow but from where and how?

Thx!

This topic has been closed for replies.

1 reply

Known Participant
September 8, 2010

Forget the observer. I have ITableModel interface. How do I get access to those keyValuePairs (IScript)

I tried :

   

InterfacePtr<IScript> iscript(tableModel, UseDefaultIID());

But that didn't work, all I got was nil and I know I have the keyValuePairs there..