Actionscript 3 :: Flex Spark Textinput Prevents Component To Be Collected By GC

Mar 28, 2012

I've got a custom component (quite complex so I can't post any code here, although that shouldn't matter), that I can add to a view. When the component is deleted from the view or the view is switched I call my own dispose method which removes remaining eventListeners and kills some references so that the component can eventually be nulled and collected by the GC.

All that works perfectly fine until I add a Spark TextInput to the MXML part of the component (it took me hours to find out what is preventing the component to be collected!), so I recon that the TextInput somehow automatically adds some eventListeners.

My question is what are these listeners, or is there anything else I haven't thought of?

View 1 Replies


Similar Posts:


Flex :: 4 - Add Component To Title Bar Of Spark Panel Or Spark TitleWindow

Feb 7, 2011

I'm looking to add a couple of buttons to the title bar of a Spark Panel or Spark TitleWindow. Is this possible to do without making the panel from scratch?

View 1 Replies

Flex :: ErrorSkin On Spark TextInput Validation?

Mar 14, 2011

I might be taking crazy pills but has anyone actually gotten the errorSkin feature to work? I am not doing anything crazy, just extending TextInput (spark) and setting the errorSkin property.I have tried creating a skin using SparkSkin, did nothing.I have tried creating a skin using ProgrammaticSkin, did nothing.TextInput is always a red border. I know you can set errorColor and errorString but I am obviously looking to do more than just change the color of the border. I am compiling using Flex 4.1.

Implimentation:
<components:PromptedTextInput id="txt"
width="200"

[code].....

View 2 Replies

Flex :: Spark TextInput Incomplete Value Using Barcode Reader?

Jul 21, 2010

working with Flex4 AIR app, using this component I get data from the barcode reader,

<s:TextInput id="barcode" enter="showBarcode()"/>

Then for handle the enter event, wich is automatically triggered when reader finishes its reading

private function showBarcode():void{
Alert.show(barcode.text);
}

Ok, very simple. But my problem is: the text showed in the Alert Box is incomplete, it misses one or two digits (last) or it just shows the entire text in the TextInput component (correct view)

I already test my BC reader using the notepad, and it's fine.

I have tested same code using MX components in Flex3 web app, and there's no problem.

View 3 Replies

Flex :: Get Actual Text Width In Pixel Of Spark TextInput?

Dec 21, 2010

As textWidth property is no more accessible in spark textinput how we can get that property ?

View 1 Replies

Actionscript :: Flex - Add Search Icon Inside Spark TextInput?

May 11, 2011

I want to add search icon inside the spark TextInput control. Is there a way by which I can extend the TextInput control and add a child to it.

View 1 Replies

Flex :: Keep Focus On Spark TextInput After Setting StageWebView Source?

Jan 15, 2012

I have a mobile application that has a Text Input used for searching. Below the search TextInput is a StageWebView. When I set the source of the StageWebView using loadURL() the key input is shifted to the StageWebView. How can I prevent this?

View 2 Replies

Component Can't Get Garbage Collected

Oct 18, 2010

I just noticed a strange behaviour while looking at my application in the Flash Profiler. When I click a button in my TitleWindow then the TitleWindow doesn't get garbage collected after it is removed. I have no idea why that is happening.[code]...

View 2 Replies

Flex :: TextInput - Component Goes Out Of Another One

Aug 31, 2010

If I drag a textInput from a component and drop it near the end of the another component, the textInput goes outside of the dropZone.
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="150" height="500" xmlns:components="components.*" >
[Code] .....

View 2 Replies

Know When TextInput Component Is Active In Flex?

Jan 2, 2010

Imagine I have two TextInput components. How do I know which one is active?

View 1 Replies

Flex :: Embedding .ttf Font In Spark TextInput "prompt"?

Dec 10, 2011

This is what i have:

Main.mxml:

