Re: [flexcoders] CSSStyleDeclaration in AIR app Windows

2015-07-29 Thread Alex Harui aha...@adobe.com [flexcoders]
Yeah, there should be per-module styles in all Apache Flex versions.

BTW, you’ll get more timely assistance by asking on the us...@flex.apache.org 
mailing list.

-Alex

From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com on behalf 
of Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Wednesday, July 29, 2015 at 7:25 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] CSSStyleDeclaration in AIR app Windows



Interesting idea, I'll look into it. I'm using Flex 4.13 currently.






From: Alex Harui aha...@adobe.commailto:aha...@adobe.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Wednesday, July 29, 2015 9:40 AM
Subject: Re: [flexcoders] CSSStyleDeclaration in AIR app Windows



I think if each window loads a module, that module gets its own styles.  You 
might need Flex 4.6 or later for that to work.

-Alex



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com on behalf 
of Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, July 24, 2015 at 6:20 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] CSSStyleDeclaration in AIR app Windows


I'm developing a multi-window Flex/AIR desktop app.

I would very much like to be able to change CSSStyleDeclarations on a 
per-window basis. It seems that if I do:

var decl:CSSStyleDeclaration = 
window.styleManager.getCSSStyleDeclaration(fully.qualified.WidgetClassName);
decl.setStyle(widgetColor, 0xFF);

The style change affects all WidgetClassName instances across all windows.

Is there some other means of accomplishing what I'm trying to accomplish? It 
would have to work with non-inheriting styles also.








Re: [flexcoders] CSSStyleDeclaration in AIR app Windows

2015-07-29 Thread Alex Harui aha...@adobe.com [flexcoders]
I think if each window loads a module, that module gets its own styles.  You 
might need Flex 4.6 or later for that to work.

-Alex

From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com on behalf 
of Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, July 24, 2015 at 6:20 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] CSSStyleDeclaration in AIR app Windows



I'm developing a multi-window Flex/AIR desktop app.

I would very much like to be able to change CSSStyleDeclarations on a 
per-window basis. It seems that if I do:

var decl:CSSStyleDeclaration = 
window.styleManager.getCSSStyleDeclaration(fully.qualified.WidgetClassName);
decl.setStyle(widgetColor, 0xFF);

The style change affects all WidgetClassName instances across all windows.

Is there some other means of accomplishing what I'm trying to accomplish? It 
would have to work with non-inheriting styles also.




Re: [flexcoders] flex calculation problem

2015-04-16 Thread Alex Harui aha...@adobe.com [flexcoders]
It could be that unless both text inputs contain strings that parse into 
numbers you’ll get funky results like NaN for empty string.

From: stinas...@yahoo.commailto:stinas...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, April 16, 2015 at 1:01 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] flex calculation problem



Hello, thanks for the response. i am already using a change listener on the 
text input but when i start typing in the first textinput, i don't get the 
desired result. its only when i type in both that the evnet kicks in.




Re: [flexcoders] Seeking Flex Contractors

2015-03-03 Thread Alex Harui aha...@adobe.com [flexcoders]
You can try asking on the d...@flex.apache.org or the Apache Flex LinkedIn 
group. https://www.linkedin.com/grp/home?gid=4296888

From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, February 24, 2015 at 6:55 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Seeking Flex Contractors



I'm looking for 1 or 2 Flex contractors, located in the US or Canada, for 
remote work. Please contact me at dglas...@pobox.commailto:dglas...@pobox.com 
if interested.





[flexcoders] Firefox not including browser cookies when using NetConnection

2014-12-21 Thread Alex Ditu ditu.alexan...@gmail.com [flexcoders]
Hello,

I have searched on google this problem for some time and haven't found a
solution. I use NetConnection to connect to red5, and in the browser I have
3 cookies for that domain.
The cookies are sent with IE and Chrome (after disableing httpOnly flag)
but Firefox doesen't send those cookies (it sends just one of them).

Do you have any ideas?


Re: [flexcoders] Which AIR SDK to use with Flex?

2014-11-08 Thread Alex Harui aha...@adobe.com [flexcoders]
The main issue is, as suggested, that ASC2.0 is not certified to compile MXML, 
only AS.

If it worked in Ant, I’d guess you loaded the Flex SDK’s ant tasks which would 
run the Flex SDKs compiler.

-Alex

From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Saturday, October 25, 2014 at 6:23 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Which AIR SDK to use with Flex?



Mark, thanks for the reply.

I don't use Flex builder, just Apache ant and the Flex and AIR SDKs. I was able 
to build the Flex/iOS app with both versions of the 15.0.0.302 SDK in their 
default configurations, so I guess the one with the new compiler uses the old 
one by default. (At least from the command line.)  I'm going to stick with the 
SDK without the new compiler though, just to be on the safe side.


On Saturday, October 25, 2014 9:39 AM, 'Mark R. Jonkman' 
mark.jonk...@comcast.netmailto:mark.jonk...@comcast.net [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com wrote:




I’m guessing it mostly has to do with mxml compiling. The old compiler would 
have to handle both types of input – ActionScript and MXML and generate 
ActionScript code based on the MXML and then generate the final product. If 
your Adobe and you no longer support MXML yourself then there is no reason to 
keep it around in future generations of the compiler – especially where speed 
becomes an issue.

I hit a lot of problems this week with the new fast compiler. AIR SDK 15 
switched from using the legacy compiler to the new fast compiler as its default 
compiler. My project uses just a small portion of the FLEX framework – just 
enough stuff to connect with the backend server running BlazeDS and sending 
stuff over AMF. As a matter of fact we actually put the classes we used into 
our own project and as far as we knew, no longer linked against any of the Flex 
framework SWCs. However after the switch to the new AIR SDK 15 the project 
started blowing chunks. It would not find about 8 interfaces and classes from 
the Flex framework.  Eventually I traced it down to possible being the swc 
cache that Flash Builder stores in the workspace .metadata folder (I think). I 
deleted all the files in the swc  cache and the errors finally went away. It 
took hours to track that down. Then I finally got the project compile into an 
iOS IPA file and installed it on my iPad – crash after a few seconds of 
running. AIR simulator no problem, iOS Simulator no problem. But a debug or 
release runtime and crash.. Then I realized that they had changed the default 
compiler to the fast, switched back to the legacy AOT compiler and everything 
worked perfectly.

Unfortunately if iOS is your target you have almost no choice but to upgrade to 
AIR SDK 15. Apple changed the requirements for uploading and all the old SDKs 
will not produce an IPA that will be accepted (unless you experiment with 
changing the linker and that sounded more like Voodoo then a long term 
solution). And the AIR SDK must be the one from at least Oct 14, 2014.

If you did not already know – The AIR SDK is located in two places one is the 
Flash Builder 4.7/eclipse/plugin folder (Used by ActionScript projects) and the 
other is in the Flash Builder 4.7/sdks folder. The plugin folder is for 
ActionScript only projects and the other in the sdk folder is for Flex 
projects. At least as near as I can determine.

I would download the default AIR SDK to use with any ActionScript projects – 
it’s the SDK that gets put into the eclipse/plugin/actionscript compiler…. 
Location.

For Flex projects, download the alternative and drop it into the sdks/4.6.0 
folder in Flash Builder.

This way you have both compilers setup and useable based on the type of project 
your working on.

If you hit the same situation I did with iOS output, then on the project 
settings, iOS settings – click customize launch button, click add parameter, 
enter –useLegacyAOT for name and for value enter yes. Then click the before.. 
radio button and choose –provisioning_profile (or something like that). I don’t 
have my work computer open so I might be off on a couple of name of the before 
radio button and the entery in the drop down list – but it’s the only entry 
with provision profile or similar in the name.

Sincerely
Mark R. Jonkman

From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com]
Sent: Thursday, October 23, 2014 12:40 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Which AIR SDK to use with Flex? [1 Attachment]

[Attachment(s)https://us-mg6.mail.yahoo.com/neo/launch?.rand=4d328m9fkp613#TopText
 from Dave

Re: [flexcoders] Re: getting the sum of values in list datafield.

2014-09-02 Thread Alex Harui aha...@adobe.com [flexcoders]
Way more people are probably watching the us...@flex.apache.org list.  You 
might try asking for help there, and if budget permits, offering to pay someone 
to help you.

-Alex

From: stinas...@yahoo.commailto:stinas...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, September 2, 2014 9:48 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: getting the sum of values in list datafield.



Hey guys, please i need help on this




Re: [flexcoders] Re: getting the sum of values in list datafield.

2014-09-01 Thread Alex Harui aha...@adobe.com [flexcoders]
Try debugging the logic.  Basically the principle is to call the same code that 
would be called by manipulating the UI whenever the data is first ready.

From: stinas...@yahoo.commailto:stinas...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Sunday, August 31, 2014 11:35 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: getting the sum of values in list datafield.



still doesn't do the trick.




Re: [flexcoders] Re: getting the sum of values in list datafield.

2014-08-31 Thread Alex Harui aha...@adobe.com [flexcoders]
Try calling filterList and maybe calculateSum in expenseResult.

From: stinas...@yahoo.commailto:stinas...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Saturday, August 30, 2014 10:19 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getting the sum of values in list datafield.



Hello Guys i managed to get it to calculate the total based on range of dates 
thanks to your help. One thing though, when the application my List Component 
is not populated with data until i select a date from the date field. Is there 
a way to fix the problem? Below is the updated code

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
width=100%
height=100%
verticalAlign=top
verticalGap=0
paddingTop=0
paddingBottom=0
paddingLeft=0
paddingRight=0
xmlns:ns1=ascript.*
creationComplete=init();
initialize=initDate();
xmlns:ns2=components.*

mx:Style source=css/styleSheet.css/

mx:Script
![CDATA[
import components.newEntryForm;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.managers.PopUpManager;
import mx.rpc.events.ResultEvent;
import mx.events.CollectionEvent;

protected const MAX_DATE:Date=new Da! te(2020, 11, 31);

/*** code to Filter based on Date Range 
*/

protected const MIN_DATE:Date=new Date(2014, 0, 1);

/*** Start Pop Ups */
private var add_win:newEntryForm;

/*** code to get Expense Details */
private var expenseAr:ArrayCollection = new ArrayCollection! ;
 div
[Bindable]
private var filteredAr:ArrayCollection=new ArrayCollection();

protected function arrColl_filterFunc(item:Object):Boolean
{
var cDate:Number=Date.parse(item.hireDate);

if (!sDate || !eDate)
{
return true;
}

if (sDate.selectedDate  eDate.selectedDate)
{
return (sDate.selectedDate.time = cDate)  (eDate.selectedDate.time = cDate);
}
else if (sDate.selectedDate)
{
return sDate.selectedDate.time = cDate;
}
else if (eDate.selectedDate)
{
return eDate.selectedDate.time = cDate;
}
else
{
return true;
}
}

protected function initDate():void
{
sDate.se! lectedDate=MIN_DATE;
sDate.selectableRange={rangeStart: MIN_DATE, rangeEnd: MAX_DATE};

eDate.selectedDate=MAX_DATE;
eDate.selectableRange=sDate.selectableRange;
}

private function createdaddPopup():void
{
add_win=newEntryForm(PopUpManager.createPopUp(this, newEntryForm, true));
}

! private function expenseResult(event:ResultEvent):void!
{
expenseAr=event.result as ArrayCollection;
expenseAr.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}
private function filterList():void
{
expenseAr.filterFunction=arrColl_filterFunc;
expenseAr.refresh();
for (var i:int=expenseAr.length - 1; i = 0; i--)
{
if (!filteredAr.contains(expenseAr[i]))
{
filteredAr.addItem(expenseAr[i]);
}
}
for (i=filteredAr.length - 1; i = 0; i--)
{
if (!e! xpenseAr.contains(filteredAr[i]))
{
filteredAr.removeItemAt(i);
}
}
}
private function init():void
{
moRentalsSvc.getExpense();
}

public function calcula! teSum(event:CollectionEvent):void
{
var amt:Number=0;
var n:int=expenseAr.length;
for (var i:int=0; i  n; i++)
{
var expenseEntry:Object=expenseAr.getItemAt(i);
amt+=Number(expenseEntry.subTotal);
}
sum.text=ugxftr.format(amt.toString());
}
]]
/mx:Script

mx:RemoteObject id=moRentalsSvc
destination=ColdFusion
source=moRentals.src.CFCs.crud
showBusyCursor=true
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getExpense
  result=expenseResult(event)/

/mx:RemoteObject
mx:DefaultTileListEffect id=dtle0
 fadeOutDuration=500
 fadeInDuration=500
 moveDuration=500
 color=0xe7e7e8/

mx:CurrencyFormatter id=ugxftrquo! t;
 precision=0
 thousandsSeparatorTo=,
 useThousandsSeparator=true
 rounding=up
 currencySymbol=UGX /

mx:DateFormatter id=dateFormat
 formatString= DD, /

mx:HBox styleName=header
width=1! 00%
height=50
verticalAlign=middle
verticalGap=0
mx:Image source=assets/logo.png/
mx:Spacer width=100%/
mx:Label text=Logged in as: Aaliyah Ntulo/
mx:Image source=assets/power.png/

/mx:HBox
mx:HBox width=100%
height=100%
horizontalGap=0
mx:VBox width=200
height=100%
verticalGap=0
backgroundColor=#818284
horizontalAlign=center

ns2:menuButton
mx:Image source=assets/dashboard.png/
mx:Label text=Dashboard/
/ns2:menuButton
ns2:menuButton
mx:Image source=assets/drivers.png/
mx:Spacer/
mx:Label text=Drivers/
/ns2:menuButton
ns2:menuButton
mx:Image source=assets/car.png/
mx:Spacer/
mx:Label text=Vehicles/
/ns2:menuButton
ns2:customBtn/
/mx:VBox
mx:VBox height=100%
backgroundColor=#FF
verticalGap=0


mx:HBox width=100%
! paddingLeft=40
paddingRight=45

Re: [flexcoders] getting the sum of values in list datafield.

2014-08-29 Thread Alex Harui aha...@adobe.com [flexcoders]
The code looks mostly ok.  I noticed you commented out the addEventListener 
calls for COLLECTION_CHANGE.  I'll bet it threw an error becuae expenseAr is 
null until the RemoteObject returns a result.  I would move the 
addEventLIstener call to expenseResult() method when you know expenseAr is 
valid.


-Alex

From: stinas...@yahoo.commailto:stinas...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, August 29, 2014 1:55 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] getting the sum of values in list datafield.



Hello, i have a flex list that is populated by an arraycollection. in the 
arraycollection i have a field subTotal and i would like to calculate the 
subtotals from that field and pin them to a text component and i would like to 
do that even when the list is filtered. below is my code

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
width=100%
height=100%
verticalAlign=top
verticalGap=0
n! bsp;   paddingTop=0
paddingBottom=0
paddingLeft=0
paddingRight=0
xmlns:ns1=ascript.*
creationComplete=init()
initialize=initDate()
xmlns:ns2=components.*

mx:Style source=css/styleSheet.css/

mx:Script
nbs! p;   ![CDATA[
  !nbsp;   import components.newEntryForm;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.managers.PopUpManager;
import mx.rpc.events.ResultEvent;
import mx.events.CollectionEvent;

protected const MAX_DATE:Date=new Date(2020, 11, 31);

/*** code to Filter based on Date Range 
*/

protected const MIN_DATE:Da! te=new Date(2014, 0, 1);

/*** Start Pop Ups */
private var add_win:newEntryForm;


/*** code to get Expense Details 
*/
[Bindable]
private var expenseAr:ArrayCollection;

protected function arrColl_filterFunc(item:Object):Boolean
{
var cDate:Number=Date.parse(item.hireDate);

  ! ;  if (!sDate || !eDate)
 nbs! p;  {
return true;
}

if (sDate.selectedDate  eDate.selectedDate)
{
return (sDate.selectedDate.time = cDate)  
(eDate.selectedDate.time = cDate);
}
else if (sDate.selectedDate)
{
  nb! sp; return sDate.selectedDate.time = cDate;
}
else if (eDate.selectedDate)
{
return eDate.selectedDate.time = cDate;
}
else
{
return true;
}
  ! ;  //expenseAr.addEventListener(Collec! tionEven 
t.COLLECTION_CHANGE, calculateSum);
}

protected function initDate():void
{
sDate.selectedDate=MIN_DATE;
sDate.selectableRange={rangeStart: MIN_DATE, rangeEnd: 
MAX_DATE};

eDate.selectedDate=MAX_DATE;
eDate.selectableRange=sDate.selectableRange;
}

private function createdaddPopup():void
{
 nbs! p;  add_win=newEntryForm(PopUpManager.createPopUp(this, 
newEntryForm, true));
}

private function expenseResult(event:ResultEvent):void
{
expenseAr=event.result as ArrayCollection;
expenseAr.filterFunction=arrColl_filterFunc;
expenseAr.refresh();
}

private function init():void
{
! nbsp;   moRentalsSvc.getExpense()! ;
nb sp;   
//expenseAr.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}

public function calculateSum(event:CollectionEvent):void
{
var amt:Number=0;
var n:int=expenseAr.length;
for (var i:int=0; i  n; i++)
{
var expenseEntry:Object=expenseAr.getItemAt(i);
nbs! p;   amt+=expenseEntry.subTotal;
}
sum.text=ugxftr.format(amt.toString());
}
]]
/mx:Script

mx:RemoteObject id=moRentalsSvc
 destination

Re: [flexcoders] Re: Future Scope of Flex

2014-08-20 Thread Alex Harui aha...@adobe.com [flexcoders]
Are you saying you've tried to port this to JS and it did not run as well?

I'll try to remember this site as we work on FlexJS.

Thanks,
-Alex

From: Dan Pride danielpr...@yahoo.commailto:danielpr...@yahoo.com 
[flexcoders] flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Wednesday, August 20, 2014 4:34 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Future Scope of Flex



Good Idea, it would be piling one hysteria on top of another so to speak ;)

 I urge you to consider I wrote this just before IE 8.
Still runs pretty good.
My first, a little embarrassing internally to me now but still.
Compare way back then to the future you are asking for now.
Try clicking a few lists or pictures etc

http://archaeolibrary.com/


Dan Pride
1-303-800-0900
1-206-313-4607 Mobile
http://danielpride.comhttp://danielpride.com/
www.linkedin.com/in/danielpride/http://www.linkedin.com/in/danielpride/
http://archaeolibrary.com/
http://RideshareGPS.comhttp://gpsrideshare.com/




On Tuesday, August 19, 2014 3:40 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com wrote:



I'm going to ignore your brush fire topic, but I will address two other points:

juice under the hood.  That is a concern for trying to emulate Flash or the 
current Flex SDK in JS since that is quite a bit of code.  But for FlexJS, if 
you look at the prototype of the JQuery wrapping, it is a thin layer written to 
implement whatever was needed to implement an AS emulation of JQuery.  So, in 
theory, if FlexJS using JQuery isn't fast enough, it probably wasn't going to 
be fast enough use JQuery either.  And that's not a problem for the Apache Flex 
project.  The browser companies know they need to get their JS implementations 
to work faster and computers and devices are getting faster.  It might be a 
problem now, but may not be in the future.

Also note that in many cases JS runs faster than AS.  In the JS code we do 
write for FlexJS we are trying to re-use code as much as possible, which is 
supposed to take advantage of the JS optimizers.  That's why FlexJS is using 
more composition instead of inheritance since AS doesn't support multiple 
inheritance.

pixel-by-pixel control.  If the industry demands it, the browser 
manufacturers will deliver.  It doesn't matter for FlexJS, although it would 
probably make some things easier or faster.  Already, we've seen significant 
convergence towards standards in the main browsers (IE, FF, Chrome, Android, 
IOS).  Compare what we have today vs back in IE6 or even IE8.

-Alex

From: danielpr...@yahoo.commailto:danielpr...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, August 19, 2014 12:05 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Future Scope of Flex


I certainly wish you the best with the javascript implementation. But have to 
admit to strong doubts about it. No matter how many hoops you put yourself 
through you are still working without many fundamentals of advanced 
programming. There just isn't the juice under the hood, maybe with parallel 
processing, but then we are getting close to a million monkeys banging on 
typewriters til they eventually produce a novel aren't we?
I think the latest ie browser brought flash into the browser as a native 
element not a plug in. Like it or not you got it. I was stunned to hear it 
being done by MS, but its a brilliant way to bring about a correction to the 
market hysteria which dominated after Job's death, and Adobe's stupid response. 
Eventually the industry will demand pixel by pixel interface control, there 
just is no substitute equal to it by definition. After all the burning at the 
stake stuff, it will probably be called shadow o! r something, not flash, but 
a rose by any other name.

