Open 0b1kn00b opened 10 years ago
import tink.lang.Cls;
import flash.text.TextField;
import flash.display.InteractiveObject;
import flash.display.DisplayObject;
import flash.display.Sprite;
class Text extends Sprite implements Cls{
@:forward(
/*alwaysShowSelection,antiAliasType,autoSize,background,
backgroundColor,border,borderColor,bottomScrollV,
caretIndex,condenseWhite,defaultTextFormat,
displayAsPassword,embedFonts,gridFitType,htmlText,
length,maxChars,maxScrollH,maxScrollV,mouseWheelEnabled,
multiline,numLines,restrict,scrollH,scrollV,selectable,
selectedText,selectionBeginIndex,selectionEndIndex,sharpness,
styleSheet,textColor,textHeight,textWidth,
thickness,type,useRichTextClipboard,wordWrap,appendText,
copyRichText,getCharBoundaries,getCharIndexAtPoint,
getFirstCharInParagraph,getImageReference,getLineIndexAtPoint,
getLineIndexOfChar,getLineLength,getLineMetrics,getLineOffset,
getLineText,getParagraphLength,getRawText,getTextFormat,getTextRuns,
getXMLText,insertXMLText,pasteRichText,
replaceSelectedText,replaceText,setSelection,setTextFormat*/
) var __text_field__ : TextField;
public function new(){
super();
}
public var text(get,set):String;
private function get_text(){
return this.__text_field__.text;
}
private function set_text(text:String):String{
return this.__text_field__.text = text;
}
/*
@:require(flash11) var textInteractionMode(get,set) : TextInteractionMode;
@:require(flash11) private function get_textInteractionMode():TextInteractionMode{
return __text_field__.textInteractionMode;
}
@:require(flash11) private function set_textInteractionMode(v:TextInteractionMode):TextInteractionMode{
return __text_field__.textInteractionMode = v;
}*/
}
Ah yes. I ran into this once. Will look into it. For the time being I suggest using @:forward(!textInteractionMode)
instead of listing all fields ;)
Didn't know you could use the negation operator here, but even with that field excluded (and requestSoftKeyboard up the chain), the error remains.
Well now you know you can and I know it's not enough :D
Ok, the problem comes from an underlying layer. In some sense the whole way in which @:require is handled is rather problematic. I would have liked to just generate the @:require on the forwarded methods, but the compiler will then reject the method bodies.
Using syntactic delegation on TextField in flash triggers a compiler error even when using (field0,field1...fieldn). I assume it's the
TextInteractionMode
field, but it may be something further up the class hierarchy.