[flexcoders] Flex Upload/Download using XML-RPC

2010-04-20 Thread Manu Dhanda

Can someone please shed some light like how we can upload/download files
using XML-RPC in Flex?

Had anyone tried it?

Thanks.
-- 
View this message in context: 
http://old.nabble.com/Flex-Upload-Download-using-XML-RPC-tp28287819p28287819.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Re: Find tree node in groupingcollection?

2010-04-20 Thread Nick Middleweek
Thanks Amy... Reading the docs a bit closer, that does make sense...

GroupingCollection inherits from HierarchicalData which implements
IHierarchicalData and the source of HierarchicalCollectionView is of type
IHierarchicalData.

Great stuff, thanks again!


Nick




On 19 April 2010 16:00, Amy amyblankens...@bellsouth.net wrote:



 HierarchicalCollectionView has methods for getting the parent node. Just
 cast your GroupingCollection to HierarchicalCollectionView.
 http://flexdiary.blogspot.com/search/label/AdvancedDataGrid

 HTH;

 Amy





Re: [flexcoders] Re: GroupingCollection.getParent() doesn't exist?

2010-04-20 Thread Nick Middleweek
ok - thanks Amy! :)

So if were to extend GroupingCollection and create MyGroupingCollection, I
could then have a public function on MyGroupingCollection that in turn calls
the getParent() protected function of GroupingCollection.


Cheers,
Nick



On 19 April 2010 16:09, Amy amyblankens...@bellsouth.net wrote:



 Check a reference on Actionscript 3 for the definition of protected.

 HTH;

 Amy


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick
 Middleweek n...@... wrote:
 
  Hi,
 
  Does anyone know why the getParent() command listed in the docs doesn't
 seem
  to exist?
 
 
 http://livedocs.adobe.com/flex/3/langref/mx/collections/GroupingCollection.html#getParent%28%29
 
  I've trying to use it like this...
 
  refreshParent = GroupingCollection(model.groupingCollection).getParent();
 
 
  Thanks,
  Nick
 

  



[flexcoders] Draw three rectangles inside a canvas -----URGENT PLEASE

2010-04-20 Thread Nini7016 Nini7016

Hello

I
have a canvas and I would like to add  within this canvas three rectangles
superimposed and just between two rectangles there will be space.

I used the panel and I put in rectangles but this was not the case.

you have any ideas please

Any help

do you think i must use any other component flex apart Panel ??


Thank you very much 
  
_
Découvrez comment SURFER DISCRETEMENT sur un site de rencontres !
http://clk.atdmt.com/FRM/go/206608211/direct/01/

Re: [flexcoders] Flex Upload/Download using XML-RPC

2010-04-20 Thread Oleg Sivokon
Why would you want to use XML for that? XML imposes quite a lot of
restrictions on the content, such as for example, it may not contain certain
bytes or byte sequences, whilst these restrictions may not necessarily apply
to the files you want to transfer. Generally there are three ways of sending
files from flash: using FileReference (or FileReferenceList), using
NetConnection or using Socket. The choice depends on what in particular you
are trying to achieve.
Filereference resembles the API you have in HTML with few differences
regarding what headers you may send and having an option to monitor the
upload process.
NetConnection may send even fewer headers, on the other hand it may allow
you for somewhat better control of the data transfer (you may send it in
chunks and backup parts of it if needed).
Socket would allow you to implement other transfer protocol based on TCP,
such as FTP for example.

Best.

Oleg


[flexcoders] What is the best Way - Multiple DataProvider's or one?

2010-04-20 Thread James
In my app I have a tilelist with an array collection as it's dp which is 
populated via remote xml from a mysql database. When a user clicks a certain 
category button in my app it sends a request to the server to tell it which 
category items the user wants to see which in turn changes the array collection 
that populates the tilelist so it shows items within that category. The thing 
is though this seems to be a bit unreliable as it means the user has to wait 
for a while for the dataprovider to change so sometimes they click to the next 
category and the items from the previous category are still shown in the 
tilelist.

Is it better practice to have multiple dataproviders initialsed at startup 
which the user can switch between as they click each category rather than 
modifying the same dataprovider? Basically I'm just wondering what way would 
you guys do it? I thought using just one dataprovider would slim down the code 
and make the app faster and more reliable but now I'm not sure.



[flexcoders] Trouble with Spark TextArea and HTML formatting

2010-04-20 Thread Wally Kolcz
I know the new TextLayoutFramework will take a little time to get used 
to and losing htmlText kinda sucks, but how can I pass html elements to 
a textarea and get them to render correctly? In this case, I control the 
elements b, i, font being pushed to the textarea.


I have a textarea (ta) that I want to push html elements to. I googled 
around and found the TextFlowUtil and saw examples of people using it. 
However when I attempt it I get 'Error: Unknown element font'.


Here is my text 'creator' (in one function):
/mess = font color='# + textColor + ' + 
UserDataModel.getInstance().person.getString('nickname')+  says:  + 
mss + /font;

/
Here is how I am attempting to get it into the textarea (ta) (in a 
different function):

/ta.textFlow = TextFlowUtil.importFromString(e.getMessage() + \n);/

Basically the 'mess' gets put into a message, sent to the server, 
returned to a different function and the textArea gets updated.


I also have the same problem with b where the error is something like 
'Unknown Element b'. Thanks!


[flexcoders] OLAPDataGrid - formatting

2010-04-20 Thread rojoe615
Looking for a way to format data in the OLAPDataGrid.  Sometimes my value are $ 
and other times it is %.  I have a column in the dataProvider that specifies 
these units and would like to format the numbers based on the specified unit.

I would guess a custom itemRenderer but not real familiar with how to do that.  
Can anyone point me to an example?

Thanks,
JB





[flexcoders] Re: ColumnChart label issues inside Module

2010-04-20 Thread BillF
Thanks, but didn't really help.

I did find the solution, though.

It appears that there is a bug that swf modules that are loaded cannot display 
text using embedded fonts unless you include a reference to the control that 
uses it in the module's parent application.
!-- code in parent ---
mx:Script
![CDATA[
import mx.charts.ColumnChart;
private var columnChartRef:ColumnChart;
]]
/mx:Script
mx:Style
@font-face{
src: url(arial.ttf);
fontFamily: Arial;
}

ColumnChart {
fontFamily: Arial;
fontSize: 10;
}
/mx:Style
!-- /code in parent ---
!-- code in module ---

mx:ColumnChart id=myChart dataProvider={weeks} 
showDataTips=true width=5000 itemClick=myHandler(event);
mx:horizontalAxis
mx:CategoryAxis  
dataProvider={weeks} 
categoryField=Timeline
id=a1
/
/mx:horizontalAxis
mx:horizontalAxisRenderers
mx:AxisRenderer labelRotation=45 
axis={a1}/
/mx:horizontalAxisRenderers
mx:series
mx:ColumnSeries 
columnWidthRatio=.9
xField=Timeline 
yField=Count 
displayName=Count

mx:fill
mx:SolidColor 
color=0x336699/
/mx:fill
/mx:ColumnSeries
/mx:series
/mx:ColumnChart


!-- /code in module ---



--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 You may need to use contextualclassfactory.  See the most recent post on my 
 blog
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
 
 On 4/19/10 7:03 AM, BillF bill.frank...@... wrote:
 
 
 
 
 
 
 During troubleshooting, I noticed that the labels will appear if I use a 
 ModuleLoader on a MXML page, instead of using the ModuleManager via 
 ActionScript...however, the embedded fonts (that rotate the label text 45 
 degrees for the x-axis) no longer rotate the text...I am not sure if that is 
 because the font is embedded in the module and not the application...
 
 However, I don't think the ModuleLoader is the solution, as this application 
 needs to be more dynamic in nature.
 
 Thoughts?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
 BillF bill.franklin@ wrote:
 
  Hello, I am having a weird issue when trying to display a chart inside a 
  Module.  The horizontal and vertical axis labels do not show up.  However, 
  the exact same chart, when displayed inside a standalone Application, 
  displays the labels correctly.
 
  Has anyone run into this?  Can anyone point me in the right direction?
 
  Thanks!
 





RE: [flexcoders] Draw three rectangles inside a canvas -----URGENT PLEASE

2010-04-20 Thread Chet Haase

I can't tell what you're trying to do, but this code works:

s:Panel width=400 height=300
s:Rect width=100 height=100
s:fill
s:SolidColor color=red/
/s:fill
/s:Rect
s:Rect x=200 width=100 height=100
s:fill
s:SolidColor color=blue/
/s:fill
/s:Rect
/s:Panel

I can't tell if you are trying to use a Canvas or a Panel, since you mention 
both. Note that Canvas does not spark equivalent, and you can't add Rect 
objects directly to a halo container. But toss a Group in there and you can add 
anything to the group.

Chet.


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Nini7016 Nini7016
Sent: Tuesday, April 20, 2010 4:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Draw three rectangles inside a canvas -URGENT PLEASE



Hello

I have a canvas and I would like to add  within this canvas three rectangles 
superimposed and just between two rectangles there will be space.

I used the panel and I put in rectangles but this was not the case.

you have any ideas please

Any help

do you think i must use any other component flex apart Panel ??


Thank you very much



Envie de naviguer sur Internet sans laisser de trace? La solution avec Internet 
Explorer 8http://clk.atdmt.com/FRM/go/207186970/direct/01/



[flexcoders] Simple Sound Player

2010-04-20 Thread simcola
Hi

I have several podcasts in wma (I could change to mp3 if needed) and I need a 
simple player that will list all the podcasts and then have a play, pause, fwd, 
rwnd, stop and download button.  Does anyone know of anything like this that I 
can use in flex.. 

thanks




[flexcoders] Problem with RichTextEdit

2010-04-20 Thread simcola
Hi

Im trying to display Rich Text (Bolds and Underlines) on a web site but I dont 
want the user to be able to edit the text.

The RichTextEditor doesnt seem to have any readonly property... any ideas?

thanks



