Transparency for clipboard image

2017-12-05 Thread DanielMcQ
I have a feature in my Flex/AIR app that allows the user to copy a selected
part of their drawing to the clipboard and then paste to some other app. On
Mac OS it preserves the transparency of the image, but on Windows I get a
black background when pasting to, e.g. PowerPoint.

Wondering if there are any ways around this or whether it's unavoidable.

Thanks for any thoughts.



-
~~~
mcquilleninteractive.com
simplediagrams.com
--
Sent from: http://apache-flex-users.246.n4.nabble.com/


Re: ModuleLoader vs SWFLoader

2017-12-05 Thread Alex Harui
Theoretically, modules are dynamically loaded libraries of classes,
whereas SWFLoader loads applications that can function as sub-applications
so more like launching sub-processes or something like Iframe.  SWFLoader
SWFs often can run on their own unless they expect something from the host
application.

Thus modules are usually more lightweight and smaller.  I doubt there will
be benefits to converting your modules into sub-applications, and it can
sometimes make debugging memory leaks harder as it doubles the number of
application instances and runs the bootstrap lifecycle twice.

One possible debugging technique is to make a TestModuleLoader.  I
generally do this by commenting out as much of the app as possible, and
adding or repurposing a few buttons.  The first level test is press a
button to load a module, then press another button to unload the module.
Test all of your modules using a profiler to check for leaks.  Sometimes
you'll catch a bad module in these tests and then you know the bad code is
in the initialization of the classes in the module since there is lots of
code in the module that probably didn't run in such a simple case.  But
often all modules do easily unload if they haven't had to do any work.

But then you have a harness where you can exercise code in the module
between the time you load and unload it.  You can comment out code in the
modules, run other code in the modules and narrow down which ones are not
unloading and what code is preventing the unload.

Good luck,
-Alex

On 12/5/17, 4:11 PM, "Kyle McKnight"  wrote:

>   1. I think it's a matter of preference and style really. In my mind I
>   view modules as more standalone than SWFs I might be loading otherwise.
>   Though I rarely use modules in my programming, but I come from a more
>pure
>   AS3 background so I tend to use those APIs even within Flex and stick
>to
>   more GUI mockup for my flex work.
>   2. I've never had much difficulty with using SWFLoader, I think it's
>   easier than modules.
>   3. I don't think there would be much of a difference, it all depends on
>   where the leaks come from. You can unload a module and they even get
>   garbage collected if you set the instance of the module to null and
>there
>   are no references to it. I don't think switching to using SWFLoader
>will
>   inherently cause less leaks. Have you been able to profile your
>application
>   using a tool like Scout?
>
>
>
>Kyle McKnight
>Senior UI Engineer - Accesso
>321.347.7318 (M)
>
>
>On Tue, Dec 5, 2017 at 4:59 PM, aceinc  wrote:
>
>> I am using the Flex 3.5 SDK.
>>
>> My entire application(s) have been developed using the moduleloader and
>> mx:module. I am having memory leak(s) and I am trying to isolate and
>>remove
>> them.
>>
>> In my research I noticed "SWFLoader" and its UnloadAndStop() method. I
>>was
>> wondering if;
>>
>> 1) This would be a better choice?
>>
>> 2) It would be easy to implement?
>>
>> 3) If it would be likely to resolve my memory leak issues?
>>
>> Thanks for your help.
>>
>>
>>
>>
>> --
>> Sent from: 
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-users.246.n4.nabble.com%2F=02%7C01%7Caharui%40adobe.com%7C5f1
>>1f458d9924d7635c008d53c3dee3d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>>7C636481159043134352=8Gponggll3jsL7WjQa7tuazk4Y473lRMNcrokog9jlk%3D
>>=0
>>



Re: ModuleLoader vs SWFLoader

2017-12-05 Thread Kyle McKnight
   1. I think it's a matter of preference and style really. In my mind I
   view modules as more standalone than SWFs I might be loading otherwise.
   Though I rarely use modules in my programming, but I come from a more pure
   AS3 background so I tend to use those APIs even within Flex and stick to
   more GUI mockup for my flex work.
   2. I've never had much difficulty with using SWFLoader, I think it's
   easier than modules.
   3. I don't think there would be much of a difference, it all depends on
   where the leaks come from. You can unload a module and they even get
   garbage collected if you set the instance of the module to null and there
   are no references to it. I don't think switching to using SWFLoader will
   inherently cause less leaks. Have you been able to profile your application
   using a tool like Scout?



