Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated TextFieldDisplay to measure when htmlText is reset

  • Loading branch information...
commit f5bc9c74140eeed30a146226e70825c2c13a1ebd 2 parents c845da4 + fc0e588
@benstucki benstucki authored
View
6 src/manifest.xml
@@ -17,7 +17,7 @@
<component id="Scroller" class="reflex.components.Scroller" />
<component id="TextInput" class="reflex.components.TextInput" />
<component id="TextArea" class="reflex.components.TextArea" />
-
+ <component id="Knob" class="reflex.components.Knob" />
<!-- containers -->
<component id="Container" class="reflex.containers.Container"/>
@@ -90,10 +90,12 @@
<component id="BitmapFillMode" class="mx.graphics.BitmapFillMode" />
<!-- states -->
- <!--<component id="State" class="mx.states.State" />-->
+ <component id="State" class="mx.states.State" />
<component id="AddItems" class="mx.states.AddItems" />
<component id="SetProperty" class="mx.states.SetProperty" />
<component id="SetStyle" class="mx.states.SetStyle" />
+ <component id="IOverride" class="mx.states.IOverride" />
+
<!-- text -->
<component id="Label" class="reflex.text.Label" />
View
3  src/mx/mxml/FlexReferences.as
@@ -15,6 +15,7 @@ package mx.mxml
import mx.core.IStateClient2;
import mx.core.Repeater;
import mx.filters.IBitmapFilter;
+ import mx.states.AddItems;
import mx.styles.CSSStyleDeclaration;
/**
@@ -48,5 +49,7 @@ package mx.mxml
static private var bf:IBitmapFilter;
static private var difc:DeferredInstanceFromClass;
+ //static private var ai:AddItems;
+
}
}
View
3  src/reflex/components/Knob.as
@@ -3,6 +3,7 @@ package reflex.components
import reflex.behaviors.SlideBehavior;
import reflex.data.Position;
+ import reflex.skins.KnobSkin;
public class Knob extends SliderComponent
{
@@ -11,7 +12,7 @@ package reflex.components
{
super();
position = new Position();
- //skin = new ScrollBarGraphic()
+ skin = new KnobSkin();
behaviors.addItem(new SlideBehavior(this));
}
View
4 src/reflex/containers/Container.as
@@ -77,8 +77,8 @@ package reflex.containers
if (_layout == null) {
//_layout = new BasicLayout();
}
- content = new SimpleCollection();
- //_content.removeEventListener(CollectionEvent.COLLECTION_CHANGE, onChildrenChange);
+ content = new SimpleCollection(); // use setter logic
+ //_content.addEventListener(CollectionEvent.COLLECTION_CHANGE, onChildrenChange);
addEventListener(Event.ADDED, onAdded, false, 0, true);
addEventListener(MEASURE, onMeasure, false, 0, true);
addEventListener(LAYOUT, onLayout, false, 0, true);
View
14 src/reflex/text/TextFieldDisplay.as
@@ -68,7 +68,19 @@
} else {
DataChange.change(this, "text", super.text, super.text = value);
}
- //onMeasure(null);
+ onMeasure(null);
+ }
+
+ [Bindable(event="htmlTextChange", noEvent)]
+ override public function get htmlText():String { return super.text; }
+ override public function set htmlText(value:String):void {
+ if(value == null) {
+ DataChange.change(this, "htmlText", super.htmlText, null);
+ super.htmlText = "";
+ } else {
+ DataChange.change(this, "htmlText", super.htmlText, super.htmlText = value);
+ }
+ onMeasure(null);
}
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.