At the risk of creating a never ending brush fire (oh what the hey its fun 
sometimes), I wonder if some of the jump on flash and pummel it hysteria had an 
unacknowledged element of gay bashing.  Adobe, deserve it or not, like it or 
not, had quite a reputation. There was one advocate, I think it was in RTMP 
networking videos, that would insert short clips of himself getting back ended 
after about 45 minutes of mind numbing, real high end, discussion. I thought it 
was funny as hell, removed the glaze from your eyes, and dropped your jaw the 
first time you saw it, but i think others were not so amused. (Hey, Kiddies 
certainly aren't going to get

Re: [flexcoders] Re: Future Scope of Flex

2014-08-19 Thread Alex Harui aha...@adobe.com [flexcoders]
Not sure  what you mean by Flash to browser native.

I've come across 3 approaches so far:

  1.  emulate Flash in the browser.  Jangaroo and Shumway are examples.  Not 
sure how it is going for them.
  2.  Emulate the current Flex SDK in JS.  One Apache Flex committer is taking 
this approach.  The big question here is that I expect the end result to have 
lots more JS source code involved than a framework designed for cross-compiling 
like FlexJS.  But maybe the browser and minifiers can make that negligible.
  3.  FlexJS.  This is less about Flash than it is about using MXML and AS to 
cross compile to JS.  FlexJS isn't going to have the same pixel-level control 
that you got in Flash.  Only the Flash emulator folks have a true shot at it.  
But again, I offered in a previous post that many folks don't need that and 
just want to catch their bugs earlier by using a more structured language and 
tool chain.

From: Dan Pride danielpr...@yahoo.commailto:danielpr...@yahoo.com 
[flexcoders] flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Monday, August 18, 2014 4:56 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Future Scope of Flex



Being its my 12th language I don't find JS that difficult.
I object to the design tho.
Its a completely inferior and unpredictable design approach.
My primary interests are relational database, complex relationships.
having classes etc that enable you to deal with the entire screen as a unit is 
invaluable
Look there is a good reason that google is on its third try to replace 
javascript with something better.
If the movement of flash native to the browser succeeds then its eventually 
going to be game over.
Its basics. Can you relate every pixel on the screen in one unified equation 
and morph it at will mathematically.
By the way, I haven't looked lately, been knee deep in other stuff, how is the 
flash to the browser native going anyway?

Dan Pride
1-303-800-0900
1-206-313-4607 Mobile
http://danielpride.comhttp://danielpride.com/
www.linkedin.com/in/danielpride/http://www.linkedin.com/in/danielpride/
http://archaeolibrary.com/
http://RideshareGPS.comhttp://gpsrideshare.com/




On Monday,! August 18, 2014 4:07 PM, Scott Fanetti 
scott.fanetti@gmail.cmailto:scott.fanetti@gmail.c! om [flex coders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com wrote:



Wow - I really don't think this is the forum for character assassination. I've 
been a polyglot developer and architect for 20 years.  One thing in technology 
is constant - that is change.

Adapt.  It is childish to cling to a technology like a fanboy.

Dynamic languages use different paradigms than strongly typed languages.  In 
these contexts functional styles and extension through composition are favored 
over extension through inheritance.  But these are all just tools for 
communication between the dev and the user.

The users have chosen a route that no longer needs flex/flash. That is neither 
good nor bad - it just is.

You may dislike parts of technology A and think it's inferior to technology B - 
but have you considered the notion that possibly you may be trying I hammer 
nails with a saw? You may dislike that JS does not have the type safety of AS. 
But if you are relying on type checking you are missing the boat. The compiler 
can't check if your logic is bad. It can only check that something like tab a 
is in slot b.

You still have to unit test. All the skills you bring to solve a problem are 
only marginally helped by the compiler bitching that a class does not have a 
method to support an interface.  There is nothing inherently bad about 
prototypical inheritance as opposed to class based inheritance. As a matter of 
fact you typically don't need to use inheritance in JS.

Tell me - is it cleaner to devolve functionality into representations that can 
be decorated onto any object - and you test the functionality itself? Or to 
HAVE to inherit from class A in order to get the features if class A? You can't 
do multiple inheritance in AS - so you have to hack around with interfaces and 
utils or you must repeat yourself.

In JS - just decorate what you need with what you need it to do.

It's all good bro. I'm just saying that as a seasoned flex dev that feared 
moving to JS - in my experience - it was an easy transition.  But whatever. 
Have a great day!

And I accept the apology you certainly forgot to add by calling me a manager 
:). I realize it's hard to be civil when someone is wrong on the internet.

Sent from my iPhone

On Aug 18, 2014, at 9:50 AM, 
danielpr...@yahoo.commailto:danielpr...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com wrote:


 js is almost exactly like Actionscript.
Typical of a 

Re: [flexcoders] Re: Future Scope of Flex

2014-08-19 Thread Alex Harui aha...@adobe.com [flexcoders]
I'm going to ignore your brush fire topic, but I will address two other points:

juice under the hood.  That is a concern for trying to emulate Flash or the 
current Flex SDK in JS since that is quite a bit of code.  But for FlexJS, if 
you look at the prototype of the JQuery wrapping, it is a thin layer written to 
implement whatever was needed to implement an AS emulation of JQuery.  So, in 
theory, if FlexJS using JQuery isn't fast enough, it probably wasn't going to 
be fast enough use JQuery either.  And that's not a problem for the Apache Flex 
project.  The browser companies know they need to get their JS implementations 
to work faster and computers and devices are getting faster.  It might be a 
problem now, but may not be in the future.

Also note that in many cases JS runs faster than AS.  In the JS code we do 
write for FlexJS we are trying to re-use code as much as possible, which is 
supposed to take advantage of the JS optimizers.  That's why FlexJS is using 
more composition instead of inheritance since AS doesn't support multiple 
inheritance.

pixel-by-pixel control.  If the industry demands it, the browser 
manufacturers will deliver.  It doesn't matter for FlexJS, although it would 
probably make some things easier or faster.  Already, we've seen significant 
convergence towards standards in the main browsers (IE, FF, Chrome, Android, 
IOS).  Compare what we have today vs back in IE6 or even IE8.

-Alex

From: danielpr...@yahoo.commailto:danielpr...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, August 19, 2014 12:05 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Future Scope of Flex



I certainly wish you the best with the javascript implementation. But have to 
admit to strong doubts about it. No matter how many hoops you put yourself 
through you are still working without many fundamentals of advanced 
programming. There just isn't the juice under the hood, maybe with parallel 
processing, but then we are getting close to a million monkeys banging on 
typewriters til they eventually produce a novel aren't we?

I think the latest ie browser brought flash into the browser as a native 
element not a plug in. Like it or not you got it. I was stunned to hear it 
being done by MS, but its a brilliant way to bring about a correction to the 
market hysteria which dominated after Job's death, and Adobe's stupid response. 
Eventually the industry will demand pixel by pixel interface control, there 
just is no substitute equal to it by definition. After all the burning at the 
stake stuff, it will probably be called shadow o! r something, not flash, but 
a rose by any other name.

At the risk of creating a never ending brush fire (oh what the hey its fun 
sometimes), I wonder if some of the jump on flash and pummel it hysteria had an 
unacknowledged element of gay bashing.  Adobe, deserve it or not, like it or 
not, had quite a reputation. There was one advocate, I think it was in RTMP 
networking videos, that would insert short clips of himself getting back ended 
after about 45 minutes of mind numbing, real high end, discussion. I thought it 
was funny as hell, removed the glaze from your eyes, and dropped your jaw the 
first time you saw it, but i think others were not so amused. (Hey, Kiddies 
certainly aren't going to get that far into one of these unless they are 
enrolling at Harvard at 12 or something, and I survived the experience, and 
found the fast forward button). I think the bent over man statue in front of 
the offices also h! elped with the rep issue. BUT WHO CARES ! Credit where 
credit ! is due. There were some of the most brilliant programmers with some of 
the greatest contributions by software developers ever. We have witnessed a 
modern equivalent of the Salem Witch trials on this one for whatever reasons, 
and the amusing part is that we actually think we are advanced beyond that.

Dan Pride

P.S. Why can't women advocates get away with this once in a while :)





Re: [flexcoders] Re: Future Scope of Flex

2014-08-17 Thread Alex Harui aha...@adobe.com [flexcoders]
Well, I don't know if Flash will return to being the solution for UI design.  
With all of the various mobile browsers, I don't know if Flash will be able to 
run in all of them.

But Flex, on the other hand, could.  That's what I'm trying to make happen with 
FlexJS.  FlexJS won't control every pixel like you could in Flash (at least, 
certainly not early versions), but it should provide the other benefits that 
folks have found missing, mainly in terms of developer productivity.

Yes, Flex isn't as popular as it was before Adobe donated it to Apache.  Adobe 
was spending serious money on getting folks to use Flex.  But every day, some 
other product or idea goes viral without million-dollar marketing schemes.  So, 
if you like Flex, take a look at FlexJS and tell us on the Apache Flex dev list 
(d...@flex.apache.org) what it needs before you'll start recommending it to 
others such that it can go viral.  IOW, you have to do your own marketing if 
you want to see more Flex jobs, and you have to help shape Flex and/or FlexJS 
into something worth marketing.  No big company is going to do that for you.

FlexJS isn't out to compete against HTML5.  In fact, it is simply out to 
leverage it.  As I've been working on FlexJS and talking to Flex folks who are 
now developing in some JS framework, it is becoming clear to me that any 
application developer using any framework is really just attaching components 
together.   There is a longer version of what I'm about to write on the Apache 
Flex LinkedIn discussion group,  but basically, the problem with JS is that you 
can attach anything to anything.  Newer languages (TypeScript, DART) have 
constructs to try to catch those mistakes.  ActionScript can do an even better 
job, especially for really big apps.  And MXML gives you a schematic of your 
components.

These days, I'm hoping to find folks who can help those of us working on FlexJS 
prove that AS and MXML can make you more proficient at attaching nearly any JS 
framework's components together.  Then someday,  it won't matter what JS 
framework your client wants to use, you'll use MXML and ActionScript to 
assemble that JS framework's components into an application and make fewer 
mistakes along the way.  But that someday will come sooner if folks can 
contribute their time and energy to the project.

If you can help out, send an email to d...@flex.apache.org.

-Alex

From: danielpr...@yahoo.commailto:danielpr...@yahoo.com [flexcoders] 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Saturday, August 16, 2014 8:39 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Future Scope of Flex



The original authors must be going nuts, in deep depression at least.

They climbed mount everest to the pinnacle of human interface design and did it 
in a universally accessible way. At the bottom line if you can't mathematically 
relate every single pixel on the screen to every other one, over time, you are 
by definition inferior to flash.
While I am currently working in Php/Mysql/ with Ajax on top due to the nature 
of the project (absolute universal access), I think there is still hope. More 
are taking flash to the browser native. Very smart move. If the standards are 
there it will in time inevitably dominate. To save face it will probably be 
called some great new tech called bonzoshow or something :)
Everybody literally freaked out at jobs' dying statement, jumped on the it 
won't run mobile and like a herd of lemmings everybody dove for the exits. 
Well mobile was si! ngle core then its quad and more now. Flash was and will be 
again I think a universal solution to absolutely superior user interface 
design. Pixel by Pixel over time. A growing morphing button is a single 
mathematics equation, not an unpredictable herd of objects clattering around in 
an approximation.




RE: [flexcoders] Original application files lost

2014-02-19 Thread Alex Harui
I assume this was a Flex app with MXML files?


BTW, I don't think the de-compilers will resurrect local variable names.


I would suggest starting from both ends and working towards the middle.  If you 
use the -keep-generated-actionscript option in the MXMLC compiler, it should 
create a folder called generated in the output folder.  Comparing that to 
what the decompiler found for those same files might help you figure out what 
modifications need to go into whatever versions of the source you currently 
have.


HTH,

-Alex



From: flexcoders@yahoogroups.com flexcoders@yahoogroups.com on behalf of Tom 
McNeer tmcn...@gmail.com
Sent: Wednesday, February 19, 2014 7:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Original application files lost



Hi,

I won't go into the gory details, but despite backups and version control 
systems, the source files for a very important application were trashed. The 
files are not recoverable from version control.

After much work with file recovery tools, most of the original files were 
restored. But many of them are versions that are several generations back in 
terms of revisions.

Obviously, this is a bit of a disaster.

I have attempted to decompile the current application with the tools from 
SoThink and Trellix. In both cases, the decompiler crashed, using both Windows 
and Mac versions of both applications. Trellix development has reproduced the 
problem and say they will out it on a bug list.

Which doesn't help much right now, obviously.

I have also attempted decompiling the application with the open source JPEXS 
Free Flash Compiler. This appeared to work, in that nothing crashed and I was 
able to export lots of files.

These files - even if they're correct - are all ActionScript, I assume the 
intermediate AS files that the compiler creates as it works.

I have created an ActionScript project from those files and attempted 
compilation. But evidently the relationships of the classes are somehow lost. 
The compiler appears to only look at the file which represents the core of the 
original Flex application file, and errors out immediately.

Thus, short of trying to reproduce lots of code, with lots of logic, from 
documentation and the running application, I don't know what to try next.

Obviously, any advice would be greatly appreciated.

--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.comhttp://www.mediumcool.com/
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560




Re: [flexcoders] Original application files lost

2014-02-19 Thread Alex Harui
Check the doc.  There is either a keep=true flag or you can add

{code}
arg line=-keep-generated-actionscript /
{code}

From: Barry Gold barrydg...@ca.rr.commailto:barrydg...@ca.rr.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Wednesday, February 19, 2014 11:55 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Original application files lost



On 2/19/2014 10:59 AM, Alex Harui wrote:
 I would suggest starting from both ends and working towards the middle.
 If you use the -keep-generated-actionscript option in the MXMLC
 compiler, it should create a folder called generated in the output
 folder. Comparing that to what the decompiler found for those same files
 might help you figure out what modifications need to go into whatever
 versions of the source you currently have.

How do you turn on -keep-generated-actionscript using ant? I think
that would help me a lot in debugging my output -- once I get it to
compile, that is.




Re: [flexcoders] Original application files lost

2014-02-19 Thread Alex Harui
It is painful but theoretically possible to reconstruct MXML from the generated 
AS.

It is also possible to get MXMLC to build a SWF from the generated AS, but 
there are some downstream issues:  If you ever change this code and it requires 
changes to generated code like CSS, the compiler will not do the right thing.  
Therefore it is best to try to get back to MXML.

In your original post, you said that file recovery tools found older versions 
of files.  I'm suggesting running these older files through MXMLC with 
-keep–generated-actionscript and comparing the results with what the decompiler 
saw in the final version.  The differences should show you what you need to 
modify in the older versions to bring them up to current.

HTH,
-Alex

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Wednesday, February 19, 2014 1:24 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Original application files lost



Hi Alex,

Yes, it was a fairly standard, though large, Flex 3.6 application. Some of the 
decompilers seem able to resurrect .mxml files (but not mine, clearly); I 
understand there's a problem with local variable names.

I never kept the generated actionscript files because (obviously incorrectly) I 
thought my version control and backup routines were solid. So there's nothing 
there to compare. And if there had been, they'd be gone, too, unless I had 
placed them somewhere completely different.

So unless there's a way to resurrect the project from the current .as files 
produced the the JPEXS Free Flash Compiler, a better working decompiler is my 
only hope short of rebuilding things from docs and observation.


On Wed, Feb 19, 2014 at 1:59 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


I assume this was a Flex app with MXML files?


BTW, I don't think the de-compilers will resurrect local variable names.


I would suggest starting from both ends and working towards the middle.  If you 
use the -keep-generated-actionscript option in the MXMLC compiler, it should 
create a folder called generated in the output folder.  Comparing that to 
what the decompiler found for those same files might help you figure out what 
modifications need to go into whatever versions of the source you currently 
have.


HTH,

-Alex



From:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com on behalf of 
Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Sent: Wednesday, February 19, 2014 7:55 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Original application files lost



Hi,

I won't go into the gory details, but despite backups and version control 
systems, the source files for a very important application were trashed. The 
files are not recoverable from version control.

After much work with file recovery tools, most of the original files were 
restored. But many of them are versions that are several generations back in 
terms of revisions.

Obviously, this is a bit of a disaster.

I have attempted to decompile the current application with the tools from 
SoThink and Trellix. In both cases, the decompiler crashed, using both Windows 
and Mac versions of both applications. Trellix development has reproduced the 
problem and say they will out it on a bug list.

Which doesn't help much right now, obviously.

I have also attempted decompiling the application with the open source JPEXS 
Free Flash Compiler. This appeared to work, in that nothing crashed and I was 
able to export lots of files.

These files - even if they're correct - are all ActionScript, I assume the 
intermediate AS files that the compiler creates as it works.

I have created an ActionScript project from those files and attempted 
compilation. But evidently the relationships of the classes are somehow lost. 
The compiler appears to only look at the file which represents the core of the 
original Flex application file, and errors out immediately.

Thus, short of trying to reproduce lots of code, with lots of logic, from 
documentation and the running application, I don't know what to try next.

Obviously, any advice would be greatly appreciated.

--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.comhttp://www.mediumcool.com/
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560tel:404.589.0560



--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560




RE: [flexcoders] Whay are too many itemrenderers being created?

2014-02-18 Thread Alex Harui
​I'm not even sure there is a JIRA issue.  I think this is only the second or 
third time it has come up on a forum/mailing list.


-Alex


From: flexcoders@yahoogroups.com flexcoders@yahoogroups.com on behalf of 
Chris Velevitch chris.velevi...@gmail.com
Sent: Tuesday, February 18, 2014 3:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Whay are too many itemrenderers being created?



What is the Issue number so I can vote for it?


On Tue, Feb 18, 2014 at 6:39 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:



They should all virtualize, but it takes a bit of effort to make a virtual 
TileLayout and we don't hear enough requests for it to get around to doing it.


-Alex


From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com on behalf of 
Chris Velevitch chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Sent: Friday, February 14, 2014 5:35 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com

Subject: Re: [flexcoders] Whay are too many itemrenderers being created?



Why shouldn't all lists virtualise? If the dataProvider of a list has a large 
or very large number of items, doesn't it make sense to only create enough 
itemRenderers for the visible area?


On Sat, Feb 15, 2014 at 9:30 AM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


Yep, didn't notice you are using TileLayout.  I'm pretty sure it doesn't 
virtualize


From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, February 14, 2014 2:26 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Whay are too many itemrenderers being created?



That makes no difference. I did notice that VerticalLayout/ always 
virtualises regardless of whether useVirtualLayout is true or false.

It looks like TileLayout/ never virtualises, so I suspect it's a bug, but I 
haven't had a chance to look into how layouts work to confirm this.


On Fri, Feb 14, 2014 at 5:37 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


useVirtualLayout property?

From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, February 13, 2014 7:34 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Whay are too many itemrenderers being created?



I'm using Flex 4.11 with Air 4.0 to create a mobile app.

I have a spark list with a custom mxml itemRenderer. Only 4 instances will be 
visible in the list. The dataprovider is initially empty.

When I assign the array collection with an array of 147 items, I get 147 traces 
on dataChange event and on the render event. I traced out the value of 'this' 
and I get 147 unique objects.

I was under the impression that only 4 instances of the itemRenderer will be 
created and get reused as I scroll through the list.

What have I overlooked?

The list is defined as:-

s:List id=lImages dataProvider={imageList} width=100% height=100% 
allowMultipleSelection=true
   change=lImagesChange(event) itemRenderer=PhotoThumbNail
doubleClickEnabled=true doubleClick=showImage(event)
s:layout
s:TileLayout/
/s:layout
/s:List

and the itemRenderer is defined as:-

?xml version=1.0?
s:ItemRenderer
xmlns:fx=http://ns.adobe.com/mxml/2009;

xmlns:s=library://ns.adobe.com/flex/sparkhttp://ns.adobe.com/flex/spark
dataChange=onDataChange(event)
render=onRender(event)
width=150 height=175


s:layout
s:VerticalLayout/
/s:layout

fx:Script![CDATA[
import DateUtils;

import mx.events.FlexEvent;

private function onDataChange(event:FlexEvent):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onDataChange: 
dataChange event, index= + itemIndex + , this=+this);
}

private function onRender(event:Event):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onRender; render 
event, index= + itemIndex + , this=+this);
}
]]/fx:Script
s:BitmapImage source={data.image} width=150 height=150/
s:Label text={data.timestamp} width=150/

/s:ItemRenderer

--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au/

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group





--


Chris
--
Chris Velevitch
Manager - Adobe

RE: [flexcoders] Whay are too many itemrenderers being created?

2014-02-17 Thread Alex Harui
​They should all virtualize, but it takes a bit of effort to make a virtual 
TileLayout and we don't hear enough requests for it to get around to doing it.


-Alex


From: flexcoders@yahoogroups.com flexcoders@yahoogroups.com on behalf of 
Chris Velevitch chris.velevi...@gmail.com
Sent: Friday, February 14, 2014 5:35 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Whay are too many itemrenderers being created?



Why shouldn't all lists virtualise? If the dataProvider of a list has a large 
or very large number of items, doesn't it make sense to only create enough 
itemRenderers for the visible area?


On Sat, Feb 15, 2014 at 9:30 AM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


Yep, didn't notice you are using TileLayout.  I'm pretty sure it doesn't 
virtualize


From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, February 14, 2014 2:26 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Whay are too many itemrenderers being created?



That makes no difference. I did notice that VerticalLayout/ always 
virtualises regardless of whether useVirtualLayout is true or false.

It looks like TileLayout/ never virtualises, so I suspect it's a bug, but I 
haven't had a chance to look into how layouts work to confirm this.


On Fri, Feb 14, 2014 at 5:37 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


useVirtualLayout property?

From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, February 13, 2014 7:34 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Whay are too many itemrenderers being created?



I'm using Flex 4.11 with Air 4.0 to create a mobile app.

I have a spark list with a custom mxml itemRenderer. Only 4 instances will be 
visible in the list. The dataprovider is initially empty.

When I assign the array collection with an array of 147 items, I get 147 traces 
on dataChange event and on the render event. I traced out the value of 'this' 
and I get 147 unique objects.

I was under the impression that only 4 instances of the itemRenderer will be 
created and get reused as I scroll through the list.

What have I overlooked?

The list is defined as:-

s:List id=lImages dataProvider={imageList} width=100% height=100% 
allowMultipleSelection=true
   change=lImagesChange(event) itemRenderer=PhotoThumbNail
doubleClickEnabled=true doubleClick=showImage(event)
s:layout
s:TileLayout/
/s:layout
/s:List

and the itemRenderer is defined as:-

?xml version=1.0?
s:ItemRenderer
xmlns:fx=http://ns.adobe.com/mxml/2009;

xmlns:s=library://ns.adobe.com/flex/sparkhttp://ns.adobe.com/flex/spark
dataChange=onDataChange(event)
render=onRender(event)
width=150 height=175


s:layout
s:VerticalLayout/
/s:layout

fx:Script![CDATA[
import DateUtils;

import mx.events.FlexEvent;

private function onDataChange(event:FlexEvent):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onDataChange: 
dataChange event, index= + itemIndex + , this=+this);
}

private function onRender(event:Event):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onRender; render 
event, index= + itemIndex + , this=+this);
}
]]/fx:Script
s:BitmapImage source={data.image} width=150 height=150/
s:Label text={data.timestamp} width=150/

/s:ItemRenderer

--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au/

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group





--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au/

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group





--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au/

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group




Re: [flexcoders] Whay are too many itemrenderers being created?

2014-02-14 Thread Alex Harui
Yep, didn't notice you are using TileLayout.  I'm pretty sure it doesn't 
virtualize


From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, February 14, 2014 2:26 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Whay are too many itemrenderers being created?



That makes no difference. I did notice that VerticalLayout/ always 
virtualises regardless of whether useVirtualLayout is true or false.

It looks like TileLayout/ never virtualises, so I suspect it's a bug, but I 
haven't had a chance to look into how layouts work to confirm this.


On Fri, Feb 14, 2014 at 5:37 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


useVirtualLayout property?

From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, February 13, 2014 7:34 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Whay are too many itemrenderers being created?



I'm using Flex 4.11 with Air 4.0 to create a mobile app.

I have a spark list with a custom mxml itemRenderer. Only 4 instances will be 
visible in the list. The dataprovider is initially empty.

When I assign the array collection with an array of 147 items, I get 147 traces 
on dataChange event and on the render event. I traced out the value of 'this' 
and I get 147 unique objects.

I was under the impression that only 4 instances of the itemRenderer will be 
created and get reused as I scroll through the list.

What have I overlooked?

The list is defined as:-

s:List id=lImages dataProvider={imageList} width=100% height=100% 
allowMultipleSelection=true
   change=lImagesChange(event) itemRenderer=PhotoThumbNail
doubleClickEnabled=true doubleClick=showImage(event)
s:layout
s:TileLayout/
/s:layout
/s:List

and the itemRenderer is defined as:-

?xml version=1.0?
s:ItemRenderer
xmlns:fx=http://ns.adobe.com/mxml/2009;

xmlns:s=library://ns.adobe.com/flex/sparkhttp://ns.adobe.com/flex/spark
dataChange=onDataChange(event)
render=onRender(event)
width=150 height=175


s:layout
s:VerticalLayout/
/s:layout

fx:Script![CDATA[
import DateUtils;

import mx.events.FlexEvent;

private function onDataChange(event:FlexEvent):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onDataChange: 
dataChange event, index= + itemIndex + , this=+this);
}

private function onRender(event:Event):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onRender; render 
event, index= + itemIndex + , this=+this);
}
]]/fx:Script
s:BitmapImage source={data.image} width=150 height=150/
s:Label text={data.timestamp} width=150/

/s:ItemRenderer

--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group





--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group




Re: [flexcoders] Whay are too many itemrenderers being created?

2014-02-13 Thread Alex Harui
useVirtualLayout property?

From: Chris Velevitch 
chris.velevi...@gmail.commailto:chris.velevi...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, February 13, 2014 7:34 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Whay are too many itemrenderers being created?



I'm using Flex 4.11 with Air 4.0 to create a mobile app.

I have a spark list with a custom mxml itemRenderer. Only 4 instances will be 
visible in the list. The dataprovider is initially empty.

When I assign the array collection with an array of 147 items, I get 147 traces 
on dataChange event and on the render event. I traced out the value of 'this' 
and I get 147 unique objects.

I was under the impression that only 4 instances of the itemRenderer will be 
created and get reused as I scroll through the list.

What have I overlooked?

The list is defined as:-

s:List id=lImages dataProvider={imageList} width=100% height=100% 
allowMultipleSelection=true
   change=lImagesChange(event) itemRenderer=PhotoThumbNail
doubleClickEnabled=true doubleClick=showImage(event)
s:layout
s:TileLayout/
/s:layout
/s:List

and the itemRenderer is defined as:-

?xml version=1.0?
s:ItemRenderer
xmlns:fx=http://ns.adobe.com/mxml/2009;

xmlns:s=library://ns.adobe.com/flex/sparkhttp://ns.adobe.com/flex/spark
dataChange=onDataChange(event)
render=onRender(event)
width=150 height=175


s:layout
s:VerticalLayout/
/s:layout

fx:Script![CDATA[
import DateUtils;

import mx.events.FlexEvent;

private function onDataChange(event:FlexEvent):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onDataChange: 
dataChange event, index= + itemIndex + , this=+this);
}

