You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. create new documents (more than 1)
2. select any tab but not the last one
3. click "close current document"
What is the expected output? What do you see instead?
Current opened tab should disapear.
Instead, the last tab only is removed.
What version of the product are you using? On what operating system?
Document based example
Please provide any additional information below.
Selecting a tab does not implies currrent document change.
Solution:
MainView.mxml, added ...change="..." like this:
<TabNavigator id = "documentsContainer"
width = "100%"
height = "100%"
change="{ model.selectAsCurrentDocument(documentsContainer.selectedIndex)
}"/>
MainModel.as, added the following method:
/**
* Notifies the application that the user has selected another doc as the
the current document.
*/
public function selectAsCurrentDocument( documentIndex:int ):void
{
var event:DocumentEvent = new DocumentEvent(DocumentEvent.SELECTED);
var document:Document = documents[documentIndex];
currentDocument = document;
event.reference = document;
dispatcher.dispatchEvent(event);
}
ApplicationEventMap.mxml, added the foolowing tag:
<EventHandlers type = "{DocumentEvent.SELECTED}">
<MethodInvoker generator = "{ApplicationManager}"
method = "setCurrentDocument"
arguments = "{[event.reference]}"/>
</EventHandlers>
DocumentEvent.as, added the following const:
public static const SELECTED:String = "selectedDocument";
Original issue reported on code.google.com by [email protected] on 30 Nov 2009 at 10:35
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 30 Nov 2009 at 10:35The text was updated successfully, but these errors were encountered: