At 05:34 AM 7/11/2008, Clay Helberg wrote:
>Hi Dan--
>
>If the users are using table mode to view and edit these elements,
>you'll probably need to use the custom table methods for accessing
>and changing the selection. Things get weird pretty fast if you try
>to munge table bits as just the underlying elements.
That's exactly what is happening.
>Look in the programmer's guide for information on a whole series of
>interfaces that start with Table, in particular TableObject, as well
>as ADocument.selectionType and ADocument.tableSelection.
This is a bit off topic, but it points up a problem I've been having
with Help Center that maybe someone can help with. So I look for
SelectionType and in this case I find info about the attribute and
the associated enumeration type. For one, unlike the regular help,
there is no Related section to help link these things together.
Secondly, all theses methods and such, have no reference back to the
interface they come from. Usually a search will also pull a bunch of
interface references, in this case ADocument for some reason is not
listed. So I just searched on adocument and the first two hits list
the interface, but its just an intro statement, again with no link to
get me to its parent or more details. This is the worst I've seen and
I can't hook it up with any interface, it doesn't appear to be part
of adocument either.
>As an alternative to using the table-specific API, you could test
>for a table selection, and then turn on table tags view, make your
>change at the element level, and then turn table tags off again.
>
>Also, be aware that if you insert non-table markup into the
>structure of a table, you may break table rendering in the editor
>view. For example, if you intend to wrap a row element in a comment,
>you could end up with something like this:
Yeah, I have two issues. I was able to get my process to work by
turning table markup on - at least it improved things. But then as
you show below, the comment tags get in the way of the table being
interpreted properly and I get the big X in cells affected.
><table>
> <tgroup>
> <tbody>
> <row><cell>a</cell><cell>b</cell></row>
> <comment comment="This" row=" is=" redundant"=">
> <row><cell>a</cell><cell>b</cell></row>
> </comment>
> </tbody>
> </tgroup>
></table>
>
>In most cases, the commented row won't display at all in the table
>view. (You can see it's still there by switching table tags on.) So
>this may not be the approach you want. In the context of a table,
>you might consider inserting rows or cells rather than using wrapper
>elements, something along these lines:
>
><table>
> <tgroup>
> <tbody>
> <row><cell>a</cell><cell>b</cell></row>
> <row colspan="2"><comment comment="The" following=" row=" is=" <br="/>> redundant"/></row>
> <row><cell>a</cell><cell>b</cell></row>
> </tbody>
> </tgroup>
></table>
>
>This is why tables have earned the well-deserved moniker "spawn of satan".
Yeah I knew they were going to be a problem. They were already giving
us problems because they are custom tables and all the table editing
functionality is not available.
So can anyone help with more detail on this selectionType attribute,
it might be what I need.
Minimally, I would like to detect that they have selected table
structure items and stop the process. Currently my insert process is
all ACL commands and I looked in the help system through the table
functions that are provided and didn't find anything. I can switch
this over to Javascript if this attribute will provide what I need.
..dan
>--Clay
>
>-----Original Message-----
>From: Dan Vint [
>
>