private function onRender(event:Event):void {
trace(DateUtils.currentTime() + PhotoThumbNail.onRender; render 
event, index= + itemIndex + , this=+this);
}
]]/fx:Script
s:BitmapImage source={data.image} width=150 height=150/
s:Label text={data.timestamp} width=150/

/s:ItemRenderer

--


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.auhttp://www.apugs.org.au

Adobe Platform Users Group, Sydney
Topic: TBD
Date: Monday, 28th February
Details and RSVP on http://www.meetup.com/Sydney-Adobe-Platform-User-Group




Re: [flexcoders] Function from string?

2013-11-06 Thread Alex Harui
Both Array and Object support [] property access.

Regarding converting a String to a Function:  AS is compiled, not
interpreted, so only strings that have been compiled into functions can be
run.  You can fill an object or array full of functions and choose one at
runtime, but that is not the same as constructing a string at runtime and
trying to run it.  Eval() will do that in JS, but there is no AS
equivalent.

Some options are:

1) There are some AS3 eval() functions in third-party libraries.  But they
are unlikely to be fast.
2) You can send the string to a server, compile it into a SWF and load
that SWF and run it.
3) If the function doesn't require much information from the rest of the
app, you could write the string to JS and call eval on it via
ExternalInterface

-Alex

On 11/6/13 2:02 PM, A. P. Damien apdam...@ca.rr.com wrote:

On 11/6/2013 9:16 AM, Keith Reinfeld wrote:
 Perhaps the following syntax will help:

 var func:String = ³yourFunctionName²;

 this[func]();

Thanks. I hadn't fully assimilated the fact that an object can also  be
treated as an array.  Do I have to declare the class 'dynamic' for this
trick to work? Or is it always legal to do this from inside the class?




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e
62079f6847
Search Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo Groups Links






Re: [flexcoders] Retrieve current item on a DataGroup

2013-11-06 Thread Alex Harui
If you need selection, why not use List?

From: Jairo França ja...@tgi.inf.brmailto:ja...@tgi.inf.br
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, November 5, 2013 9:27 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Retrieve current item on a DataGroup



I have a question that seems easy, but i can't solve.
I have a DataGroup with a custom ItemRenderer.
How can I retrieve the current item that was selected with a double
click (something like a SelectedItem on a DataGrid)?
Can I retrieve the itemRenderer instance of the element?

Thansk

My code is:

s:Group height=100% width=100%
s:Scroller height=100% width=100% id=scr
s:DataGroup id=dg height=100% width=100%
itemRenderer=myItemRenderer
dataProvider={_data}
doubleClickEnabled=true doubleClick=dg_doubleClickHandler(event)
s:layout
s:TileLayout/
/s:layout
/s:DataGroup
/s:Scroller
/s:Group




Re: [flexcoders] Thanks Alex!

2013-11-05 Thread Alex Harui
Thanks, but it's not so hard since I'm paid to do it.

It would help for you all to switch to Apache Flex and ask your questions over 
there.  The main Apache Flex website is: http://flex.apache.org/
You can subscribe to the mailing lists or a forum version by following 
instructions here: http://flex.apache.org/community-mailinglists.html
And in case you haven't been following, Apache just released 4.11.0 which has 
some 200 bug fixes over Adobe 4.6, and several of us, including myself are 
working on FlexJS, a version of Flex that runs without Flash.  More information 
on that is here:  https://cwiki.apache.org/confluence/display/FLEX/FlexJS

-Alex

From: [ p e r c e p t i c o n ] 
percepti...@gmail.commailto:percepti...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, November 5, 2013 9:15 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Thanks Alex!



I second third and fourth that

On Nov 5, 2013, at 10:37 AM, James Finnigan 
james.alan.finni...@gmail.commailto:james.alan.finni...@gmail.com wrote:



I have no idea who is still listening to this thread but I think it's time to 
humbly, and gratefully thank Alex for his devotion to Flex and this thread.  
Two years ago our world was shaken and we've all moved onto different (not 
better) things. ;)

Alex has continued to demonstrate and keep his promise in supporting Flex two 
years down the road and will probably continue to monitor these and other 
threads for several more.



Hats off to you Alex!  You are to commended for your devotion and sacrifices to 
our beloved Flex!

James

LongLiveFlex/







Re: [flexcoders] Nested TabNabvigator/Repeater error

2013-11-05 Thread Alex Harui
So if I understand correctly, clicking on some nested Tab changes some other 
ViewStack's selectedIndex.  If that's correct, try subclassing the ViewStack's 
selectedIndex setter so you can set a breakpoint and catch when only that 
ViewStack is changed.  Then the call stack should contain some good clues.

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Monday, November 4, 2013 3:31 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Nested TabNabvigator/Repeater error [4 Attachments]


[Attachment(s) from Tom McNeer included below]

I've finally had time to check this out a little further.

As a reminder, I'm creating nested TabNavigator elements dynamically. I avoided 
using a Repeater and attached a CollectionChange event listener to the 
ArrayCollection that is the main data provider. The function called by the 
listener walks through the structure, creating TabNavigators with VBox 
children, and at the bottom level, a custom component (DocDataGrid) that is a 
VBox which wraps a DataGrid.

The problem is that a click on a tab in the lowest-level TabNavigator doesn't 
display the selected child. Rather, it sends the user several levels back up 
the component tree.

I've followed the click through TabBars and NavBars and Buttons till there's a 
click event fired where I can't determine what's supposed to hear the click. 
The selectedIndex appears correct through each level in the inheritance, but 
then the process fails.

I've even added some hack-y invalidateDisplayList() calls in hopes that they 
might have an effect.

I'm including the code that creates the elements, along with some screen shots 
that I hope will better explain what's going on.

If you have time to look them over, and if you see where I'm going wrong, I 
would certainly appreciate any pointers.

Thanks very much in advance.

private function buildUI(e:CollectionEvent):
void{
clearTabs();
var vb:VBox;
var tn:TabNavigator;
var ddg:DocDataGrid;
for(var i:int=0;iacCaseDocuments.length;i++){
var arSubtypes:Array = acCaseDocuments[i].subtypes as Array;
vb = new VBox();
vb.idhttp://vb.id='docType' + i;
vb.setStyle('horizontalAlign','center');
vb.label = acCaseDocuments[i].friendlyName as String;
vb.percentWidth=95;
vb.percentHeight=95;
vb.styleName='contentWhite';
tn = new TabNavigator();
tn.idhttp://tn.id='docSubtab' + i;
tn.percentWidth=100;
tn.percentHeight=100;
tn.x=5;
tn.y=5;
tn.setStyle(backgroundAlpha,0);
tn.setStyle('borderThickness',1);
tn.setStyle('paddingTop',0);
tn.creationPolicy=all;
for(var j:int=0;jarSubtypes.length;j++){
ddg = new DocDataGrid();
ddg.idhttp://ddg.id= 'docSubtype' + j;
ddg.label=arSubtypes[j].friendlyName as String;
ddg.gridData.source=arSubtypes[j].documents as Array;
ddg.gridData.refresh();
tn.addChild(ddg);
}
tn.invalidateDisplayList();
vb.addChild(tn);
docTabs.addChild(vb);
}
setFirstTab(e);
}


On Thu, Oct 24, 2013 at 12:32 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


Never tried right clicking on the framework files before.  You're right that it 
doesn't work.  But double-clicking should set a breakpoint.  It does for me.

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, October 24, 2013 7:44 AM

To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Nested TabNabvigator/Repeater error



Alex,

Thanks again for your reply. Sorry I was unclear. I wasn't suggesting that the 
framework had code to switch the ViewStack on click.

I was responding to your comment about the concern being the logic that 
responds to the change in the TabNavigator and TabBar. And I simply meant that 
my code does not contain any handlers for any actions on the TabNavigators 
created in my AS code, nor on the underlying TabBars. But rather, the click on 
the visible Tab that _appears_

Re: [flexcoders] Nested TabNabvigator/Repeater error

2013-10-24 Thread Alex Harui
Never tried right clicking on the framework files before.  You're right that it 
doesn't work.  But double-clicking should set a breakpoint.  It does for me.

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, October 24, 2013 7:44 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Nested TabNabvigator/Repeater error



Alex,

Thanks again for your reply. Sorry I was unclear. I wasn't suggesting that the 
framework had code to switch the ViewStack on click.

I was responding to your comment about the concern being the logic that 
responds to the change in the TabNavigator and TabBar. And I simply meant that 
my code does not contain any handlers for any actions on the TabNavigators 
created in my AS code, nor on the underlying TabBars. But rather, the click on 
the visible Tab that _appears_ to be responsible for switching the ViewStack is 
being handled somehow by the framework, since I have not overridden it.

I realize that the proper course would be to follow the event into the 
framework files. However, in my initial post, I was hoping that someone might 
have experienced a similar problem and know a simple solution.

I am now trying to follow the event down into the framework. But I'm running 
into what seems like a dumb problem: I am unable to set breakpoints in the 
framework files. I can search for and open class files in the correct version 
of the framework; but a right-click in the left margin does not bring up a 
context menu at all.

The framework is being merged into the code at compile time.

I know this may be a silly question, but can you tell me why Flash Builder 
(4.6) might be acting this way?


On Wed, Oct 23, 2013 at 2:40 AM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


I'm not sure what you mean by the framework.  AFAIK, the framework doesn't 
have any code that automatically switches ViewStack views based on mouse 
activity.

But you could put a breakpoint on the ViewStack code and see why it is changing.

-Alex

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, October 22, 2013 12:30 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Nested TabNabvigator/Repeater error



Hi Alex,

Thanks very much for the reply.


On Tue, Oct 22, 2013 at 12:56 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:
In the AS version, I would guess there are relatively few ways to switch to a 
different screen.

Yeah, I would agree. The reason I used the vague switch to a different screen 
is that the resulting action is nothing that is called in the component or even 
its parent.

I'll lay this out as quickly as I can:

There's a view we'll call Cases which has a ViewStack that consists of Case 
Results and Case Details. A search triggered from a parent of the Cases view 
results in a grid in Case Results being populated. A click on a row in the grid 
calls the server for data on an individual Case and switches to the Case 
Details view.

That view contains a TabNavigator for various aspects of the Case, including 
Documents. The nested TabNavigators I'm trying to create are within that 
Documents view.

When I say that a click on any second-level (Document subtype) tab goes to a 
different screen, what happens is that everything is switched back to the Case 
Results view - taking you back to the first element in the Cases ViewStack. 
There's no action or event defined in any of the child views inside the Case 
Details TabNavigator that would switch the view that way.

That's why I find it confounding.

If you put a breakpoint on code that does that, does it get hit and will the 
stack info show you how it got there?

The code would be in the framework. It would just be the handler for a click on 
the TabBar.

The TabBar children should just be Tabs that dispatch events.  The logic that 
responds to the change event should be the main concern.

Thanks. I understand that. But I'm not writing any code to react to the click 
event. It's just the default action from the framework, which should be to make 
the box corresponding to the Tab the selectedChild of the TabNaviagator.

I have tried walking through my ActionScript, and the oddity I see (which I may 
not really understand) is that even after all the custom components are added 
as children to one of the second-level TabNavigators, the TabNavigator and its 
TabBar show in debugging as having a different number of children.



--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE

Re: [flexcoders] Nested TabNabvigator/Repeater error

2013-10-23 Thread Alex Harui
I'm not sure what you mean by the framework.  AFAIK, the framework doesn't 
have any code that automatically switches ViewStack views based on mouse 
activity.

But you could put a breakpoint on the ViewStack code and see why it is changing.

-Alex

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, October 22, 2013 12:30 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Nested TabNabvigator/Repeater error



Hi Alex,

Thanks very much for the reply.


On Tue, Oct 22, 2013 at 12:56 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:
In the AS version, I would guess there are relatively few ways to switch to a 
different screen.

Yeah, I would agree. The reason I used the vague switch to a different screen 
is that the resulting action is nothing that is called in the component or even 
its parent.

I'll lay this out as quickly as I can:

There's a view we'll call Cases which has a ViewStack that consists of Case 
Results and Case Details. A search triggered from a parent of the Cases view 
results in a grid in Case Results being populated. A click on a row in the grid 
calls the server for data on an individual Case and switches to the Case 
Details view.

That view contains a TabNavigator for various aspects of the Case, including 
Documents. The nested TabNavigators I'm trying to create are within that 
Documents view.

When I say that a click on any second-level (Document subtype) tab goes to a 
different screen, what happens is that everything is switched back to the Case 
Results view - taking you back to the first element in the Cases ViewStack. 
There's no action or event defined in any of the child views inside the Case 
Details TabNavigator that would switch the view that way.

That's why I find it confounding.

If you put a breakpoint on code that does that, does it get hit and will the 
stack info show you how it got there?

The code would be in the framework. It would just be the handler for a click on 
the TabBar.

The TabBar children should just be Tabs that dispatch events.  The logic that 
responds to the change event should be the main concern.

Thanks. I understand that. But I'm not writing any code to react to the click 
event. It's just the default action from the framework, which should be to make 
the box corresponding to the Tab the selectedChild of the TabNaviagator.

I have tried walking through my ActionScript, and the oddity I see (which I may 
not really understand) is that even after all the custom components are added 
as children to one of the second-level TabNavigators, the TabNavigator and its 
TabBar show in debugging as having a different number of children.



--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560




Re: [flexcoders] Nested TabNabvigator/Repeater error

2013-10-22 Thread Alex Harui
Probably best to not use repeater.

In the AS version, I would guess there are relatively few ways to switch to a 
different screen.  If you put a breakpoint on code that does that, does it get 
hit and will the stack info show you how it got there?

You might want to build out a simpler re-construction of this problem in a new 
Flex project so less of your other code can be run accidentally.

The TabBar children should just be Tabs that dispatch events.  The logic that 
responds to the change event should be the main concern.

-Alex

From: Tom McNeer tmcn...@gmail.commailto:tmcn...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, October 22, 2013 6:41 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Nested TabNabvigator/Repeater error



Hi,

I am trying to create nested TabNavigators which are built dynamically from 
server data. The top TabNavigator is static. Its children are created by a 
Repeater. Within each Repeater's child (VBox), another TabNavigator is created, 
and a second Repeater creates the children of the TabNavigator.

This is a revision of a old application, so it's using a 3.6 SDK.

The top level tabs represent types of Documents. The second level of tabs 
represent subtypes. And each time this area is accessed, there will be 
different trees of types/subtype/documents.

The process throws an error intermittently as the elements are created:

RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/getChildAt()
at 
mx.core::Container/getChildAt()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\Container.as:2377]
at 
mx.controls::ToggleButtonBar/hiliteSelectedNavItem()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\ToggleButtonBar.as:441]
at 
mx.controls::ToggleButtonBar/updateDisplayList()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\controls\ToggleButtonBar.as:364]
at 
mx.core::UIComponent/validateDisplayList()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6510]
at 
mx.core::Container/validateDisplayList()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\Container.as:2720]
at 
mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622]
at 
mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:677]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at 
mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8892]
at 
mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8832]

Since the error reference is to getChildAt(), and before that, to 
hiliteSelectedNavItem, I assume that the error is coming as the framework tries 
to select a tab that does not exist. But I have no clue what to do about it.

Here is the opening MXML:

mx:TabNavigator id=docTabs width=100%  height=100% x=5 y=5 
backgroundAlpha=0.0 borderThickness=1 paddingTop=0 creationPolicy=all
mx:Repeater id=docTypes dataProvider={acCaseDocuments} 
recycleChildren=false
mx:VBox id=docType  horizontalAlign=center 
label={docTypes.currentItem.friendlyName} height=95% width=95% 
styleName=contentWhite
mx:TabNavigator id=docSubtabs width=100%  height=100% 
x=5 y=5 backgroundAlpha=0.0 borderThickness=1 paddingTop=0 
creationPolicy=all
mx:Repeater id=docSubtypes 
dataProvider={docTypes.currentItem.subtypes} recycleChildren=false
mx:VBox id=docSubtype horizontalAlign=center 
label={docSubtypes.currentItem.friendlyName} height=95% width=95% 
styleName=contentWhite

I have also tried creating the elements in ActionScript, to bypass the Repeater 
action. This results in no errors. Both levels of tabs appear to be created 
properly (by appear, I mean visually.) However, when a tab on the second 
level (the subtypes) is clicked, rather than the selected chlid appearing, the 
user is switched to an entirely different screen - completely away from the 
Documents area.

I don't know why the click is taking me away from the screen, but as I walk 
through the debugging, it appears that while the TabNavigator children are 
created correctly, the children of its associated TabBar are not. Here's the 
ActionScript, which is fired by a CollectionChangeEvent listener on the 
ArrayCollection which contains the Document data:

private function buildUI(e:CollectionEvent):void{
clearTabs();
 for(var i:int=0;iacCaseDocuments.length;i++){
var arSubtypes:Array = acCaseDocuments[i

Re: [flexcoders] Automation and Application Domains

2013-10-03 Thread Alex Harui
A class's identifier is only as unique as its fully qualified name.  You can 
think of an ApplicationDomain as an Object with slots for each class as in:

var appdom:Object = {
flash.display.DisplayObject : flash.display.DisplayObject;
mx.core.UIComponent: mx.core.UIComponent;
}

with the exception that, once a slot is set, you can't overwrite it: 
first-in-wins.  If two separate SWFs supply different definitions the second 
one will lose out and that can cause issues with code that depends on the lost 
definition.  That is baked into the runtime.

What is also baked into the runtime is a lack of an API to take an object and 
find its ApplicationDomain.  This makes it impossible to write a universal, 
works-everywhere, get the class definition for this object.

That said, Flex has some infrastructure to allow a main Flex SWF to find the 
ApplicationDomain of a child Flex SWF (but not any non-Flex child SWF) and 
therefore take an object and find its ApplicationDomain and thus its class 
definition.   Automated Testing code could have leveraged this infrastructure, 
but apparently didn't.  Not sure why, probably because there is no official 
documentation on how to do that, and maybe because it would fail for non-Flex 
SWFs.

HTH,
-Alex
From: Nigel Magnay nigel.mag...@gmail.commailto:nigel.mag...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, October 3, 2013 2:16 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Automation and Application Domains



Yes, it does seem a problem - hence me trying to figure out if it was a 'burned 
in' limitation of the flash runtime, or something I could find a workaround for.



On Wed, Oct 2, 2013 at 6:58 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


Even generating shim classes would result in conflicts if you have more than 
one definition of a class you are trying to shim into the main 
applicationdomain.

But if you can guarantee there isn't conflicts for a particular test scenario, 
then maybe you can test by loading into the main app domain.

From: Nigel Magnay nigel.mag...@gmail.commailto:nigel.mag...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, October 1, 2013 4:38 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Automation and Application Domains



Yes, it seems to fail.

RIAtest has a component 'inspector', which shows the component tree. If my UI 
component is in a different (child) application domain, it never appears in the 
inspector (and events from manipulating it never get received).

When I raised a ticket against it (and asked if there were some API that I 
could use to perhaps inform it more directly to my new application domains), 
they pointed me to the supposed flex automation restriction - hence me starting 
to dig to see if I might be able to overcome the restriction - perhaps by 
generating shim classes or delegates..



On Fri, Sep 27, 2013 at 7:25 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


Did you actually try it and found that it fails?  I would think it should be 
able to introspect child appdomains.

From: Nigel Magnay nigel.mag...@gmail.commailto:nigel.mag...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, September 27, 2013 6:36 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Automation and Application Domains



We are using RIAtest, which uses flex automation to test some applications.

Reading the flex documentation, it contains the following:

Testing applications that load external libraries

... A library that is loaded at run time (including run-time shared libraries 
(RSLs)) must be loaded into the ApplicationDomain of the loading application. 
If the SWF file used in the application is loaded in a different application 
domain, automated testing record and playback will not function properly.


This is particularly inconvenient for us; we load UI controls into separate 
ApplicationDomains (all children of ApplicationDomain.currentDomain) because 
they can have conflicting classnames, and this allows each form to be generated 
in isolation, and they cannot interfere with each other. The thought of having 
to refactor hundreds of classes is not appealing.


This seems to prevent RIAtest's inspector from finding child controls sourced 
from that loader.

Is there any way around this restriction, perhaps by implementing some kind of 
delegate class, or overriding

Re: [flexcoders] Automation and Application Domains

2013-10-02 Thread Alex Harui
Even generating shim classes would result in conflicts if you have more than 
one definition of a class you are trying to shim into the main 
applicationdomain.

But if you can guarantee there isn't conflicts for a particular test scenario, 
then maybe you can test by loading into the main app domain.

From: Nigel Magnay nigel.mag...@gmail.commailto:nigel.mag...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, October 1, 2013 4:38 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Automation and Application Domains



Yes, it seems to fail.

RIAtest has a component 'inspector', which shows the component tree. If my UI 
component is in a different (child) application domain, it never appears in the 
inspector (and events from manipulating it never get received).

When I raised a ticket against it (and asked if there were some API that I 
could use to perhaps inform it more directly to my new application domains), 
they pointed me to the supposed flex automation restriction - hence me starting 
to dig to see if I might be able to overcome the restriction - perhaps by 
generating shim classes or delegates..



On Fri, Sep 27, 2013 at 7:25 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:


Did you actually try it and found that it fails?  I would think it should be 
able to introspect child appdomains.

From: Nigel Magnay nigel.mag...@gmail.commailto:nigel.mag...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, September 27, 2013 6:36 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Automation and Application Domains



We are using RIAtest, which uses flex automation to test some applications.

Reading the flex documentation, it contains the following:

Testing applications that load external libraries

... A library that is loaded at run time (including run-time shared libraries 
(RSLs)) must be loaded into the ApplicationDomain of the loading application. 
If the SWF file used in the application is loaded in a different application 
domain, automated testing record and playback will not function properly.


This is particularly inconvenient for us; we load UI controls into separate 
ApplicationDomains (all children of ApplicationDomain.currentDomain) because 
they can have conflicting classnames, and this allows each form to be generated 
in isolation, and they cannot interfere with each other. The thought of having 
to refactor hundreds of classes is not appealing.


This seems to prevent RIAtest's inspector from finding child controls sourced 
from that loader.

Is there any way around this restriction, perhaps by implementing some kind of 
delegate class, or overriding the automation provider to allow it to callback 
to discover the applicationdomains it needs to search?






Re: [flexcoders] Automation and Application Domains

2013-09-27 Thread Alex Harui
Did you actually try it and found that it fails?  I would think it should be 
able to introspect child appdomains.

From: Nigel Magnay nigel.mag...@gmail.commailto:nigel.mag...@gmail.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Friday, September 27, 2013 6:36 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Automation and Application Domains



We are using RIAtest, which uses flex automation to test some applications.

Reading the flex documentation, it contains the following:

Testing applications that load external libraries

... A library that is loaded at run time (including run-time shared libraries 
(RSLs)) must be loaded into the ApplicationDomain of the loading application. 
If the SWF file used in the application is loaded in a different application 
domain, automated testing record and playback will not function properly.


This is particularly inconvenient for us; we load UI controls into separate 
ApplicationDomains (all children of ApplicationDomain.currentDomain) because 
they can have conflicting classnames, and this allows each form to be generated 
in isolation, and they cannot interfere with each other. The thought of having 
to refactor hundreds of classes is not appealing.


This seems to prevent RIAtest's inspector from finding child controls sourced 
from that loader.

Is there any way around this restriction, perhaps by implementing some kind of 
delegate class, or overriding the automation provider to allow it to callback 
to discover the applicationdomains it needs to search?





Re: [flexcoders] Re: data service not executing any ideas please

2013-06-26 Thread Alex Harui
How small a test case can you make?

From: rob.love1977 rob.love1...@yahoo.commailto:rob.love1...@yahoo.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Wednesday, June 26, 2013 5:47 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Re: data service not executing any ideas please



Nothing happens, I see nothing in the console window.

A service call thats passes no custom objects and is a simple getall works 
fine, but when I try a create and pass a custom object it never makes the 
call.

I have no idea where to be looking.

Rob

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aharui@... wrote:

 I think you can turn on logging and see more details of what is going on in 
 the client.

 From: rob.love1977 rob.love1977@...mailto:rob.love1977@...
 Reply-To: 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Date: Tuesday, June 25, 2013 3:52 PM
 To: 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] data service not executing any ideas please



 I have something peculiar that I have never run into. I recently began a new 
 flex project with a ColdFusion 9 backend. In the past I would use the CFC 
 generator packaged with ColdFusion builder to create my base classes/services 
 that I would further customize.
 Then in flash builder 4.6 I would simply generate the data services based on 
 the corresponding CFC. All should work properly and fine I would 
 think.however any service call generated that passes the custom object never 
 executes and there are no errors ever thrown. If someone could please tell me 
 where I should look to track down this strange issue I would be very grateful.

 Thank you in advance,
 Rob






Re: [flexcoders] data service not executing any ideas please

2013-06-25 Thread Alex Harui
I think you can turn on logging and see more details of what is going on in the 
client.

From: rob.love1977 rob.love1...@yahoo.commailto:rob.love1...@yahoo.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Tuesday, June 25, 2013 3:52 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] data service not executing any ideas please



I have something peculiar that I have never run into. I recently began a new 
flex project with a ColdFusion 9 backend. In the past I would use the CFC 
generator packaged with ColdFusion builder to create my base classes/services 
that I would further customize.
Then in flash builder 4.6 I would simply generate the data services based on 
the corresponding CFC. All should work properly and fine I would think.however 
any service call generated that passes the custom object never executes and 
there are no errors ever thrown. If someone could please tell me where I should 
look to track down this strange issue I would be very grateful.

Thank you in advance,
Rob





Re: [flexcoders] UIFTETextField - randomly disappearing lines

2013-06-14 Thread Alex Harui
Yeah, a test case would need UIFTETextField and more than one instance of it in 
order to fool the recycler.  It might require common text or textflow snippets. 
 I don't remember how the recycler remembers what can be recycled.

It is fine to switch the text display widget at runtime, but realize that means 
more testing, slightly different glyph positions, and different performance and 
memory utilization.

-Alex

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 12:34 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



The odd thing is, the bug wouldn't manifest in a small test app that I wrote 
for the purpose of testing possible workarounds. In that app, the text 
displayed correctly every single time.

I just did some checking, and this behavior wasn't observed (although it might 
have been happening unobserved) until after we began compiling the app with 
this:

mx|Label {
textFieldClass:ClassReference(mx.core.UIFTETextField);
}

That was needed to get Arabic text rendering properly. That means that the 
number of UIFTETextFields that the app was creating had increased dramatically. 
I put some tracing code in FTETextField.createTextLinesFromTextBlock() and 
noticed that it was getting called numerous times in the main app, prior to 
where the bug occurred, but not so much in the small app prior to where the bug 
should have occurred. It makes sense that the recycler was the culprit. In the 
main app the pool of recycled TextLines was probably large, whereas in the 
small app it might have been empty, therefore no recycling was occurring to gum 
things up.

I'm thinking now of having a switch in the app that the small (but important) 
fraction of our Arabic-speaking users could use that would, at runtime rather 
than compile time, set the textFieldClass style of mx.controls.Label to 
UIFTETextField and disable TextLine recycling, while for everyone else, the old 
textFieldClass and TextLine recycling would be used. Do you see any potential 
problems with that approach?





From: Ale! x Harui aha...@adobe.commailto:aha...@adobe.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Thursday, June 13, 2013 2:33 PM
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



Well I'd run into this before but I thought we'd fixed all cases (and I 
couldn't find the old bug report).  Not having the recycler might slow down 
your app a bit.  If you have a small test case, please file a bug at 
issues.apache.org/jira under the Flex project there.

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 10:49 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines


Dude, you're amazing. That worked like a charm. I owe you one.



From: Alex Harui aha...@adobe.commailto:aha...@adobe.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Thursday, June 13, 2013 1:00 PM
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



Try turning off the recycler: 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/compose/TextLineRecycler.html


From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 9:16 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines


It's 4.6.0.23201B. One of the last Adobe releases.



From: Alex Harui aha...@adobe.commailto:aha...@adobe.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Thursday, June 13, 2013 12:08 PM
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



What version of Flex SDK?  This sounds like an old bug.

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexc! ! od...@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday

Re: [flexcoders] UIFTETextField - randomly disappearing lines

2013-06-13 Thread Alex Harui
What version of Flex SDK?  This sounds like an old bug.

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 8:57 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] UIFTETextField - randomly disappearing lines



I have a UIFTETextField that is displaying a line of text 115 characters long. 
I set its width to 300 with wordwrap enabled, and it wraps the text into 3 
lines. The weird thing is that any or all of the lines may be invisible when 
this object is displayed. Sometimes you'll see the first and third lines with a 
blank line between them, other times maybe two blank lines followed by the 
visible third line, other times all three are blank.

Has anyone ever encountered something like this? I checked the bug tracker for 
UIFTETextField and its parent class, FTETextField, and didn't find any bug 
report on this.




Re: [flexcoders] UIFTETextField - randomly disappearing lines

2013-06-13 Thread Alex Harui
Try turning off the recycler: 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/compose/TextLineRecycler.html


From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 9:16 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



It's 4.6.0.23201B. One of the last Adobe releases.



From: Alex Harui aha...@adobe.commailto:aha...@adobe.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Thursday, June 13, 2013 12:08 PM
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



What version of Flex SDK?  This sounds like an old bug.

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 8:57 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] UIFTETextField - randomly disappearing lines


I have a UIFTETextField that is displaying a line of text 115 characters long. 
I set its width to 300 with wordwrap enabled, and it wraps the text into 3 
lines. The weird thing is that any or all of the lines may be invisible when 
this object is displayed. Sometimes you'll see the first and third lines with a 
blank line between them, other times maybe two blank lines followed by the 
visible third line, other times all three are blank.

Has anyone ever encountered something like this? I checked the bug tracker for 
UIFTETextField and its parent class, FTETextField, and didn't find any bug 
report on this.








Re: [flexcoders] UIFTETextField - randomly disappearing lines

2013-06-13 Thread Alex Harui
Well I'd run into this before but I thought we'd fixed all cases (and I 
couldn't find the old bug report).  Not having the recycler might slow down 
your app a bit.  If you have a small test case, please file a bug at 
issues.apache.org/jira under the Flex project there.

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 10:49 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



Dude, you're amazing. That worked like a charm. I owe you one.



From: Alex Harui aha...@adobe.commailto:aha...@adobe.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Thursday, June 13, 2013 1:00 PM
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



Try turning off the recycler: 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/compose/TextLineRecycler.html


From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 9:16 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines


It's 4.6.0.23201B. One of the last Adobe releases.



From: Alex Harui aha...@adobe.commailto:aha...@adobe.com
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Sent: Thursday, June 13, 2013 12:08 PM
Subject: Re: [flexcoders] UIFTETextField - randomly disappearing lines



What version of Flex SDK?  This sounds like an old bug.

From: Dave Glasser dglas...@pobox.commailto:dglas...@pobox.com
Reply-To: flexc! od...@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, June 13, 2013 8:57 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] UIFTETextField - randomly disappearing lines


I have a UIFTETextField that is displaying a line of text 115 characters long. 
I set its width to 300 with wordwrap enabled, and it wraps the text into 3 
lines. The weird thing is that any or all of the lines may be invisible when 
this object is displayed. Sometimes you'll see the first and third lines with a 
blank line between them, other times maybe two blank lines followed by the 
visible third line, other times all three are blank.

Has anyone ever encountered something like this? I checked the bug tracker for 
UIFTETextField and its parent class, FTETextField, and didn't find any bug 
report on this.












Re: [flexcoders] ErrorString and borderColor of controls not in sink

2013-05-31 Thread Alex Harui
Setting errorString only calls invalidateProperties.  Not sure why.  Did you 
try calling invalidateDisplayList as well?

From: ilikeflex ilikef...@yahoo.commailto:ilikef...@yahoo.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, May 30, 2013 9:03 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] ErrorString and borderColor of controls not in sink



Hi

When errorString of the component is any value(ex 'Enter the value') then the 
borderColor of the component changes to 'red'. But when you make the 
errorString= it does not change the borderColor of the component back for the 
first time.

It change when the control lose focus.

How can we make the border color to original when using errorString= for the 
first time even the control does not loose focus.

I have attached sample of the problem.

Any pointers..

?xml version=1.0 encoding=utf-8?
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 minWidth=955 minHeight=600
fx:Script
![CDATA[
import mx.utils.StringUtil;
protected function textarea1_changeHandler(event:Event):void
{
// TODO Auto-generated method stub
if (StringUtil.trim((event.target as TextArea).text).length == 0)
{
(event.target as TextArea).errorString = 'Enter any value';
}
else
{
(event.target as TextArea).errorString = ;
}
}
]]
/fx:Script

fx:Declarations
!-- Place non-visual elements (e.g., services, value objects) here --
/fx:Declarations
s:layout
s:VerticalLayout/
/s:layout

mx:TextArea width=100 height=100 errorString=Enter any value
change=textarea1_changeHandler(event)
/
s:Button label=Hello World/
/s:Application

Thanks
ilikeflex





Re: [flexcoders] Unlike VBox, Spark Group Container shows child components even height=0

2013-05-16 Thread Alex Harui
With Spark, you have to use a Scroller, or add custom code to set a scrollRect. 
 But if you are using height=0 to hide something, you might be better off using 
visible and includeInLayout.

From: ilikeflex ilikef...@yahoo.commailto:ilikef...@yahoo.com
Reply-To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Date: Thursday, May 16, 2013 3:22 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] Unlike VBox, Spark Group Container shows child components 
even height=0



Hi

Child components are displayed when height=0 for spark group container.So how 
can we hide the components in the Group.

This is used to work perfectly fine with VBox.

If you notice below the children of VBox are not displayed.

?xml version=1.0 encoding=utf-8?
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 minWidth=955 minHeight=600
fx:Declarations
!-- Place non-visual elements (e.g., services, value objects) here --
/fx:Declarations

s:Group width=100% height=0
s:Button label=Hi - group container/
/s:Group

mx:VBox height=0 width=100%
s:Button label=Hi - mx VBOx container/
/mx:VBox

/s:Application

So i want to hide the components in the group.
Any pointer..

Thanks
Rajan





Re: [flexcoders] Flash Builder project to HTML5

2013-05-14 Thread Alex Harui
Well, the Apache Flex community doesn’t have anything ready for release yet, 
but we are working on this:

https://cwiki.apache.org/confluence/display/FLEX/FlexJS+Status


On 5/14/13 9:31 AM, Slackware selecter...@gmail.com wrote:






Hello everyone, I need to port an existing Flash Builder (4.7) project to HTML5.

I'm wondering if there's anything like the Toolkit_for_CreateJS on Adobe Flash 
Pro but focused on Flash Builder.
If not, could you also recommend some links with aspects to take into account 
for this kind of migrations, etc?

Thanks in advance.

Claudio M. E. Bastos Iorio






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Flex alternatives

2013-05-10 Thread Alex Harui
Looks like Mike Chambers is responding on that thread.  He is a better person 
to ask than me.

Even though I work for Adobe, my main focus is on Apache Flex.  I barely keep 
up with the plans and goals of the other teams, even the Flash Runtime, because 
at this time, Apache Flex isn’t counting on any new awesome features from Flash 
itself.  Apache Flex is looking at publishing Flex apps for HTML5.  One 
approach is described here: 
https://cwiki.apache.org/confluence/display/FLEX/Alex%27s+FlexJS+Prototype

Now, IMO, Flex apps are quite different from other Flash swfs, especially those 
that are timeline driven, so Apache Flex isn’t going to be the solution for 
everyone.

On 5/10/13 12:42 PM, John McCormack j...@easypeasy.co.uk wrote:







Alex

 I pointed someone to this on Flashcoders:
http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg58770.html
 Do you have any new views on where Flash is heading?

 John


 On 20/12/2012 05:50, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives  Well, there are several pieces.  
ActionScript is a language.  It is really only the dozen classes or so in the 
“top-level” in the ASDoc.  String, int, RegEx, Array, Vector, a few functions 
like unescape, etc, plus a bunch of keywords and stuff like “var”, “class”, 
plus a grammar of how you put it all together.  It hasn’t changed much in 
years, other than the addition of Vector.  There are no plans to improve on its 
specification by adding things it is missing compared to other languages like 
Java such as method overloading, or mutiple inheritance.  Instead, Adobe is 
tossing out the whole specification and developing a next-generation of 
ActionScript.  It will have some of the same things you see in the current 
ActionScript, but there will be new keywords and grammar.  The goal is to give 
up on backward compatibility in order to get significant speed improvements by 
making the language easier to execute at runtime.

 ActionScript currently only runs in a Virtual Machine embedded in the 
FlashPlayer or AIR.  Both runtimes provide additional APIs that allow you to 
draw stuff and get network i/o, etc.  The current APIs use ActionScript 3 
syntax and are focused primarily on Sprites, Shapes and MovieClips on a display 
list.  New features were added in every major release.

 Now, Adobe is working on embedding a new Virtual Machine that runs the 
next-generation ActionScript in the FlashPlayer and AIR.  The focus is on 
gaming, and a new set of APIs that talk to a 3d rendering engine is being 
devloped in the next-generation ActionScript syntax.  There will be no support 
for the old Sprites/Shapes/MovieClips and display list.

 However, the old virtual machine that runs ActionScript 3 will continue to be 
embedded in the FlashPlayer and AIR that run on tradtional desktops/laptops.  I 
would not expect it to be co-existent on mobile versions of AIR because the new 
focus is on the captive runtime workflow where you pre-process your 
ActionScript code and the runtime libraries into a device-dependent executable.

 So, given all of that, you can continue to deliver ActionScript 3 content in 
AIR or FlashPlayer on desktops/laptops “forever”.  And unless you have heard 
otherwise from the PDF team, they probably won’t eliminate support for Flash in 
PDF on desktop/laptops soon.

 I think Apache Flex exists because folks have found the Flex workflow easy and 
productive and also safe because it uses structured programming, and former 
Flex customers are now pitching in to continue to evolve Flex as much as we can 
given the constraints of the current environment.  The problem for many is 
that, because Adobe is not evolving the ActionScript 3 language, VM and runtime 
APIs related to it, folks see it as a dead end and no longer want to develop 
apps on it.  I can see their point, but there is a reason why DOS is still 
around on some custom handheld devices: it works, it is well known, and has a 
small footprint for a constrained environment.  Flash/AIR and Flex on 
ActionScript3 continue to be excellent ways to create apps quickly, but it has 
been difficult to convince customers to stick with it.

 Anyway, so far, the most interest in Apache Flex seems to be around trying to 
leverage the Flex workflow to create apps that run on the HTML/CSS/JS stack 
(without Flash).  It will have growing pains for sure, but to me, a question 
about CPU load is premature.  There is 1000’s of people from all over the world 
working on improving the runtime environment for HTML/CSS/JS.  They have made 
significant advances in the past several years and I don’t see a cap on it.  So 
any pain points you experience now are likely to be solved in the near future.  
If you can continue to use Flash/AIR and let others suffer through the growing 
pains, consider yourself lucky.  Otherwise, put on some pads and join the 
battle.

 On 12/19/12 9:29 AM, John McCormack j...@easypeasy.co.uk wrote:








 Thank you again

Re: [flexcoders] Need Help

2013-05-07 Thread Alex Harui
I think you are supposed to create a custom item renderer for the list where 
the item renderer knows to display differently for that one item.


On 5/7/13 8:14 AM, Mohammad Usman Ashraf m.usmanash...@yahoo.com wrote:







Hi everyone.

Can anyone provide me solution for this facing  problem: I am using 
dropdownlist in flash 4.6 , where I have applied custom skin. custom skin 
contained on button , label, Datagroup. So, I want to change the color of 
specific item from list, as given option is only to change 
contantBackgroundColor but not contant color. Help me please If anyone have its 
solution.

---
Best Regard:

Muhammad Usman Ashraf.
Sr.Software Engineer
Cell# +92-312-7070895
Skype : m.usmanashraf
pk.linkedin.com/in/usmanashrafpk http://pk.linkedin.com/in/usmanashrafpk






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: UIComponent in frame 2 of swf?

2013-03-30 Thread Alex Harui
Yeah, it is possible that the –frame option doesn’t work with RSLs.  I’m not 
sure how much testing the –frame option got.


On 3/30/13 7:34 AM, glasheen56 glash...@hotmail.com wrote:






Thanks for replying Alex!

When I don't use frame 3, the size report says there's no UIComponent in the 
Flex swf.  I assume it's because I'm using RSL's.  IUIComponent is there, but 
it's very small.

Regarding the swf size, when I use frame 3, frame 2 alone is bigger than the 
whole swf was without frame 3.  So unless I can sort this out, I gain nothing 
from using frame 3.

Could it be that -frame doesn't play nice with RSL's?  It looks like it's 
merging all the framework classes into the swf (in frame 2) when I use frame 3, 
instead of treating them as RSL's.

I'm using Flex 4.6.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui aharui@... wrote:

 In a Flex SWF, UIComponent is always in frame 2.

 Also, the app should start to run when frame 2 loads while the other frames 
 stream in.


 On 3/29/13 6:52 AM, glasheen56 glasheen@... wrote:






 I just tried, for the first time, the trick where you use -frame to put 
 assets in frame 3 of a swf.  It worked, except that the swf file size grew so 
 large it defeated the purpose of loading the assets late.

 I did a size report and saw that frame 2 now includes a lot of classes it 
 didn't need before, like UIComponent, and these are bloating the swf.  If I 
 remove frame 3, these extra classes go away.

 1. Anyone have an idea why this is happening?  I'm stumped.  I tried using 
 -externs to remove UIComponent from the swf but it had no effect.

 2. If I abandon the frame 3 approach and use an assets module instead, will I 
 run into a similar problem?

 Thanks






 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] UIComponent in frame 2 of swf?

2013-03-29 Thread Alex Harui
In a Flex SWF, UIComponent is always in frame 2.

Also, the app should start to run when frame 2 loads while the other frames 
stream in.


On 3/29/13 6:52 AM, glasheen56 glash...@hotmail.com wrote:






I just tried, for the first time, the trick where you use -frame to put assets 
in frame 3 of a swf.  It worked, except that the swf file size grew so large it 
defeated the purpose of loading the assets late.

I did a size report and saw that frame 2 now includes a lot of classes it 
didn't need before, like UIComponent, and these are bloating the swf.  If I 
remove frame 3, these extra classes go away.

1. Anyone have an idea why this is happening?  I'm stumped.  I tried using 
-externs to remove UIComponent from the swf but it had no effect.

2. If I abandon the frame 3 approach and use an assets module instead, will I 
run into a similar problem?

Thanks






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-11 Thread Alex Harui
Use the debugger to examine the source of the collections.  The source is the 
unfiltered data.  That might help shed light on where the data is and isn’t.


On 3/11/13 4:36 AM, ZIONIST stinas...@yahoo.com wrote:






any ideas?






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-10 Thread Alex Harui
private function myFilterFunction(item:Object):Boolean
{

// if no search text,allow all
If (generalSearch.text.length == 0  titleSearch.text.length == 0  
subjectSearch.text.length == 0)
return true;

return (item[keywordText].match(new RegExp(generalSearch.text, 'i'))  
item[titleText].match(new RegExp(titleSearch.text, 'i'))  
item[subjectText].match(new RegExp(subjectSearch.text, 'i')));

}



On 3/10/13 5:45 AM, ZIONIST stinas...@yahoo.com wrote:






am not sure i follow... care to shed more light?






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-09 Thread Alex Harui
I didn’t look, but I would not call match if the textinputs are empty.


On 3/8/13 11:29 PM, ZIONIST stinas...@yahoo.com wrote:






ok i have improved it so that i can apply itemsChangeEffects when filtering is 
happening. It works but the problem i have is that when the app starts up 
nothing shows up in the tilelist. its only when i start typing in the textinput 
that data appears in the tilelist.

What i would like to see is on startup, data appears in the tilelist. below is 
the improve code. Please advise.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
creationComplete=init()

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.collections.ArrayCollection;

private function init():void
{

archiveSvc.getDocs();

}

/*** code to get Archives */
[Bindable]
private var archiveAr:ArrayCollection=new ArrayCollection();

[Bindable]
private var filteredAr:ArrayCollection=new ArrayCollection();

private function archiveResult(event:ResultEvent):void
{

archiveAr=event.result as ArrayCollection;

}

/*** Start Filter Functions ***/

private var keywordText:String=keywords;
private var titleText:String=title;
private var subjectText:String=subject;

private function filterGrid():void
{

archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

for (var i:int=archiveAr.length - 1; i = 0; i--)
{
if (!filteredAr.contains(archiveAr[i]))
{
filteredAr.addItem(archiveAr[i]);
}
}
for (i=filteredAr.length - 1; i = 0; i--)
{
if (!archiveAr.contains(filteredAr[i]))
{
filteredAr.removeItemAt(i);
}
}

}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{

return (item[keywordText].match(new RegExp(generalSearch.text, 'i'))  
item[titleText].match(new RegExp(titleSearch.text, 'i'))  
item[subjectText].match(new RegExp(subjectSearch.text, 'i')));

}

private function keywordChangeHandler(event:Event):void
{

if (generalSearch.text != '')
{
filterGrid();
}

}

private function titleChangeHandler(event:Event):void
{

if (titleSearch.text != '')
{
filterGrid();
}

}

private function subjectChangeHandler(event:Event):void
{

if (subjectSearch.text != '')
{
filterGrid();
}

}
]]
/mx:Script

mx:RemoteObject id=archiveSvc
 destination=ColdFusion
 source=tilelistFilter.src.cfcs.crud
 showBusyCursor=true
 fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getDocs
   result=archiveResult(event)/

/mx:RemoteObject

mx:DefaultTileListEffect id=dtle0
  fadeOutDuration=500
  fadeInDuration=500
  moveDuration=500
  color=0x3060AA/

mx:HBox

mx:VBox horizontalAlign=center
mx:Label text=Keyword Search:/
mx:TextInput id=generalSearch
  change=keywordChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Title:/
mx:TextInput id=titleSearch
  change=titleChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Subject:/
mx:TextInput id=subjectSearch
  change=subjectChangeHandler(event)/
/mx:VBox

/mx:HBox

mx:TileList width=800
 height=100%
 dataProvider={filteredAr}
 itemRenderer=renderers.archiveRenders
 itemsChangeEffect={dtle0}/

/mx:Application






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-08 Thread Alex Harui
Looks ok to me.


On 3/8/13 6:25 AM, ZIONIST stinas...@yahoo.com wrote:






i have figured it out and it works now. i would like the community's thoughts 
on best practices though. below is the full code. thanks

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
creationComplete=init()

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.collections.ArrayCollection;

private function init():void
{

archiveSvc.getDocs();

}

/*** code to get Archives */
[Bindable]
private var archiveAr:ArrayCollection=new ArrayCollection();

private function archiveResult(event:ResultEvent):void
{

archiveAr=event.result as ArrayCollection;

}

/*** Start Filter Functions ***/

private var keywordText:String=keywords;
private var titleText:String=title;
private var subjectText:String=subject;

private function filterGrid():void
{

archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{

//return item[keywordText].match(new RegExp(generalSearch.text, 'i'));

return (item[keywordText].match(new RegExp(generalSearch.text, 'i'))  
item[titleText].match(new RegExp(titleSearch.text, 'i'))  
item[subjectText].match(new RegExp(subjectSearch.text, 'i')));
}

private function keywordChangeHandler(event:Event):void
{

if (generalSearch.text != '')
{
filterGrid();
}

}

private function titleChangeHandler(event:Event):void
{

if (titleSearch.text != '')
{
filterGrid();
}

}

private function subjectChangeHandler(event:Event):void
{

if (subjectSearch.text != '')
{
filterGrid();
}

}
]]
/mx:Script