<fx:Style source="Main.css"/>
<s:TextInput x="72" y="95" focusColor="#CECB02" prompt="E-mail: "
skinClass="components.TextInputSkin"/>

[code]....

So, the "promptDisplay" in a computer(online) that does not have "Acens.ttf" installed shows the predefined one, but the inputed text is showed correctly with the embeded font!

View 1 Replies

Flex :: TextInput Component Event Is Not Working

Aug 10, 2010

I am working on a AS3 only project in Flex....I tried to listen ENTER event when use clicks enter/return in my textinput box....but it seems not working well...I did try using TextEvent.TEXT_INPUT and it worked fine but not Component.ENTER.

[Code]....

View 3 Replies

Flex :: MXML Error When Extending Component From TextInput

Feb 17, 2012

Whats wrong with this Flex MXML code? I'm getting error messages (error lines marked with "X"). Code is very simple but I cannot find the error.Message both times: multiple initalisation values for standard property "text" of type "string" (translated from german)[code]

View 2 Replies

Flex :: Custom TextInput Component Loses Focus But Still Contains Cursor?

Oct 29, 2011

I have a custom TextInput that listens for the FocusEvent.FOCUS_IN and FocusEvent.FOCUS_OUT events:

textDisplay.addEventListener(FocusEvent.FOCUS_IN, onFocusInHandler);
textDisplay.addEventListener(FocusEvent.FOCUS_OUT, onFocusOutHandler);

My onFocusInHandler function basically removes a "promptview" that tells the user to type in a value, with the onFocusOutHandler doing the opposite.

For example, if the TextInput text was backspaced to a blank value and the user clicks out of the TextInput box, it would show a "Please enter a value" light-gray prompt in the TextInput.

This works fine until the user clicks our custom "Clear" button. The clear button sets the text to "", and I can tell the FocusEvent.FOCUS_OUT is received because the prompt text is set to visible (its not being set anywhere else). The problem is, the cursor remains in the box as if it still has focus, so if the user immediately starts typing, both the prompt text "Please enter a value" and the user-entered text appears over the gray text, which looks pretty ugly and unreadable.

Why does the TextInput receive the FocusEvent.FOCUS_OUT event if it's not actually losing focus?

View 1 Replies

Adobe Flex 4 Rendering Issues With Text In Disabled TextInput Component?

Apr 22, 2011

I have an application which displays employee information. If the user opening the detailed employee information page is not authorized to make changes I set the TextInput to disabled. Some users are reporting rendering issues with this. The TextInput's text value does not appear inside the box but is misaligned and is outside of the component. You can see the screenshow below of the disabled ID column where the numbers which are supposed to be in the TextInput box are far off to the right.

[Code]...

View 1 Replies

Flex :: Skinning Spark List Component?

Aug 2, 2010

How to skin spark List component so that every adjacent itemRenderer has different color (something like mx DataGrid)?

View 1 Replies

Flex 4 :: Way To Disable A Tab Of A Spark Tabbar Component

Dec 27, 2010

is there a common way to disable a tab of a spark tabbar component in flex 4? with the mx tabnavigator component you can just disable the content corresponding to the tab and the tab is also disabled then. but doing this with the spark tab bar component disables just the content not the tab.[code]

View 3 Replies

Flex :: Halo Theme On A Spark Component

Aug 2, 2011

I have a Flex form made up mostly of MX components. Due to limitations with the MX mx.controls.ComboBox, I'd like to use the Spark control, spark. components.ComboBox. This works, except the Spark ComboBox sticks out visually because it doesn't use the Halo theme.Is there a way to have the Spark ComboBox use the Halo theme?

View 1 Replies

Flex :: Warning: Css Type Selectors Are Not Supported In Components 'sparks.component.TextInput'?

Jun 26, 2010

I am trying to do a simple CSS declaration. However, I got the warning above and not sure how to solve it. I thought s|(type) should declare the style for me

<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";[code]....

View 1 Replies

