Kris Coppieters wrote on 02/15/11 at 07:14:11:
Hi Weller,
... the 'unreliable' approach. Care to elaborate on what you find to be unreliable about the approach?
Kris
My InDesign document is a product catalogue. It needs to stay in sync with the database. So on opening the document it will load the list of changes since last database access and applies them. This is handled by MySQL <-> Python HTTP server <-> extendScript Socket.
However the link must work both ways. The idea was to build a list of relevant changes in InDesign while they happen and send it through the Socket object onSave. This works nicely for plain textFrames and changes to applied styles.
But when the tables are involved (mainly for pricing) users tend type & tab furiously through the cells ant there's no guarantee that the cursor stays in the text that fired the event (even with the 0ms delay).
I know that I can send every price from the table to the database, knowing that it will ignore any unchanged values. The whole system is on local network so I can happily waste bandwidth in a belt-and-braces way. I still hope there is cleaner way. I also fear that user may experience unnacceptable timeouts after each typed character when working on larger tables (1 - 500 rows)
I'm sorry for the verbosity, hope it showed what I'm trying to achieve and what I'm trying to avoid.
Thanks for help