mx:RemoteObject id=archiveSvc
 destination=ColdFusion
 source=tilelistFilter.src.cfcs.crud
 showBusyCursor=true
 fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getDocs
   result=archiveResult(event)/

/mx:RemoteObject

mx:HBox

mx:VBox horizontalAlign=center
mx:Label text=Keyword Search:/
mx:TextInput id=generalSearch
  change=keywordChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Title:/
mx:TextInput id=titleSearch
  change=titleChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Subject:/
mx:TextInput id=subjectSearch
  change=subjectChangeHandler(event)/
/mx:VBox

/mx:HBox

mx:TileList width=800
 height=100%
 dataProvider={archiveAr}
 itemRenderer=renderers.archiveRenders/

/mx:Application






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-07 Thread Alex Harui
Are you sure you want to use  and not ||?


On 3/7/13 4:18 AM, ZIONIST stinas...@yahoo.com wrote:






hi when i try to apply the second search parameter, nothing gets filtered. here 
is my code. please advise.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
creationComplete=init()

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.collections.ArrayCollection;

private function init():void
{

archiveSvc.getDocs();

}

/*** code to get Archives */
[Bindable]
private var archiveAr:ArrayCollection=new ArrayCollection();

private function archiveResult(event:ResultEvent):void
{

archiveAr=event.result as ArrayCollection;

}

/*** Start Filter Functions ***/

private var keywordText:String=keywords;
private var titleText:String=title;
private var subjectText:String=subject;

private function filterGrid():void
{

archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{

//return item[keywordText].match(new RegExp(generalSearch.text, 'i'));
return (item[keywordText].match(new RegExp(generalSearch.text, 'i')))  
(item[titleText].match(new RegExp(titleSearch.text, 'i')));

}

private function keywordChangeHandler(event:Event):void
{

if (generalSearch.text != '')
{
filterGrid();
}
else
{
filterReset()
}

}

private function titleChangeHandler(event:Event):void
{

if (titleSearch.text != '')
{
filterGrid();
}
else
{
filterReset()
}

}

]]
/mx:Script

mx:RemoteObject id=archiveSvc
 destination=ColdFusion
 source=tilelistFilter.src.cfcs.crud
 showBusyCursor=true
 fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getDocs
   result=archiveResult(event)/

/mx:RemoteObject

mx:HBox

mx:VBox horizontalAlign=center
mx:Label text=Keyword Search:/
mx:TextInput id=generalSearch
  change=keywordChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Title:/
mx:TextInput id=titleSearch/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Subject:/
mx:TextInput id=subjectSearch/
/mx:VBox

/mx:HBox

mx:TileList width=800
 height=100%
 dataProvider={archiveAr}
 itemRenderer=renderers.archiveRenders/

/mx:Application






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-07 Thread Alex Harui
Give us an example of what is in the text fields and what is in the item and 
which ones should  and shouldn’t get filtered out.


On 3/7/13 9:56 AM, ZIONIST stinas...@yahoo.com wrote:






tried that and it doesn't work






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-06 Thread Alex Harui
I guess I don’t understand what problem you are having.  Your use of 
generalSearch.text looks right to me.  What happens when you try to add another 
TextInput?  What does your code look like and what goes wrong?


On 3/6/13 12:02 AM, ZIONIST stinas...@yahoo.com wrote:






Hi Alex, i apply the result of the filtered archiveAr to the second array 
collection so as to use the Itemschangeeffect thats all. The generalSearch 
textinput only search's based on keywords, so in the event there are so many 
records with the same keywords i would like to drill down more by searching on 
other parameters too.






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] what is different between mx and spark component in flex (flex 3.0 or 4.0) ?

2013-03-06 Thread Alex Harui
MX is a more complete and functional set of components for desktop and browser 
applications, but they had inconsistent skinning rules.
Spark provides more consistent skinning rules, supports right-to-left text, and 
has touch-enabled components for mobile.


On 3/6/13 2:08 AM, devchetu devch...@yahoo.com wrote:






I read many article but i am still confused. could any one tell me what is the 
difference between MX and spark?. if you try to explain with example that will 
be good for me.
thanks






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Flex 4.6 - Problem loading Flex SWF inside Flex App

2013-03-06 Thread Alex Harui
Is the child app’s main class also called Main.mxml?


On 3/6/13 7:00 AM, Dave Glasser dglas...@pobox.com wrote:






I'm using a SWFLoader to load a Flex app -- I'll call it the child app - inside 
my main Flex app. I've used tracing code on the server to prove that the child 
app is being requested and served by the SWFLoader. What's happening, however, 
is that a new instance of the main app is being created and displayed inside 
the SWFLoader. It seems that the Flex initialization code is failing somewhere. 
I have this code in the main app's mxml file:

  private function traceStack():Boolean {
  trace(Main.mxml.():  + new Error(TRACE).getStackTrace());
  return true;
  }

  private var b:Boolean = traceStack();

And the stacktraces that are logged in both the app's initial load and its 
second loading from the embedding are identical:


Main.mxml.(): Error: TRACE
at 
com.Company.web.app.main::Main/traceStack()[C:\dev\projects\web\src\com\Company\web\app\main\Main.mxml:65]
at 
com.Company.web.app.main::Main()[C:\dev\projects\web\src\com\Company\web\app\main\Main.mxml:69]
at 
_Main_mx_managers_SystemManager/create()[_Main_mx_managers_SystemManager.as:53]
at 
mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\systemClasses\ChildManager.as:311]
at 
mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:3057]
at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2843]
at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2723]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.preloaders::Preloader/timerHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\preloaders\Preloader.as:542]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()


I should note that the embedding is a result of user action, and that's why 
it's not an infinitely recursive thing. I tried loading the child app with a 
mx:SWFLoader tag in the main mxml file, and the results were basically the 
same, except the infinite recursion occurred.

Does anyone have a clue what might be going on here?









--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-05 Thread Alex Harui
Post the code that filters with one TextInput and maybe folks will help you 
adjust it for more than one.


On 3/5/13 6:32 AM, ZIONIST stinas...@yahoo.com wrote:






i would like to use the textinputs to filter the array collection using 
different parameters.






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-05 Thread Alex Harui
It looks like there is more work going on here than necessary.  There should be 
no need to loop through the filteredArr and add and remove things.  You should 
be able to set the source or list property of the filteredAr to the source, 
toArray or list of archiveAr and maybe apply the same filter.  It depends a bit 
on what you want to share, if anything.

Anyway, regarding the filter function, since you already are filtering based on 
generalSearch.text, I don’t see why you can’t add other logic to further test 
on someOtherTextField.text.


On 3/5/13 8:56 PM, ZIONIST stinas...@yahoo.com wrote:






Alex, i have an arraycollection (archiveAr) which i would like to filter based 
on the following multiple parameters; Keywords, title and subject. i would like 
to use 3 textinputs to do this. one for keywords, another for title and the 
last one for subject. Now i can only use one textinput to filter based on 
keywords and would like to have all of them filter the array collection 
depending on the users choice. below is the code i have so far. someone please 
help.

/*** code to get Archives */

 //[Bindable]

 private var archiveAr:ArrayCollection=new ArrayCollection();

 /* [Bindable]

 private var filteredAr:ArrayCollection = new

ArrayCollection(archiveAr.toArray()); */

 [Bindable]

 private var filteredAr:ArrayCollection=new ArrayCollection();

 private function archiveResult(event:ResultEvent):void

 {

 archiveAr=event.result as ArrayCollection;

 //filteredAr=event.result as ArrayCollection;

 }

 /*** Start Filter Functions ***/

 private var keywordText:String=keywords;

 private function filterGrid():void

 {

 archiveAr.filterFunction=myFilterFunction;

 archiveAr.refresh();

 for (var i:int=archiveAr.length - 1; i = 0; i--)

 {

 if (!filteredAr.contains(archiveAr[i]))

 {

 filteredAr.addItem(archiveAr[i]);

 }

 }

 for (i=filteredAr.length - 1; i = 0; i--)

 {

 if (!archiveAr.contains(filteredAr[i]))

 {

 filteredAr.removeItemAt(i);

 }

 }

 }

 private function filterReset():void

 {

 archiveAr.filterFunction=null;

 archiveAr.refresh();

 }

 private function myFilterFunction(item:Object):Boolean

 {

 return item[keywordText].match(new RegExp(generalSearch.text, 'i'));

 //return item[keywordText].match(new RegExp(^+generalSearch.text, 'i'));

 }

 private function keywordChangeHandler(event:Event):void

 {

 if (generalSearch.text != '')

 {

 filterGrid();

 }

 else

 {

 filterReset()

 }

 }






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] application.enabled = false when application is communicating with server

2013-02-25 Thread Alex Harui
You could popup a modal dialog.


On 2/25/13 8:33 AM, jmfamp m...@availdata.com wrote:






I would like to have the application.enabled set to false anytime the cursur 
changes to stop watch (communication with backend server) and have the 
application.enabled set to true when the cursor reverts to default.

How would I do this?  Is there an easy way to set this up?  I know I could set 
it in code for every remote object call and result/fault handler, but currently 
there are alot of these in the application and I actually do not have fault 
handlers per say...just pop up an alert box with the fault string.

Is there an attribute to set or maybe a simple override?

Thanks






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Equivalent of editorUsesEnterKey in spark

2013-02-14 Thread Alex Harui
Hmm, that looks like a bug.  Feel free to file it.

You should be able to call stopPropagation.  The code looks like it is 
listening to the renderer and the TextArea should be a child so if you cancel 
it before it bubbles up to the renderer it should work.

Another option is to track if keydown and keyup and respond to the 
endItemEditorSession
If it is asked during an ENTER key.

On 2/14/13 5:57 AM, Nigel Magnay nigel.mag...@gmail.com wrote:






In mx:Datagrid, you can easily declare that a column uses the enter
key, so you can enter multiline text into it.

Basically, exactly this:
http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/

(see how you can hit enter in the grid cell, and enter multiline text).

How does one do this in Spark?

I've diagnosed the editor ending when it receives the keyboard ENTER
event into DatagridEditor::editor_keydownHandler.

I can't just cancel / stop propagation of the event / modify the
event, otherwise the textarea doesn't add the CR.

I can't override in some custom version DataGridEditor because
editor_keyDownHandler is declared private. The DataGridEditor anyway
is instantiated in an mx_internal function in DataGrid.

It seems like this behaviour is burnt in and can't easily be reversed... ?





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Help needed regarding image vectorization in flex reference in details

2013-02-10 Thread Alex Harui
I think you want to read up on image edge detection.


On 2/9/13 10:37 PM, anas naeem maverick_0...@yahoo.com wrote:






Hi everyone,

I need help/guidance regarding image vectorization in flex .

As a  reference its shown here http://www.streetshirts.com/creation.aspx and by 
clicking on the add Image there an selecting Yes i want to Vectorise to see 
what i am talking about ...

Any help would be really appreciated as uptill now i have wasted a lot of time 
Googling out this but of no luck

Thanks in advance and best Regards

Anas





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Code not lining up - brackets

2013-02-07 Thread Alex Harui
Did you say you are using a custom editor?  Do you have FlashBuilder or another 
Flex IDE?  Is it confused about brace matching?  If not, it could be the editor 
you are using.


On 2/7/13 10:33 AM, Davidson, Jerry jerry.david...@illinois.gov wrote:






Jay,

Thanks for the response.  And thanks for the heads up.

And thanks for not commenting on how silly a single case is.

I removed the braces from the case statement and I continue to have the cursor 
before either the last or the next t last closing brace pointing to the first 
open one.

Jerry


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of jaywood58
Sent: Thursday, February 07, 2013 10:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Code not lining up - brackets



Jerry,

I think your issue is the opening brace at line 6 (right after case 
Const.ALERT_LIST_RETRIEVED:) and the closing brace at line 32 (right after the 
break statement)... the code block for a case statement in ActionScript is 
typically not enclosed in braces (perhaps it is even illegal, I'm not sure). 
Instead, the code is delimited by the case statement itself and the break. 
Either way, your closing brace at line 32 overlaps your break statement at line 
31. I suggest removing those two braces or at least moving the closing brace 
above the break.

Jay Wood
Sr. Flex Developer
Tech4Learning, Inc.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
Davidson, Jerry wrote:

 This is a very small problem. I'm using RAD to develop in flex. When I get a 
 module someone else has written, I try to pretty print it to make it easier 
 to work with. While doing this on the below, I found the braces didn't add up 
 right. That is, the last one should apply to the first one (proc statement), 
 and it does. The second to last should apply to the second one (switch 
 statement), but it doesn't. Put the cursor after it and it also points to the 
 first one.

 Am I missing something? I ran clean and refresh on it.

 public function set _checkStatus(status:String):void
 {
 switch (status)
 {
 case Const.ALERT_LIST_RETRIEVED:
 {
 if (model.userAlertsVOvar != null  model.showAlert == true)
 {
 if (model.userAlertsVOvar.length  0)
 {
 var ctr:int = 0;
 for each (var alertRow:Object in model.userAlertsVOvar)
 {
 if( StringUtil.trim(alertRow.individualName) == 
  StringUtil.trim(alertRow.description ) ==  )
 {
 ctr = ctr + 1; //increment ctr
 }
 }

 if (ctr  model.userAlertsVOvar.length)
 { // SHOW ALERT - all rows do not have blank data
 alertPopup = new AlertComp();
 PopUpManager.addPopUp(alertPopup, this, false);
 PopUpManager.centerPopUp(alertPopup);
 model.showAlert=false;
 }
 }
 }
 model.applicationStatus = null;
 break;
 }
 default:
 }
 }








--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Frustrations with the profiler - analyzing memory usage.

2013-02-06 Thread Alex Harui
I have never seen the localconnection hack fail to GC everything, but it has 
been over a year since I was last in the profiler, so maybe more recent players 
don’t GC everything, but I would be surprised if that was the case.  That’s 
because the LC hack wasn’t supposed to GC everything, but once we discovered it 
did, the FP team felt like they couldn’t change that behavior.

I have seen different player versions cause the profiler to report things as 
being around when they aren’t or have it seem like the GC button in the 
profiler doesn’t work, but we tend to get that resolved for each new FB 
version.  Then newer players come along and it seems to go funky again.  That’s 
why you should make sure you are using the right player for your FB version.

I have never seen weak references not work correctly, so you probably don’t 
need to chase paths beyond weak references.

EmbeddedFonts are not leaking per-se.  They are sticking around because a 
display object that uses embedded fonts is stuck.  I usually look for big 
things (views/containers/navigators for example).  A common workflow for me is 
to exercise the app, take a memory snapshot, exercise the app some more, take 
another snapshot, sort both snapshots alphabetically, and manually compare the 
number of live instances.  LoiteringObjects can show you false positives in 
some scenarios so I often do manual compares.  If the number of big things is 
increasing, I look there first.  Of course, it could be a child that is stuck 
because children reference their parents.  And maybe you’ll get lucky and see 
that timers or intervals are increasing.


On 2/6/13 12:48 AM, Nigel Magnay nigel.mag...@gmail.com wrote:






Thanks for that - that's very helpful information.

I'm getting dragged into diagnosis because on very low-spec machines our app is 
tending to eat memory causing it to heavily slow down. I've managed to diagnose 
some of these (use of setTimeout, Bindings that never go away) which is liable 
to help hugely.

What I'm having difficulty in is determining what things in the profiler are 
genuine leaks, and what things are things the GC will eventually get to as 
they're weak references (I do the System.gc() and new 
LocalConnection().connect('foo'); tricks beforehand, but they don't feel like 
they're reliable. It's a shame there isn't a 
System.reallyreallyfullGCandIDontCareHowLongItTakes() )

A good example is mx.core:EmbeddedFont. When the app is in use, this number 
doubles. So I analyse an instance, and find only 1 path - which it states as 
simply mx.core:EmbeddedFont (1 Path), GC Root=YES and allocated in 
mx.core:EmbeddedFontRegistry:GetAssociatedModuleFactory().

What I believe that's telling me is that the reference is there because of the 
static EmbeddedFontRegistry in EmbeddedFont, and it's being stored in that 
registry in a cache (cachedFontsForObjects) - which is a weak dictionary.
My gut instinct at this point is this is irrelevant, it'll get GCed 
eventually. Two things strike me though
  - I'm guessing that it's in that dictionary as the object reference view 
stops at the EmbeddedFont, which seems a shame. That makes it difficult in any 
code that's pretty complex
  - I'm guessing it'll be GCed. But I wonder now if all those things will be 
GCed eventually. Why didn't the 'invoke GC' parts actually cause it to be 
collected..



t
On Tue, Feb 5, 2013 at 7:32 PM, Alex Harui aha...@adobe.com wrote:





The true test of a leak is whether your OS’s process manager says that memory 
consumption keeps going up.

Before we had a profiler, we would add code to the app to exercise some 
sequence (by faking button events, etc), force garbage collection, and report 
System.totalMemory over and over again and run it overnight.  Due to the way 
Flash manages memory, just manually exercising the sequence a few dozen times 
may show increasing memory even though there isn’t a leak, although really bad 
leaks will show up in System.totalMemory or in the OS process manager pretty 
quickly.  Leaky apps will eventualy crash the browser, or just report an 
endless increase in memory, way past what you would expect for an app of that 
size and complexity.

Historically, the profiler has shown a dependency on the version of the Flash 
Player.  Whatever version of Flash Player is recommended for the default SDK in 
your version of Flash Builder should be the one to use when profiling.  Newer 
and older versions may report memory slightly differently and fool the profiler.

HTH,
-Alex



On 2/5/13 5:57 AM, Nigel Magnay nigel.mag...@gmail.com 
http://nigel.mag...@gmail.com  wrote:






We have an application that is leaking memory. Sadly, trying to diagnose this 
with the flex profiler (4.6, 4.7) is proving to be a frustrating experience.

I've picked on one object class to try and understand what is going on. We have 
a wizard-style dialog box with a sidebar control 'wizardlinks' which adds 
'wizardlink' objects to it. Both are Spark group

Re: [flexcoders] Frustrations with the profiler - analyzing memory usage.

2013-02-05 Thread Alex Harui
The true test of a leak is whether your OS’s process manager says that memory 
consumption keeps going up.

Before we had a profiler, we would add code to the app to exercise some 
sequence (by faking button events, etc), force garbage collection, and report 
System.totalMemory over and over again and run it overnight.  Due to the way 
Flash manages memory, just manually exercising the sequence a few dozen times 
may show increasing memory even though there isn’t a leak, although really bad 
leaks will show up in System.totalMemory or in the OS process manager pretty 
quickly.  Leaky apps will eventualy crash the browser, or just report an 
endless increase in memory, way past what you would expect for an app of that 
size and complexity.

Historically, the profiler has shown a dependency on the version of the Flash 
Player.  Whatever version of Flash Player is recommended for the default SDK in 
your version of Flash Builder should be the one to use when profiling.  Newer 
and older versions may report memory slightly differently and fool the profiler.

HTH,
-Alex

On 2/5/13 5:57 AM, Nigel Magnay nigel.mag...@gmail.com wrote:






We have an application that is leaking memory. Sadly, trying to diagnose this 
with the flex profiler (4.6, 4.7) is proving to be a frustrating experience.

I've picked on one object class to try and understand what is going on. We have 
a wizard-style dialog box with a sidebar control 'wizardlinks' which adds 
'wizardlink' objects to it. Both are Spark group controls. The links are being 
added to the group with an 'addElement' call.

The WizardLink instances are growing in memory and do not seem to be being 
released. I've pared them right down to try and eliminate possible listeners.

If I immediately remove the link, Something still seems to hold on to it. If I 
view it in the profiler object view, it expands saying (1 Path) but won't 
describe what it is. Even more mysteriously - if I run with Watch live memory 
data, I can see the instances going up -- but if I then do a memory dump, 
those instances are now missing. If I don't run with 'watch live memory data', 
they are there.

Part of this feels like chasing shadows - are these real leaks, or just things 
the collector will eventually get round to?







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Binding using as3

2013-01-31 Thread Alex Harui
It will be faster if you just hand-code the equivalent of:
[Bindable] private var _y:int
as:
private var __y;
private function get _y():int
{
return __y;
}
private function set _y(value:int):void
{
if (value != __y)
{
__y = value;
dispatchEvent(new Event(“_yChanged”));
}
}

Then whocares() can be coded like this:

  private function whocares():void
{
var vtiA:MyTextInput = new MyTextInput;
   addEventListener(“_yChanged”, function(e:Event) {vtiA.x = 
event.target[“_y”]);
vtiA.x = _y
}

On 1/31/13 7:29 AM, Paul A. p...@ipauland.com wrote:






On 31/01/2013 15:13, aceoohay wrote:
 Paul,

 BTW I did try BindingUtils.bindProperty(vtiA,x,this,_y); and it did not 
 seem to work for me. It recognized _y as it required that I change it to a 
 public variable.

I was suprised that you were binding a private variable - that only
makes sense if your code is sitting inside that class.

I don't know the context of this, but if you had a setter, you might be
able to do the same as when binding.

I have to say that _y is a bit confusing since y is the natural public
accessor for a private variable _y and y is the actual position of an
element and _y seems to be something else!


 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
 Paul A.  wrote:
 On 30/01/2013 23:17, aceoohay wrote:
 I have customized textinput control with a property of x. In my program I 
 instntiate the control as vtiA. My program has a bindable variable called 
 _y.

 I would like everytime that _y is changed by my program that the property x 
 of the control vtiA reflects the new values.

 What I have done that does not work is

 [Bindable] private var _y;

 private function whocares():void
 {
   var vtiA:MyTextInput = new MyTextInput;
   vtiA.x = _y
 }

 If this were mxml I would just say



 What is the equivalent in as3?
 This might point you in the right direction:

 http://stackoverflow.com/questions/966047/flex-3-dynamic-creation-and-binding-of-textinput


 Paul



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links







 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links










--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: SWFloader base path

2013-01-26 Thread Alex Harui
I’m not sure I understood that.  SWFLoader overrides default Flash behavior and 
makes all of your relative paths relative to the SWF using that SWFLoader.


On 1/25/13 11:22 PM, max.sammie max.sam...@yahoo.com wrote:








Thanks for the response Alex.  I see the you created a base variable in AS3 and 
then called it in SWFLoader appending nested.swf.

I was actually hoping to find a solution that would eliminate the need to write 
the path into the 'source' attribute.  So that all swf's loaded by mx:SWFLoader 
would default to some base path that is different from the root directory of 
the parent swf (default behavior of flash), allowing me to  write the source as 
source=nested.swf.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui  wrote:

 {code}




 {code}

 On 1/25/13 3:59 PM, max.sammie  wrote:






 I am using SWFLoader to nest an swf inside of my main flex application.

 I need the nested swf to access a different location than that of the parent 
 swf.

 For example:

 /parent.swf - location of parent swf
 /access/nested.swf  - path of nested swf

 I load the nested swf in the mxml like so:

 mx:SWFLoader id=swfLoader x=0 y=-10 width=800 height=400 
 source=nested.swf

 Without explicitly listing the directory location is it possible to set 
 something like a base path for SWFLoader with something like 
 base=/access/?  I know you can do this in js with swfobject.js, where you 
 set params with the base attribute, but can something similar be done in 
 flash?

 Please help, any assistance is greatly appreciated.






 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] SWFloader base path

2013-01-25 Thread Alex Harui
{code}
fx:Script
![CDATA[
[Bindable]
private var base=”/access/”;
]]
/fx:Script
mx:SWFLoader id=”swfloader” ... source=”{base + ‘nested.swf’}” /
{code}

On 1/25/13 3:59 PM, max.sammie max.sam...@yahoo.com wrote:






I am using SWFLoader to nest an swf inside of my main flex application.

I need the nested swf to access a different location than that of the parent 
swf.

For example:

/parent.swf - location of parent swf
/access/nested.swf  - path of nested swf

I load the nested swf in the mxml like so:

mx:SWFLoader id=swfLoader x=0 y=-10 width=800 height=400 
source=nested.swf

Without explicitly listing the directory location is it possible to set 
something like a base path for SWFLoader with something like base=/access/? 
 I know you can do this in js with swfobject.js, where you set params with the 
base attribute, but can something similar be done in flash?

Please help, any assistance is greatly appreciated.






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] New Spark DG vs. MX ADG

2013-01-17 Thread Alex Harui
The original goal of Spark was to have only one DG that had all of the features 
of ADG in it.  Spark DG still can’t match ADG so you have to decide what 
features you need and which component is the best way to achieve your goal.  
There are trade-off as well: you may choose ADG for grouping collections and 
heirarchy, but then you have to skin it differently than you would other Spark 
controls.


On 1/17/13 7:54 AM, michael_reg...@dell.com michael_reg...@dell.com wrote:






Now that Adobe released the new Spark DataGrid in 4.5+, what are the main 
differences with the MX AdvancedDataGrid, and why is there not an equivalent 
Spark AdvancedDataGrid component? When should I use one vs the other?   Thanks 
for your time on this!

Michael





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] How to call page down function in Flex DataGrid

2013-01-07 Thread Alex Harui
Set verticalScrollPosition


On 1/6/13 10:39 PM, umd.wang wangjip...@gmail.com wrote:






I have a DataGrid control in Flash Builder, it shows a long list of data. I 
want to set a timer, so every time the timer ticks, it will call a function 
which makes the DataGrid control do a pagedown action, just like you click the 
scroll bar every 3 seconds. What is the easiest way?

Thanks.






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Flex alternatives

2012-12-23 Thread Alex Harui
On desktops/laptops, I will be surprised if you lose the ability to view SWFs.  
I can’t imagine you are the only person to leverage SWFs in PDF and I would 
expect major backlash if that was to stop working.

But the question for you is, in the future will your customers be using 
desktop/laptops?  In the home, tablets are becoming all the rage.  This is also 
true in some upper executive ranks.  Tablets may not support SWF in PDF.

There aren’t separate VMs for AIR vs Web.  AIR is a delivery package of the 
same AS VM that you get with the FlashPlayer but with some extensions and the 
ability to hook into the OS, so I don’t quite know how to answer your 
questions.  Both the current AS VM and AS Next VM use JIT to convert AS byte 
code to machine code at runtime.  For mobile apps you have to pre-process the 
entire SWF and the AIR runtime into a single machine-dependent package.

PDF is using a special player but I think that, even if that player does not 
stay in sync with Flash Player Next, it doesn’t matter to you.  It should still 
run your content.  So, I think the big question is what kind of devices your 
customers will be using.  I think Adobe will support legacy content on 
desktop/laptops for a long time.

-Alex

On 12/23/12 10:43 AM, John McCormack j...@easypeasy.co.uk wrote:







That is a very interesting diagram showing a way forward for Flex users.

 I have only used ActionScript Projects, rather than Flex, and have mainly been 
concerned not to lose a way to deliver my SWFs.

 I can see myself developing in JavaScript but not wishing to go back near the 
beginning with programming, and liking the way SWCs are used in my projects, I 
rather want things to stay as they are.

 On that subject, will later FlashPlayers have separate Virtual Machines for: 
(1) interpreting AIR (legacy) and (2) Browser (legacy) as well as (3) new code 
which is CPU dependent machine code?

 I understand that PDFs have their own built-in player and, according to Dave 
Merchant on Acrobat.com, we don't know what tje future of that might be. It 
would be a great shame to lose the PDF SWFs since if they worked properly with 
the PDF container it would be the best way to deliver high quality 
Text/Photo/Video/SWF combinations. At the moment the SWFs and PDF container 
don't thoroughly know about each other. Have I got that right about the PDF SWF 
player?

 Forgive my delayed posts but I have been teaching three days a week and busy 
winding up the apprentices assessments for the end of term.

 It's a great thing that Adobe have continued to keep you involved with the 
project.

 John


 On 21/12/2012 21:43, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives  Actually, I’m not just hanging in 
there, I’m still paid by Adobe to spend all of my time on Flex.  My teammates 
are now folks like you who have spare cycles to contribute to the future of 
Flex.  Apache Flex just “graduated” to being an official “top-level” project at 
Apache which means it will be around for as long as folks want it to.  Adobe 
has no say in its future.

 Working in Apache has been interesting because these new contributors have 
lots of diverse knowledge and experience.  The Apache Flex community is now 
investigating was to leverage a cross-compiler that can take in ActionScript 
and spit out JavaScript and allow you to use a Flex-like workflow to create 
RIAs that run without Flash.

 My thoughts on that topic and prototype is written up here: 
https://cwiki.apache.org/confluence/display/FLEX/Alex%27s+FlexJS+Prototype

 On 12/21/12 12:50 PM, John McCormack j...@easypeasy.co.uk wrote:









--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Flex alternatives

2012-12-21 Thread Alex Harui
To not allow existing SWFs to play where they currently play would “break the 
web” and Adobe has no interest in doing that.

The next generation of AS is supposed to be easy to migrate to if you just want 
to get your code to run, but there is a chance that to fully leverage the 
performance benefits of the new language you will have to learn some new 
constructs and refactor existing code.

FlashBuilder will definitely be the IDE for developing applications for the new 
VM and new AS.


On 12/21/12 10:41 AM, John McCormack j...@easypeasy.co.uk wrote:







Brilliant.
 Thank you.

 I am pleased that existing SWF's will run in an embedded VM in the new player.

 Do you think the next-generation of ActionScript will be similar enough to 
make migration easy?
 and
 Is FlashBuilder likely to be the IDE that creates code for the new VM?

 John

 On 20/12/2012 05:50, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives  Well, there are several pieces.  
ActionScript is a language.  It is really only the dozen classes or so in the 
“top-level” in the ASDoc.  String, int, RegEx, Array, Vector, a few functions 
like unescape, etc, plus a bunch of keywords and stuff like “var”, “class”, 
plus a grammar of how you put it all together.  It hasn’t changed much in 
years, other than the addition of Vector.  There are no plans to improve on its 
specification by adding things it is missing compared to other languages like 
Java such as method overloading, or mutiple inheritance.  Instead, Adobe is 
tossing out the whole specification and developing a next-generation of 
ActionScript.  It will have some of the same things you see in the current 
ActionScript, but there will be new keywords and grammar.  The goal is to give 
up on backward compatibility in order to get significant speed improvements by 
making the language easier to execute at runtime.

 ActionScript currently only runs in a Virtual Machine embedded in the 
FlashPlayer or AIR.  Both runtimes provide additional APIs that allow you to 
draw stuff and get network i/o, etc.  The current APIs use ActionScript 3 
syntax and are focused primarily on Sprites, Shapes and MovieClips on a display 
list.  New features were added in every major release.

 Now, Adobe is working on embedding a new Virtual Machine that runs the 
next-generation ActionScript in the FlashPlayer and AIR.  The focus is on 
gaming, and a new set of APIs that talk to a 3d rendering engine is being 
devloped in the next-generation ActionScript syntax.  There will be no support 
for the old Sprites/Shapes/MovieClips and display list.

 However, the old virtual machine that runs ActionScript 3 will continue to be 
embedded in the FlashPlayer and AIR that run on tradtional desktops/laptops.  I 
would not expect it to be co-existent on mobile versions of AIR because the new 
focus is on the captive runtime workflow where you pre-process your 
ActionScript code and the runtime libraries into a device-dependent executable.

 So, given all of that, you can continue to deliver ActionScript 3 content in 
AIR or FlashPlayer on desktops/laptops “forever”.  And unless you have heard 
otherwise from the PDF team, they probably won’t eliminate support for Flash in 
PDF on desktop/laptops soon.

 I think Apache Flex exists because folks have found the Flex workflow easy and 
productive and also safe because it uses structured programming, and former 
Flex customers are now pitching in to continue to evolve Flex as much as we can 
given the constraints of the current environment.  The problem for many is 
that, because Adobe is not evolving the ActionScript 3 language, VM and runtime 
APIs related to it, folks see it as a dead end and no longer want to develop 
apps on it.  I can see their point, but there is a reason why DOS is still 
around on some custom handheld devices: it works, it is well known, and has a 
small footprint for a constrained environment.  Flash/AIR and Flex on 
ActionScript3 continue to be excellent ways to create apps quickly, but it has 
been difficult to convince customers to stick with it.

 Anyway, so far, the most interest in Apache Flex seems to be around trying to 
leverage the Flex workflow to create apps that run on the HTML/CSS/JS stack 
(without Flash).  It will have growing pains for sure, but to me, a question 
about CPU load is premature.  There is 1000’s of people from all over the world 
working on improving the runtime environment for HTML/CSS/JS.  They have made 
significant advances in the past several years and I don’t see a cap on it.  So 
any pain points you experience now are likely to be solved in the near future.  
If you can continue to use Flash/AIR and let others suffer through the growing 
pains, consider yourself lucky.  Otherwise, put on some pads and join the 
battle.

 On 12/19/12 9:29 AM, John McCormack j...@easypeasy.co.uk wrote:








 Thank you again.

  Although ActionScript is not being developed for the FlashPlayer, is it 
possible

Re: [flexcoders] Re: Flex alternatives

2012-12-21 Thread Alex Harui
Actually, I’m not just hanging in there, I’m still paid by Adobe to spend all 
of my time on Flex.  My teammates are now folks like you who have spare cycles 
to contribute to the future of Flex.  Apache Flex just “graduated” to being an 
official “top-level” project at Apache which means it will be around for as 
long as folks want it to.  Adobe has no say in its future.

Working in Apache has been interesting because these new contributors have lots 
of diverse knowledge and experience.  The Apache Flex community is now 
investigating was to leverage a cross-compiler that can take in ActionScript 
and spit out JavaScript and allow you to use a Flex-like workflow to create 
RIAs that run without Flash.

My thoughts on that topic and prototype is written up here: 
https://cwiki.apache.org/confluence/display/FLEX/Alex%27s+FlexJS+Prototype

On 12/21/12 12:50 PM, John McCormack j...@easypeasy.co.uk wrote:







On 21/12/2012 18:52, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives
  To not allow existing SWFs to play where they currently play would “break the 
web” and Adobe has no interest in doing that.

 The next generation of AS is supposed to be easy to migrate to if you just 
want to get your code to run, but there is a chance that to fully leverage the 
performance benefits of the new language you will have to learn some new 
constructs and refactor existing code.

 FlashBuilder will definitely be the IDE for developing applications for the 
new VM and new AS.



 That's all good to know. Looks like I am all set for a while, at least.

 I noticed you still hanging in there...
 http://incubator.apache.org/flex/team.html

 Thanks again.
 John






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Flex alternatives

2012-12-19 Thread Alex Harui
Well, there are several pieces.  ActionScript is a language.  It is really only 
the dozen classes or so in the “top-level” in the ASDoc.  String, int, RegEx, 
Array, Vector, a few functions like unescape, etc, plus a bunch of keywords and 
stuff like “var”, “class”, plus a grammar of how you put it all together.  It 
hasn’t changed much in years, other than the addition of Vector.  There are no 
plans to improve on its specification by adding things it is missing compared 
to other languages like Java such as method overloading, or mutiple 
inheritance.  Instead, Adobe is tossing out the whole specification and 
developing a next-generation of ActionScript.  It will have some of the same 
things you see in the current ActionScript, but there will be new keywords and 
grammar.  The goal is to give up on backward compatibility in order to get 
significant speed improvements by making the language easier to execute at 
runtime.

ActionScript currently only runs in a Virtual Machine embedded in the 
FlashPlayer or AIR.  Both runtimes provide additional APIs that allow you to 
draw stuff and get network i/o, etc.  The current APIs use ActionScript 3 
syntax and are focused primarily on Sprites, Shapes and MovieClips on a display 
list.  New features were added in every major release.

Now, Adobe is working on embedding a new Virtual Machine that runs the 
next-generation ActionScript in the FlashPlayer and AIR.  The focus is on 
gaming, and a new set of APIs that talk to a 3d rendering engine is being 
devloped in the next-generation ActionScript syntax.  There will be no support 
for the old Sprites/Shapes/MovieClips and display list.

However, the old virtual machine that runs ActionScript 3 will continue to be 
embedded in the FlashPlayer and AIR that run on tradtional desktops/laptops.  I 
would not expect it to be co-existent on mobile versions of AIR because the new 
focus is on the captive runtime workflow where you pre-process your 
ActionScript code and the runtime libraries into a device-dependent executable.

So, given all of that, you can continue to deliver ActionScript 3 content in 
AIR or FlashPlayer on desktops/laptops “forever”.  And unless you have heard 
otherwise from the PDF team, they probably won’t eliminate support for Flash in 
PDF on desktop/laptops soon.

I think Apache Flex exists because folks have found the Flex workflow easy and 
productive and also safe because it uses structured programming, and former 
Flex customers are now pitching in to continue to evolve Flex as much as we can 
given the constraints of the current environment.  The problem for many is 
that, because Adobe is not evolving the ActionScript 3 language, VM and runtime 
APIs related to it, folks see it as a dead end and no longer want to develop 
apps on it.  I can see their point, but there is a reason why DOS is still 
around on some custom handheld devices: it works, it is well known, and has a 
small footprint for a constrained environment.  Flash/AIR and Flex on 
ActionScript3 continue to be excellent ways to create apps quickly, but it has 
been difficult to convince customers to stick with it.

Anyway, so far, the most interest in Apache Flex seems to be around trying to 
leverage the Flex workflow to create apps that run on the HTML/CSS/JS stack 
(without Flash).  It will have growing pains for sure, but to me, a question 
about CPU load is premature.  There is 1000’s of people from all over the world 
working on improving the runtime environment for HTML/CSS/JS.  They have made 
significant advances in the past several years and I don’t see a cap on it.  So 
any pain points you experience now are likely to be solved in the near future.  
If you can continue to use Flash/AIR and let others suffer through the growing 
pains, consider yourself lucky.  Otherwise, put on some pads and join the 
battle.

On 12/19/12 9:29 AM, John McCormack j...@easypeasy.co.uk wrote:







Thank you again.

 Although ActionScript is not being developed for the FlashPlayer, is it 
possible that it may still be developed separately for use in AIR? I could 
deliver content through AIR instead of PDFs.

 My problem is that the FlashBuilder / Flash Professional workflow is such a 
seductive one, with that easy marriage of graphics and code, that I don't want 
to lose it. I have used C++ to produce graphical programs and the AS3 route is 
a godsend in comparison.

 One wonders Is HMTL5 going to use any less CPU cycles than AS3, once it is 
doing similar work?

 John

 On 18/12/2012 05:38, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives  Things get lost in translation, but 
one goal of the parallel frameworks is to not leverage things that get lost in 
translation.  Otherwise, since JS and AS are ECMA-based, the translation works 
pretty well.

 Keep in mind that, while Adobe is no longer investing in ActionScript 3 on the 
Flash Player, and not developing Flash Player for mobile devices, and AIR may 
not run on all

Re: [flexcoders] Re: Flex alternatives

2012-12-17 Thread Alex Harui
Adobe has no plans that I know of to get ActionScript to work with HTML5 in the 
same way that Google is proposing Dart as an alternative to JavaScript.

The Apache Flex project is working on a compiler that will translate 
ActionScript to JavaScript.  In addition, the link I posted proposes a 
component framework that would enable you to build or prototype your app in 
Flash using FlashBuilder and ActionScript and then run a separate tool outside 
of FlashBuilder to translate it to JavaScript where it will run and leverage 
HTML or HTML5 components.

Alternatively, the same ActionScript to JavaScript compiler would let you write 
the script portions of your website as ActionScript using FlashBuilder and have 
separate HTML files, then use the same separate tool outside of FlashBuilder to 
translate the ActionScript to JavaScript.  And maybe variations will be created 
that can output to various JS frameworks.

At this time, there are no plans to change FlashBuilder to integrate the 
translation workflow.  Adobe’s focus for FlashBuilder is on building 
ActionScript gaming and premium video projects that run on the Flash player.  I 
suppose if the JS workflow became wildly popular and Adobe could see a revenue 
stream by supporting such a workflow things might change, but I wouldn’t count 
on it.  There is a better chance that someone in Apache Flex will start 
creating plugins for Eclipse to support the workflow or one of the other tool 
vendors will provide an integrated workflow.

The future of ActionScript 3 in Rich Internet Applications (as opposed to 
ActionScript “Next” as mentioned in the Flash roadmap) is actually being given 
more attention by Apache Flex than Adobe.  If you want to continue to use 
ActionScript 3 to develop RIAs, I would encourage you to get involved with the 
Apache Flex project.

On 12/17/12 2:16 AM, John McCormack j...@easypeasy.co.uk wrote:







On 17/12/2012 05:12, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives  Adobe has spent the year donating the 
Flex SDK and Falcon compilers to the Apache Software Foundation.  While Adobe 
has a small set of people contributing to Flex in Apache and a team that 
shipped Flash Builder 4.7 and is working on subsequent Flash Builder release, 
Adobe is not leading the development of Flex and has not been for a full year.  
The future of Flex is in the hands of the Apache Flex community.  This document 
should have made Adobe’s plans clear: 
http://www.adobe.com/devnet/flex/whitepapers/roadmap.html

I followed this link through to
 http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html

 Under Flash Player Next this says...
  and provide a foundation on which Flash can move forward over the next 
decade.

 Does this imply ActionScript working collaboratively with HTML5 or is it an 
alternative to HTML5?

 I am asking because I am hoping Flash Builder will continue to offer me a way 
forward (AS3+HTML5).

 John






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Flex alternatives

2012-12-17 Thread Alex Harui
I’m not sure I understood.  These roadmaps are nearly a year old.  Folks still 
thought that Flash Builder was being developed for Rich Internet Apps?  I guess 
we failed again to get the message out.

DesignView, as was discussed several times on the Apache Flex mailing list, is 
tied to specific SDK versions and as such, it was not possible for Adobe to 
certify DV against Apache Flex versions.

Adobe is investing in a whole new set of tools to address new workflows for 
HTML5 development.  If you are near a large city, try to find out when the 
“Create The Web” tour comes to your city.


On 12/17/12 8:54 AM, Nigel Magnay nigel.mag...@gmail.com wrote:






Adobe’s focus for FlashBuilder is on building ActionScript gaming and premium 
video projects that run on the Flash player.

I think many people assumed that the driver was legacy in-browser flex apps, 
plus AIR apps for mobile devices. That the older, legacy support had been 
farmed out to Apache, leaving the Flash Builder products as 'premium 
value-added design tools' fit consistently with what Adobe does elsewhere.

The (baffling) removal of design view in 4.7 puts that impression to the sword, 
however.

I'm not saying it's the wrong way to go - it's after all up to Adobe to choose 
where to invest their product development. It's in a sense good to know that 
Adobe has ceded all hope of competing with Google or Microsoft for HTML5 
application building - that makes the choices a bit easier.





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Flex alternatives

2012-12-17 Thread Alex Harui
Things get lost in translation, but one goal of the parallel frameworks is to 
not leverage things that get lost in translation.  Otherwise, since JS and AS 
are ECMA-based, the translation works pretty well.

Keep in mind that, while Adobe is no longer investing in ActionScript 3 on the 
Flash Player, and not developing Flash Player for mobile devices, and AIR may 
not run on all mobile devices, where the FlashPlayer is today, it will likely 
be there “forever”.  So, if alll of your users are using desktops/laptops that 
have browsers that have Flash, you can continue to use Flex and/or ActionScript 
3 to build applications and they will likely run there not just in five years, 
but even after that.  There is no time-bomb in the players that will go off and 
stop running.  Even though ActionScript Next and FlashPlayer Next are not 
compatibile with ActionScript 3, the AS3 VM will ship in the FlashPlayers that 
Adobe ships in the future.  There is the possibility that the browser vendors 
will stop supporting plugins, but I would imagine they will keep a 
compatibility-mode somehow.  I think there is too much Flash content out there 
and to block it from existing desktops/laptops would “break the web” and I 
don’t expect the browser vendors or Adobe take such a risk.  There would be too 
much negative press.  That doesn’t mean that new computers with new OS’s may 
not support Flash (that’s what Apple did with IOS), and many home users may 
forgo traditional computers for tablets in the future, so keep that in mind as 
well.

I don’t know the PDF market that well, but again, I would expect PDFs to 
continue to support Flash “forever” as well.  At least for the readers on 
traditional desktops/laptops.


On 12/17/12 10:48 AM, John McCormack j...@easypeasy.co.uk wrote:







Thank you.
 That's interesting and very helpful.

 One does wonder if a separate translation tool would do the job faithfully, 
and so creates doubt.

 For someone that wants to use SWFs in PDFs to deliver educational content that 
is fully interactive, what workflow would you suggest using for the next three 
to five years?

 John

 On 17/12/2012 16:31, Alex Harui wrote:


  Re: [flexcoders] Re: Flex alternatives  Adobe has no plans that I know of to 
get ActionScript to work with HTML5 in the same way that Google is proposing 
Dart as an alternative to JavaScript.

 The Apache Flex project is working on a compiler that will translate 
ActionScript to JavaScript.  In addition, the link I posted proposes a 
component framework that would enable you to build or prototype your app in 
Flash using FlashBuilder and ActionScript and then run a separate tool outside 
of FlashBuilder to translate it to JavaScript where it will run and leverage 
HTML or HTML5 components.

 Alternatively, the same ActionScript to JavaScript compiler would let you 
write the script portions of your website as ActionScript using FlashBuilder 
and have separate HTML files, then use the same separate tool outside of 
FlashBuilder to translate the ActionScript to JavaScript.  And maybe variations 
will be created that can output to various JS frameworks.

 At this time, there are no plans to change FlashBuilder to integrate the 
translation workflow.  Adobe’s focus for FlashBuilder is on building 
ActionScript gaming and premium video projects that run on the Flash player.  I 
suppose if the JS workflow became wildly popular and Adobe could see a revenue 
stream by supporting such a workflow things might change, but I wouldn’t count 
on it.  There is a better chance that someone in Apache Flex will start 
creating plugins for Eclipse to support the workflow or one of the other tool 
vendors will provide an integrated workflow.

 The future of ActionScript 3 in Rich Internet Applications (as opposed to 
ActionScript “Next” as mentioned in the Flash roadmap) is actually being given 
more attention by Apache Flex than Adobe.  If you want to continue to use 
ActionScript 3 to develop RIAs, I would encourage you to get involved with the 
Apache Flex project.

 On 12/17/12 2:16 AM, John McCormack j...@easypeasy.co.uk wrote:








 On 17/12/2012 05:12, Alex Harui wrote:



  Re: [flexcoders] Re: Flex alternatives  Adobe has spent the year donating the 
Flex SDK and Falcon compilers to the Apache Software Foundation.  While Adobe 
has a small set of people contributing to Flex in Apache and a team that 
shipped Flash Builder 4.7 and is working on subsequent Flash Builder release, 
Adobe is not leading the development of Flex and has not been for a full year.  
The future of Flex is in the hands of the Apache Flex community.  This document 
should have made Adobe’s plans clear: 
http://www.adobe.com/devnet/flex/whitepapers/roadmap.html


 I followed this link through to
  http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html

  Under Flash Player Next this says...
   and provide a foundation on which Flash can move forward over the next 
decade.

  Does

Re: [flexcoders] Re: Flex alternatives

2012-12-16 Thread Alex Harui
Adobe has spent the year donating the Flex SDK and Falcon compilers to the 
Apache Software Foundation.  While Adobe has a small set of people contributing 
to Flex in Apache and a team that shipped Flash Builder 4.7 and is working on 
subsequent Flash Builder release, Adobe is not leading the development of Flex 
and has not been for a full year.  The future of Flex is in the hands of the 
Apache Flex community.  This document should have made Adobe’s plans clear: 
http://www.adobe.com/devnet/flex/whitepapers/roadmap.html

Meanwhile, there is plenty of activity in the Apache Flex community, including 
an effort to leverage ActionScript and MXML to write applications that can run 
without Flash, by translating ActionScript to JavaScript.  If you like to use 
Flex, you may want to find a way to contribute to the Apache Flex project.  The 
main page for the Apache Flex project is currently: 
http://incubator.apache.org/flex/ but will change if/when we become an official 
Apache top-level project.

This document describes one approach to Flex without Flash.  There are other 
approaches being investigated at this time.

-Alex


On 12/15/12 1:59 AM, Sal sal.ce...@yahoo.com wrote:








--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sal 
sal.celli@... wrote:

 hi,
  as i can sadly see from the message history bottom grid, many programmers 
 are leaving flex.
 So this thread is to ask you all, if you have already found a valid 
 alternative to flex for RIA development.


After almost 1 year, it seems that Adobe itself gave us the answer releasing 
Adobe Flash Builder 4.7 without the design view. This is a straight message to 
all flex programmers telling us that Adobe has no more intention, and maybe 
neither a project group, to continue flex developing. So now, after this year 
of reflections and testing new products, what is the real alternative to flex?






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Checkbox in grid

2012-12-07 Thread Alex Harui
Renderers are recycled.  There are only enough of them as there are visible 
rows.   Renderers get re-assigned to different dataprovider items as you 
scroll.  Therefore, every visible aspect of the renderer should be tied to the 
dataprovider item.  And that’s why reading back the value from the renderer 
won’t work.  There isn’t a renderer for off-screen rows.


On 12/7/12 12:14 PM, Davidson, Jerry jerry.david...@illinois.gov wrote:






I guess I’m just not getting it.  The datagrid (id=dg2) has a dataProvider.  
Each column in the grid is associated with one element in the dataProvider 
except for the renderer where the checkbox is.  That is in a renderer because 
based on other fields it will be either enabled or not.

After a button is pressed, a routine is invoked that will loop through the 
dataProvider source to see if the checkbox were clicked.  What I don’t see is 
how to connect the renderer to the dataProvider checkbox field.  Any reference 
to it causes a “can’t do that to a null object” message.

I added another field to the VO and in the renderer I can  change the value of 
a Boolean such that it is true if the box were checked.  This was done by 
adding a “change” event to the renderer.  Since I could change the value of the 
field I don’t see why I couldn’t change the value of the checkbox field.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Friday, December 07, 2012 1:29 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Checkbox in grid



Usually the checkbox changes something, either in the selection model or the 
data model, and you loop over that model.


On 12/6/12 7:58 AM, Davidson, Jerry jerry.david...@illinois.gov wrote:






I have a check box in an advancedatagrid along with other fields.  They all 
show up as does the checkbox.  I can check the box(es).  There is a button that 
will then process the selected records.

I start a loop on the grid, but I don’t know where to go from there.  The two 
things I want to do is 1) if the row is checked, add it to an array for further 
processing and 2) when coming into the array clear any checks still in there 
from the last time.

The user will click on array1 and the data is used to populate array2 with 
details.  Array2 also has the checkbox in an itemrenderer and below it a 
process button.  You click the records you want processed then the button to 
build an array of selected records that are passed on for further processing.

The array code looks like this:
   cust:MyAdvancedDataGrid
id=dg2
resizableColumns=true
height=100% width=100%
editable=false
styleName=mainGrid
dataProvider={model.userAARetrieveList}
headerStyleName=datagridHeaderStyles
selectionMode=singleCell
accessibilityName=A and A Report History List, DataGrid, use arrow 
keys to navigate between cells
   cust:columns
 mx:AdvancedDataGridColumn
id=select
headerText=Select

itemRenderer=gov.il.dhs.wvs.view.renderers.UserAA_Chck_Renderer
width=45/

 mx:AdvancedDataGridColumn
headerText=Week Ending

itemRenderer=gov.il.dhs.wvs.view.renderers.UserAA_WE_Renderer
width=85/
more columns…

The processing button code looks like this:
   // bottom grid clicked
   var dg2AC:ArrayCollection = new ArrayCollection();

 for each (var obj:Object in dg2.dataProvider)
  {
   if (obj.select.selected)
{
  dg2AC.addItem(obj);
}
  }

 if (dg2AC.length == 0)
   return;

  (new UserAAInsertEvent(dg2AC as UserAAInsertVO)).dispatch();

I’ve spent the last hour reviewing blogs and such, but can’t seem to find the 
right stuff.






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Checkbox in grid

2012-12-06 Thread Alex Harui
Usually the checkbox changes something, either in the selection model or the 
data model, and you loop over that model.


On 12/6/12 7:58 AM, Davidson, Jerry jerry.david...@illinois.gov wrote:






I have a check box in an advancedatagrid along with other fields.  They all 
show up as does the checkbox.  I can check the box(es).  There is a button that 
will then process the selected records.

I start a loop on the grid, but I don’t know where to go from there.  The two 
things I want to do is 1) if the row is checked, add it to an array for further 
processing and 2) when coming into the array clear any checks still in there 
from the last time.

The user will click on array1 and the data is used to populate array2 with 
details.  Array2 also has the checkbox in an itemrenderer and below it a 
process button.  You click the records you want processed then the button to 
build an array of selected records that are passed on for further processing.

The array code looks like this:
cust:MyAdvancedDataGrid
id=dg2
resizableColumns=true
height=100% width=100%
editable=false
styleName=mainGrid
dataProvider={model.userAARetrieveList}
headerStyleName=datagridHeaderStyles
selectionMode=singleCell
accessibilityName=A and A Report History List, DataGrid, use arrow 
keys to navigate between cells
   cust:columns
 mx:AdvancedDataGridColumn
id=select
headerText=Select

itemRenderer=gov.il.dhs.wvs.view.renderers.UserAA_Chck_Renderer
width=45/

 mx:AdvancedDataGridColumn
headerText=Week Ending

itemRenderer=gov.il.dhs.wvs.view.renderers.UserAA_WE_Renderer
width=85/
more columns…

The processing button code looks like this:
// bottom grid clicked
var dg2AC:ArrayCollection = new ArrayCollection();

 for each (var obj:Object in dg2.dataProvider)
  {
   if (obj.select.selected)
{
  dg2AC.addItem(obj);
}
  }

 if (dg2AC.length == 0)
   return;

  (new UserAAInsertEvent(dg2AC as UserAAInsertVO)).dispatch();

I’ve spent the last hour reviewing blogs and such, but can’t seem to find the 
right stuff.






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Inserting Flex Container to TLF?

2012-12-04 Thread Alex Harui
What is the content of this container?  If it is non-interactive, take a bitmap 
of it and insert that instead.

If you are trying to get text to flow around it, Flex text widgets do not 
support that ,but TLF supposedly does.by setting up a set of TLF containers for 
the ContainerController to work with.

Also, you can insert a dummy bitmap in the TextFlow and float a Flex container 
over that area.


On 12/4/12 9:10 AM, handitan handi@gmail.com wrote:






Hi Alex!

Thanks for the reply!
Hmmm...I guess that's the only way to do it, huh?
Any other suggestion?

Again thank you!

Handi
--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui aharui@... wrote:

 UIComponents must be parented by other UIComponents.

 Now there is a call that sets a virtual parent that you might be able to use 
 to jump over all of the TLF parents to rewire the container into the Flex 
 DOM.  We use it in MX containers for scrolling since we put a non-UIComponent 
 between the container and its children so we can clip it.  No guarantees that 
 will work though.


 On 11/29/12 6:05 PM, handitan handi.tan@... wrote:






 Hi all,

 I am in the process of trying to customize TLF to be able to read my custom 
 html tag that will be able to render Flex container.

 I am using TLF code that's related to InlineGraphicElement as my reference 
 for this customization.
 I think I got into a good point where the Flex container is added but the 
 style doesn't get rendered (blue border and red background).

 I don't know why that is but my best guess is the validation doesn't get 
 called since TLF is not based on Flex.
 To verify this I tried another experiment by creating a subclass of  
 RectangularBorder where the updateDisplayList overridden with code that has 
 drawRect,and bla bla.

 I found out that updateDisplayList never gets called at all.
 Here's the framework that I am using:
 - Flex 3.6
 - TLF 3.0

 Could anyone please point me into the right direction on how to solve this 
 issue?

 Thank you,

 Handi






 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] implement stage3d while maintaining fp 10.1 support

2012-11-30 Thread Alex Harui
I would use player version detection to load different SWFs.


On 11/29/12 2:21 AM, Csomák Gábor csom...@gmail.com wrote:






Hi!
At my company, there is a policy to support 10.1 flash player. I was wondering, 
if there is a way to implement stage3D if the client is capable, (else display 
on stage), with Flex 4.1A SDK to compile the AS3 project?
Thanks,
Gabor





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Inserting Flex Container to TLF?

2012-11-30 Thread Alex Harui
UIComponents must be parented by other UIComponents.

Now there is a call that sets a virtual parent that you might be able to use to 
jump over all of the TLF parents to rewire the container into the Flex DOM.  We 
use it in MX containers for scrolling since we put a non-UIComponent between 
the container and its children so we can clip it.  No guarantees that will work 
though.


On 11/29/12 6:05 PM, handitan handi@gmail.com wrote:






Hi all,

I am in the process of trying to customize TLF to be able to read my custom 
html tag that will be able to render Flex container.

I am using TLF code that's related to InlineGraphicElement as my reference for 
this customization.
I think I got into a good point where the Flex container is added but the style 
doesn't get rendered (blue border and red background).

I don't know why that is but my best guess is the validation doesn't get called 
since TLF is not based on Flex.
To verify this I tried another experiment by creating a subclass of  
RectangularBorder where the updateDisplayList overridden with code that has 
drawRect,and bla bla.

I found out that updateDisplayList never gets called at all.
Here's the framework that I am using:
- Flex 3.6
- TLF 3.0

Could anyone please point me into the right direction on how to solve this 
issue?

Thank you,

Handi






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: profiling flex applications

2012-11-20 Thread Alex Harui
You should refactor to use modules.


On 11/20/12 2:08 AM, Nitin Gopi nitin.g...@yahoo.co.in wrote:






Hi
First I tell you what is the present scenario.
I have an application which was not created using modules. It was developed 
years back. Now the application size has grown larger. When we compile it we 
get a singe swf file which is 5 MB in size. It takes so much time to load on 
the browser. Its the only swf in the debug folder. The compile time is also 
much more.
Now my task is to do both, reduce the compile time as much as possible and also 
make it faster on the browser.
So far I have done these things
1. I tried to look for loitering objects using flashbuilder profiler tool and 
found some of them. Then I assigned the objects to null as soon as its job was 
finished. I couldn't find the weak references. This has reduce memory leaks at 
many places.
2. Use of setStyle() is not the best way, so for that I used the styles in css. 
But do not know how much the performance will be improved.
3. We have been using embedded images for each button to show the skins for 
mouse hover, mouse click operations. This creates unnecessary images in the 
assets folder. As part of solution I tried to use a skinClass for the buttons. 
It has styles for mouse over, mouse click operations. One advantage is that we 
can get rid of all the button images inside the assets folder. But for each 
button one object of skinClass will be created. Is it a nice idea or I am doing 
something wrong here?
4. I also tried to put all the css files and images inside separate swc and 
link it as RSL in the project. It reduces the overall swf size and compile time 
is also reduced but not sure about the performance, will check it.
5. Is there anything else which I can do to reduce the compile time and 
increase the performance or if there is anything which I am doing wrong?






 From: Nitin Gopi nitin.g...@yahoo.co.in
 To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
 Sent: Tuesday, 20 November 2012 9:01 AM
 Subject: profiling flex applications


Hi
I am doing the profiling of our flex application. For this I am taking the help 
of flashbuilder profiler tool.
Right now I am focusing on reducing the build time of the application. The 
application is compiled into a single swf file, since modules are not used in 
the application. Keeping that in view, my task is to reduce the build time of 
the application. So far I have found that one way to reduce the build time is 
to separate the assets into a separate swc. Link that swc as RSL and build the 
project. Does this affect the performance of the application?
What are the other ways to reduce the build time of the application?

I have one more question. In our project we are using embedded images for the 
buttons. One is the default image and one image for mouse down. So 2 images for 
each button. This increases the no. of images in the assets folder. I tried to 
use a custom skin for all the buttons. This reduces the no. of assets but when 
I run the flashbuilder profiler it shows no. of objects for the skinclass used. 
So if we have say 50 buttons in the application, 50 objects of skinclass will 
be created. Is this the correct way or I am missing something ?

Thanks
Nitin










--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] flash.system::Worker could not be found

2012-11-20 Thread Alex Harui
Yes


On 11/20/12 4:45 AM, Csomák Gábor csom...@gmail.com wrote:






its in air. can I use swf version for air also?

On Tue, Nov 20, 2012 at 12:10 AM, Alex Harui aha...@adobe.com wrote:





Make sure the swf-version is set correctly.




On 11/19/12 12:21 PM, Csomák Gábor csom...@gmail.com 
http://csom...@gmail.com  wrote:






HI!
I'm trying to implement workers to an existing Flex/AIR project, but I get the 
following runtime error:

VerifyError: Error #1014: Class flash.system::Worker could not be found.

at line:

var worker:Worker = 
WorkerDomain.current.createWorker(Workers.TUtils_DataToXMLToFileWorker);


anybody got idea why it is?
thanks!





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] flash.system::Worker could not be found

2012-11-19 Thread Alex Harui
Make sure the swf-version is set correctly.


On 11/19/12 12:21 PM, Csomák Gábor csom...@gmail.com wrote:






HI!
I'm trying to implement workers to an existing Flex/AIR project, but I get the 
following runtime error:

VerifyError: Error #1014: Class flash.system::Worker could not be found.

at line:

var worker:Worker = 
WorkerDomain.current.createWorker(Workers.TUtils_DataToXMLToFileWorker);


anybody got idea why it is?
thanks!





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] sharing RSL (loaded by module) between sibling modules

2012-11-18 Thread Alex Harui
See the modules presentation on my blog.

If you want to share classes, the RSL must be loaded into a shared 
ApplicationDomain.

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


On 11/18/12 7:43 AM, venkateswarlu naidu contactve...@yahoo.co.in wrote:

Forgot to mention that i am using SDK 4.1 and my RSL has some non UI 
actionscript classes only!!

Thanks,
Venkat.




 From: venkateswarlu naidu contactve...@yahoo.co.in
 To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Cc: Alex Harui aha...@adobe.com
 Sent: Saturday, 17 November 2012 11:47 PM
 Subject: [flexcoders] sharing RSL (loaded by module) between sibling modules






Hi Guys,

I am stuck with  this RSL issue and need your help here!
I have one main mx:Application and two modules!

Main Application (abc.com/MainApp/main.swf) loads module1 
(abc.com/ModuleApp1/module1.swf) which inturn loads one custom RSL and module1 
is using getDefinitionByName to instantiate the classes (present in RSL) at 
runtime and it works.
Main Application loads module2 (abc.com/ModuleApp2/module2.swf), from this 
module i want to use getDefinitionByName  to instantiate the class (present in 
above RSL) at runtime but its not working..

Application ---loads module1 -loads custom RSL (contains 
test.TestImpl)  getDefinitonByName(test.TestImpl) works
Application  loads module2- 
getDefinitonByName(test.TestImpl)  doesnt work :(

It works if custom RSL is loaded by Main application but not by module1! Tried 
different ways but couldnt make it work.

Appreciate your help !!



Thanks,
Venkat.











Re: [flexcoders] Profiling flex applications

2012-11-14 Thread Alex Harui
Jun Heider gave a presentation at 360 Flex several years back.


On 11/13/12 7:08 AM, Nitin Gopi nitin.g...@yahoo.co.in wrote:






Hi All,
Has anybody worked in the area of profiling flex applications. This includes 
finding memory leaks, improving compilation time and solving performance issues.

Regards
Nitin Gopi





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] mx component restrict question

2012-11-14 Thread Alex Harui
That’s in the doc.  See use of backslashes.


On 11/13/12 8:54 PM, markflex2007 markflex2...@yahoo.com wrote:






Hi,

for mx component. if textinput allow number. I can do this

mx:TextInput id=textInput
 restrict=0-9
 widthInChars=20
 maxChars=20 /

 but I also want to allow negative sign

 if I did this

 mx:TextInput id=textInput
 restrict=-0-9
 widthInChars=20
 maxChars=20 /

 I also can type ,.etc

 How to do that if I only allow negative sign and number for mx component.

 Thanks


 Mark






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] updateDisplayList() called before commitProperties()

2012-09-26 Thread Alex Harui
If you are adding the component in the updateDisplayList of a parent, I think 
that can happen.  The List classes call validateClient on components added in 
updateDisplayList in order to get them through their other phases.


On 9/26/12 12:35 PM, Dave Glasser dglas...@pobox.com wrote:






I have a custom component and the first time updateDisplayList() is called, it 
is called before commitProperties() has been called for the first time. It 
still happens even after I put:

invalidateProperties();

in the constructor.

The stacktrace looks like this:

at mx.core::UIComponent/validateDisplayList()
at com.package.MyClass/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()

I'm using Flex 4.6. Is this proper behavior?





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-21 Thread Alex Harui
If you turn off accessibility in the MXML app does displayAsPassword still make 
a difference?  I’m not really sure how to help here, just throwing out ideas.


On 9/21/12 3:11 AM, Wouter Schreuders wschreud...@gmail.com wrote:






ah ok. I set up a test where I added accessibility properties to the sprite. 
Doesn't invoke the keyboard in metro :(

I've also traced out  Accessibility.active onto a textfield in metro and it 
returns false.

Here's the added code:

private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
drawInputTextField(); // successfully invokes Metro soft Keyboard
setTimeout(updateAccessibility, 2000);
}
private function updateAccessibility():void {
console.text += Accessibility.active:  + Accessibility.active+'\n';
if(Accessibility.active) {
Accessibility.updateProperties();
}
}

private function drawSpriteWithEventHandler():void
{
textInputEH = new Sprite();
textInputEH.x  = 100;
textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
g.beginFill(0x22ff00, 1);
g.drawRect(0,0,200,80);
g.endFill();
addChild(textInputEH);
textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function (event:MouseEvent):void
{
console.text += event.currentTarget+'\n';
} );
addEventListener(Event.ADDED, addedHandler);
var accessProps:AccessibilityProperties = new AccessibilityProperties();
accessibilityProperties = accessProps;
}
private function addedHandler(event:Event):void {
console.text += addedHandler:  + name+'\n';
var accessProps:AccessibilityProperties = new AccessibilityProperties();
accessProps.name = 'spriteWithAccessability';
accessProps.description = 'textbox';
textInputEH.accessibilityProperties = accessProps;
removeEventListener(Event.ADDED, addedHandler);
}



On 20 September 2012 23:26, Alex Harui aha...@adobe.com wrote:





I was more interested if you could get the Sprite to display the keyboard by 
adding accessibility properties to it.




On 9/20/12 2:45 AM, Wouter Schreuders wschreud...@gmail.com 
http://wschreud...@gmail.com  wrote:






Hi Alex

Yep, focus definitely does go to the sprite and the stage's focus is set. I 
also outputted all the events that the textinput received (I've excluded some 
overly chatty ones like enterframe) Accessibly is enabled for the project and 
I've added the following to the MXML textInput which seem to no difference:

accessibilityEnabled=true accessibilityName=textbox 
accessibilityDescription=textbox

when I have a universal event listerner I get these events in both 
displayAsPassword enabled and disabled textInputs:

preinitialize
initialize
resize
creationComplete
activate
touchBegin
touchRollOver
touchOver
removed
focusIn
touchMove
removed
touchMove
touchEnd
touchTap
touchOut
touchRollOut
click




On 19 September 2012 19:44, Alex Harui aha...@adobe.com 
http://aha...@adobe.com  wrote:
stage.focus






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-20 Thread Alex Harui
I was more interested if you could get the Sprite to display the keyboard by 
adding accessibility properties to it.


On 9/20/12 2:45 AM, Wouter Schreuders wschreud...@gmail.com wrote:






Hi Alex

Yep, focus definitely does go to the sprite and the stage's focus is set. I 
also outputted all the events that the textinput received (I've excluded some 
overly chatty ones like enterframe) Accessibly is enabled for the project and 
I've added the following to the MXML textInput which seem to no difference:

accessibilityEnabled=true accessibilityName=textbox 
accessibilityDescription=textbox

when I have a universal event listerner I get these events in both 
displayAsPassword enabled and disabled textInputs:

preinitialize
initialize
resize
creationComplete
activate
touchBegin
touchRollOver
touchOver
removed
focusIn
touchMove
removed
touchMove
touchEnd
touchTap
touchOut
touchRollOut
click




On 19 September 2012 19:44, Alex Harui aha...@adobe.com wrote:
stage.focus






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-19 Thread Alex Harui
Are you sure focus went to the sprite?  Make sure stage.focus is set and you 
got FOCUS_IN and not FOCUS_OUT (and can get keyboard events).

It might be that there is a difference in the UIA in the player.  Did you link 
in the Flex accessibility code for the Spark components?


On 9/19/12 1:37 AM, Wouter Schreuders wschreud...@gmail.com wrote:






Hi Alex

I'm using Flex SDK 4.5A (problem also occurs on 4.6)
The flash player is version 11.3.372.94 on windows 8 64 bit and as far as I 
know IE have gone the same route as flash and rolled their own version of the 
flash player inside the browser.

Metro officially supports flash sites that comply with their conditions as set 
out here ( 
http://msdn.microsoft.com/en-us/library/ie/jj193557%28v=vs.85%29.aspx )

Microsoft's official policy on invoking the keyboard is that it must be under 
the control of the user and can not be problematically invoked. The way to 
invoke the keyboard is one of the following from this page ( 
http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx ) :

Accessibility properties from UI Automation (UIA)
User tap
Focus changes

from their docs : UI Automation is the mechanism through which developers 
communicate whether or not a particular UI element can receive text input. You 
must ensure that the appropriate accessibility properties are set in your apps 
so that the touch keyboard will know to appear when focus lands on a specific 
UI element.

Their own windows provided controls do this automatically otherwise inside of 
your html you need to add the following:
div contentEditable=true role=textbox

So  that's how it works in html. I haven't found any documentation of help on 
forums explaining how they decide when to bring up the keyboard in a flash 
situation.

As you suggested I made an AS only site to see what works and what doesn't. a 
normal sprite doesn't invoke the keyboard, neither does a sprite with a mouse 
click listener. A normal textField doesn't invoke the keyboard but a textfield 
with type set to TextFieldType.INPUT does invoke the keyboard (which makes 
sense)

So somehow microsoft (I'm guessing) are inside of flash detecting what kind of 
component recieved focus and if it's a editable textfield then it does bring up 
the keyboard.

The intriguing thing is that for some reason when a spark textInput / 
RichEditableText is set to displayAsPassword = true it DOES bring up the 
keyboard so perhaps somewhere in the framework setting that flag causes the 
component to somehow be perceived as a input component which quite strange to 
me since I can't see why setting that condition would make any difference.

Here's my test code:


package
{
import flash.display.Graphics;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldType;
public class CleanAsProject extends Sprite
{
public function CleanAsProject()
{
stage.scaleMode = StageScaleMode.NO_SCALE; //this stuff is required since I'm 
working in flash builder and if you you don't put it in your graphics scale is 
whack
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
init();
}
private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
drawInputTextField(); // successfully invokes Metro soft Keyboard
}
private function drawTextField():void
{
var textField:TextField = new TextField;
addChild(textField);
textField.x  = 100;
textField.y = 300;
textField.height = 50;
textField.text = 'click me';
}
private function drawInputTextField():void
{
var textField:TextField = new TextField;
addChild(textField);
textField.x  = 100;
textField.y = 350;
textField.height = 50;
textField.text = 'input text into me';
textField.type = TextFieldType.INPUT;
textField.background = true;
}
private function drawSpriteWithEventHandler():void
{
var textInputEH:Sprite = new Sprite();
textInputEH.x  = 100;
textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
g.beginFill(0x44ff00, 1);
g.drawRect(0,0,200,80);
g.endFill();
addChild(textInputEH);
textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function (event:MouseEvent):void
{
trace(event.currentTarget);
} );
}
private function drawSprite():void
{
var textInput:Sprite = new Sprite();
textInput.x  = 100;
textInput.y = 100;
var g:Graphics = textInput.graphics;
g.beginFill(0xff9900, 1);
g.drawRect(0,0,200,80);
g.endFill();
addChild(textInput);
}
}
}


On 19 September 2012 07:59, Alex Harui aha...@adobe.com wrote:





I would break it down to an AS-only test where you set focus to a Sprite and 
see if you get the keyboard.

Which version of player are you using?  Is metro officially supported?




On 9/18/12 1:11 PM, Wouter Schreuders

Re: [flexcoders] urgent Help needed regarding loading time please

2012-09-19 Thread Alex Harui
What error did you get?


On 9/18/12 10:04 PM, anas naeem maverick_0...@yahoo.com wrote:






Hi Guys hope everyone is doing great firstly i am not a native English speaker 
so apologies for any language mistakes any ways,  this is my third post for 
help needed regarding an error in my Flex application and no one had replied 
ever to my first 2 posts either i hope i get some help this time
I am working on a real time flex application related to stock exchange domain 
and i am using LightStreamer's flex api . Its a browser based application.
So the issue i am facing is whenever i launch my application as soon it is 
launched in the browser it gets stuck on sometimes 1% , sometimes 7% and 
sometimes between 20 and 25% for about 27 seconds approximately. I have tried 
to fix it using the Flash Builder profiler but I don't got something 
informative about the cause of the error. I have also switched between RSLs and 
by merging into code from the Flex Build Path but it either not helped me One 
thing more I localized my application recently  and afterwards i am getting 
this error but I removed all my localization code from the project and tested 
it but the problem persisted there as it is... Please I have to deliver a build 
by this Friday evening so I request that please figure me out what am I doing 
wrong and where should be corrected ?

i also Googled the error but the solutions aren't matching for my specific 
problems

Thanks alot in advance.





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-18 Thread Alex Harui
Spark or MX?  If Spark, then maybe they can’t handle non-TextFields getting 
focus?


On 9/17/12 8:33 AM, Wouter Schreuders wschreud...@gmail.com wrote:






Hi All

I'm busy testing our application in the windows 8 store app browser and I've 
noticed that the keyboard automatically appears when you click on a flash text 
input but not when you click on a flex text input. I'm guessing that MS are 
doing some kind of event detection which invokes the onscreen keyboard but that 
they didn't do the same thing for flex text inputs. I've also checked it seems 
that one cannot invoke the keyboard manually with javascript.

Has anyone run into this problem before and found a solution? I've also noticed 
that it DOES bring up the keyboard if you have set displayAsPassword=true for 
some reason.

Has anyone got any idea why this is happening and how I can work around/solve 
it?

Thanks

Wouter






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-18 Thread Alex Harui
I would break it down to an AS-only test where you set focus to a Sprite and 
see if you get the keyboard.

Which version of player are you using?  Is metro officially supported?


On 9/18/12 1:11 PM, Wouter Schreuders wschreud...@gmail.com wrote:






Hi Alex

The problem occurs with the spark RichEditableText therefore also textInput 
(not for MX:textInput). I set up a little test inside of windows 8 metro where 
traced out all the events for both a normal textInput and a textInput with 
displayAsPassword=true and they are firing identical events. The one with 
displayAsPassword=true invokes the keyboard perfectly everytime. I've also 
extended the RichEditableText class and overwritten some of the methods that 
are dependant on the displayAsPassword flag to see if that makes any difference 
but no luck.


On 18 September 2012 21:50, Alex Harui aha...@adobe.com wrote:





Spark or MX?  If Spark, then maybe they can’t handle non-TextFields getting 
focus?




On 9/17/12 8:33 AM, Wouter Schreuders wschreud...@gmail.com 
http://wschreud...@gmail.com  wrote:






Hi All

I'm busy testing our application in the windows 8 store app browser and I've 
noticed that the keyboard automatically appears when you click on a flash text 
input but not when you click on a flex text input. I'm guessing that MS are 
doing some kind of event detection which invokes the onscreen keyboard but that 
they didn't do the same thing for flex text inputs. I've also checked it seems 
that one cannot invoke the keyboard manually with javascript.

Has anyone run into this problem before and found a solution? I've also noticed 
that it DOES bring up the keyboard if you have set displayAsPassword=true for 
some reason.

Has anyone got any idea why this is happening and how I can work around/solve 
it?

Thanks

Wouter






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] need some printing advice

2012-09-11 Thread Alex Harui
Have you sized the printContainer to the printJob’s page size?  Otherwise the 
blank is overrun from each page.


On 9/11/12 11:00 AM, Sells, Fred fred.se...@adventistcare.org wrote:






This code produces blank 2nd and 4th page with 
remainder on third page=
  if(printJob.start()){//start the print job
 printJob.addObject(printcontainer);
 var validNextPage = printDataGrid.validNextPage; 
//use local var to help debug
if (validNextPage) { //worst case scenario two 
pages max
   printDataGrid.nextPage();
printcontainer.validateNow();
printJob.addObject(printcontainer); //get 
blank 2nd page, remaining data on 3rd page
 }
  printJob.send();


replacing printcontainer.validateNow()

with   printDataGrid.validateNow()   produces the same result
removing all calls to .validateNow() produces the same result.
Removing the call to .nextPage()  results in printing the contents of the 1st 
page on the third page with 2nd and 4th pages blank

I’m doing a print to Adobe PDF and if I change the paper size to legal, I get 
the same results just with more white space at the bottom of 1st and 3rd pages.

I switched to Foxit Phantom Printer with same result.

It’s as if there is an invisible footer on the container or datagrid that force 
a blank page?  It’s almost as if there is something in the MXML that is forcing 
a blank 2nd page





From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Friday, September 07, 2012 11:43 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] need some printing advice



Try calling vlidateNow on printContainer instead of printDataGrid


On 9/7/12 11:19 AM, Sells, Fred fred.se...@adventistcare.org wrote:






With the following code, I get a blank 2nd page and the data continues on the 
3rd page.   This code is slightly different from prior example…grasping at 
straws without clear understanding of what I’m doing.

   private function print():void {
   var printJob:FlexPrintJob = new FlexPrintJob();

   if(printJob.start()){//start the print job
   printJob.addObject(printcontainer);
 var validNextPage = printDataGrid.validNextPage; 
//use local var to help debug
   if (validNextPage) { //worst case scenario two pages 
max
  printDataGrid.nextPage();
printDataGrid.validateNow();
   printJob.addObject(printcontainer); //get 
blank 2nd page, remaining data on 3rd page
 //printJob.addObject(printDataGrid); //2nd 
page blank; 3rd page purple header but no data.
}
 printJob.send();
  printDataGrid.dataProvider = Appointments;
}
  }
!—I tried reducing height of VBox and that just caused the page break to 
happen sooner, still had blank 2nd page --


   mx:VBox id=printcontainer  width=100% height=1450  
backgroundAlpha=1.0 backgroundColor=white
  paddingLeft=20 paddingRight=20 paddingTop=50
  borderThickness=20 verticalAlign=top 
horizontalAlign=center
  visible=false  includeInLayout=false
   mx:Label fontSize=24  textAlign=center   fontWeight=bold
  text={picker.selectedItem.nickname} on 
{String(Globals.SelectedDate).substr(0,10)}.  This contains PHI; destroy 
after use!!!
 /

   mx:PrintDataGrid  id=printDataGrid dataProvider={Appointments} 
fontSize=12  
 mx:columns
   mx:DataGridColumn  headerText=Start   
dataField=starttime width=80 textAlign=right/
   mx:DataGridColumn  headerText=Until   
dataField=endtime width=80 textAlign=right/
   . . .
   mx:DataGridColumn headerText=Location   
dataField=location   textAlign=center/
   mx:DataGridColumn headerText=Notes   
dataField=notes  width=400   textAlign=left/
 /mx:columns
   /mx:PrintDataGrid
 /mx:VBox


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Thursday, September 06, 2012 11:50 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] need some printing advice



What result do you get?  No second page or second page is same as first?  If 
the latter, try calling validateNow() after nextPage()







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http

Re: [flexcoders] need some printing advice

2012-09-07 Thread Alex Harui
Try calling vlidateNow on printContainer instead of printDataGrid


On 9/7/12 11:19 AM, Sells, Fred fred.se...@adventistcare.org wrote:






With the following code, I get a blank 2nd page and the data continues on the 
3rd page.   This code is slightly different from prior example…grasping at 
straws without clear understanding of what I’m doing.

private function print():void {
   var printJob:FlexPrintJob = new FlexPrintJob();

   if(printJob.start()){//start the print job
printJob.addObject(printcontainer);
 var validNextPage = printDataGrid.validNextPage; 
//use local var to help debug
if (validNextPage) { //worst case scenario two 
pages max
   printDataGrid.nextPage();
printDataGrid.validateNow();
   printJob.addObject(printcontainer); //get 
blank 2nd page, remaining data on 3rd page
  //printJob.addObject(printDataGrid); //2nd 
page blank; 3rd page purple header but no data.
 }
 printJob.send();
  printDataGrid.dataProvider = Appointments;
}
  }
!—I tried reducing height of VBox and that just caused the page break to 
happen sooner, still had blank 2nd page --


mx:VBox id=printcontainer  width=100% height=1450  
backgroundAlpha=1.0 backgroundColor=white
  paddingLeft=20 paddingRight=20 paddingTop=50
  borderThickness=20 verticalAlign=top 
horizontalAlign=center
  visible=false  includeInLayout=false
   mx:Label fontSize=24  textAlign=center   fontWeight=bold
  text={picker.selectedItem.nickname} on 
{String(Globals.SelectedDate).substr(0,10)}.  This contains PHI; destroy 
after use!!!
 /

   mx:PrintDataGrid  id=printDataGrid dataProvider={Appointments} 
fontSize=12  
 mx:columns
   mx:DataGridColumn  headerText=Start   
dataField=starttime width=80 textAlign=right/
   mx:DataGridColumn  headerText=Until   
dataField=endtime width=80 textAlign=right/
   . . .
   mx:DataGridColumn headerText=Location   
dataField=location   textAlign=center/
   mx:DataGridColumn headerText=Notes   
dataField=notes  width=400   textAlign=left/
 /mx:columns
   /mx:PrintDataGrid
 /mx:VBox


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Thursday, September 06, 2012 11:50 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] need some printing advice



What result do you get?  No second page or second page is same as first?  If 
the latter, try calling validateNow() after nextPage()







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] need some printing advice

2012-09-06 Thread Alex Harui
What result do you get?  No second page or second page is same as first?  If 
the latter, try calling validateNow() after nextPage()


On 9/5/12 12:21 PM, Sells, Fred fred.se...@adventistcare.org wrote:






I’m using the printdatagrid control and can print one page just fine, but 
cannot get the second page to print.  The code below is a bit hacked from 
trying to apply Adobe’s examples, which I cannot translate to my problem.  Any 
help would be appreciated…

private function print():void {
   var printJob:FlexPrintJob = new FlexPrintJob();

   //start the print job
  if(printJob.start())  {
 printJob.addObject(printcontainer);
 //printJob.addObject(printDataGrid);
 printDataGrid.nextPage();
  printJob.addObject(printDataGrid);
 while(printDataGrid.validNextPage) 
 {

printDataGrid.nextPage();
   printJob.addObject(printDataGrid);
  }
 printJob.send();
  printDataGrid.dataProvider = Appointments; 
//needed to reset for next time.
}
  }


 mx:VBox id=printcontainer  width=100% height=1450  
backgroundAlpha=1.0 backgroundColor=white
  paddingLeft=20 paddingRight=20 paddingTop=50
  borderThickness=20 verticalAlign=top 
horizontalAlign=center
  visible=false  includeInLayout=false
   mx:Label id=PageHeader fontSize=24  textAlign=center   
fontWeight=bold
  text={picker.selectedItem.nickname} on 
{String(Globals.SelectedDate).substr(0,10)}.
  /

   mx:PrintDataGrid  id=printDataGrid dataProvider={Appointments} 
fontSize=12  
 mx:columns
   mx:DataGridColumn  headerText=Start   
dataField=starttime width=80 textAlign=right/
…






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] How To Run An Application With 2 Flex Versions?

2012-08-31 Thread Alex Harui
See my blog post on Marshall Plan and documentation about MarshallingSupport.

It is possible to host an older-versioned component in its own SWF and load it 
into a newer-versioned app, but there are tradeoffs.


On 8/31/12 8:51 AM, Nhi Le nhi...@gmail.com wrote:






Hi,

We have an component developed in Flex 3 that we would like to reuse in an 
application that is using Flex 4.  Is it possible to incorporate the two 
together?  If so, please shed some insight.

Thanks,
nhi





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Need Help - Loader changes the pixel value after loading as bitmap

2012-08-28 Thread Alex Harui
);
//}
  }
]]
  /fx:Script

  s:Button id=loadBtn_ID label=Load! click=loadBtn_ClickHandler()
   nb! sp;x=5 y=5 height=20/
  mx:UIComponent id=container_ID x=5 y=30 width=1366 
height=768/
/s:WindowedApplication



Regards,
Rajkumar S





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] RE: Flash Builder Problem

2012-08-22 Thread Alex Harui
Adobe has a Flash Builder forum.  Try asking there.


On 8/22/12 7:27 AM, Davidson, Jerry jerry.david...@illinois.gov wrote:






My complaint was it taking 3-4 hours to even see a post.  Of course, I’m VERY 
appreciative of any help I get.  I moderate other forums and am aware of the 
“reviewing” process for new posters.

I’m currently dead in the water with Flash Builder and my boss just asked me 
about when the project will be done.  I filed a support request with Adobe, but 
they are not the fastest to respond.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Dimitrios Gianninas
Sent: Wednesday, August 22, 2012 9:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RE: Flash Builder Problem



Hi Jerry,

Your messages will now auto-post with no moderation. But also remember that ppl 
on this group responded when they can, not when you expect them too :)

Hope that helps!

Jimmy
Flexcoders Moderator

On Wed, Aug 22, 2012 at 10:11 AM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:



We’re at the mercy of Yahoo and how their server choose to batch send e-mails.


Jason Merrill
Instructional Technology Architect II
Bank of America  Global Learning





___


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Davidson, Jerry
Sent: Wednesday, August 22, 2012 8:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RE: Flash Builder Problem



Any way to speed up the posts?  Sending it at 1:55 to have it show up at 4:37 
guarantees prompt answers are impossible.  It’s like sending a letter to get 
tech support or answers.

Posted 7:48AM 8/22


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Davidson, Jerry
Sent: Tuesday, August 21, 2012 1:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flash Builder Problem



Flash Builder is no longer working correctly.  If you chose a different 
perspective, you have to leave the program and change it on reentry.

I don’t know if the newest version of java is related to it, but the problems 
seemed to happen after those were installed.

We have both Flash Builder and the RAD component, but I’m using FB the most.

4.0.1 build 277662.

Help.

Posted 1:55 CDT 8/21.



This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law.
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses.

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
Government Agency. Attachments that are part of this EC may have additional 
important disclosures and disclaimers, which you should read. This message is 
subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.



--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Tree Custom ItemRenderer - I need help

2012-08-16 Thread Alex Harui
Looks like you want a 15 pixel gap (you are adding 15 in updateDisplayList) but 
that is not accounted for in the measure() method.


On 8/15/12 4:18 PM, libbychantel libbychan...@yahoo.com wrote:






Here's the renderer code and the app file. I used someone else's code to build 
the data. I will email the entire project in a zip file to flexcoders. the name 
of the file is TwoLines.zip The problem is, when I add the second line (in 
CreateChildren()), the label is pushed up away from the icon. I am sure I am 
doing something stupid. I have included a screen print of the output in the src 
directory of the .zip file.

Thanks,
Libby

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 

mx:Script
![CDATA[
private const treeData:Array = new Array( CompositeTreeDataBuilder.create(), 
CompositeTreeDataBuilder.create() );
]]
/mx:Script

mx:Label text=Selected: {tree.selectedItem.name} /
mx:Tree id=tree
itemRenderer=TwoLineTreeItemRenderer
dataProvider={treeData} labelField=name height=100% width=100% /
/mx:Application

package {
import mx.controls.CheckBox;
import mx.controls.TextInput;
import mx.controls.treeClasses.TreeItemRenderer;
import mx.controls.treeClasses.TreeListData;

public class TwoLineTreeItemRenderer extends TreeItemRenderer {
private var _labelLineCheckBox:CheckBox;
private var _secondLineLabel:TextInput;

public function TwoLineTreeItemRenderer()
{
super();
mouseEnabled = false;
}

private var ckLabel:String = CB;

 override public function set data(value:Object):void
{
if(value != null) {
super.data = value;
 }
 }

override protected function createChildren():void  {
 super.createChildren();

createFirstLineCheckBox();
createSecondLineLabel(0,_labelLineCheckBox.y);
 }

 override protected function 
updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {

 super.updateDisplayList(unscaledWidth, unscaledHeight);

 if(super.data) {
 if(TreeListData(super.listData).hasChildren) {
_labelLineCheckBox.visible = false; // there is a CB on every branch. don't 
show the ones not on leaves
_secondLineLabel.visible   = false; // there is a textInput on every branch. 
don't show the ones not on leaves
}
 }

 }
override protected function measure():void {
super.measure();

measuredHeight = measuredMinHeight = measuredHeight +
_labelLineCheckBox.getExplicitOrMeasuredHeight() + getSecondLineLabelHeight();
}

private function createFirstLineCheckBox():void {
_labelLineCheckBox = new CheckBox();
_labelLineCheckBox.label = ckLabel;
_labelLineCheckBox.x = 350;
_labelLineCheckBox.width = 100;
_labelLineCheckBox.height = 18;
addChild(_labelLineCheckBox);

}

private function createSecondLineLabel(x:int,y:int):void {
_secondLineLabel = new TextInput();
_secondLineLabel.text = Second Line Label;
_secondLineLabel.x = 100;
_secondLineLabel.y = _labelLineCheckBox.y + 
_labelLineCheckBox.getExplicitOrMeasuredHeight() + 15;//label.y + label.height 
+ 5;
_secondLineLabel.width = 100;
_secondLineLabel.height = 20;
_secondLineLabel.editable = false;
addChild(_secondLineLabel);
}

private function getSecondLineLabelHeight():int {
if(_secondLineLabel) return _secondLineLabel.getExplicitOrMeasuredHeight();
return 0;
}

}
}

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui aharui@... wrote:

 Post your code.


 On 8/15/12 7:10 AM, libbychantel libbychantel@... wrote:






 Flex 3.x

 I have been trying to construct a Tree Custom ItemRenderer that has basically 
 2 lines on the terminal branches. the first line should show the file icon 
 and the label, and the second line right below the first line should show 
 another label. It seems simple, yet when I try to do this the top label winds 
 up being pushed above the file icon, so there is something I am missing here.

 Does anyone know how to do this or better yet can provide me an example that 
 explains how to do it?

 Thanks,
 Libby






 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui







--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Re: Tree Custom ItemRenderer - I need help

2012-08-16 Thread Alex Harui
I think there is probably code in the default TreeItemRenderer that centers the 
folder or branch icon.  I think you can add code in your updateDisplayList 
override to reposition the icon


On 8/16/12 8:10 AM, libbychantel libbychan...@yahoo.com wrote:






the issue I am not understanding here is, when I add the second line label, 
this causes all labels including the root label, to be pushed up so that they 
do not align with their icon. there is something I am not understanding as to 
how this works. I add the checkbox to the leaf branch at y=0 and that works ok 
- it (checkbox) aligns with the label and icon for the leaf. Then I add the 
second line at checkbox.y + checkbox.height + 15px line spacing. Now all the 
labels are pushed up above their icons, about the height of the new label I 
added. what am I missing here that is causing the labels to no longer be 
aligned with their icons?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui aharui@... wrote:

 Looks like you want a 15 pixel gap (you are adding 15 in updateDisplayList) 
 but that is not accounted for in the measure() method.


 On 8/15/12 4:18 PM, libbychantel libbychantel@... wrote:






 Here's the renderer code and the app file. I used someone else's code to 
 build the data. I will email the entire project in a zip file to flexcoders. 
 the name of the file is TwoLines.zip The problem is, when I add the second 
 line (in CreateChildren()), the label is pushed up away from the icon. I am 
 sure I am doing something stupid. I have included a screen print of the 
 output in the src directory of the .zip file.

 Thanks,
 Libby

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 

 mx:Script
 ![CDATA[
 private const treeData:Array = new Array( CompositeTreeDataBuilder.create(), 
 CompositeTreeDataBuilder.create() );
 ]]
 /mx:Script

 mx:Label text=Selected: {tree.selectedItem.name} /
 mx:Tree id=tree
 itemRenderer=TwoLineTreeItemRenderer
 dataProvider={treeData} labelField=name height=100% width=100% /
 /mx:Application

 package {
 import mx.controls.CheckBox;
 import mx.controls.TextInput;
 import mx.controls.treeClasses.TreeItemRenderer;
 import mx.controls.treeClasses.TreeListData;

 public class TwoLineTreeItemRenderer extends TreeItemRenderer {
 private var _labelLineCheckBox:CheckBox;
 private var _secondLineLabel:TextInput;

 public function TwoLineTreeItemRenderer()
 {
 super();
 mouseEnabled = false;
 }

 private var ckLabel:String = CB;

  override public function set data(value:Object):void
 {
 if(value != null) {
 super.data = value;
  }
  }

 override protected function createChildren():void  {
  super.createChildren();

 createFirstLineCheckBox();
 createSecondLineLabel(0,_labelLineCheckBox.y);
  }

  override protected function 
 updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {

  super.updateDisplayList(unscaledWidth, unscaledHeight);

  if(super.data) {
  if(TreeListData(super.listData).hasChildren) {
 _labelLineCheckBox.visible = false; // there is a CB on every branch. don't 
 show the ones not on leaves
 _secondLineLabel.visible   = false; // there is a textInput on every branch. 
 don't show the ones not on leaves
 }
  }

  }
 override protected function measure():void {
 super.measure();

 measuredHeight = measuredMinHeight = measuredHeight +
 _labelLineCheckBox.getExplicitOrMeasuredHeight() + getSecondLineLabelHeight();
 }

 private function createFirstLineCheckBox():void {
 _labelLineCheckBox = new CheckBox();
 _labelLineCheckBox.label = ckLabel;
 _labelLineCheckBox.x = 350;
 _labelLineCheckBox.width = 100;
 _labelLineCheckBox.height = 18;
 addChild(_labelLineCheckBox);

 }

 private function createSecondLineLabel(x:int,y:int):void {
 _secondLineLabel = new TextInput();
 _secondLineLabel.text = Second Line Label;
 _secondLineLabel.x = 100;
 _secondLineLabel.y = _labelLineCheckBox.y + 
 _labelLineCheckBox.getExplicitOrMeasuredHeight() + 15;//label.y + 
 label.height + 5;
 _secondLineLabel.width = 100;
 _secondLineLabel.height = 20;
 _secondLineLabel.editable = false;
 addChild(_secondLineLabel);
 }

 private function getSecondLineLabelHeight():int {
 if(_secondLineLabel) return _secondLineLabel.getExplicitOrMeasuredHeight();
 return 0;
 }

 }
 }

 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
 
  Post your code.
 
 
  On 8/15/12 7:10 AM, libbychantel libbychantel@ wrote:
 
 
 
 
 
 
  Flex 3.x
 
  I have been trying to construct a Tree Custom ItemRenderer that has 
  basically 2 lines on the terminal branches. the first line should show the 
  file icon and the label, and the second line right below the first line 
  should show another label. It seems simple, yet when I try to do this the 
  top label winds up being pushed above the file icon, so there is something 
  I am missing here.
 
  Does

  1   2   3   4   5   6   7   8   9   10   >