[flexcoders] Help Loading Content From Website

2010-04-20 Thread DTAngram
I need to upload text and images from thefreedictionary.com Website into my 
Flex 3 project and it must update daily. The RSS that thefreedictionary.com 
provides contains javascript and html. I am very new to Flex and I want to know 
how to upload this content into my Flex project without using AIR. I have no 
clue where to begin.



[flexcoders] Stacked ColumnChart data and columns

2010-04-20 Thread BillF
Hello FCs...

I have a dataset, that is similar to this..

Month=Apr Category=Apples Quantity=25
Month=Apr Category=Oranges Quantity=30
Month=Apr Category=Grapes Quantity=10
Month=Apr Category=Cherrys Quantity=5
Month=May Category=Apples Quantity=37
Month=May Category=Oranges Quantity=17
Month=May Category=Grapes Quantity=23
Month=Jun Category=Apples Quantity=5
Month=Jun Category=Cherrys Quantity=17


I need the stacked columnchart to show the quantities of the categories stacked 
up for each month.

Suggestions?




[flexcoders] online flex compiler

2010-04-20 Thread srini_stellarip
Hello guys,

check this cool site to practise flex online...it has examples and IDE...
http://www.flexatschool.com

thanks



RE: [flexcoders] Draw three rectangles inside a canvas -----URGENT PLEASE

2010-04-20 Thread Nini7016 Nini7016

Thank you very much Chet. :) :)


To: flexcoders@yahoogroups.com
From: cha...@adobe.com
Date: Tue, 20 Apr 2010 07:18:25 -0700
Subject: RE: [flexcoders] Draw three rectangles inside a canvas -URGENT 
PLEASE


















 



  



  
  
  








 

I can’t tell what you’re trying to do, but this code works:

 

s:Panel width=400
height=300

s:Rect width=100
height=100

s:fill

s:SolidColor color=red/

/s:fill

/s:Rect

s:Rect x=200
width=100 height=100

s:fill

s:SolidColor color=blue/

/s:fill

/s:Rect

/s:Panel

 

I can’t tell if you are trying to use a Canvas or a Panel, since
you mention both. Note that Canvas does not spark equivalent, and you can’t add
Rect objects directly to a halo container. But toss a Group in there and you
can add anything to the group.

 

Chet.

 

 





From:
flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of 
Nini7016
Nini7016

Sent: Tuesday, April 20, 2010 4:19 AM

To: flexcoders@yahoogroups.com

Subject: [flexcoders] Draw three rectangles inside a canvas -URGENT
PLEASE





 

  







Hello



I have a canvas and I would like to add  within this
canvas three rectangles superimposed and just between two rectangles there will
be space.



I used the panel and I put in rectangles but this was not
the case.



you have any ideas please



Any help



do you think i must use any other component flex apart
Panel ??





Thank you very much 












Envie de naviguer sur Internet sans laisser de trace? La
solution avec Internet Explorer 8 


















 









  
_
Hotmail arrive sur votre téléphone ! Compatible Iphone, Windows Phone, 
Blackberry, …
http://www.messengersurvotremobile.com/?d=Hotmail

Re: [flexcoders] Re: security flex

2010-04-20 Thread Jimmy G
You can load the Flex app from an HTTPS site right off the bat, that what
you would have to do if that app is processing payments, that only makes
sense, so the communication will be encrypted.  If you load the Flex app via
HTTP, then yes, that is the wrong way to do it, like  I said a developer can
make a mistake :)

On Mon, Apr 19, 2010 at 7:30 PM, garykim...@rocketmail.com 
garykim...@rocketmail.com wrote:



 I agree w/ you on the loading of sensitive data. I believe your wrong w/
 regards to your point on entering sensitive data. A quick check of some of
 the large and medium-size e-commerce sites written in html, php, etc. will
 redirect you to the https site BEFORE you enter the credit card data.
 Perhaps you didn't understand Miti's article: He specifically uses a popup
 window to deal w/ the payments system since he believes that flex isn't
 secure enough for a user to enter in credit card info. Otherwise, he would
 have just used a credit card form w/in flex that gets passed to the Amazon
 API on the backend.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jimmy G
 angelone197...@... wrote:
 
  Ok, after reading the devnet article that you read, let me explain.
 
  ENTERING SENSITIVE DATA
 
  When you enter a card number in a HTML web site, the user will enter the
  clear text credit number and then hit the submit button. The data will
 then
  be encrypted and send to your secure server (via HTTPS).
 
  When you enter a card number in a Flex app, the user will enter the clear
  text credit number and then hit the submit button. The data will then be
  sent to the server in a binary format and encrypted.
 
  So basically same as situation with both technologies. And yes we do this
 at
  my company :)
 
  LOADING SENSITIVE DATA
 
  The loading is where you have to be careful. Say in a Flex app you load
 the
  user's full payment information to display it. DON'T return the full card
  number to your Flex app! Even thought you might just display the last
 four
  digits of the card number, the full card is in memory somewhere. So a
  potential evil user could use a memory sniffer to find and extract the
 full
  card number. But then again you can make this same mistake with
 traditional
  HTML/JS web site by loading full card details using an AJAX call and
 holding
  the full card number in memory, bad!
 
  So basically is Flex less secure? No. Can a developer code it up to make
 it
  less secure? Yes.
 
  Let me know if you have anymore questions.
 
  On Sun, Apr 18, 2010 at 9:19 PM, garykim...@... 
  garykim...@... wrote:
 
  
  
   the link has everything to do with my question. He gives an example of
 a
   shopping cart/payment system setup in Flex. This raises my question of
   whether or not flash is secure enough to operate his phone store in
 real
   life.
  
   More specifically, user enters information into flash app, which then
 sends
   it somewhere to get processed (presumably some HTTPS address). The
 period of
   time where flash is transfering info to the HTTPS address is not
 secure, as
   described here:
   http://www.adobe.com/devnet/flex/articles/flex_amazon_02.html
  
   Specifically, Miti (a Flex Evangelist, so we should take his word for
 it,
   right?) says:
  
   hardcoding sensitive information into a Flex application is a highly
   insecure practice.
  
   So, is it possible that Pandora's (100% Flex) payments system is
 secure?
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com, Jimmy G

   angelone197555@ wrote:
   
What gave you the impression that UI built in Flex less secure than
 one
built in HTML? In both cases the end-user can input sensitive data
 like
credit card information and then it is up to you to setup proper
   security.
Like making sure that the client to server communication is done
 using
   SSL
(meaning HTTPS). If you dont do this in either case, then anyone can
   capture
the data that is being transmitted.
   
You need to provide more information so we can help you.
   
Also the link you provide below doesn't have anything to do with you
question.
   
Jimmy
   
On Sun, Apr 18, 2010 at 12:01 PM, garykimble@ 
garykimble@ wrote:
   


 I was under the impression that flex is not a secure UI and that
 credit
 card information and other sensitive information should not be
 passed
 through flash/flex.

 When I upgraded my account with Pandora, I noticed the payments
 system
 interface was flash. Also, there is the flex store that Conraets
 talks
   about
 at

  
 http://coenraets.org/blog/2010/02/flexstore-revisited-building-an-animated-spark-layout/

 So, are these methods not secure, then?



   
   
   
--
Jimmy G
Development Team Lead
   
  
  
  
 
 
 
  --
  Jimmy G
  Development Team Lead
 

  




-- 
Jimmy G
Development Team Lead


[flexcoders] Flex 4: How to make draggable and resizable modules?

2010-04-20 Thread astronaute75
Hello,

I would like to make an application using Flex modules (mx.modules.Module), the 
requirement is that those modules have to be draggable and resizable inside the 
main application shell.

What is the best practice to make this kind of applications in Flex 4?

Thank you in advance for your help,
Adnan




Re: [flexcoders] Is MATE framework appropriate for my project?

2010-04-20 Thread Wally Kolcz
I use Mate on all my projects. I use a lot of injectors to push my data 
to my views by binding them to the manager Class. What is the issue you 
are having? If you are reusing the same element on 2 views, you'd need 
to either put the data binding (ArrayCollection, Object, etc) on the 
component with your menu or push the data to both views to have the menu 
use it as a datasource.


I particularly like Mate for 2 main reasons. Lower learning curve and 
you don't put any of the framework into your views or models. All is 
managed by custom events and the map. So, if at any time in the future, 
you want to pop it out of the application, its minimal work (just have 
to write connectors for the events).


On 4/19/2010 1:55 PM, md_ars wrote:


Hello,

We are planning to use MATE framework for our project. We will have 
two separate applications our main transaction application will have 
probably over 150 screens and 100 reports. The application is mostly 
data driven and we are using web-services to display and enter the 
data. I tested the MATE frame work with one screen and it was easy to 
implement. Now I am trying with one MENU and two screens and it is 
getting complicated to use shared classes etc. Is the MATE framework 
good for our application? If yes what is the best way to implement 
MATE? With two screens I am already finding tricky to use Injectors. 
The main code structure of my project looks like as given below.


Main -- Contains Application module
view
Forms -- Contains screens based on panels/vbox or mdi window
Events - Contains main event map and following folders
Session -- Events triggered from the screens.
EventManager -- Parsing the data after session events fetched data 
through web service.

ControlClass -- Common classes used for screens etc.

Should I use a common structure of the whole application or should it 
a separate for each screen? To me it will be too messy to have common 
structure whereas too tedious for each screen. So far team size is 2 
and may extend to 3. Please suggest an optimum way.


Thanks
Ars


Reply to sender 
mailto:mdar...@gmail.com?subject=is%20mate%20framework%20appropriate%20for%20my%20project? 
| Reply to group 
mailto:flexcod...@yahoogroups.com?subject=is%20mate%20framework%20appropriate%20for%20my%20project? 
| Reply via web post 
http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJzZDQwbHBpBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNTQ4MDQEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMjcxNjk5ODky?act=replymessageNum=154804 
| Start a New Topic 
http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJmbG8wbHBiBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzEyNzE2OTk4OTI- 