Kyle McKnight
Senior UI Engineer - Accesso
321.347.7318 (M)


On Tue, Dec 5, 2017 at 4:59 PM, aceinc  wrote:

> I am using the Flex 3.5 SDK.
>
> My entire application(s) have been developed using the moduleloader and
> mx:module. I am having memory leak(s) and I am trying to isolate and remove
> them.
>
> In my research I noticed "SWFLoader" and its UnloadAndStop() method. I was
> wondering if;
>
> 1) This would be a better choice?
>
> 2) It would be easy to implement?
>
> 3) If it would be likely to resolve my memory leak issues?
>
> Thanks for your help.
>
>
>
>
> --
> Sent from: http://apache-flex-users.246.n4.nabble.com/
>


ModuleLoader vs SWFLoader

2017-12-05 Thread aceinc
I am using the Flex 3.5 SDK. 

My entire application(s) have been developed using the moduleloader and 
mx:module. I am having memory leak(s) and I am trying to isolate and remove 
them. 

In my research I noticed "SWFLoader" and its UnloadAndStop() method. I was 
wondering if; 

1) This would be a better choice? 

2) It would be easy to implement? 

3) If it would be likely to resolve my memory leak issues? 

Thanks for your help. 




--
Sent from: http://apache-flex-users.246.n4.nabble.com/


ModuleLoader vs SWFLoader

2017-12-05 Thread aceinc
I am using the Flex 3.5 SDK.

My entire application(s) have been developed using the moduleloader and
mx:module. I am having memory leak(s) and I am trying to isolate and remove
them. 

In my research I noticed "SWFLoader" and its UnloadAndStop() method. I was
wondering if;

1) This would be a better choice?

2) It would be easy to implement?

3) If it would be likely to resolve my memory leak issues?

Thanks for your help.



--
Sent from: http://apache-flex-users.246.n4.nabble.com/


Re: Strange error for existing project on Mac while Windows version works with same SDK version

2017-12-05 Thread Alex Harui
Good to know you figured it out.  This is a good reminder about the risks
of using generic folder/package names like "components".

-Alex

On 12/5/17, 9:02 AM, "Fréderic Cox"  wrote:

>Hi Alex,
>
>Thanks for helping me figuring this out! You were right (as always .. ;-))
>I was using a new theme and it has a built-in components.DashboardIcon
>which was different then the components.DashboardIcon class in this older
>project that now uses the new theme.
>
>Now it works as I deleted the old components.DashboardIcon.
>
>Thanks for the help!
>
>Best regards,
>
>Fréderic
>
>On Fri, Dec 1, 2017 at 6:41 PM, Alex Harui 
>wrote:
>
>> Hard to say for sure.  It looks like there is a binding to the width of
>> something.  If you don't have lots of binding expressions maybe you can
>> find the binding to width (probably from DashboardIcon.width)
>>
>> Also, further down in the stack trace, I see:
>>
>>"Cannot create property icon on components.DashboardIcon."
>>
>>
>> That makes me wonder if you have a different DashboardIcon in the source
>> paths of your Mac build.  I think if you SWFDump the SWF it will show
>>you
>> the path to the actual DashboardIcon that was used.
>>
>> HTH,
>> -Alex
>>
>> On 12/1/17, 4:48 AM, "Fréderic Cox"  wrote:
>>
>> >Hi,
>> >
>> >I'm having a strange issue with an existing project.
>> >The project is built with Flex 4.15 and AIR 20. In order to solve a
>> >particular issue I need to use AIR27.
>> >
>> >I re-added the project (which I didn't work on for 6 months) in Flash
>> >Builder and saw it was selecting 4.15 SDK with AIR20.
>> >
>> >I opened VMWare to check the Windows version and also there it uses
>>4.15
>> >SDK with AIR20.
>> >
>> >I then selected 4.15 SDK on Mac with AIR27 and noticed the following
>>error
>> >when opening the application:
>> >
>> >TypeError: Error #1010: A term is undefined and has no properties.
>> >at
>> >mx.binding::Watcher/notifyListeners()[D:\flex_sdk\
>> Sources\flex-sdk\framewo
>> >rks\projects\framework\src\mx\binding\Watcher.as:317]
>> >at
>> >mx.binding::PropertyWatcher/eventHandler()[D:\flex_sdk\
>> Sources\flex-sdk\fr
>> >ameworks\projects\framework\src\mx\binding\PropertyWatcher.as:385]
>> >at flash.events::EventDispatcher/dispatchEventFunction()
>> >at flash.events::EventDispatcher/dispatchEvent()
>> >at
>> >mx.core::UIComponent/dispatchEvent()[D:\flex_sdk\
>> Sources\flex-sdk\framewor
>> >ks\projects\framework\src\mx\core\UIComponent.as:13688]
>> >at mx.core::UIComponent/set
>> >width()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\
>> framework\src\mx\
>> >core\UIComponent.as:2883]
>> >at spark.components::Group/set
>> >width()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\
>> spark\src\spark\c
>> >omponents\Group.as:362]
>> >at
>> >components::DashboardIcon()[/Users/frederic/Desktop/Exuvis/
>> Mediahuis/MHCFl
>> >exLibrary/src/components/DashboardIcon.mxml:3]
>> >at views::DashboardView/_DashboardView_DashboardIcon1_i()
>> >at
>> >views::DashboardView/_DashboardView_Group1_i()[/
>> Users/frederic/Desktop/Exu
>> >vis/CityFashion/CityFashionTransferLib/src/views/DashboardView.mxml:3]
>> >at views::DashboardView/_DashboardView_Array3_c()
>> >at
>> >mx.core::DeferredInstanceFromFunction/getInstance()[D:\flex_sdk\
>> Sources\fl
>> >ex-sdk\frameworks\projects\framework\src\mx\core\
>> DeferredInstanceFromFunct
>> >ion.as:116]
>> >at
>> >spark.components::SkinnableContainer/createDeferredContent()[D:\
>> flex_sdk\S
>> >ources\flex-sdk\frameworks\projects\spark\src\spark\
>> components\SkinnableCo
>> >ntainer.as:1091]
>> >at
>> >spark.components::SkinnableContainer/createContentIfNeeded()[D:\
>> flex_sdk\S
>> >ources\flex-sdk\frameworks\projects\spark\src\spark\
>> components\SkinnableCo
>> >ntainer.as:1120]
>> >at
>> >spark.components::SkinnableContainer/createChildren()[D:\flex_sdk\
>> Sources\
>> >flex-sdk\frameworks\projects\spark\src\spark\components\
>> SkinnableContainer
>> >.as:915]
>> >at
>> >mx.core::UIComponent/initialize()[D:\flex_sdk\
>> Sources\flex-sdk\frameworks\
>> >projects\framework\src\mx\core\UIComponent.as:7695]
>> >at
>> >spark.components::View/initialize()[D:\flex_sdk\
>> Sources\flex-sdk\framework
>> >s\projects\mobilecomponents\src\spark\components\View.as:1008]
>> >at views::DashboardView/initialize()
>> >at mx.core::UIComponent/
>> >http://www.adobe.com/2006/flex/mx/internal::childAdded()[D
>> >:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\
>> src\mx\core\UICo
>> >mponent.as:7556]
>> >at
>> >mx.core::UIComponent/addChildAt()[D:\flex_sdk\
>> Sources\flex-sdk\frameworks\
>> >projects\framework\src\mx\core\UIComponent.as:7260]
>> >at
>> >spark.components::Group/addDisplayObjectToDisplayList(
>> )[D:\flex_sdk\Source
>> 
>>>s\flex-sdk\frameworks\projects\spark\src\spark\components\Group.as:2116]
>> >at spark.components::Group/
>> 

Re: Strange error for existing project on Mac while Windows version works with same SDK version

2017-12-05 Thread Fréderic Cox
Hi Alex,

Thanks for helping me figuring this out! You were right (as always .. ;-))
I was using a new theme and it has a built-in components.DashboardIcon
which was different then the components.DashboardIcon class in this older
project that now uses the new theme.

Now it works as I deleted the old components.DashboardIcon.

Thanks for the help!

Best regards,

Fréderic

On Fri, Dec 1, 2017 at 6:41 PM, Alex Harui  wrote:

> Hard to say for sure.  It looks like there is a binding to the width of
> something.  If you don't have lots of binding expressions maybe you can
> find the binding to width (probably from DashboardIcon.width)
>
> Also, further down in the stack trace, I see:
>
>"Cannot create property icon on components.DashboardIcon."
>
>
> That makes me wonder if you have a different DashboardIcon in the source
> paths of your Mac build.  I think if you SWFDump the SWF it will show you
> the path to the actual DashboardIcon that was used.
>
> HTH,
> -Alex
>
> On 12/1/17, 4:48 AM, "Fréderic Cox"  wrote:
>
> >Hi,
> >
> >I'm having a strange issue with an existing project.
> >The project is built with Flex 4.15 and AIR 20. In order to solve a
> >particular issue I need to use AIR27.
> >
> >I re-added the project (which I didn't work on for 6 months) in Flash
> >Builder and saw it was selecting 4.15 SDK with AIR20.
> >
> >I opened VMWare to check the Windows version and also there it uses 4.15
> >SDK with AIR20.
> >
> >I then selected 4.15 SDK on Mac with AIR27 and noticed the following error
> >when opening the application:
> >
> >TypeError: Error #1010: A term is undefined and has no properties.
> >at
> >mx.binding::Watcher/notifyListeners()[D:\flex_sdk\
> Sources\flex-sdk\framewo
> >rks\projects\framework\src\mx\binding\Watcher.as:317]
> >at
> >mx.binding::PropertyWatcher/eventHandler()[D:\flex_sdk\
> Sources\flex-sdk\fr
> >ameworks\projects\framework\src\mx\binding\PropertyWatcher.as:385]
> >at flash.events::EventDispatcher/dispatchEventFunction()
> >at flash.events::EventDispatcher/dispatchEvent()
> >at
> >mx.core::UIComponent/dispatchEvent()[D:\flex_sdk\
> Sources\flex-sdk\framewor
> >ks\projects\framework\src\mx\core\UIComponent.as:13688]
> >at mx.core::UIComponent/set
> >width()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\
> framework\src\mx\
> >core\UIComponent.as:2883]
> >at spark.components::Group/set
> >width()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\
> spark\src\spark\c
> >omponents\Group.as:362]
> >at
> >components::DashboardIcon()[/Users/frederic/Desktop/Exuvis/
> Mediahuis/MHCFl
> >exLibrary/src/components/DashboardIcon.mxml:3]
> >at views::DashboardView/_DashboardView_DashboardIcon1_i()
> >at
> >views::DashboardView/_DashboardView_Group1_i()[/
> Users/frederic/Desktop/Exu
> >vis/CityFashion/CityFashionTransferLib/src/views/DashboardView.mxml:3]
> >at views::DashboardView/_DashboardView_Array3_c()
> >at
> >mx.core::DeferredInstanceFromFunction/getInstance()[D:\flex_sdk\
> Sources\fl
> >ex-sdk\frameworks\projects\framework\src\mx\core\
> DeferredInstanceFromFunct
> >ion.as:116]
> >at
> >spark.components::SkinnableContainer/createDeferredContent()[D:\
> flex_sdk\S
> >ources\flex-sdk\frameworks\projects\spark\src\spark\
> components\SkinnableCo
> >ntainer.as:1091]
> >at
> >spark.components::SkinnableContainer/createContentIfNeeded()[D:\
> flex_sdk\S
> >ources\flex-sdk\frameworks\projects\spark\src\spark\
> components\SkinnableCo
> >ntainer.as:1120]
> >at
> >spark.components::SkinnableContainer/createChildren()[D:\flex_sdk\
> Sources\
> >flex-sdk\frameworks\projects\spark\src\spark\components\
> SkinnableContainer
> >.as:915]
> >at
> >mx.core::UIComponent/initialize()[D:\flex_sdk\
> Sources\flex-sdk\frameworks\
> >projects\framework\src\mx\core\UIComponent.as:7695]
> >at
> >spark.components::View/initialize()[D:\flex_sdk\
> Sources\flex-sdk\framework
> >s\projects\mobilecomponents\src\spark\components\View.as:1008]
> >at views::DashboardView/initialize()
> >at mx.core::UIComponent/
> >http://www.adobe.com/2006/flex/mx/internal::childAdded()[D
> >:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\
> src\mx\core\UICo
> >mponent.as:7556]
> >at
> >mx.core::UIComponent/addChildAt()[D:\flex_sdk\
> Sources\flex-sdk\frameworks\
> >projects\framework\src\mx\core\UIComponent.as:7260]
> >at
> >spark.components::Group/addDisplayObjectToDisplayList(
> )[D:\flex_sdk\Source
> >s\flex-sdk\frameworks\projects\spark\src\spark\components\Group.as:2116]
> >at spark.components::Group/
> >http://www.adobe.com/2006/flex/mx/internal::elementAdded()[D
> >:\flex_sdk\Sources\flex-sdk\frameworks\projects\spark\src\
> spark\components
> >\Group.as:1707]
> >at
> >spark.components::Group/addElementAt()[D:\flex_sdk\
> Sources\flex-sdk\framew
> >orks\projects\spark\src\spark\components\Group.as:1466]
> >at
>