You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by bilbosax <wa...@comcast.net> on 2016/11/24 07:12:56 UTC

Heads Up - There MAY be something wrong with current mobile swc

I have been trying to skin a textInput control for a mobile application.  I
was not able to change the color of the background using
contentBackgroundColor, or the border, or basically to change much of
anything.  I set the skinClass to spark.skins.mobile.TextInputSkin, and
still was not able to change anything.  Finally I ctrl+clicked on
spark.skins.mobile.TextInputSkin to pull up the class and I got an error
that the skin class was not in my mobile swc.  So I removed the mobile swc
and I imported a mobile swc from an earlier sdk, and it worked like a charm.

I usually am wrong about these kinds of things, but I thought I would give a
heads up to anyone who might help package these things that there just MIGHT
be a problem with the mobile swc that was included in the Apache Flex 4.15.0
FP23.0 AIR23.0 files. It seems to be missing some skin classes.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Heads-Up-There-MAY-be-something-wrong-with-current-mobile-swc-tp14214.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: will event handlers in mxml be removed automatically?

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/16, 7:39 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>great, thanks
>
>but when added in AS then I always have to remove them manually, right?

Only if you are listening to something outside of the class that will
block GC and in that case, you can use weak references.

HTH,
-Alex


Re: will event handlers in mxml be removed automatically?

Posted by Frank Dahmen <fr...@dahmenia.de>.
ok, thanks


Am 25.11.2016 um 16:41 schrieb Kyle McKnight:
> It's always good practice to remove them yes. You can also look into weakly
> referenced listeners, but it's still better to remove them yourself
>
>
> Kyle McKnight
> Senior UI Engineer - Accesso
> 602.515.1444 (M)
>
> On Fri, Nov 25, 2016 at 10:39 AM, Frank Dahmen <fr...@dahmenia.de> wrote:
>
>> great, thanks
>>
>> but when added in AS then I always have to remove them manually, right?
>>
>> e.g.:
>>
>> private function do():void{
>>       otherBtn.addEventListener(.....);
>> }
>>
>> when is this done best in a view?
>> here:
>>
>> <s:View viewDeactivate="functionToRemoveAllASListeners()">
>>
>> ?
>>
>>
>>
>>
>> Am 25.11.2016 um 16:27 schrieb Alex Harui:
>>
>>> On 11/25/16, 6:25 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>>>
>>> Hi,
>>>> e.g.
>>>>
>>>> <s:View creationComplete="init()">
>>>>       <s:Button click="do() "/>
>>>> </s:View>
>>>>
>>>> when i call navigator.popView()
>>>> will the 2 eventhandlers be removed so the view can be gc'd ?
>>>>
>>> Assuming init() and do() are defined in the same MXML file and do not
>>> reference things outside the MXML file, there is no need to remove the
>>> handlers to enable GC.
>>>
>>> HTH,
>>> -Alex
>>>
>>>


Re: will event handlers in mxml be removed automatically?

Posted by Kyle McKnight <ka...@gmail.com>.
It's always good practice to remove them yes. You can also look into weakly
referenced listeners, but it's still better to remove them yourself


Kyle McKnight
Senior UI Engineer - Accesso
602.515.1444 (M)

On Fri, Nov 25, 2016 at 10:39 AM, Frank Dahmen <fr...@dahmenia.de> wrote:

> great, thanks
>
> but when added in AS then I always have to remove them manually, right?
>
> e.g.:
>
> private function do():void{
>      otherBtn.addEventListener(.....);
> }
>
> when is this done best in a view?
> here:
>
> <s:View viewDeactivate="functionToRemoveAllASListeners()">
>
> ?
>
>
>
>
> Am 25.11.2016 um 16:27 schrieb Alex Harui:
>
>>
>> On 11/25/16, 6:25 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>>
>> Hi,
>>> e.g.
>>>
>>> <s:View creationComplete="init()">
>>>      <s:Button click="do() "/>
>>> </s:View>
>>>
>>> when i call navigator.popView()
>>> will the 2 eventhandlers be removed so the view can be gc'd ?
>>>
>> Assuming init() and do() are defined in the same MXML file and do not
>> reference things outside the MXML file, there is no need to remove the
>> handlers to enable GC.
>>
>> HTH,
>> -Alex
>>
>>
>

Re: will event handlers in mxml be removed automatically?

Posted by Frank Dahmen <fr...@dahmenia.de>.
great, thanks

but when added in AS then I always have to remove them manually, right?

e.g.:

private function do():void{
      otherBtn.addEventListener(.....);
}

when is this done best in a view?
here:

<s:View viewDeactivate="functionToRemoveAllASListeners()">

?




Am 25.11.2016 um 16:27 schrieb Alex Harui:
>
> On 11/25/16, 6:25 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>
>> Hi,
>> e.g.
>>
>> <s:View creationComplete="init()">
>>      <s:Button click="do() "/>
>> </s:View>
>>
>> when i call navigator.popView()
>> will the 2 eventhandlers be removed so the view can be gc'd ?
> Assuming init() and do() are defined in the same MXML file and do not
> reference things outside the MXML file, there is no need to remove the
> handlers to enable GC.
>
> HTH,
> -Alex
>


Re: will event handlers in mxml be removed automatically?

Posted by Kyle McKnight <ka...@gmail.com>.
I know that you can not remove them manually by calling
removeEventListener. There is documentation somewhere stating that. I do
not know if they are removed internally by the framework


Kyle McKnight
Senior UI Engineer - Accesso
602.515.1444 (M)

On Fri, Nov 25, 2016 at 10:27 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 11/25/16, 6:25 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>
> >Hi,
> >e.g.
> >
> ><s:View creationComplete="init()">
> >     <s:Button click="do() "/>
> ></s:View>
> >
> >when i call navigator.popView()
> >will the 2 eventhandlers be removed so the view can be gc'd ?
>
> Assuming init() and do() are defined in the same MXML file and do not
> reference things outside the MXML file, there is no need to remove the
> handlers to enable GC.
>
> HTH,
> -Alex
>
>

Re: will event handlers in mxml be removed automatically?

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/16, 6:25 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:

>Hi,
>e.g.
>
><s:View creationComplete="init()">
>     <s:Button click="do() "/>
></s:View>
>
>when i call navigator.popView()
>will the 2 eventhandlers be removed so the view can be gc'd ?

Assuming init() and do() are defined in the same MXML file and do not
reference things outside the MXML file, there is no need to remove the
handlers to enable GC.

HTH,
-Alex


will event handlers in mxml be removed automatically?

Posted by Frank Dahmen <fr...@dahmenia.de>.
Hi,
e.g.

<s:View creationComplete="init()">
     <s:Button click="do() "/>
</s:View>

when i call navigator.popView()
will the 2 eventhandlers be removed so the view can be gc'd ?

thanks



Re: Heads Up - There MAY be something wrong with current mobile swc

Posted by bilbosax <wa...@comcast.net>.
Thought that I should post that I was using Flash Builder 4.5 when I was
having this problem. Tried it with Flash Builder 4.7 and I am having no
issues, so I think the mobile swc is likely good. Apologies



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Heads-Up-There-MAY-be-something-wrong-with-current-mobile-swc-tp14214p14215.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.