Messages in this topic 
http://groups.yahoo.com/group/flexcoders/message/154804;_ylc=X3oDMTM5NHZoc3ZnBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNTQ4MDQEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMjcxNjk5ODkyBHRwY0lkAzE1NDgwNA-- 
(1)

Recent Activity:

* New Members
  
http://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnajBkc2d2BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxMjcxNjk5ODky?o=6
  29

Visit Your Group 
http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmdGRkcjkxBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzEyNzE2OTk4OTI- 


--
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.com



[flexcoders] open source load testing tool for flex 4

2010-04-20 Thread sanjitcs
Hi everybody,

I need to do load testing of flex 4 application. I need to send 100 concurrent 
user login to application with different user name at same time. Plz suggest 
any load testing tool through which i can perform load testing. In application 
we are using RTMPS protocol to communicate with server.

Please provide me suggestion because i am not be able to find out any testing 
tool which can do login to application for multiple user at same time. 

 
   




[flexcoders] Using Flash Player 10 in Full Screen mode, check this out!

2010-04-20 Thread Nick Collins
http://blog.nc-design.net/post.cfm/flash-player-10-hardware-acceleration-fail

The gist is that in certain circumstances, the Flash Player has problems
with its full screen mode.


[flexcoders] Flashplayer 10.1 RC2

2010-04-20 Thread Patrick
Any body have this issue on a mac (seems to only happen when running flex, drag 
your browser to the right monitor, the flashplayer stops, hangs, and white 
boxes appear on the flashplayer.





Re: [flexcoders] online flex compiler

2010-04-20 Thread Kerry Thompson
srini_stellarip wrote:

 check this cool site to practise flex online...it has examples and IDE...
 http://www.flexatschool.com

Hmm... I looked at it, but didn't see much applicable to my level, so
I didn't sign up. It looks like this is aimed at students learning
Flex. If so, best wishes to you. It looks like a good start.

One question, though. Why does it say Courtesy by Adobe? To many
people, that could be interpreted as having some sort of tie-in with
Adobe. Is there some relationship beyond using their tools to create
the site?

Cordially,

Kerry Thompson


RE: [flexcoders] What is the best Way - Multiple DataProvider's or one?

2010-04-20 Thread Tracy Spratt
As usual, it depends.  If your data is small enough and static enough, get
it all at once and avoid the inherent latency of remote data retrieval
entirely.

 

But rarely is data retrieval or processing the performance bottleneck.  Most
often it is screen rendering, and TileList can be a hog, depending on how
you have implemented it. (How many and how complex are the tiles?)

 

Use getTimer() to benchmark the various steps to verify where your
bottleneck actually is.

 

Regardless, consider disabling the TileList while it is rendering.  I am not
sure what the best event to use to indicate rendering complete will be.
Knowing when a screen is fully rendered is not a simple thin, but I do not
think you have to get the very latest event, just late enough to prevent
clicking on stale data.

 

Tracy Spratt,

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of James
Sent: Tuesday, April 20, 2010 7:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] What is the best Way - Multiple DataProvider's or one?

 

  

In my app I have a tilelist with an array collection as it's dp which is
populated via remote xml from a mysql database. When a user clicks a certain
category button in my app it sends a request to the server to tell it which
category items the user wants to see which in turn changes the array
collection that populates the tilelist so it shows items within that
category. The thing is though this seems to be a bit unreliable as it means
the user has to wait for a while for the dataprovider to change so sometimes
they click to the next category and the items from the previous category are
still shown in the tilelist.

Is it better practice to have multiple dataproviders initialsed at startup
which the user can switch between as they click each category rather than
modifying the same dataprovider? Basically I'm just wondering what way would
you guys do it? I thought using just one dataprovider would slim down the
code and make the app faster and more reliable but now I'm not sure.





RE: [flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-20 Thread Tracy Spratt
Yes.  Manually incrementing the version at each build will be more work for
you, but will be a better experience for your users.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of handitan
Sent: Monday, April 19, 2010 8:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to clear cache for all major browsers (IE,
Mozilla, Safari and Chrome)

 

  

Hi Cato or anyone,

Where do you put that change?
Is it on this part of index.template.html?

else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
src, ${swf}?version=1.0,
width, ${width},
height, ${height},

Thanks for the help!

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
Cato Paus ca...@... wrote:

 Or just do this 
 
 src, ${swf}?version=1.0,
 
 and increment it each time you crate a new build, I have filed a request
to adobe about this issue
 https://bugs. https://bugs.adobe.com/jira/browse/FB-16764
adobe.com/jira/browse/FB-16764 
 go and vote for it :)
 
 
 
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
Tracy Spratt tspratt@ wrote:
 
  The only reliable, cross platform/browser solution I have seen is to
