[flexcoders] Re: Using arraycollection as text for a flex TextArea Component.

2011-12-26 Thread stephen_anson
It looks like you are 'joining' objects, into a string.
If you created a product class and provided a suitable toString() method I 
think that would solve the problem

--- In flexcoders@yahoogroups.com, "ZIONIST"  wrote:
>
> Hello Guys i have an arraycollection that is populated dynamically and would 
> like to use the same arraycollection as text for a TextArea component. Below 
> is my array collection
> 
> [Bindable]
> private var orderColl:ArrayCollection=new ArrayCollection();
> 
> /*** Create an object to hold the data ***/
> var obj:Object=new Object();
>   
> /*** Assign the variables to it ***/
> obj.Product=product.text;
> obj.Price=price.text;
> obj.Qty=1;
> obj.OrderNumber=label1.text;
>   
> /*** Add the object to the list ***/
> orderColl.addItemAt(obj, 0);
> 
> Then i have a TextArea component (id=cart) and i try to assign the 
> arraycollection to it as text like this
> 
> var str:String = orderColl.source.join("\n");
> cart.text = str;
> 
> The result in the textarea is [object object]. Any help guys?
>




[flexcoders] Re: Best book for learning flex

2010-06-14 Thread stephen_anson
I think it depends on your development experience.
For a total noob i'd look at essential guide to flex3  - charles E Brown

the flashbuilder / flex bible is also good with a little less hand holding.

and if you like looking at examples the flex cookbook is good.

It's also worth doing the adobe flex video in a week.

hth
Steve

--- In flexcoders@yahoogroups.com, Ramkumar  wrote:
>
> Hi,
> Can anyone suggest the best book for learning flex and action scripts?
> I am just beginner of flex and aprat from adobe site please suggest me the
> book.
> 
> Thanks and regards,
> N.Ramkumar
>




[flexcoders] item renderer inner button selection

2010-06-09 Thread stephen_anson
Hi,

I have a custom item renderer for a list component that contains a button.
I would like the itemClick event to target clicks of the button not the whole 
renderer

What is the best way to go about this?

any help much appreciated.
cheers Steve




[flexcoders] Re: Data grid column sizing is changing when returning from another state

2010-05-31 Thread stephen_anson
Well I'm not setting the width apart from in the mx:DataGrid attrib. to 991
However if I specify 100% rather than 991 then it works - the columns maintain 
their widths on returning to the prev state!
I can live with 100% but that behaviour seems odd to me.

cheers Steve and thanks for your help.

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Sounds like the DG is given a 0 width or really small width at some point.
> 
> 
> On 5/30/10 4:00 AM, "stephen_anson"  wrote:
> 
> 
> 
> 
> 
> 
> Hi,
> I have a data grid that has several columns, when i go from one state and 
> back to the original state the first 2 columns are resizing to fill the grid.
> I have used an the following custom checkbox component as an item renderer in 
> several of the fields, could there be a problem with this?
> 
> http://ns.adobe.com/mxml/2009";
>   xmlns:s="library://ns.adobe.com/flex/spark"
>   xmlns:mx="library://ns.adobe.com/flex/mx"
>   focusEnabled="true"
>  >
>  selected="{dataGridListData.label=='1'}" />
> 
> 
> when i stick a trace in the enterstate handler it says the first datacolumn 
> is -1 in width.
> any help much appreciated
> 
> cheers Steve
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>




[flexcoders] Data grid column sizing is changing when returning from another state

2010-05-30 Thread stephen_anson
Hi,
I have a data grid that has several columns, when i go from one state and back 
to the original state the first 2 columns are resizing to fill the grid.
I have used an the following custom checkbox component as an item renderer in 
several of the fields, could there be a problem with this?

http://ns.adobe.com/mxml/2009"; 
  
xmlns:s="library://ns.adobe.com/flex/spark" 
  
xmlns:mx="library://ns.adobe.com/flex/mx" 
  focusEnabled="true" 
 >



when i stick a trace in the enterstate handler it says the first datacolumn is 
-1 in width.
any help much appreciated

