Seems that when applying Squiggly to a TextArea, the usual Event.CHANGE doesn't get triggered when word is updated via spellchecking. It breaks some logic that I have when listening for Event.CHANGE. Squiggly surely updates the text via an mx_internal textfield or something but didn't got to the bottom of it. Any ideas?
Any Idea when the event dispatching will be added?
I depend on this feature because I have a data model which I update based on changes in the text area (e.g text input, text delete).
So I need of course to update the model based on the corrections made using the spell checker.
Is there any work-around that I can use in the meantime?
Another cool feature would be to automatically select the newly corrected word.
Unfortunately I cannot give you a timeline for when this feature will be available. It likely will not be within the next 3 months.
Currently our top priority enhancements are:
1. Split out the UI code from the engine so that people can either write their own UI or have more flexibility in how they call the spelling engine.
2. Make it possible to integrate Squiggly with TLF (Text Layout Framework)
3. Add support for German and French.
I am not aware of a workaround, but maybe the community could help?
- Bruce, Adobe
I ran into the same issue, and there is a possible solution for this. A textChanged event is fired when the internal text property is changed, which is the case when performing a correction with Squiggly. You can listen for this event somewhere and update your data property accordingly. I have this implemented as a listener/handler inside a TextArea subclass that I'm using.
I remember I tried also to use the textChanged of the internal TextField of the TextArea but for some reason it did not fit my needs.
In the end my solution was also to extend TextArea, but with a different approach:
First, I listen for the opening of the Player context menu, since I need to remember what was the selection in the TextArea at that point.
At this point I add other listenets for the selection of the custom items in the context menu (spelling suggestions).
Then I dispatch a custom event containing the spelling suggestion that was selected and I catch this and update my data model (replacing the old selected text with the new suggestion).
I would agree it's great to have community suggestions but this seems like it should be a core feature! Let's say you extend a TextInput component and want to enable spelling automatically and we put this custom component in a form. Usually you listen for the "change" event so you can update a model (some property), however, when you right click and pick a suggestion that "change" event does not fire which means the model didn't get updated correctly .... very bad ;(
So after researching this issue the best solution is....??