append
  a unique string to the swf url. Modify the index.template like this:
  
  AC_FL_RunContent(
  
  src, ${swf}?nocache=+(new
  Date()).getTime(),
  
  
  
  It does make that app slow to load every time.
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
[mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
On
  Behalf Of anuj181
  Sent: Tuesday, March 17, 2009 7:32 PM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] How to clear cache for all major browsers (IE,
  Mozilla, Safari and Chrome)
  
  
  
  Hi Guys
  Anyone has any idea which is the best way to clear the cache for my web
  application (which is made in Flex and PHP), For some reason it keeps on
  pulling old entries from cache and is confusing user and me with the
  inconsistent results, I guess that it is pulling values from the cache
as
  everything works fine when I manually clear the cache.I did little
research
  and tried following tags in the index.template.html but somehow it is
not
  working efficiently , Whats the best way to clear the cache for all the
  major browsers (IE, Mozilla, Safari and Chrome) for my web application?
  Anyone has any idea?
  Thanks in advance for your help,
  
  head
  meta http-equiv=Content-Type content=text/html; charset=utf-8 /
  meta http-equiv=Pragma content=no-cache /
  meta http-equiv=Expires content=-1 /
  /head
 






RE: [flexcoders] Re: Problems With my XML Created Array Collection

2010-04-20 Thread Tracy Spratt
I know this is very late in the game, and I haven’t read the full thread, but 
this seems like a very complicated solution to the problem.  Further, the 
default resultFormat has other consequences, data type conversions for example. 
 If you have a string that looks like a number, it will get converted to a 
number, removing trailing and leading zeros and such, and sometimes this is not 
desired.  

 

Using e4x and looping over the categories.category XMLList is very simple. 
XMLLists are never null, but empty nodes just result in a zero length, which is 
easy to test for.

 

Tracy Spratt

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of James
Sent: Monday, April 19, 2010 3:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problems With my XML Created Array Collection

 

  

I've noticed that if I remove all items from the mysql table which populates 
the remote xml file the xml that is produced is simply this:-

?xml version=1.0 ? 
categories / 

i.e. all of the nodes are removed so this means my app is looking for nodes 
that aren't actually there so it seems I need another else if bracket to deal 
with this but I haven't got a clue for how to check if an xml file is empty or 
null or whatever you'd call the above in flex and what to do within this else 
if bracket if it's not.

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, 
Robert Moss rdm0...@... wrote:

 In essence yes, I do not think I would do it as part of the button click, but 
 instead clear it before the IF in the result handler with LinksFullAC.source 
 = new Array(); or LinksFullAC.removeAll(); I prefer the former. 
 
 As for your error, I'm not sure what's happening, but you should be able to 
 set a break in the result handler and see what is getting returned. It looks 
 like for the combination you describe, categories is not getting returned for 
 some reason. You'll need to figure out why and trap for it. The same goes for 
 returning 0 records. See what is getting returned and trap for it.
 
 
 
 
 
 
 From: James garymoorcroft_...@...
 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 Sent: Mon, April 19, 2010 12:47:15 PM
 Subject: [flexcoders] Re: Problems With my XML Created Array Collection
 
 
 Hi Robert. Thanks so much for that my friend. 
 
 I have some problems with it though. You see I have an event in my app 
 applied to a button (refresh button) which resends data via the LinksService 
 i.e. LinksService. send and I've noticed that with your code if there is only 
 1 link i.e. 1 node and I click the refresh button it seems to keep recreating 
 that 1 over and over again as if it's recreating the same object in the array 
 collection or something. This doesn't happen if their are 2 or more 
 links/nodes/ objects. Perhaps I'll have to get the refresh button to empty 
 the array collection first before sending the data i.e. it's click function 
 would be LinksFullAC. flush; LinksService. send() Am I right?
 
 I've also noticed now with your code applied if I select an item in the 
 tilelist and click the reresh button I get the error Property categories not 
 found on String and there is no default value which is indicating the error 
 at the if statement in the code you gave me and the LinksService itself. Any 
 idea what's causing this?
 
 Another question though what if the xml contains no nodes? 
 
 You see my xml file is dynamic, I have a variable in my app called categoryid 
 and that variable is based on a category that the user selects in my app and 
 is submitted to getlinks.php which gets all the records from my mysql table 
 which contain that specific submitted categoryid and output them as the xml 
 file. Some categoryids have no records (the user can add and delte records 
 via my app). Is there any way of getting it to handle 0 records/nodes as well 
 as handling muliple records/1record which it seems to already do?
 
 Thanks so much for your help. Sorry to be a pain :-(
 
 --- In flexcod...@yahoogro ups.com, Robert Moss rdm0004@  wrote:
 
  This is not exactly how I would implement, but you should get the idea. If 
  you have multiple category nodes, then your LinksService. lastResult. 
  categories. category is returned as an ArrayCollection and your code works. 
  If it only has one node then LinksService. lastResult. categories. category 
  is returned as an ObjectProxy. So in your return method you could have the 
  following.
  
  if(LinksService. lastResult. categories. category is ArrayCollection) {
  LinksFullAC= LinksService. lastResult. categories. category as 
  ArrayCollection;
  }else
  {
  var oCat:Object = new Object();
  oCat.id = LinksService. lastResult. categories. category. id;
  oCat.label = LinksService. lastResult. categories. category. label;
  oCat.icon = LinksService. lastResult. categories. category. icon;
  LinksFullAC. addItem(oCat) ; // NOTE: 

RE: [flexcoders] Re: Problems With my XML Created Array Collection

2010-04-20 Thread Tracy Spratt
Here is some untested code to loop (you will need to correct the automatic 
capitalization ): It is also more verbose than necessary, just for clarity.

 

Var xmlResult:XML = event.result as XML;

Trace(xmlResult.toXMLString()); //to verify your xml

Var xlResult:XMLList = xmlResult.category;

Var acResult:ArrayCollection = new ArrayCollection();

Var xmlCategory:XML;

For (var i:uint=0;ixlResult.length()) { //watch out for the length() method, 
not property

  xmlCategory = xlResult[i]; 

  
acResult.addItem({id:xmlCategory.id.text(),label:xmlCategory.label.text(),icon:xmlCategory.icon.text()});
  //usually the text) can be omitted, but I use it by habit.

}

myTileList.dataProvider = acResult;

 

And DO avoid using lastResult in functions.  It is intended for binding 
espressions.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Tracy Spratt
Sent: Tuesday, April 20, 2010 12:39 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Problems With my XML Created Array Collection

 

  

I know this is very late in the game, and I haven’t read the full thread, but 
this seems like a very complicated solution to the problem.  Further, the 
default resultFormat has other consequences, data type conversions for example. 
 If you have a string that looks like a number, it will get converted to a 
number, removing trailing and leading zeros and such, and sometimes this is not 
desired.  

 

Using e4x and looping over the categories.category XMLList is very simple. 
XMLLists are never null, but empty nodes just result in a zero length, which is 
easy to test for.

 

Tracy Spratt

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of James
Sent: Monday, April 19, 2010 3:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problems With my XML Created Array Collection

 

  

I've noticed that if I remove all items from the mysql table which populates 
the remote xml file the xml that is produced is simply this:-

?xml version=1.0 ? 
categories / 

i.e. all of the nodes are removed so this means my app is looking for nodes 
that aren't actually there so it seems I need another else if bracket to deal 
with this but I haven't got a clue for how to check if an xml file is empty or 
null or whatever you'd call the above in flex and what to do within this else 
if bracket if it's not.

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, 
Robert Moss rdm0...@... wrote:

 In essence yes, I do not think I would do it as part of the button click, but 
 instead clear it before the IF in the result handler with LinksFullAC.source 
 = new Array(); or LinksFullAC.removeAll(); I prefer the former. 
 
 As for your error, I'm not sure what's happening, but you should be able to 
 set a break in the result handler and see what is getting returned. It looks 
 like for the combination you describe, categories is not getting returned for 
 some reason. You'll need to figure out why and trap for it. The same goes for 
 returning 0 records. See what is getting returned and trap for it.
 
 
 
 
 
 
 From: James garymoorcroft_...@...
 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 Sent: Mon, April 19, 2010 12:47:15 PM
 Subject: [flexcoders] Re: Problems With my XML Created Array Collection
 
 
 Hi Robert. Thanks so much for that my friend. 
 
 I have some problems with it though. You see I have an event in my app 
 applied to a button (refresh button) which resends data via the LinksService 
 i.e. LinksService. send and I've noticed that with your code if there is only 
 1 link i.e. 1 node and I click the refresh button it seems to keep recreating 
 that 1 over and over again as if it's recreating the same object in the array 
 collection or something. This doesn't happen if their are 2 or more 
 links/nodes/ objects. Perhaps I'll have to get the refresh button to empty 
 the array collection first before sending the data i.e. it's click function 
 would be LinksFullAC. flush; LinksService. send() Am I right?
 
 I've also noticed now with your code applied if I select an item in the 
 tilelist and click the reresh button I get the error Property categories not 
 found on String and there is no default value which is indicating the error 
 at the if statement in the code you gave me and the LinksService itself. Any 
 idea what's causing this?
 
 Another question though what if the xml contains no nodes? 
 
 You see my xml file is dynamic, I have a variable in my app called categoryid 
 and that variable is based on a category that the user selects in my app and 
 is submitted to getlinks.php which gets all the records from my mysql table 
 which contain that specific submitted categoryid and output them as the xml 
 file. Some categoryids have no records (the user can add and delte records 

[flexcoders] Re: Is MATE framework appropriate for my project?

2010-04-20 Thread md_ars



Thanks for the reply.

Please check my requirement below and let me know do I need separate event map 
for each screen/mxml component? how it will be linked to main event map.

I created a ArrayCollection in the DataManager that is being populated in the 
result event and I want to inject it in the calling module. 

-- The main application calling the view which contains the menu bar. It 
dispatches the event. Once event is triggered and fetched the data from 
database, control should come back to view and menu should be populated with 
database value(menu items). The intermediate ArrayCollection is being populated 
but not assigning values to the dataprovider of menu.

Ars

--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 I use Mate on all my projects. I use a lot of injectors to push my data 
 to my views by binding them to the manager Class. What is the issue you 
 are having? If you are reusing the same element on 2 views, you'd need 
 to either put the data binding (ArrayCollection, Object, etc) on the 
 component with your menu or push the data to both views to have the menu 
 use it as a datasource.
 
 I particularly like Mate for 2 main reasons. Lower learning curve and 
 you don't put any of the framework into your views or models. All is 
 managed by custom events and the map. So, if at any time in the future, 
 you want to pop it out of the application, its minimal work (just have 
 to write connectors for the events).
 
 On 4/19/2010 1:55 PM, md_ars wrote:
 
  Hello,
 
  We are planning to use MATE framework for our project. We will have 
  two separate applications our main transaction application will have 
  probably over 150 screens and 100 reports. The application is mostly 
  data driven and we are using web-services to display and enter the 
  data. I tested the MATE frame work with one screen and it was easy to 
  implement. Now I am trying with one MENU and two screens and it is 
  getting complicated to use shared classes etc. Is the MATE framework 
  good for our application? If yes what is the best way to implement 
  MATE? With two screens I am already finding tricky to use Injectors. 
  The main code structure of my project looks like as given below.
 
  Main -- Contains Application module
  view
  Forms -- Contains screens based on panels/vbox or mdi window
  Events - Contains main event map and following folders
  Session -- Events triggered from the screens.
  EventManager -- Parsing the data after session events fetched data 
  through web service.
  ControlClass -- Common classes used for screens etc.
 
  Should I use a common structure of the whole application or should it 
  a separate for each screen? To me it will be too messy to have common 
  structure whereas too tedious for each screen. So far team size is 2 
  and may extend to 3. Please suggest an optimum way.
 
  Thanks
  Ars
 
  
  Reply to sender 
  mailto:mdar...@...?subject=is%20mate%20framework%20appropriate%20for%20my%20project?
   
  | Reply to group 
  mailto:flexcod...@yahoogroups.com?subject=is%20mate%20framework%20appropriate%20for%20my%20project?
   
  | Reply via web post 
  http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJzZDQwbHBpBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNTQ4MDQEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMjcxNjk5ODky?act=replymessageNum=154804
   
  | Start a New Topic 
  http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJmbG8wbHBiBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzEyNzE2OTk4OTI-
   
 
  Messages in this topic 
  http://groups.yahoo.com/group/flexcoders/message/154804;_ylc=X3oDMTM5NHZoc3ZnBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNTQ4MDQEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMjcxNjk5ODkyBHRwY0lkAzE1NDgwNA--
   
  (1)
  Recent Activity:
 
  * New Members

  http://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnajBkc2d2BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxMjcxNjk5ODky?o=6
29
 
  Visit Your Group 
  http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmdGRkcjkxBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzEyNzE2OTk4OTI-
   
 
  --
  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.com
 





[flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)

2010-04-20 Thread handitan
Thx Tracy!

I have a diff question relating to this caching issue.
My app is composed with a main-swf, a library-swf, and several module-swfs.

To my understanding, this incrementing-build-version solution only applies to 
the main-swf.
So that means the library-swf and module-swfs that I updated would be loaded 
from the browser-cache instead of from the server.
Is my understanding correct?

Thx! 


--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 Yes.  Manually incrementing the version at each build will be more work for
 you, but will be a better experience for your users.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of handitan
 Sent: Monday, April 19, 2010 8:17 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: How to clear cache for all major browsers (IE,
 Mozilla, Safari and Chrome)
 
  
 
   
 
 Hi Cato or anyone,
 
 Where do you put that change?
 Is it on this part of index.template.html?
 
 else if (hasRequestedVersion) {
 // if we've detected an acceptable version
 // embed the Flash Content SWF when all tests are passed
 AC_FL_RunContent(
 src, ${swf}?version=1.0,
 width, ${width},
 height, ${height},
 
 Thanks for the help!
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Cato Paus cato1@ wrote:
 
  Or just do this 
  
  src, ${swf}?version=1.0,
  
  and increment it each time you crate a new build, I have filed a request
 to adobe about this issue
  https://bugs. https://bugs.adobe.com/jira/browse/FB-16764
 adobe.com/jira/browse/FB-16764 
  go and vote for it :)
  
  
  
  
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Tracy Spratt tspratt@ wrote:
  
   The only reliable, cross platform/browser solution I have seen is to
 append
   a unique string to the swf url. Modify the index.template like this:
   
   AC_FL_RunContent(
   
   src, ${swf}?nocache=+(new
   Date()).getTime(),
   
   
   
   It does make that app slow to load every time.
   
   
   
   Tracy Spratt,
   
   Lariat Services, development services available
   
   _ 
   
   From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
 On
   Behalf Of anuj181
   Sent: Tuesday, March 17, 2009 7:32 PM
   To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
   Subject: [flexcoders] How to clear cache for all major browsers (IE,
   Mozilla, Safari and Chrome)
   
   
   
   Hi Guys
   Anyone has any idea which is the best way to clear the cache for my web
   application (which is made in Flex and PHP), For some reason it keeps on
   pulling old entries from cache and is confusing user and me with the
   inconsistent results, I guess that it is pulling values from the cache
 as
   everything works fine when I manually clear the cache.I did little
 research
   and tried following tags in the index.template.html but somehow it is
 not
   working efficiently , Whats the best way to clear the cache for all the
   major browsers (IE, Mozilla, Safari and Chrome) for my web application?
   Anyone has any idea?
   Thanks in advance for your help,
   
   head
   meta http-equiv=Content-Type content=text/html; charset=utf-8 /
   meta http-equiv=Pragma content=no-cache /
   meta http-equiv=Expires content=-1 /
   /head
  
 





Re: [flexcoders] Re: Is MATE framework appropriate for my project?

2010-04-20 Thread Wally Kolcz
If you created an ArrayCollection in your DataManager, did you set it to 
[Bindable]? The AC doesn't care where it is injected or into what 
element (as long as it supports it), its just a data wrapper. Is the 
menu a separate component that you 'include' in multiple views or are 
you creating a new menu in each view? If you share a component Menu, 
then you would just need to add a  Bindable arraycollection in the 
script area of your Menu then (in your EventMap) add an injector to bind 
it to the AC in the manager.


For Example:
DataManager: [Bindable] public var sourceData:ArrayCollection;
Menu Component: [Bindable] public var menuData:ArrayCollection;

Injectors target={MyMenuComponent}
PropertyInjector source={DataManager} sourceKey=sourceData 
targetKey=menuData /

/Injectors

If you have a menu in 2 different views (not recommended), just create 2 
injectors.

DataManager: [Bindable] public var sourceData:ArrayCollection;
View 1: [Bindable] public var menuData:ArrayCollection;
View 2: [Bindable] public var menuData:ArrayCollection;

Injectors target={View1}
PropertyInjector source={DataManager} sourceKey=sourceData 
targetKey=menuData /

/Injectors
Injectors target={View2}
PropertyInjector source={DataManager} sourceKey=sourceData 
targetKey=menuData /

/Injectors

In any case, you only need one EventMap for an application (unless you 
want to break it up to make it smaller cause they can get QUITE long). 
You would need multiple injectors (one per view) unless you create a 
component out of all shared pieces (which promotes reuse...a true OO 
best practice).


Let me know if this helps at all

On 4/20/2010 12:56 PM, md_ars wrote:




Thanks for the reply.

Please check my requirement below and let me know do I need separate 
event map for each screen/mxml component? how it will be linked to 
main event map.


I created a ArrayCollection in the DataManager that is being populated 
in the result event and I want to inject it in the calling module.


-- The main application calling the view which contains the menu bar. 
It dispatches the event. Once event is triggered and fetched the data 
from database, control should come back to view and menu should be 
populated with database value(menu items). The intermediate 
ArrayCollection is being populated but not assigning values to the 
dataprovider of menu.


Ars

--- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com, Wally Kolcz wko...@... wrote:


 I use Mate on all my projects. I use a lot of injectors to push my data
 to my views by binding them to the manager Class. What is the issue you
 are having? If you are reusing the same element on 2 views, you'd need
 to either put the data binding (ArrayCollection, Object, etc) on the
 component with your menu or push the data to both views to have the 
menu

 use it as a datasource.

 I particularly like Mate for 2 main reasons. Lower learning curve and
 you don't put any of the framework into your views or models. All is
 managed by custom events and the map. So, if at any time in the future,
 you want to pop it out of the application, its minimal work (just have
 to write connectors for the events).

 On 4/19/2010 1:55 PM, md_ars wrote:
 
  Hello,
 
  We are planning to use MATE framework for our project. We will have
  two separate applications our main transaction application will have
  probably over 150 screens and 100 reports. The application is mostly
  data driven and we are using web-services to display and enter the
  data. I tested the MATE frame work with one screen and it was easy to
  implement. Now I am trying with one MENU and two screens and it is
  getting complicated to use shared classes etc. Is the MATE framework
  good for our application? If yes what is the best way to implement
  MATE? With two screens I am already finding tricky to use Injectors.
  The main code structure of my project looks like as given below.
 
  Main -- Contains Application module
  view
  Forms -- Contains screens based on panels/vbox or mdi window
  Events - Contains main event map and following folders
  Session -- Events triggered from the screens.
  EventManager -- Parsing the data after session events fetched data
  through web service.
  ControlClass -- Common classes used for screens etc.
 
  Should I use a common structure of the whole application or should it
  a separate for each screen? To me it will be too messy to have common
  structure whereas too tedious for each screen. So far team size is 2
  and may extend to 3. Please suggest an optimum way.
 
  Thanks
  Ars





[flexcoders] BLAZE DS AND OSIV PATTERN

2010-04-20 Thread Fernando Wermus
Hi all,
   I am using blazeds and flex without spring. I am also using remote object
and RemoteClass metatag. I would like to know how to open hibernate session
before messagebroker servlet takes into action and how to close hibernate
session after messagebroker servlet. I searched in google but I didnt find a
piece of code to implement it. This is called OSIV or open session in view
pattern, which I use with other frameworks like wicket.

thanks in advance.


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[flexcoders] Re: Is MATE framework appropriate for my project?

2010-04-20 Thread md_ars


Thanks Wally. It worked. I don't know where I was missing. I started from the 
same because with one panel I tested it successfully to populate data in a 
DataGrid. When I added multiple modules and menu, I modified DataManage and 
might have missed either some sequence or  properties.

I am using only one menu which is the starting page. Main Application call this 
page(view as this page and Eventmap) then event is dispatched from this module 
to get the data for menu. I have added 
addEventListener(MenuEvent.ITEM_CLICK,onMenuClick) to call the other 
modules(component) attached to menu items. Hope this is appropriate. Now my 
concern is every called module(mxml component) as well as menu using the same 
webservice and same method with different arguments. Does this need a separate 
event handler for each module(component) as it is doing for menu(given below) 
and in the SAME eventmap. Do I need to write a separate method in DataManger 
for each result handler. One module may have more than one operation (fetch and 
save). My worry is it will become huge if I add 150 screens and 100 reports. Is 
there any way to make event handler generic and same with DataManger. Please 
suggest. I am new to both OOP and Flex.

EventHandlers type={GetDataEvent.GET_M} debug=true
WebServiceInvoker wsdl=http://10d/MyApps/App?WSDL; 
method=mtExecute
arguments={[SessionManager.dbSessionID, event.dbParam]}  
debug=true
resultHandlers
!-- parse the results --
MethodInvoker generator={DataManager} method=saveMenuData
arguments={resultObject} /
   EventAnnouncer generator={GetDataEvent} 
type={EventSequenceDispatcher.EVENT_FINISHED} / 
/resultHandlers
/WebServiceInvoker
   /EventHandlers




--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 If you created an ArrayCollection in your DataManager, did you set it to 
 [Bindable]? The AC doesn't care where it is injected or into what 
 element (as long as it supports it), its just a data wrapper. Is the 
 menu a separate component that you 'include' in multiple views or are 
 you creating a new menu in each view? If you share a component Menu, 
 then you would just need to add a  Bindable arraycollection in the 
 script area of your Menu then (in your EventMap) add an injector to bind 
 it to the AC in the manager.
 
 For Example:
 DataManager: [Bindable] public var sourceData:ArrayCollection;
 Menu Component: [Bindable] public var menuData:ArrayCollection;
 
 Injectors target={MyMenuComponent}
 PropertyInjector source={DataManager} sourceKey=sourceData 
 targetKey=menuData /
 /Injectors
 
 If you have a menu in 2 different views (not recommended), just create 2 
 injectors.
 DataManager: [Bindable] public var sourceData:ArrayCollection;
 View 1: [Bindable] public var menuData:ArrayCollection;
 View 2: [Bindable] public var menuData:ArrayCollection;
 
 Injectors target={View1}
 PropertyInjector source={DataManager} sourceKey=sourceData 
 targetKey=menuData /
 /Injectors
 Injectors target={View2}
 PropertyInjector source={DataManager} sourceKey=sourceData 
 targetKey=menuData /
 /Injectors
 
 In any case, you only need one EventMap for an application (unless you 
 want to break it up to make it smaller cause they can get QUITE long). 
 You would need multiple injectors (one per view) unless you create a 
 component out of all shared pieces (which promotes reuse...a true OO 
 best practice).
 
 Let me know if this helps at all
 
 On 4/20/2010 12:56 PM, md_ars wrote:
 
 
 
  Thanks for the reply.
 
  Please check my requirement below and let me know do I need separate 
  event map for each screen/mxml component? how it will be linked to 
  main event map.
 
  I created a ArrayCollection in the DataManager that is being populated 
  in the result event and I want to inject it in the calling module.
 
  -- The main application calling the view which contains the menu bar. 
  It dispatches the event. Once event is triggered and fetched the data 
  from database, control should come back to view and menu should be 
  populated with database value(menu items). The intermediate 
  ArrayCollection is being populated but not assigning values to the 
  dataprovider of menu.
 
  Ars
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, Wally Kolcz wkolcz@ wrote:
  
   I use Mate on all my projects. I use a lot of injectors to push my data
   to my views by binding them to the manager Class. What is the issue you
   are having? If you are reusing the same element on 2 views, you'd need
   to either put the data binding (ArrayCollection, Object, etc) on the
   component with your menu or push the data to both views to have the 
  menu
   use it as a datasource.
  
   I particularly like Mate for 2 main reasons. Lower learning curve and
   you don't put any of the framework into your views or models. All 

[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-20 Thread Amy


--- In flexcoders@yahoogroups.com, Robert Moss rdm0...@... wrote:

 Yes use a third if statement like:  if(event.result.categories)   
 if(event.result.categories != null) should also work
 
 Notice I used event.result instead of LinksService.lastResult.  Small change, 
 but you should get in the habit as LinksService.lastResult will cause some 
 pain in the future if you decide to change it's name for some reason.  
 
 Amy suggested using e4x which is probably the correct answer as e4x grants 
 you consistency ( you do not have the arrayCollection returned sometimes and 
 ObjectProxy others) and allows you to work with XML in actionscript like XML 
 was meant to be accessed.  You will still have to trap for the same issues, 
 just implemented in a different way.   We do not always use e4x although we 
 probably should, being lazy will probably bite us one of these days.

I think you've misunderstood.  By changing the result format from the default 
of object to e4x, you _avoid_ the problem the OP had, which is if there is only 
one object returned, you get a different result than if you have multiple 
objects returned.  You don't have to trap for the problem, because it goes 
away.  If there is only one node, you get one node.  If there are multiple 
nodes, you get multiple nodes.

But whatever.

-Amy



Re: [flexcoders] Re: Is MATE framework appropriate for my project?

2010-04-20 Thread Wally Kolcz
One of the joys of Mate is that you can create a 'Services' component 
set to fx:object and set up all your data services (web services) and 
give them ID's and the wsdl address, then, in your map per eventhandler 
call a different method on that web services via the WebServicesInvoker. 
Then depending on what Manager you want to tweek the data, call then in 
the resultsHandler and MethodInvoker. Focus on creating custom events to 
handler different scenerios of data needs. You can also create an 
EventHandler that invokes other EventHandlers to set up multiple data 
needs per view.


Lets say you have a email client where you need all messages and 
emailaddresses (for a phonebook). Rather than having the view fire off 
multiple events to retrieve the different datas, you can have a single 
Event (MessengerEvent.START) and in your EventHandler, have it perform 
multiple single event calls.


EventHandlers type={MessengerEvent.START}
EventAnnouncer type={MessEvent.LIST}
Properties username={event.username} /
/EventAnnouncer
EventAnnouncer type={PhoneBookEvent.LIST}
Properties username={event.username} /
/EventAnnouncer
/EventHandlers

This way you can preserve the individual Events incase another view 
needs only one. For example another view just wants the phone book, it 
can just call the PhoneBookEvent.LIST event and have that view be binded 
to that ArrayCollection also.


A manager is just there to tweek the data and put it into a dataholder. 
It doesn't care where it goes to or how many elements are using it. As 
long as it can support it.


Split your managers up by category and you can have as many as you like. 
I break mine  up by view (or view category). For my child portal 
application I have ChatManager, ArtManager, UserManager, UsageManager, 
JournalManager, MailManager, AppManager, and about a dozen others. Don't 
make a generic manager that handler EVERYTHING, especially if you are 
talking over 100 views.


Also, as your EventMap grows, break it up into other EventMaps. I have 
mine by Event type letters (A-L, M-R, S-Z). For Example MailEvent goes 
in M-R, JournalEvent goes in A-L, etc.


Hope that helps. If you need anything else. Let me know. I can share 
what knowledge I have.


On 4/20/2010 2:55 PM, md_ars wrote:




Thanks Wally. It worked. I don't know where I was missing. I started 
from the same because with one panel I tested it successfully to 
populate data in a DataGrid. When I added multiple modules and menu, I 
modified DataManage and might have missed either some sequence or 
properties.


I am using only one menu which is the starting page. Main Application 
call this page(view as this page and Eventmap) then event is 
dispatched from this module to get the data for menu. I have added 
addEventListener(MenuEvent.ITEM_CLICK,onMenuClick) to call the other 
modules(component) attached to menu items. Hope this is appropriate. 
Now my concern is every called module(mxml component) as well as menu 
using the same webservice and same method with different arguments. 
Does this need a separate event handler for each module(component) as 
it is doing for menu(given below) and in the SAME eventmap. Do I need 
to write a separate method in DataManger for each result handler. One 
module may have more than one operation (fetch and save). My worry is 
it will become huge if I add 150 screens and 100 reports. Is there any 
way to make event handler generic and same with DataManger. Please 
suggest. I am new to both OOP and Flex.


EventHandlers type={GetDataEvent.GET_M} debug=true
WebServiceInvoker wsdl=http://10d/MyApps/App?WSDL 
http://10d/MyApps/App?WSDL

method=mtExecute
arguments={[SessionManager.dbSessionID, event.dbParam]}
debug=true
resultHandlers
!-- parse the results --
MethodInvoker generator={DataManager} method=saveMenuData
arguments={resultObject} /
EventAnnouncer generator={GetDataEvent} 
type={EventSequenceDispatcher.EVENT_FINISHED} /

/resultHandlers
/WebServiceInvoker
/EventHandlers

--- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com, Wally Kolcz wko...@... wrote:


 If you created an ArrayCollection in your DataManager, did you set 
it to

 [Bindable]? The AC doesn't care where it is injected or into what
 element (as long as it supports it), its just a data wrapper. Is the
 menu a separate component that you 'include' in multiple views or are
 you creating a new menu in each view? If you share a component Menu,
 then you would just need to add a Bindable arraycollection in the
 script area of your Menu then (in your EventMap) add an injector to 
bind

 it to the AC in the manager.

 For Example:
 DataManager: [Bindable] public var sourceData:ArrayCollection;
 Menu Component: [Bindable] public var menuData:ArrayCollection;

 Injectors target={MyMenuComponent}
 PropertyInjector source={DataManager} sourceKey=sourceData
 targetKey=menuData /
 /Injectors

 If you have a menu in 2 different views (not recommended), just 
create 2

 injectors.
 

[flexcoders] Re: GroupingCollection.getParent() doesn't exist?

2010-04-20 Thread Amy


--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 ok - thanks Amy! :)
 
 So if were to extend GroupingCollection and create MyGroupingCollection, I
 could then have a public function on MyGroupingCollection that in turn calls
 the getParent() protected function of GroupingCollection.

That should work :-D



[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-20 Thread James
Thanks Tracy that looks good. I may try something similar in the future. I've 
managed to get the previous example provided by robert working though so 
basically I'm thinking if it isn't broke don't fix it. :-) It's all that I 
require really as I'm only using it to display the results and it covers 
everything I need. Thanks a lot for your advice.

While you're hear would you happen to know how to upload an entire array 
collection to a server via php/http request? You see the thing is at the moment 
I have an app which allows users to create links and remove links which 
directly creates/removes them in the mysql database I have which holds my data.

To explain what I want basically I have a links table which contains all the 
available links and a userlinks table in my mysql database. When the user 
creates a new account via my app all the links from the links table are 
displayed in the app using the method we've been discussing but now I want the 
user to be able to add the entire contents of this to the userlinks table. The 
purpose of this is the user can favorite each link which will alter a boolean 
field in the userlinks table which will mean in turn when a user logs in with 
an existing account the links they've favourited will be displayed.

So basically firstly I need to know how to add/send mulitple records via 
flex/php. I have no problem adding/removing and updating individual records but 
I now need to know how to add multiple ones at once. Is there any way of doing 
this and do you know of any similar examples?

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 Here is some untested code to loop (you will need to correct the automatic 
 capitalization ): It is also more verbose than necessary, just for clarity.
 
  
 
 Var xmlResult:XML = event.result as XML;
 
 Trace(xmlResult.toXMLString()); //to verify your xml
 
 Var xlResult:XMLList = xmlResult.category;
 
 Var acResult:ArrayCollection = new ArrayCollection();
 
 Var xmlCategory:XML;
 
 For (var i:uint=0;ixlResult.length()) { //watch out for the length() method, 
 not property
 
   xmlCategory = xlResult[i]; 
 
   
 acResult.addItem({id:xmlCategory.id.text(),label:xmlCategory.label.text(),icon:xmlCategory.icon.text()});
   //usually the text) can be omitted, but I use it by habit.
 
 }
 
 myTileList.dataProvider = acResult;
 
  
 
 And DO avoid using lastResult in functions.  It is intended for binding 
 espressions.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of Tracy Spratt
 Sent: Tuesday, April 20, 2010 12:39 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: Problems With my XML Created Array Collection
 
  
 
   
 
 I know this is very late in the game, and I haven’t read the full thread, 
 but this seems like a very complicated solution to the problem.  Further, the 
 default resultFormat has other consequences, data type conversions for 
 example.  If you have a string that looks like a number, it will get 
 converted to a number, removing trailing and leading zeros and such, and 
 sometimes this is not desired.  
 
  
 
 Using e4x and looping over the categories.category XMLList is very simple. 
 XMLLists are never null, but empty nodes just result in a zero length, which 
 is easy to test for.
 
  
 
 Tracy Spratt
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of James
 Sent: Monday, April 19, 2010 3:39 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Problems With my XML Created Array Collection
 
  
 
   
 
 I've noticed that if I remove all items from the mysql table which populates 
 the remote xml file the xml that is produced is simply this:-
 
 ?xml version=1.0 ? 
 categories / 
 
 i.e. all of the nodes are removed so this means my app is looking for nodes 
 that aren't actually there so it seems I need another else if bracket to deal 
 with this but I haven't got a clue for how to check if an xml file is empty 
 or null or whatever you'd call the above in flex and what to do within this 
 else if bracket if it's not.
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, 
 Robert Moss rdm0004@ wrote:
 
  In essence yes, I do not think I would do it as part of the button click, 
  but instead clear it before the IF in the result handler with 
  LinksFullAC.source = new Array(); or LinksFullAC.removeAll(); I prefer the 
  former. 
  
  As for your error, I'm not sure what's happening, but you should be able to 
  set a break in the result handler and see what is getting returned. It 
  looks like for the combination you describe, categories is not getting 
  returned for some reason. You'll need to figure out why and trap for it. 
  The same goes for returning 0 records. See what is getting returned and 
  trap for it.
  
  
  
  
  
  
  

[flexcoders] Re: Is MATE framework appropriate for my project?

2010-04-20 Thread md_ars
Great amount of knowledge. I need some time to discuss it with my other team 
mate who is expert in OOP and also taking care of webservice part. I appreciate 
your prompt replies and willingness to share your knowledge. How do I contact 
you once we design something you suggested? Should I reply to the same thread 
after some time(may be days)or send an email directly.

Thanks
Ars

--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 One of the joys of Mate is that you can create a 'Services' component 
 set to fx:object and set up all your data services (web services) and 
 give them ID's and the wsdl address, then, in your map per eventhandler 
 call a different method on that web services via the WebServicesInvoker. 
 Then depending on what Manager you want to tweek the data, call then in 
 the resultsHandler and MethodInvoker. Focus on creating custom events to 
 handler different scenerios of data needs. You can also create an 
 EventHandler that invokes other EventHandlers to set up multiple data 
 needs per view.
 
 Lets say you have a email client where you need all messages and 
 emailaddresses (for a phonebook). Rather than having the view fire off 
 multiple events to retrieve the different datas, you can have a single 
 Event (MessengerEvent.START) and in your EventHandler, have it perform 
 multiple single event calls.
 
 EventHandlers type={MessengerEvent.START}
 EventAnnouncer type={MessEvent.LIST}
 Properties username={event.username} /
 /EventAnnouncer
 EventAnnouncer type={PhoneBookEvent.LIST}
 Properties username={event.username} /
 /EventAnnouncer
 /EventHandlers
 
 This way you can preserve the individual Events incase another view 
 needs only one. For example another view just wants the phone book, it 
 can just call the PhoneBookEvent.LIST event and have that view be binded 
 to that ArrayCollection also.
 
 A manager is just there to tweek the data and put it into a dataholder. 
 It doesn't care where it goes to or how many elements are using it. As 
 long as it can support it.
 
 Split your managers up by category and you can have as many as you like. 
 I break mine  up by view (or view category). For my child portal 
 application I have ChatManager, ArtManager, UserManager, UsageManager, 
 JournalManager, MailManager, AppManager, and about a dozen others. Don't 
 make a generic manager that handler EVERYTHING, especially if you are 
 talking over 100 views.
 
 Also, as your EventMap grows, break it up into other EventMaps. I have 
 mine by Event type letters (A-L, M-R, S-Z). For Example MailEvent goes 
 in M-R, JournalEvent goes in A-L, etc.
 
 Hope that helps. If you need anything else. Let me know. I can share 
 what knowledge I have.
 
 On 4/20/2010 2:55 PM, md_ars wrote:
 
 
 
  Thanks Wally. It worked. I don't know where I was missing. I started 
  from the same because with one panel I tested it successfully to 
  populate data in a DataGrid. When I added multiple modules and menu, I 
  modified DataManage and might have missed either some sequence or 
  properties.
 
  I am using only one menu which is the starting page. Main Application 
  call this page(view as this page and Eventmap) then event is 
  dispatched from this module to get the data for menu. I have added 
  addEventListener(MenuEvent.ITEM_CLICK,onMenuClick) to call the other 
  modules(component) attached to menu items. Hope this is appropriate. 
  Now my concern is every called module(mxml component) as well as menu 
  using the same webservice and same method with different arguments. 
  Does this need a separate event handler for each module(component) as 
  it is doing for menu(given below) and in the SAME eventmap. Do I need 
  to write a separate method in DataManger for each result handler. One 
  module may have more than one operation (fetch and save). My worry is 
  it will become huge if I add 150 screens and 100 reports. Is there any 
  way to make event handler generic and same with DataManger. Please 
  suggest. I am new to both OOP and Flex.
 
  EventHandlers type={GetDataEvent.GET_M} debug=true
  WebServiceInvoker wsdl=http://10d/MyApps/App?WSDL 
  http://10d/MyApps/App?WSDL
  method=mtExecute
  arguments={[SessionManager.dbSessionID, event.dbParam]}
  debug=true
  resultHandlers
  !-- parse the results --
  MethodInvoker generator={DataManager} method=saveMenuData
  arguments={resultObject} /
  EventAnnouncer generator={GetDataEvent} 
  type={EventSequenceDispatcher.EVENT_FINISHED} /
  /resultHandlers
  /WebServiceInvoker
  /EventHandlers
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, Wally Kolcz wkolcz@ wrote:
  
   If you created an ArrayCollection in your DataManager, did you set 
  it to
   [Bindable]? The AC doesn't care where it is injected or into what
   element (as long as it supports it), its just a data wrapper. Is the
   menu a separate component that you 'include' in multiple views or are
   you creating a new menu in each view? If 

[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-20 Thread James
Hi Amy. Sorry I missed your post yesterday. e4x does seem good but I was just a 
little bit worried about implementing it. As a flex beginner I tend to stick to 
the traditional most widely used methods of doing things as a lot of the times 
I work by looking at previous examples and applying them to my own code and 
it's hard to find examples of things such as handling results of e4x etc.

Cheers.

--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, Robert Moss rdm0004@ wrote:
 
  Yes use a third if statement like:  if(event.result.categories)   
  if(event.result.categories != null) should also work
  
  Notice I used event.result instead of LinksService.lastResult.  Small 
  change, but you should get in the habit as LinksService.lastResult will 
  cause some pain in the future if you decide to change it's name for some 
  reason.  
  
  Amy suggested using e4x which is probably the correct answer as e4x grants 
  you consistency ( you do not have the arrayCollection returned sometimes 
  and ObjectProxy others) and allows you to work with XML in actionscript 
  like XML was meant to be accessed.  You will still have to trap for the 
  same issues, just implemented in a different way.   We do not always use 
  e4x although we probably should, being lazy will probably bite us one of 
  these days.
 
 I think you've misunderstood.  By changing the result format from the default 
 of object to e4x, you _avoid_ the problem the OP had, which is if there is 
 only one object returned, you get a different result than if you have 
 multiple objects returned.  You don't have to trap for the problem, because 
 it goes away.  If there is only one node, you get one node.  If there are 
 multiple nodes, you get multiple nodes.
 
 But whatever.
 
 -Amy





[flexcoders] Re: Problems With my XML Created Array Collection

2010-04-20 Thread sminrana



return the xml as a string from PHP file and cast that return string 
in flex like this var xml:XML = XML(data.result);
then do whatever it needs like XMLList and XMLListCollection;

then is the resultEvent you can check like this

if (data.result != )
{
xml:XML = XML(data.result);
}
else
{
Alert.show(something);
}






--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 In my app I have an array collection which populates a tilelist. This array 
 collection is populated by a remote xml file via a http request. Problem is 
 if the xml only has 1 or no nodes I get a null object reference error. I know 
 this is a known problem but I've never been able to find a valid solution for 
 it which could be applied to my code. I've heard of looping through the xml 
 to create an array collection or using xmllist collection but I don't know 
 how these can be done whilst still allowing the data to be displayed in the 
 tilelist. Can anyone help me out please?
 
 The code for my httpservice, array collcection I'm trying to make and the 
 result of the http service and the tilelist it populates is shown below. As I 
 say this all works fine as long as the xml has more than 1 node but causes 
 the error if it doesn't:-
 
 mx:HTTPService id=LinksService result=linksResultHandler(event) 
 resultFormat=object method=POST 
 url=http://www.coolvisiontest.com/getlinks.php/
 
 mx:Script
   ![CDATA[
   
   import mx.rpc.events.ResultEvent;
   import mx.collections.ArrayCollection;
 
   [Bindable] private var LinksFullAC:ArrayCollection;
   
   private function linksResultHandler(event:ResultEvent):void
   {
   LinksFullAC=LinksService.lastResult.categories.category 
 as ArrayCollection;
   }
   
 
   ]]
 /mx:Script
 
 mx:TileList id=linkChoice  dataProvider={LinksFullAC} height=365 
 width=665/
 
 Here's my xml structure:-
 
 categories
  category
   id/id 
   label/label 
   icon/icon 
  /category
 /categories
 
 Obviously I need the array collection to be populated by id, label and icon.
 
 Thanks for any suggestions.





[flexcoders] Re: What is the best Way - Multiple DataProvider's or one?

2010-04-20 Thread sminrana
Can you show your code?

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 As usual, it depends.  If your data is small enough and static enough, get
 it all at once and avoid the inherent latency of remote data retrieval
 entirely.
 
  
 
 But rarely is data retrieval or processing the performance bottleneck.  Most
 often it is screen rendering, and TileList can be a hog, depending on how
 you have implemented it. (How many and how complex are the tiles?)
 
  
 
 Use getTimer() to benchmark the various steps to verify where your
 bottleneck actually is.
 
  
 
 Regardless, consider disabling the TileList while it is rendering.  I am not
 sure what the best event to use to indicate rendering complete will be.
 Knowing when a screen is fully rendered is not a simple thin, but I do not
 think you have to get the very latest event, just late enough to prevent
 clicking on stale data.
 
  
 
 Tracy Spratt,
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of James
 Sent: Tuesday, April 20, 2010 7:37 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] What is the best Way - Multiple DataProvider's or one?
 
  
 
   
 
 In my app I have a tilelist with an array collection as it's dp which is
 populated via remote xml from a mysql database. When a user clicks a certain
 category button in my app it sends a request to the server to tell it which
 category items the user wants to see which in turn changes the array
 collection that populates the tilelist so it shows items within that
 category. The thing is though this seems to be a bit unreliable as it means
 the user has to wait for a while for the dataprovider to change so sometimes
 they click to the next category and the items from the previous category are
 still shown in the tilelist.
 
 Is it better practice to have multiple dataproviders initialsed at startup
 which the user can switch between as they click each category rather than
 modifying the same dataprovider? Basically I'm just wondering what way would
 you guys do it? I thought using just one dataprovider would slim down the
 code and make the app faster and more reliable but now I'm not sure.





[flexcoders] Re: Draw three rectangles inside a canvas -----URGENT PLEASE

2010-04-20 Thread sminrana
If you dont have any options except Canvas and Panel (you can do it easily with 
Group spark component) then you can 
override createChildren() method in Canvas or Panel and as many rect you need 
with adding a new sprite in createChildren and update graphics it in 
updateDisplayList()

mx:Canvas

private var rect:Sprite;
override public function createChildren():void
{
 rect = new Sprite();
addChild(rect);
}

then you need to update the display list

override public function updateDisplayList():void
{
 rect.graphics.beginFill();
rect.graphics.drawRect(your values);

}


/mx:Canvas

--- In flexcoders@yahoogroups.com, Chet Haase cha...@... wrote:

 
 I can't tell what you're trying to do, but this code works:
 
 s:Panel width=400 height=300
 s:Rect width=100 height=100
 s:fill
 s:SolidColor color=red/
 /s:fill
 /s:Rect
 s:Rect x=200 width=100 height=100
 s:fill
 s:SolidColor color=blue/
 /s:fill
 /s:Rect
 /s:Panel
 
 I can't tell if you are trying to use a Canvas or a Panel, since you mention 
 both. Note that Canvas does not spark equivalent, and you can't add Rect 
 objects directly to a halo container. But toss a Group in there and you can 
 add anything to the group.
 
 Chet.
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of Nini7016 Nini7016
 Sent: Tuesday, April 20, 2010 4:19 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Draw three rectangles inside a canvas -URGENT PLEASE
 
 
 
 Hello
 
 I have a canvas and I would like to add  within this canvas three rectangles 
 superimposed and just between two rectangles there will be space.
 
 I used the panel and I put in rectangles but this was not the case.
 
 you have any ideas please
 
 Any help
 
 do you think i must use any other component flex apart Panel ??
 
 
 Thank you very much
 
 
 
 Envie de naviguer sur Internet sans laisser de trace? La solution avec 
 Internet Explorer 8http://clk.atdmt.com/FRM/go/207186970/direct/01/





[flexcoders] Re: What is the best Way - Multiple DataProvider's or one?

2010-04-20 Thread James
Hi I would but my code is pretty big. To sum it all up basically I have an 
application which displays links in a tilelist based on whatever category 
button the user clicks on. Each time the user clicks a category it sends the 
categoryid (which I've made as a variable that changes based on whatever 
category icon is clicked) to the server which gets all the the links that have 
that specific category id and displays them in the remote xml file which 
poulates the array collection that acts as the dataprovider for the tilelist.

What I may do, which seems to be a better solution, is rather than constantly 
sending requests to the server instead simply get ALL the links from the table 
and also make the categories in my app dynamic and apply a filter function 
within my application that depends upon what category is clicked which will 
mean that the data will be getting handled within the app rather than getting 
passed back and forth. I think this is the best solution.

The app also allows user to create and remove links so I suppse the only time 
I'll have to resend data to refresh the array collection to include such 
alterations is after the user adds, removes or updates data.

--- In flexcoders@yahoogroups.com, sminrana sminr...@... wrote:

 Can you show your code?
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  As usual, it depends.  If your data is small enough and static enough, get
  it all at once and avoid the inherent latency of remote data retrieval
  entirely.
  
   
  
  But rarely is data retrieval or processing the performance bottleneck.  Most
  often it is screen rendering, and TileList can be a hog, depending on how
  you have implemented it. (How many and how complex are the tiles?)
  
   
  
  Use getTimer() to benchmark the various steps to verify where your
  bottleneck actually is.
  
   
  
  Regardless, consider disabling the TileList while it is rendering.  I am not
  sure what the best event to use to indicate rendering complete will be.
  Knowing when a screen is fully rendered is not a simple thin, but I do not
  think you have to get the very latest event, just late enough to prevent
  clicking on stale data.
  
   
  
  Tracy Spratt,
  
   
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of James
  Sent: Tuesday, April 20, 2010 7:37 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] What is the best Way - Multiple DataProvider's or one?
  
   
  

  
  In my app I have a tilelist with an array collection as it's dp which is
  populated via remote xml from a mysql database. When a user clicks a certain
  category button in my app it sends a request to the server to tell it which
  category items the user wants to see which in turn changes the array
  collection that populates the tilelist so it shows items within that
  category. The thing is though this seems to be a bit unreliable as it means
  the user has to wait for a while for the dataprovider to change so sometimes
  they click to the next category and the items from the previous category are
  still shown in the tilelist.
  
  Is it better practice to have multiple dataproviders initialsed at startup
  which the user can switch between as they click each category rather than
  modifying the same dataprovider? Basically I'm just wondering what way would
  you guys do it? I thought using just one dataprovider would slim down the
  code and make the app faster and more reliable but now I'm not sure.
 





Re: [flexcoders] Flex 4: How to make draggable and resizable modules?

2010-04-20 Thread Alex Harui
You can try starting here: 
http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html

Someone else probably has an example of how to add resizing to a TitleWindow.


On 4/20/10 7:35 AM, astronaute75 astrona...@gmail.com wrote:






Hello,

I would like to make an application using Flex modules (mx.modules.Module), the 
requirement is that those modules have to be draggable and resizable inside the 
main application shell.

What is the best practice to make this kind of applications in Flex 4?

Thank you in advance for your help,
Adnan






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


[flexcoders] What is the Correct Type of Component For This?

2010-04-20 Thread James
I'm lost as to what component to use for navigation within my application. 
Across the top of my app I want something which horizontally displays a list of 
categories which the user can click to select. This is fine if I use a tilelist 
but I also want to allow my client to add and remove categories and for the 
width of the component to adjust so that new categories fit in but it seems 
impossible to apply fit to content to a tilelist the way you can to a hbox 
which obviously means scrollbars will appear and if you switch the scroll 
policy off this simply means any added categories won't be visible if they are 
past the set width.

If a hbox had a selecteditem property that would be perfect. Is there any such 
way of getting a component to work like this?



[flexcoders] Cold Fusion/Flash Builder 4 hosting

2010-04-20 Thread Dan Pride
I have been hosting on GoDaddy.

They now offer Cold Fusion 7 on Unix and 8 on Windows.
Except they inculude the following restriction.

To call your CFC, you will need to use the cfinvoke  tag. The cfobject tag 
and the CreateObject  function are disabled on our servers for security 
reasons. For example, the following code will call the sayHello function on a 
CFC named hello.cfc

Will Cold Fusion 7 allow me to do remote objects and catch them in Flash 
Builder 4 with this setup???

Thanks
Dan Pride


  


Re: [flexcoders] What is the Correct Type of Component For This?

2010-04-20 Thread Oleg Sivokon
Hi.

A. You can always create your own layout.
B. Thinking of ready-made components, it could be HorizontalList,
TabNavigator, ApplicationControlBar etc, whichever is more relevant.

Best.

Oleg


[flexcoders] TitleWindow.title won't update from a setter

2010-04-20 Thread Nick Middleweek
Hi,

I've got a small MXML Component based on TitleWindow which I'm opening with
PopupManager that has a setter and getter called iFormID.

In the setter I have this code...

public function set iFormID ( value : String ) : void
{
if ( _iFormID == value )
return;

_iFormID = value;


if(iFormID.length  0)
{
this.title = Create Vendor;
}
else
{
this.title = Create Vendor by iForm;
}

}


I am find that the title remains blank, but then if I close the PopUp and
open it again, the last value the .title should have been is now visible...

Is there some a refresh issue with TitleWindow.title?

If I set the .title outside of the component, after I've used PopupManager,
then it's set as expected but I want to control the .title from the setter
function.


Does anyone have an idea what I should be doing?

I've also tried setting a dirty_flag, calling invalidateProperties() and
setting the .title from within commitProperties() but no joy there either...


Thanks for any help...
Nick


[flexcoders] Re: What is the Correct Type of Component For This?

2010-04-20 Thread James
Hi Oleg. I need it to display an icon and a label beneath that icon for each 
item. I thought about horizontal list but that doesn't expand automatically 
based on how many items are in it does it i.e. you can't edit it to fit to 
content?

Basically I need the same effect as in the disney website navigation here. i.e. 
with an image for each item and a label beneath it (which can be done via an 
item renderer):-

http://home.disney.co.uk/

But it's the resizing to refit any new added categories that I need to achieve.

--- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote:

 Hi.
 
 A. You can always create your own layout.
 B. Thinking of ready-made components, it could be HorizontalList,
 TabNavigator, ApplicationControlBar etc, whichever is more relevant.
 
 Best.
 
 Oleg





[flexcoders] Drag and drop vs scrolling

2010-04-20 Thread Richard Rodseth
I inherited some code which supports drag and drop from a list to a
node of a tree. Unfortunately it does not work when the tree is
scrolled.
Not only does the tree not autoscroll, but even if you scroll the
target item into view before beginning the drag, incorrect nodes
highlight.

I didn't see any code that's doing coordinate transformations, but did
notice that there is a custom TreeItemRenderer, which contains the
listeners for dragEnter etc.
I'm guessing this is the root of the problem, since renderers are recycled.

I've no idea why things were done this way, and am wondering if this
is a legitimate idiom, or if I need to start over with listeners
defined at the Tree level.

Also, is autoscroll supported if you do things the right way?


[flexcoders] Re: TitleWindow.title won't update from a setter

2010-04-20 Thread sminrana



Hi
If i understood when you close the popup it destroy all it's properties, that's 
why its not happening as you wanted.

i dont think in this case you can't do with setter.

--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 Hi,
 
 I've got a small MXML Component based on TitleWindow which I'm opening with
 PopupManager that has a setter and getter called iFormID.
 
 In the setter I have this code...
 
 public function set iFormID ( value : String ) : void
 {
 if ( _iFormID == value )
 return;
 
 _iFormID = value;
 
 
 if(iFormID.length  0)
 {
 this.title = Create Vendor;
 }
 else
 {
 this.title = Create Vendor by iForm;
 }
 
 }
 
 
 I am find that the title remains blank, but then if I close the PopUp and
 open it again, the last value the .title should have been is now visible...
 
 Is there some a refresh issue with TitleWindow.title?
 
 If I set the .title outside of the component, after I've used PopupManager,
 then it's set as expected but I want to control the .title from the setter
 function.
 
 
 Does anyone have an idea what I should be doing?
 
 I've also tried setting a dirty_flag, calling invalidateProperties() and
 setting the .title from within commitProperties() but no joy there either...
 
 
 Thanks for any help...
 Nick