Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated TextFieldDisplay to measure when htmlText is reset

  • Loading branch information...
commit f5bc9c74140eeed30a146226e70825c2c13a1ebd 2 parents c845da4 + fc0e588
Ben Stucki benstucki authored
6 src/manifest.xml
@@ -17,7 +17,7 @@
17 17 <component id="Scroller" class="reflex.components.Scroller" />
18 18 <component id="TextInput" class="reflex.components.TextInput" />
19 19 <component id="TextArea" class="reflex.components.TextArea" />
20   -
  20 + <component id="Knob" class="reflex.components.Knob" />
21 21
22 22 <!-- containers -->
23 23 <component id="Container" class="reflex.containers.Container"/>
@@ -90,10 +90,12 @@
90 90 <component id="BitmapFillMode" class="mx.graphics.BitmapFillMode" />
91 91
92 92 <!-- states -->
93   - <!--<component id="State" class="mx.states.State" />-->
  93 + <component id="State" class="mx.states.State" />
94 94 <component id="AddItems" class="mx.states.AddItems" />
95 95 <component id="SetProperty" class="mx.states.SetProperty" />
96 96 <component id="SetStyle" class="mx.states.SetStyle" />
  97 + <component id="IOverride" class="mx.states.IOverride" />
  98 +
97 99
98 100 <!-- text -->
99 101 <component id="Label" class="reflex.text.Label" />
3  src/mx/mxml/FlexReferences.as
@@ -15,6 +15,7 @@ package mx.mxml
15 15 import mx.core.IStateClient2;
16 16 import mx.core.Repeater;
17 17 import mx.filters.IBitmapFilter;
  18 + import mx.states.AddItems;
18 19 import mx.styles.CSSStyleDeclaration;
19 20
20 21 /**
@@ -48,5 +49,7 @@ package mx.mxml
48 49 static private var bf:IBitmapFilter;
49 50 static private var difc:DeferredInstanceFromClass;
50 51
  52 + //static private var ai:AddItems;
  53 +
51 54 }
52 55 }
3  src/reflex/components/Knob.as
@@ -3,6 +3,7 @@ package reflex.components
3 3
4 4 import reflex.behaviors.SlideBehavior;
5 5 import reflex.data.Position;
  6 + import reflex.skins.KnobSkin;
6 7
7 8 public class Knob extends SliderComponent
8 9 {
@@ -11,7 +12,7 @@ package reflex.components
11 12 {
12 13 super();
13 14 position = new Position();
14   - //skin = new ScrollBarGraphic()
  15 + skin = new KnobSkin();
15 16 behaviors.addItem(new SlideBehavior(this));
16 17 }
17 18
4 src/reflex/containers/Container.as
@@ -77,8 +77,8 @@ package reflex.containers
77 77 if (_layout == null) {
78 78 //_layout = new BasicLayout();
79 79 }
80   - content = new SimpleCollection();
81   - //_content.removeEventListener(CollectionEvent.COLLECTION_CHANGE, onChildrenChange);
  80 + content = new SimpleCollection(); // use setter logic
  81 + //_content.addEventListener(CollectionEvent.COLLECTION_CHANGE, onChildrenChange);
82 82 addEventListener(Event.ADDED, onAdded, false, 0, true);
83 83 addEventListener(MEASURE, onMeasure, false, 0, true);
84 84 addEventListener(LAYOUT, onLayout, false, 0, true);
14 src/reflex/text/TextFieldDisplay.as
@@ -68,7 +68,19 @@
68 68 } else {
69 69 DataChange.change(this, "text", super.text, super.text = value);
70 70 }
71   - //onMeasure(null);
  71 + onMeasure(null);
  72 + }
  73 +
  74 + [Bindable(event="htmlTextChange", noEvent)]
  75 + override public function get htmlText():String { return super.text; }
  76 + override public function set htmlText(value:String):void {
  77 + if(value == null) {
  78 + DataChange.change(this, "htmlText", super.htmlText, null);
  79 + super.htmlText = "";
  80 + } else {
  81 + DataChange.change(this, "htmlText", super.htmlText, super.htmlText = value);
  82 + }
  83 + onMeasure(null);
72 84 }
73 85
74 86 override public function set defaultTextFormat(value:TextFormat):void {

0 comments on commit f5bc9c7

Please sign in to comment.
Something went wrong with that request. Please try again.