跟踪Flex4的Text Layout Framework

Text Layout Framework论坛地址:

http://alist.adobe.co.uk/cfusion/webforums/forum/categories.cfm?forumid=72&catid=669

目前运用作品:
http://diding.iteye.com/blog/341009


[2009-02-21]
flex_sdk_4.0.5030的TextLayout的一些变化,总得来说,对formats变化比较大
//import flashx.textLayout.formats.CharacterFormat;
//import flashx.textLayout.formats.ContainerFormat;
//import flashx.textLayout.formats.ICharacterFormat;
//import flashx.textLayout.formats.IContainerFormat;
//import flashx.textLayout.formats.IParagraphFormat;
//import flashx.textLayout.formats.LeadingDirection;
//import flashx.textLayout.formats.LineOffsetBasis;
//import flashx.textLayout.formats.ParagraphFormat;


可以由如下类进行解决
import flashx.textLayout.formats.ITextLayoutFormat;
import flashx.textLayout.formats.TextLayoutFormat;

还有IEditManager的applyCharacterFormat()不能使用了,可以用applyLeafFormat换掉


[2009-02-28]
昨天把一个FxTextArea的一个问题发到了bug.adobe.com    
http://bugs.adobe.com/jira/browse/SDK-19576


[2009-03-02]
同样的代码:
Flex 4.0.0.5116和Flex 4.0.0.5121居然FxTexteara不能回车Enter,
Flex 4.0.0.5101可以
原因查明:
_textFlow.interactionManager=new EditManager(um);

如果不加上句,则不能执行undo和redo

最终解决办法:textArea.content="";须要初始化!!!!晕

[2009-03-06]
今天FlexSDK到了flex_sdk_4.0.0.5183 http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

到compiler中改成4.0.0.5183,又不能回车了,真有点晕;
最后没办法:侦听来 执行Enter回车
textArea.addEventListener(KeyboardEvent.KEY_DOWN,doWatchKey);
private function doWatchKey(event:KeyboardEvent):void{
   trace(event.keyCode)
  if(event.keyCode==13){
   var em:IEditManager=IEditManager(_textFlow.interactionManager);
   em.splitParagraph();
   }
}



[2009-03-30]
if (_textFlow.interactionManager && _textFlow.interactionManager.hasSelection()){
    _textFlow.flowComposer.hideSelection();
 }  


[2009-04-04]
flex_sdk_4.0.0.5900出来了
FxTextArea--->import spark.components.TextArea;
其它的FxXXX组件全部跑到spark.components下面去了

还有要注意mxml 写FxApplication或Application不行了,

[2009-04-08]
flex_sdk_4.0.0.5931居然不能引入FB,在学校的机器一样,Adobe的开发组真忙于更新啊

不过还好,今天把5952给DOWN下来,移入FB了


[2009-04-11]
flex_sdk_4.0.0.6137
1.开发小组把LinkElement和InlineGraphicElement的getEventMirror()给Kill了,可以变通地通过import spark.components.RichEditableText的来操作
2.textFlow.flowComposer.updateAllContainers()也给Kill了
3.如果想搞掉其默认的cut copy paste clear
可以一句搞定
richEditableText.contextMenu.clipboardMenu=false

分开则是:
richEditableText.contextMenu.clipboardItems.cut=false
richEditableText.contextMenu.clipboardItems.paste=false

也可以自定义menu
var myContextMenu:ContextMenu=richEditableText.contextMenu
addMyMenuItems(myContextMenu)
private function addMyMenuItems(myContextMenu:ContextMenu=null):void
		{
			//var myContextMenu:ContextMenu=new ContextMenu()
			myContextMenu.hideBuiltInItems();
			var MenuList:Array=["添加链接", "编辑链接", "复制链接", "剪切链接"];
			var separatorBeforeArray:Array=[true, false, true, false];

			for (var j:int=0; j < MenuList.length; j++)
			{
				var item:ContextMenuItem=new ContextMenuItem(MenuList[j], separatorBeforeArray[j]);
				//item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, MenuItemSelectHandler);
				myContextMenu.customItems.push(item);
				
			}
		} 



[2009-08-31]
//FB4 BETA 已出来一段时间了,也开校了,此文就此锁定!
//周末静心研究FB4

你可能感兴趣的:(Blog,Flex,J#,Adobe,OpenSource)