cheers Steve



[flexcoders] Re: Data grid vary column sizes

2010-05-26 Thread stephen_anson
following  link looks like what you need.
Another variation is to use TextMetrics to figure out the size of the text.

hth
cheers  Steve Anson

http://groups.google.com/group/flex_india/browse_thread/thread/7b546ff1cf7f94b8?pli=1

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> I never found any examples on the web.
> 
> I am trying to do this now and have my own strategy which may or may not be 
> the best. In my case, my Data Grid has a max of around 30 rows - I don't 
> think my strategy would work for large data sets.
> 
> So, what I am thinking is to use a mono-spaced embedded font for the data 
> grid (I am using Apple's Monaco TrueType font). Seeing as I know the font 
> size I will be using and each character uses the same width, I can safely use 
> a simple calculation to get the width of the column. I send a separate 
> request to the server that returns an object that contains the max character 
> length for each of the fields. In FLex I create columns from this object and 
> set the datagrid's columns to this array.
> 
> Once I have this working, I will post an example.
> 
> 
> 
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > I don't know of any, but this question has been asked so many times, 
> > there's probably an example if you search the web.
> > 
> > 
> > On 5/25/10 10:36 AM, "method_air"  wrote:
> > 
> > 
> > 
> > 
> > 
> > 
> > Any 'resize data grid columns to content' code examples?
> > 
> > --- In flexcoders@yahoogroups.com  , 
> > Alex Harui  wrote:
> > >
> > > The column has to be the same size for every row, but each column can 
> > > have different widths.  It would be rare to set it from the itemrenderer, 
> > > usually some other code accesses datagrid.column[i].width.
> > >
> > >
> > > On 5/19/10 11:02 AM, "method_air"  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > How do you vary the data grid column widths? Setting the width property 
> > > inside the item renderers to different values is not working.
> > >
> > > Thanks,
> > >
> > > Philip
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe System, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
>




[flexcoders] Re: Flash builder 4 installation options

2010-03-24 Thread stephen_anson
Sorry that was meant to read is Flash Builder 4 plugin going to work ok in 
eclipse 3.4.2

cheers Steve

--- In flexcoders@yahoogroups.com, "stephen_anson"  wrote:
>
> 
> I have eclipse 3.4.2 is that a recent enough edition
> 
> thanks for your advice - Steve
> 
> --- In flexcoders@yahoogroups.com, Tom Chiverton  wrote:
> >
> > On Wednesday 24 Mar 2010, stephen_anson wrote:
> > > Anybody got advice in this area, as I've googled and found nothing helpful
> > 
> > Backup your workspace and eclipse install.
> > Make sure you on a recent Eclipse (3.5 or late 3.4) supported by FB, if 
> > not, 
> > upgrade Eclipse and your other tools.
> > Uninstall the FB3 plugin and install FB4 plugin.
> > 
> > -- 
> > Helping to revolutionarily deploy interactive enterprise channels as part 
> > of 
> > the IT team of the year 2010, '09 and '08
> > 
> > 
> > 
> > This email is sent for and on behalf of Halliwells LLP.
> > 
> > Halliwells LLP is a limited liability partnership registered in England and 
> > Wales under registered number OC307980 whose registered office address is 
> > at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A 
> > list of members is available for inspection at the registered office 
> > together with a list of those non members who are referred to as partners.  
> > We use the word ?partner? to refer to a member of the LLP, or an employee 
> > or consultant with equivalent standing and qualifications. Regulated by the 
> > Solicitors Regulation Authority.
> > 
> > CONFIDENTIALITY
> > 
> > This email is intended only for the use of the addressee named above and 
> > may be confidential or legally privileged.  If you are not the addressee 
> > you must not read it and must not use any information contained in nor copy 
> > it nor inform any person other than Halliwells LLP or the addressee of its 
> > existence or contents.  If you have received this email in error please 
> > delete it and notify Halliwells LLP IT Department on 0870 365 2500.
> > 
> > For more information about Halliwells LLP visit www.halliwells.com.
> >
>




[flexcoders] Re: Flash builder 4 installation options

2010-03-24 Thread stephen_anson

I have eclipse 3.4.2 is that a recent enough edition

thanks for your advice - Steve

--- In flexcoders@yahoogroups.com, Tom Chiverton  wrote:
>
> On Wednesday 24 Mar 2010, stephen_anson wrote:
> > Anybody got advice in this area, as I've googled and found nothing helpful
> 
> Backup your workspace and eclipse install.
> Make sure you on a recent Eclipse (3.5 or late 3.4) supported by FB, if not, 
> upgrade Eclipse and your other tools.
> Uninstall the FB3 plugin and install FB4 plugin.
> 
> -- 
> Helping to revolutionarily deploy interactive enterprise channels as part of 
> the IT team of the year 2010, '09 and '08
> 
> 
> 
> This email is sent for and on behalf of Halliwells LLP.
> 
> Halliwells LLP is a limited liability partnership registered in England and 
> Wales under registered number OC307980 whose registered office address is at 
> Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
> of members is available for inspection at the registered office together with 
> a list of those non members who are referred to as partners.  We use the word 
> ?partner? to refer to a member of the LLP, or an employee or consultant with 
> equivalent standing and qualifications. Regulated by the Solicitors 
> Regulation Authority.
> 
> CONFIDENTIALITY
> 
> This email is intended only for the use of the addressee named above and may 
> be confidential or legally privileged.  If you are not the addressee you must 
> not read it and must not use any information contained in nor copy it nor 
> inform any person other than Halliwells LLP or the addressee of its existence 
> or contents.  If you have received this email in error please delete it and 
> notify Halliwells LLP IT Department on 0870 365 2500.
> 
> For more information about Halliwells LLP visit www.halliwells.com.
>




[flexcoders] Flash builder 4 installation options

2010-03-24 Thread stephen_anson
Hi,
I currently am working on Flex projects using flex builder 3, installed as a 
plugin to eclipse.
I also do java server development using eclipse.
I'm looking to upgrade to take advantage of the new tools in flash builder, but 
am concerned that this may give me issues. 

Anybody got advice in this area, as I've googled and found nothing helpful

cheers Steve



[flexcoders] Re: soap and cookies with webservice

2009-09-10 Thread stephen_anson
--- In flexcoders@yahoogroups.com, "guy.tomer"  wrote:
>
> In a standard browser flash application in a web page, if the server sets a 
> cookie on any http requests, the cookie will be sent back just fine. However 
> you're talking about a desktop app which you probably mean an AIR application 
> so I am not sure, although I guess it should work. The test should be easy - 
> make any http call from one of the air applications to a server that sets a 
> cookie and see if it is sent back.
> We'll be happy to hear the results...
>

I'm planning on creating a projector using screenweaver / haxe that will load 
in a swf created in flex, needed for the webservice features.

i will let you know how it gets on

thanks Steve




[flexcoders] Re: soap and cookies with webservice

2009-09-09 Thread stephen_anson
--- In flexcoders@yahoogroups.com, "guy.tomer"  wrote:
>
> Not sure what you mean by "standalone player". to the best of my knowledge 
> flash uses the http connection of the browser so cookies behave the same as 
> in the browser. HOWEVER, if you are trying to add headers "manually" to the 
> outgoing SOAP requests - that's problematic, from our experience using the 
> flex 3 SOAP it is not possible, as far as I know it's not possible with flash 
> over HTTP POST requests at all.
>

I have a client who wants to develop a desktop application, and has the need to 
communicate with a web service via soap.

they have stated that the service will send a cookie and expect a return of 
that cookie with each request.

it sounds like this is not possible with flash?







[flexcoders] soap and cookies with webservice

2009-09-08 Thread stephen_anson
Hi,
is it possible to send and receive cookies along with a WebService in
Flex a flex application (note that it will be in a standalone player)

any help really appreciated

Steve



[flexcoders] Printing on Mac

2009-04-28 Thread stephen_anson
Hi,
Anyone any idea why printing on Mac might result in an empty page whereas on 
windows its fine?

I'm using all the standard techniques, with Print jobs etc. But I am not adding 
the print sprite to the stage.

I am guessing that there is some difference in the way the flash players 
implement printing.

any pointers in the right direction much appreciated
cheers Steve



[flexcoders] Re: Sending a HEAD request

2009-04-17 Thread stephen_anson
Thank you,

Is there a way to do the same thing directly in actionscript?


thanks Steve

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> You could include a javascript function in the wrapper and call it from 
> externalInterface.call. Something like...
> 
> function UrlExists(url)
> {
>   var http = new XMLHttpRequest();
>   http.open('HEAD', url, false);
>   http.send();
>   return http.status!=404;
> }
> 
> HTH
> 
> 
> 
> Steve
> 
> 
> --- In flexcoders@yahoogroups.com, "stephen_anson"  wrote:
> >
> > Hi,
> > 
> > The server side dev team have asked if I can send a HEAD request to their 
> > home page in order to 'keep my flex app logged in'
> > 
> > What is the best way of going about this.
> > URLRequest will not allow the method as  a "HEAD" as far as I can see.
> > 
> > And URLLoader returns the html data, I basically need to send only
> > 
> > Any ideas much appreciated
> > 
> > thanks Steve
> >
>




[flexcoders] Sending a HEAD request

2009-04-17 Thread stephen_anson
Hi,

The server side dev team have asked if I can send a HEAD request to their home 
page in order to 'keep my flex app logged in'

What is the best way of going about this.
URLRequest will not allow the method as  a "HEAD" as far as I can see.

And URLLoader returns the html data, I basically need to send only

Any ideas much appreciated

thanks Steve




[flexcoders] issues with printing on mac and linux

2009-04-06 Thread stephen_anson
HI there,
I'm trying to print out a sprite called 'plan', but its not appearing on Mac 
and Linux. Here I draw my plan sprite into a bitmap, add that bitmap to a 
sprite and try and print that. 
I get blanks on Mac and Linux.

Any ideas really appreciated!

var pj:PrintJob = new PrintJob();
if( pj.start())
{
var planh:Number = plan.height;
var planw:Number = plan.width;
var ph:Number = pj.pageHeight;
var pw:Number = pj.pageWidth;
var bd:BitmapData = new 
BitmapData(planw, planh, false );
var bmp:Bitmap; 

var s:Sprite= new Sprite();


// figure out a scale that will suit 
the print
var rw:Number = planw/pw;
var rh:Number = planh/ph;
bd.draw(plan, null,null,null,null, 
true);
bmp = new Bitmap(bd);
if(rw >1 || rh>1)
{
var scale:Number = rw > rh ? 
1/rw : 1/rh;

bmp.scaleX = scale;
bmp.scaleY = scale;

}
s.addChild(bmp);

pj.addPage(s);
pj.send();

}



[flexcoders] Re: Observer pattern

2008-11-10 Thread stephen_anson
I notice something that is possibly similar in my app, eventually foun
d out the focus manager had a reference to a ui component in the
popup. You can see if it this by looking at references in the
profiler, by taking a memory snap shot and looking at your object 

Hope that helps Steve



--- In flexcoders@yahoogroups.com, jitendra jain
<[EMAIL PROTECTED]> wrote:
>
> Well Everytime i create a popup there is only as single instance.
But i don't want that also because My application is too big and iam
not wanting my application to occupy the memory. Thanks again. I will
read the link once again.
> Â Thanks,
> 
> with Regards,
> Jitendra Jain
> 
> 
> 
> 
> 
> 
> From: Ralf Bokelberg <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Monday, 10 November, 2008 1:19:37 PM
> Subject: Re: [flexcoders] Observer pattern
> 
> 
> Very difficult to debug, because we don't know, what is going on
> behind the scenes. Try googling Grant Skinner's articles about Flash
> Player memory and garbage collection. Might be helpful. Also you could
> try to create and destroy the popup a billion times and see, if the
> problem manifests into a real problem.
> 
> Ralf.
> 
> On Mon, Nov 10, 2008 at 8:20 AM, jitendra jain
>  wrote:
> > Profiler still shows that popup occupied the memory. I'm
> > enforcing garbage Collector but not working. Let me know..
> >
> > Thanks Relf for your reply.
> >
> > Thanks,
> >
> > with Regards,
> > Jitendra Jain
> >
> >
> >  _ _ __
> > From: Ralf Bokelberg 
> > To: [EMAIL PROTECTED] ups.com
> > Sent: Monday, 10 November, 2008 12:46:12 PM
> > Subject: Re: [flexcoders] Observer pattern
> >
> > Afaik the gc only runs, if the player is running out of memory. What
> > makes you think, that your popup doesn't get garbage collected?
> >
> > Ralf.
> >
> > On Mon, Nov 10, 2008 at 6:08 AM, jitendra jain
> >  wrote:
> >> Hi friends,
> >>
> >> I'm using Observer pattern to create popups in my application.
But when i
> >> tried to remove PopUpManager. removePopUp( displayObj) , it does
not get
> >> garbage collected. I even tried with assigning null to my
Observer. ITs
> >> not
> >> working. I removed event Listeners and also firing Observer by
setting the
> >> boolean 'false' the way we did with 'true'. But nothing seems
working.
> >>
> >> Please help.
> >>
> >> Thanks,
> >>
> >> with Regards,
> >> Jitendra Jain
> >>
> >>
> >>
> >>  _ _ __
> >> Connect with friends all over the world. Get Yahoo! India Messenger.
> >>
> >
> >  _ _ __
> > Add more friends to your messenger and enjoy! Invite them now.
> > 
>  
> 
> 
>   Be the first one to try the new Messenger 9 Beta! Go to
http://in.messenger.yahoo.com/win/
>




[flexcoders] Re: profile still shows removed instances

2008-11-05 Thread stephen_anson
cheers makes perfect sense now I think about it!



[flexcoders] profile still shows removed instances

2008-11-05 Thread stephen_anson
Hi,
I'm adding a custom UIComponent to the application and then later
removing it.

In the profiler it is still showing up as existing ( even after
garbage collection and setting it to null etc

here is a simplified example, custom butt extends standard button and
does nothing else.


http://www.adobe.com/2006/mxml"; 
layout="absolute" 
xmlns:comps="*"
creationComplete="init()">






anyone any ideas?, is removing child elements in a flex different to
standard AS 3



[flexcoders] Re: When to use Cairngorm front controller ?

2008-09-15 Thread stephen_anson
--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> Hi Steve,
> 
> Usually you would use Cairngorm events for application wide user
> gestures; like making a service call, or for gestures that require a lot
> of calculations or that navigate.  However, to reduce the amount of
> custom events, you can certainly use local flex or flash events for user
> gestures that are local to a view; like click a button and change the
> view state of the component or view.  Nothing wrong with using Cairngorm
> events for everything, but the more that you can keep a component
> self-contained, the better.
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "stephen_anson" <[EMAIL PROTECTED]> wrote:
> >
> > Hi, I'm fairly new to cairngorm,
> >
> > I have an app that produces many events via 'user gestures', so for
> > example I produce a group of items one of which can be selected for
> > further editing of its properties via a form.
> >
> > Should cairngorm I produce custom events and hookup to the front
> > controller for every single mouse click etc, or is it best to reserve
> > the cairngorm architecture for specific parts of an application such
> > as sending and receiving data to the server.
> >
> > thanks Steve
> >
>
much appreciated thanks 
Steve



[flexcoders] When to use Cairngorm front controller ?

2008-09-15 Thread stephen_anson
Hi, I'm fairly new to cairngorm,

I have an app that produces many events via 'user gestures', so for
example I produce a group of items one of which can be selected for
further editing of its properties via a form.

Should cairngorm I produce custom events and hookup to the front
controller for every single mouse click etc, or is it best to reserve
the cairngorm architecture for specific parts of an application such
as sending and receiving data to the server.

thanks Steve