Flex :: Add A Spark Component To A Mx Extended Custom Itemrenderer?

Nov 14, 2010

have been working on an air app for quite some time and in one of my mx:lists i have a custom renderer written in pure AS (no mxml). it extends the listitemrenderer mx componenet. in it i have overrode the createChildren() function to add some children of my own.

now, fort right-to-left text i want in this itemrenderer, i would like to add a spark:TextArea component in this createChildren() function

is there a way to do so?

this is the itemRenderer:
import flash.text.TextField;
import mx.controls.listClasses.ListItemRenderer;

[Code].....

View 2 Replies

Flex :: Conditional Coloring On Spark RichText Component?

Jan 26, 2011

I have a spark RichText that I want to change his color according with the value on text property.

Negative values get red, positives blue...

When I declare the component, I call a method to set up the css style, but when the value changes, the color is not updated.

How can I put a conditional CSS Style? Is possible to create custom skins to RichText component?

View 3 Replies

Flex :: Flexbuilder Spark Component Implementation Error

May 27, 2011

I am having this error when I try to paste in code of a spark component. The component is a DataGrid and it needs to be a spark and not a mx.[code]The Error:Could not resolve <s:DataGrid> to a component implementation.How can I resolve this error. I need to make my DataGrid into a Spark Component.

View 1 Replies

Flex :: 4 Spark Component Panel - Hide Title Bar

Aug 18, 2011

Flex 4 Spark component Panel - Hide Title Bar I have used Spark panel to display the object inside a container. The panel and the inside elements are created dynamically. (using ActionScript). I need to remove the title bar of the panel in actionscript. When i tried to remove that, i am unable to hide the same. Tried below ways.

[Code]...

View 2 Replies

Flex :: Skin A (single) Spark Component To Look Like An MX Components

Oct 12, 2011

I want to use a Spark ComboBox with numerous MX Components but the Spark ComboBox does not look the same as the MX Components. Is there a skin I can use to Skin Spark components like MX components?

[Code]...

View 1 Replies

Flex :: Spark List Component Item Order

Oct 17, 2011

I have a regular spark list which is sorted correctly when no item renderer is used. However, when the following item renderer is used, the list shuffles and displays items from previous instances of the list.[code]

View 2 Replies

Flex :: Scroll To Selected Item In Spark List Component?

Oct 21, 2009

I'm setting selected element in s:List component with Actionscript, it works, but List doesn't scroll to selected item -- need to scroll with scrollbar or mouse. Is it possible to auto-scroll to selected item

View 8 Replies

Flex :: Adobe : ToolTip Of A Spark Component With Enabled=false?

Oct 19, 2010

I have a Spark Component (a Group) which doesn't behave as wanted.The tooltip is only shown when the component is enabled=true which the following example shows:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"[code]/....

In the Halo component the toolTip is shown. And this is, what I want to achieve.In my case I want to try something like this:

<s:Group toolTip="{cartEntries > 0 ? 'great!' : 'go and buy!'}"></s:Group>

View 1 Replies

AS3 :: Flex - Auto-resize The Width Of A Spark Dropdown Component?

Nov 29, 2010

in flash builder 4 how do i use the skinning option to make sure the popup dropdown list changes it's width to fit the longest item in the list?(the prompt area - the component when it is closed - should not change it's width)

View 1 Replies

Flex :: Wrapping A MXML (or Spark) Component On A Flash Sprite?

Oct 19, 2011

When using an mx:Canvas from the Flex api inside a Sprite, I'm getting a TypeError: Error #1009 and following stack:

> StyleManager/getStyleManager
> StyleProtoChain/getStyleManager
> StyleProtoChain/initProtoChain

[code].....

View 1 Replies

Actionscript 3 :: Multiple Text Color In One Spark:TextInput

Apr 10, 2012

How can I color words in spark:TextInput with two or more colors? I did it with mx:TextInput with htmlText property but i can not find it in spark component.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved