Hi!
Sometimes I get exception when I try to call GetSelectionBounds from OnItemAction event handler. So I have 2 questions:
1. It is allowably to call GetSelectionBounds from OnItemAction?
2. How can I determine is document formatted?
Thank you!
Call GetSelectionBounds from OnItemAction
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
When this event informs about item insertion, this insertion may be done in many ways, including file cleared.
Similarly, deletion may means that the document is being loaded.
In these cases, document may be half-created or half-destroyed when this event is called.
And in the most cases, this event is called then the document is not formatted, so it is not ready to be displayed, modified, and its selection cannot be accessed.
Similarly, deletion may means that the document is being loaded.
In these cases, document may be half-created or half-destroyed when this event is called.
And in the most cases, this event is called then the document is not formatted, so it is not ready to be displayed, modified, and its selection cannot be accessed.
Ok.
I'm going to do the next.
1. When ItemAction = rviaInserting in OnItemAction event handler I will put Item into the TObjectList. Then I will post some message to the form.
2. Also I will add item deletion processing to OnItemAction to exclude item from TObjectList.
3. In message handler I will get Item from TObjectList.
So can I be sure that in message handler Item will not be freed?
I'm going to do the next.
1. When ItemAction = rviaInserting in OnItemAction event handler I will put Item into the TObjectList. Then I will post some message to the form.
2. Also I will add item deletion processing to OnItemAction to exclude item from TObjectList.
3. In message handler I will get Item from TObjectList.
So can I be sure that in message handler Item will not be freed?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: