Changeset 9392 for trunk/Xul_XedLib/chrome/content/scenarixedlib/libUiBase/widgets/xedUiRichTextInput.xbl.xml
- Timestamp:
- 07/24/07 14:47:27 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_XedLib/chrome/content/scenarixedlib/libUiBase/widgets/xedUiRichTextInput.xbl.xml
r9384 r9392 59 59 <implementation> 60 60 <constructor> 61 if(this.fRichTextZone) this.fRichTextZone.resetEditor(); //Nouvel appel constructor : gestion memLeak instance précédente. 62 this.fRichTextZone = document.getAnonymousElementByAttribute(this, "anonid", "richText"); 61 63 this.fRichTextZone.fRichTextInput = this; 62 64 </constructor> 63 <field name="fRichTextZone">document.getAnonymousElementByAttribute(this, "anonid", "richText")</field> 65 <destructor>this.destroy();</destructor> 66 <method name="destroy"> 67 <body> 68 this.fRichTextZone.resetEditor(); 69 </body> 70 </method> 64 71 <property name="realvalue"> 65 72 <getter> … … 274 281 <!-- API nsIControllers de l'editor. --> 275 282 <field name="fControllers"/> 283 <!-- API nsICommandManager de l'editor (obligé de le mémorise sinon impossible de le récupére si node décroché du doc). --> 284 <field name="fCommandManager"/> 276 285 <!-- Champ affecté par le RichTextInput pour retrouver l'input propriétaire de cette Zone. --> 277 286 <field name="fRichTextInput"/> 278 287 <!-- Noeud Editor (construit dynamiquement). --> 279 288 <field name="fEditorNode">document.getAnonymousElementByAttribute(this, "type", "content-primary")</field> 280 <destructor><![CDATA[281 this.resetEditor(true);282 ]]></destructor>283 289 <!-- Permet de redéfinir sa hauteur par rapport au contenu (appelé par le RichTextInput propriétaire) --> 284 290 <method name="autoSize"> … … 314 320 //La commande cmd_bold est utilisée comme proxy pour toute modification potentielle de style lié au caret ou à la sélection. 315 321 //cette commande est déclenchée par Mozilla en asynchrone lorsque le caret s'est stabilisé. 316 this.f EditorNode.commandManager.removeCommandObserver(this.fObserver, "cmd_bold");322 this.fCommandManager.removeCommandObserver(this.fObserver, "cmd_bold"); 317 323 delete this.fObserver.fXbl; //memLeak 318 324 delete this.fObserver; //memLeak … … 336 342 try{ 337 343 var vDoc = this.fEditorNode.contentDocument; 344 this.fCommandManager = this.fEditorNode.commandManager; 338 345 // On remplit le document de l'éditeur 339 346 this.fHtmlRoot = vDoc.body; … … 409 416 //La commande cmd_bold est utilisée comme proxy pour toute modification potentielle de style lié au caret ou à la sélection. 410 417 //cette commande est déclenchée par Mozilla en asynchrone lorsque le caret s'est stabilisé. 411 vXbl.f EditorNode.commandManager.addCommandObserver(vXbl.fObserver, "cmd_bold");418 vXbl.fCommandManager.addCommandObserver(vXbl.fObserver, "cmd_bold"); 412 419 } 413 420 … … 434 441 finally { 435 442 //Init ok on se désabonne. 436 vXbl.f EditorNode.commandManager.removeCommandObserver(this, "obs_documentCreated");443 vXbl.fCommandManager.removeCommandObserver(this, "obs_documentCreated"); 437 444 } 438 445 439 446 } 440 447 441 this.f EditorNode.commandManager.addCommandObserver(vObserveCreateEditor, "obs_documentCreated");448 this.fCommandManager.addCommandObserver(vObserveCreateEditor, "obs_documentCreated"); 442 449 this.fEditorNode.makeEditable(vMethodEditor, false); 443 450
Note: See TracChangeset
for help on using the changeset viewer.