Welcome, Guest. Please Login
Rorohiko Workflow Resources
  Welcome the Message Board of Rorohiko Workflow Resources. To register, please e-mail [email protected] - automatic registration has been turned off because of relentless spambots and spammers. This Message Board is not actively monitored. If you have an urgent question, please e-mail [email protected]. If you post it here, it will probably be many weeks before we notice.
  HomeHelpSearchLogin  
 
Page Index Toggle Pages: 1
Send Topic Print
Story Events (version >= 1.0.46) (Read 8068 times)
Kris Coppieters
YaBB Administrator
*****
Offline



Posts: 181
New Zealand
Gender: male
Story Events (version >= 1.0.46)
10/16/08 at 15:36:01
 
From version 1.0.46 onwards, story objects play a more important role, and they receive more events. It also has become possible to edit the attached script for stories with the Active Page Item Developer palette.

The change is in how APIDToolAssistant reacts when a text frame is selected.

If the text frame is selected with the regular selection tool, then you'll be accessing the text frame's API properties. However, if you click inside the text frame with the text selection tool, the Active Page Item Developer will instead show the API properties of the story that runs 'through' that text frame.

Stories now also receive selected and deselected events - in previous versions there was a 'hole' in the way APIDToolAssistant was tracking selections: as soon as the user made a text selection, your script would lose track because no more selected/deselected events would occur until the user selected another page item and left the text selection mode.

That's now been remedied - when the user goes 'into' text selection mode, your story object will receive a 'selected' event (and any observer will receive a 'subjectSelected' event).

When the user leaves text selection mode, your story will receive a 'deselected' event.

When the text selection changes or moves, your story will receive a 'selected-textselection' event.

With this change it now becomes easy to create an observer that continuously tracks the current selection  - simply set your event filter to 'subject*elected*' and it will receive subjectSelected, subjectDeselected, and subjectSelected-textselection events - i.e. every time the selection changes, you'll get an event.

You could then do things like continuously update a ScriptUI palette: your event handler would check the app.selection and update a ScriptUI palette accordingly.

Stories now also receive all other text-based events - so to handle text changes and so you can 'attach' yourself to the stories instead of to the text frames as was necessary in previous versions.
Back to top
 

Kris
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print