[flexcoders] I want to create a custom ComboBox with general itemRenderer.

2009-10-27 Thread yms0411
I have comboboxes that might take in different item renderers depending on the 
situation.
The problem I'm facing is showing the selected item on the Combobox label. 
I want to show it exactly same as to the item showing on the dropdown list. I 
found somewhere that i should remove the textInput from the Combobox and 
addChild with a new renderer instance. however I couldnt find a clear solution 
to this. 

Any tips on where i should start?



RE: [flexcoders] Binding Model Objects

2009-10-27 Thread Gregor Kiddie
Having your DTOs physically different from your Domain Objects has a lot
of benefit using the assembler pattern to map between the two.

 

You can have entirely different structures for your DTOs, map multiple
DOs to DTOs, keep your transport and domain layers separate (also
allowing you to use different transport mechanisms AMF or XML over HTTP
both easily swapped), and allow you a great deal of flexibility in
structuring your application.

 

Downside, yes the conversion process can be expensive, BUT only if you
are planning on throwing around massive objects all the time.

Taylor your service layer to be more responsive to your needs. Don't
write a service which requires the whole object when all you need to
send is an id (example, it's the difference between sending a whole
email back to the server with the 'read' status marked as true, and just
calling a 'markAsRead' service with the id of the email).

Use paging techniques to break up your dataset, do you really need to
fetch all 10k items now? If you are only showing them in 10 item chunks
(i.e. in a datagrid) why not fetch them in 10 item chunks (or a few more
for visual performance reasons).

Well thought out business services can both reduce the amount of traffic
you need to send, and allow DTO mapping to be realistic (on both ends of
the wire).

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Richard Rodseth
Sent: 26 October 2009 20:02
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Binding  Model Objects

 

  

Jeff

I hope we see some responses to this. I like the idea of non-bindable
and immutable DTOs, but isn't it true that if you have a very large
list, you've got substantial memory overhead in the conversion of those
DTOs to the bindable objects. Or are people tackling that with
virtualized collections?

 



[flexcoders] Flash/AMFPHP/Code Igniter Integration

2009-10-27 Thread Lexter
hello everybody,

do anyone can lend me a help regarding on how to integrated CI and AMFPHP with 
flash?

hoping for your response.

thanks in advance.



RE: [flexcoders] Re: AIR Performance

2009-10-27 Thread Gregor Kiddie
 

Which is why I said can, rather than should. I can't make that decision
for him.

 

I can write you an application in any language you want which will max
your CPU, and eat up all your available memory. So how is that any
different?

Yes Adobe are producing a better version of the runtime, but that's
falling out of general improvements to allow the Flash Player to run on
mobile devices, rather than any acceptance that the AIR runtime is slow
/ expensive.

Flash / AIR are where Java was 10-12 years ago. It's easy to write a
memory hogging, CPU burning app very easily, and harder to write a good
one. Remember all those Java applets which maxed your CPU because they
were spawning a ridiculous amount of threads?

Check out this link on Firefox and watch your CPU usage, no Flash in
sight

http://www.ehiprimarycare.com/news/5322/dh_endorses_first_video_game

 

There are performance tips for reducing CPU usage in AIR which a well
designed application should follow

http://blogs.adobe.com/air/2009/05/performance_tips_for_adobe_air.html

as well as more general tips for writing applications (link is for the
iPhone experience but is still useful, runtime is optimized for Bitmaps,
so use them over PNGs, etc)

http://coderhump.com/archives/517

 

Yes the runtime should be as frugal as possible when it comes to
grabbing resources, but writing a crappy app and then blaming problems
on the runtime is just trying to absolve blame.

 

I guarantee if someone has written an app which abuses the runtime now,
AIR 2 / FP 10.1 isn't going to be their savior.

 

Personal experience... We have an AIR application with almost 400k LOC
spread over 30+ modules. It doesn't take more memory than we are
comfortable with, and doesn't burn through the CPU unnecessarily. We
would quite like it to be a bit quicker, but hopefully the runtime
improvements will sort that for us ;) We've had memory problems in the
past, managing to crash the runtime repeatedly, but these were always
traced back to poorly performing code rather than runtime issues.

 

What I will say is that currently, the runtime makes writing a well
behaved app very difficult indeed. The required level of understanding
of the internals of the runtime, and how AS3 interacts with it is
ridiculously high. The SDK bugs which contribute to the failure of the
garbage collector (the focus manager one makes me grind my teeth a lot)
are avoidable by Adobe, and they are admitting that working out where
problems lie is hard (hence the better profiler in FB4, and the amount
of posts on these forums about it).

 

For the OP, I'd say, don't believe the hype in either direction. If you
are planning on betting your company on either my or reflexactions
posts, you'd be making a huge mistake. Do the leg work yourself,
prototype stuff (not just AIR, but other options too), and actually find
out which meets your needs.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of reflexactions
Sent: 27 October 2009 01:07
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR Performance

 

  

If you write it well, you will not have any CPU or memory issues
I am sorry but that is just so far from reality it is ridiculous.

AIR does not just have 'the same memory and CPU issue as every other
app'.

The issues are well known and accepted so I don't where you come up with
that notion, even Adobe have talked about how they are going to address
memory issues in the next version and Flex4 has throttling code built in
to try and make a PC usable when an AIR is in the background something
not 'every other app' usually requires.

When some guy is asking about makeing a decison that might affect the
future of his company it really doesnt help to stick you head in the
sand and pretend everything is hunky dory when it isn't.





[flexcoders] LCDS : creating custom messaging service adapter

2009-10-27 Thread Besite - Bart
Hello,
A short question, to create a custom messaging service adapter, is it 
best to extend from ServiceAdapter or to extend from MessageServiceAdapter ?

Thanks,
Bart


[flexcoders] Re: AIR Performance

2009-10-27 Thread jwc_wensan


Gregor:

I am doing my due diligence.  That is why I am asking those who have
more experience working with AIR than I do. 

I read the articles and I was just asking for input from the real
world developers and not relying soley on information contained in
article(s).

Isn't this what this forum is for?

You assume that I would write crappy software.  

Never have. Never will.

I have been developing software for over 30 years.

Sorry if asking my question upset you.

However, thanks for your input.

Jack

--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

  
 
 Which is why I said can, rather than should. I can't make that decision
 for him.
 
  
 
 I can write you an application in any language you want which will max
 your CPU, and eat up all your available memory. So how is that any
 different?
 
 Yes Adobe are producing a better version of the runtime, but that's
 falling out of general improvements to allow the Flash Player to run on
 mobile devices, rather than any acceptance that the AIR runtime is slow
 / expensive.
 
 Flash / AIR are where Java was 10-12 years ago. It's easy to write a
 memory hogging, CPU burning app very easily, and harder to write a good
 one. Remember all those Java applets which maxed your CPU because they
 were spawning a ridiculous amount of threads?
 
 Check out this link on Firefox and watch your CPU usage, no Flash in
 sight
 
 http://www.ehiprimarycare.com/news/5322/dh_endorses_first_video_game
 
  
 
 There are performance tips for reducing CPU usage in AIR which a well
 designed application should follow
 
 http://blogs.adobe.com/air/2009/05/performance_tips_for_adobe_air.html
 
 as well as more general tips for writing applications (link is for the
 iPhone experience but is still useful, runtime is optimized for Bitmaps,
 so use them over PNGs, etc)
 
 http://coderhump.com/archives/517
 
  
 
 Yes the runtime should be as frugal as possible when it comes to
 grabbing resources, but writing a crappy app and then blaming problems
 on the runtime is just trying to absolve blame.
 
  
 
 I guarantee if someone has written an app which abuses the runtime now,
 AIR 2 / FP 10.1 isn't going to be their savior.
 
  
 
 Personal experience... We have an AIR application with almost 400k LOC
 spread over 30+ modules. It doesn't take more memory than we are
 comfortable with, and doesn't burn through the CPU unnecessarily. We
 would quite like it to be a bit quicker, but hopefully the runtime
 improvements will sort that for us ;) We've had memory problems in the
 past, managing to crash the runtime repeatedly, but these were always
 traced back to poorly performing code rather than runtime issues.
 
  
 
 What I will say is that currently, the runtime makes writing a well
 behaved app very difficult indeed. The required level of understanding
 of the internals of the runtime, and how AS3 interacts with it is
 ridiculously high. The SDK bugs which contribute to the failure of the
 garbage collector (the focus manager one makes me grind my teeth a lot)
 are avoidable by Adobe, and they are admitting that working out where
 problems lie is hard (hence the better profiler in FB4, and the amount
 of posts on these forums about it).
 
  
 
 For the OP, I'd say, don't believe the hype in either direction. If you
 are planning on betting your company on either my or reflexactions
 posts, you'd be making a huge mistake. Do the leg work yourself,
 prototype stuff (not just AIR, but other options too), and actually find
 out which meets your needs.
 
  
 
 Gk.
 
 Gregor Kiddie
 Senior Developer
 INPS
 
 Tel:   01382 564343
 
 Registered address: The Bread Factory, 1a Broughton Street, London SW8
 3QJ
 
 Registered Number: 1788577
 
 Registered in the UK
 
 Visit our Internet Web site at www.inps.co.uk
 blocked::http://www.inps.co.uk/ 
 
 The information in this internet email is confidential and is intended
 solely for the addressee. Access, copying or re-use of information in it
 by anyone else is not authorised. Any views or opinions presented are
 solely those of the author and do not necessarily represent those of
 INPS or any of its affiliates. If you are not the intended recipient
 please contact is.helpd...@...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of reflexactions
 Sent: 27 October 2009 01:07
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: AIR Performance
 
  
 
   
 
 If you write it well, you will not have any CPU or memory issues
 I am sorry but that is just so far from reality it is ridiculous.
 
 AIR does not just have 'the same memory and CPU issue as every other
 app'.
 
 The issues are well known and accepted so I don't where you come up with
 that notion, even Adobe have talked about how they are going to address
 memory issues in the next version and Flex4 has throttling code built in
 to try and make a PC usable when an AIR is in the background something
 

Re: [flexcoders] Flash/AMFPHP/Code Igniter Integration

2009-10-27 Thread Yesaya handoyo
Try 
http://active.tutsplus.com/tutorials/workflow/using-amfphp-with-as3-and-codeignitor/

Hope it helps.. ^_^

On 10/27/09, Lexter halfbaked11...@yahoo.com wrote:
 hello everybody,

 do anyone can lend me a help regarding on how to integrated CI and AMFPHP
 with flash?

 hoping for your response.

 thanks in advance.




Re: [flexcoders] Flash/AMFPHP/Code Igniter Integration

2009-10-27 Thread Yesaya handoyo
and http://philpalmieri.com/2009/04/codeigniter-amfphp-library/

On 10/27/09, Yesaya handoyo yongha...@gmail.com wrote:
 Try
 http://active.tutsplus.com/tutorials/workflow/using-amfphp-with-as3-and-codeignitor/

 Hope it helps.. ^_^

 On 10/27/09, Lexter halfbaked11...@yahoo.com wrote:
 hello everybody,

 do anyone can lend me a help regarding on how to integrated CI and AMFPHP
 with flash?

 hoping for your response.

 thanks in advance.





RE: [flexcoders] Re: AIR Performance

2009-10-27 Thread Gregor Kiddie
Sorry Jack, I didn't mean it to come across as accusing you of either
writing bad code, or not doing due diligence.  It wasn't intended that
way! The head-in-the-sand comment got me fired up ;)

 

I'm sure as a developer you know these arguments always crop up on lists
like this... ask 3 developers a question and you'll get 5 different
answers, I know I could have written reflexaction's post as easily as my
own (depending on how annoyed with Flex I was feeling at the time)!

 

I'd never stop people from asking questions on this list, far from it!

 

Ask me again tomorrow, and I'll give you a different answer ;)

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of jwc_wensan
Sent: 27 October 2009 12:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR Performance

 

  



Gregor:

I am doing my due diligence. That is why I am asking those who have
more experience working with AIR than I do. 

I read the articles and I was just asking for input from the real
world developers and not relying soley on information contained in
article(s).

Isn't this what this forum is for?

You assume that I would write crappy software. 

Never have. Never will.

I have been developing software for over 30 years.

Sorry if asking my question upset you.

However, thanks for your input.

Jack





RE: [flexcoders] Binding Model Objects

2009-10-27 Thread Battershall, Jeff
Gregor,

I'm doing a good bit of what you describe already - like chunking the number of 
objects transferred, only transferring what is needed, etc.

My big question based on Sean's preso was making domain objects bindable.  
Right now, I am, for the most part.  For example, when editing a specific 
record in a datagrid, it makes it so much easier to have that object bindable 
so I can load it into a form and have the UI reflect that object instance. To 
NOT make domain model objects bindable would mean creating a third layer for 
binding and loading a non-bindable model object into it.  That is a total 
headache, but I'd do it, if it really made that much difference.  I'm a little 
skeptical that a bindable AMF model object is going to fire off a bunch of 
events when received by the Flex client.

Jeff


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Gregor Kiddie
Sent: Tuesday, October 27, 2009 6:18 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding  Model Objects




Having your DTOs physically different from your Domain Objects has a lot of 
benefit using the assembler pattern to map between the two.

You can have entirely different structures for your DTOs, map multiple DOs to 
DTOs, keep your transport and domain layers separate (also allowing you to use 
different transport mechanisms AMF or XML over HTTP both easily swapped), and 
allow you a great deal of flexibility in structuring your application.

Downside, yes the conversion process can be expensive, BUT only if you are 
planning on throwing around massive objects all the time.
Taylor your service layer to be more responsive to your needs. Don't write a 
service which requires the whole object when all you need to send is an id 
(example, it's the difference between sending a whole email back to the server 
with the 'read' status marked as true, and just calling a 'markAsRead' service 
with the id of the email).
Use paging techniques to break up your dataset, do you really need to fetch all 
10k items now? If you are only showing them in 10 item chunks (i.e. in a 
datagrid) why not fetch them in 10 item chunks (or a few more for visual 
performance reasons).
Well thought out business services can both reduce the amount of traffic you 
need to send, and allow DTO mapping to be realistic (on both ends of the wire).

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343
Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
Registered Number: 1788577
Registered in the UK

Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/

The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpd...@inps.co.uk


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Richard Rodseth
Sent: 26 October 2009 20:02
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Binding  Model Objects



Jeff

I hope we see some responses to this. I like the idea of non-bindable and 
immutable DTOs, but isn't it true that if you have a very large list, you've 
got substantial memory overhead in the conversion of those DTOs to the bindable 
objects. Or are people tackling that with virtualized collections?







[flexcoders] Re: AIR Performance

2009-10-27 Thread reflexactions
head-in-the-sand comment got me fired up 
As did the statement that bad memory issues in AIR were down to bad coding.

Ok we probably are comming at this from a different scale, the number of 
modules on our app runs in to the hundreds not 30 so we probably have quite a 
different perspective, but like Jack I have been coding for over 30 years, the 
last 10 in actionscript, I do nothing other than pure AS coding (I logged 
140hrs in pure flex development last week alone and we have 7 other developers 
as well) and I know for a fact that even with the best coding you still have 
memory/cpu issues with AIR/flex that simply can't be avoided.


--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 Sorry Jack, I didn't mean it to come across as accusing you of either
 writing bad code, or not doing due diligence.  It wasn't intended that
 way! The head-in-the-sand comment got me fired up ;)
 
  
 
 I'm sure as a developer you know these arguments always crop up on lists
 like this... ask 3 developers a question and you'll get 5 different
 answers, I know I could have written reflexaction's post as easily as my
 own (depending on how annoyed with Flex I was feeling at the time)!
 
  
 
 I'd never stop people from asking questions on this list, far from it!
 
  
 
 Ask me again tomorrow, and I'll give you a different answer ;)
 
  
 
 Gk.
 
 Gregor Kiddie
 Senior Developer
 INPS
 
 Tel:   01382 564343
 
 Registered address: The Bread Factory, 1a Broughton Street, London SW8
 3QJ
 
 Registered Number: 1788577
 
 Registered in the UK
 
 Visit our Internet Web site at www.inps.co.uk
 blocked::http://www.inps.co.uk/ 
 
 The information in this internet email is confidential and is intended
 solely for the addressee. Access, copying or re-use of information in it
 by anyone else is not authorised. Any views or opinions presented are
 solely those of the author and do not necessarily represent those of
 INPS or any of its affiliates. If you are not the intended recipient
 please contact is.helpd...@...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of jwc_wensan
 Sent: 27 October 2009 12:15
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: AIR Performance
 
  
 
   
 
 
 
 Gregor:
 
 I am doing my due diligence. That is why I am asking those who have
 more experience working with AIR than I do. 
 
 I read the articles and I was just asking for input from the real
 world developers and not relying soley on information contained in
 article(s).
 
 Isn't this what this forum is for?
 
 You assume that I would write crappy software. 
 
 Never have. Never will.
 
 I have been developing software for over 30 years.
 
 Sorry if asking my question upset you.
 
 However, thanks for your input.
 
 Jack





RE: [flexcoders] Binding Model Objects

2009-10-27 Thread Gregor Kiddie
Jeff,

 

Yeah, I just jumped all over the DTO part of the discussion. Our DOs
never get near AMF.

We convert everything btw... each record in the DG ends up as an
instance of a DO (which is why the performance of the service layer is
so important).

 

With DOs, we do make them bindable, but we use custom events to fire the
bindings, and we never ever make the entire object bindable, only the
fields required for the UI. The cheat here is when assembling the DO
from a DTO, use a method that doesn't go through the setters, and then
dispatch the change event once done, that way the binding operations can
be done in a single frame rather than being spread out.

 

Example (not the best architecture though).

public class fooDO extends EventDispatcher {



private var _bar : String;

 

public function set bar( b : String ) : void {

   if ( _bar != b ) {

 _bar = b;

dispatchEvent( fooChanged );

}

}



[Bindable(fooChanged)]

public function get bar() : String {

return _bar;

}



public function assemble( dto : FooDTO ) : void {

_bar = dto.bar;

dispatchEvent( fooChanged );

}

}

 

Quickly written out, but if all the bindable properties are fired off
fooChanged then the non-bindable DTO can be assembled into a Bindable
DO and cut down on the number of change events being fired. If the
default changeEvent is used, events will fire on each setter used
which is where the presentation is going.

 

Is that explained badly? Non-bindable DTOs assemble to bindable DOs in a
way that minimizes the amount of event slinging going on...

 

Gk,

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Battershall, Jeff
Sent: 27 October 2009 13:43
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Binding  Model Objects

 

  

Gregor,

 

I'm doing a good bit of what you describe already - like chunking the
number of objects transferred, only transferring what is needed, etc. 

 

My big question based on Sean's preso was making domain objects
bindable.  Right now, I am, for the most part.  For example, when
editing a specific record in a datagrid, it makes it so much easier to
have that object bindable so I can load it into a form and have the UI
reflect that object instance. To NOT make domain model objects bindable
would mean creating a third layer for binding and loading a non-bindable
model object into it.  That is a total headache, but I'd do it, if it
really made that much difference.  I'm a little skeptical that a
bindable AMF model object is going to fire off a bunch of events when
received by the Flex client.

 

Jeff

 



[flexcoders] Re: creationPolicy and createComponentsFromDecsriptors

2009-10-27 Thread asea19
Thanks for confirming that there won't be any issues accessing the components 
shortly after they've been created with the createComponentsFromDescriptors() 
method.  Yes, I agree, there shouldn't be so many layout containers.  I need to 
clean this guy's code up! 

Cheers

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

 There won't be any issues with accessing the results of 
 createComponentsFromDescriptors unless there are sub-containers with their 
 own creation policies that don't create something you'd expect to be there.
 
 I can't picture any renderer needing 15 layout containers at the same time.  
 Using fewer containers for more than one purpose will be a significant 
 performance gain.  The fewer containers and components you ever create, the 
 better off you'll be.  Less is more.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of asea19
 Sent: Monday, October 26, 2009 12:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] creationPolicy and createComponentsFromDecsriptors
 
 
 
 Hi,
 
 I'm working on an app that works with a lot of search results and item 
 renderers to display the search results. The renderer is usually a VBox with 
 a lot of HBoxes or GridRows within it. The developer who put these together 
 just used includeInLayout=false for the HBoxes or GridRows that weren't being 
 used. This seems to be a bad idea since there are usually 25-30 renderers on 
 the screen at a time, each with about 10-15 unused layout containers.
 
 I am going through and optimizing them now, and started setting the 
 creationPolicy to none on all the items, and where they were previosuly being 
 made visible, I call createComponentsFromDescriptors() on the layout 
 container. This seems to cut rendering time in about half. I am wondering if 
 there might be any unforseen issues I may have using this method. In the 
 code, the textfields(which are the children of the layout containers) are 
 being populated in the very next line after I call the 
 createComponentsFromDescriptors() method. I am a little surprised that the 
 container's children are initialized so quickly to be able to be accessed and 
 take properties. Is this safe to do? Or should I listen for some 
 initialization events before setting any properties on the child components 
 as a failsafe?
 
 Thanks in Advance,
 
 Adam





[flexcoders] Re: ImageSnapshot and PopUpManager

2009-10-27 Thread shafram





Thanks it worked. This is what I ended up doing

private function captureImage() : void
{
var sn : ImageSnapshot;
sn = 
ImageSnapshot.captureImage(this.systemManager.getTopLevelRoot(),100,new 
PNGEncoder());
var file:FileReference = new FileReference();
file.save(sn.data, captured.png);
}



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

 Use systemManager instead of application.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of shafram
 Sent: Monday, October 26, 2009 1:31 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] ImageSnapshot and PopUpManager
 
 
 
 Hi, I have an application that has several windows that were created using 
 the PopUpManager. I would like the user to be able to take a screenshot of 
 the the app so I am using the ImageSnapshot class.
 
 The application is being captured but none of the pop up windows are showing 
 up. Is there any way I can achieve this?
 
 I have attached an example of the problem. You will need to ensure that the 
 project is set to require Flash Player Version 10.0 in the flex compiler 
 options.
 
 To see the problem click on 'Pop up box' then click on 'Capture Image'
 
 Thanks in advance
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 
 mx:Script
 ![CDATA[
 import mx.graphi! cs.codec.PNGEncoder;
 import mx.graphics.ImageSnapshot;
 import mx.managers.PopUpManager;
 import mx.containers.TitleWindow;
 import flash.net.FileReference;
 
 private var titleWindow : TitleWindow;
 
 private function captureImage() : void{
 
var sn : ImageSnapshot;
  nbs! p; sn = ImageSnapshot.captureImag! e(f orm,100,new 
 PNGEncoder());
 var file:FileReference = new FileReference();
file.save(sn.data, captured.png);
 
 }
 
 private function showPopUp() : void {
 
 if (titleWindow == null)
 {
 ! titleWindow = 
 TitleWindow(PopUpManager.createPopUp(this.form,TitleWindow,false));
 titleWindow.height = 115;
 titleWindow.width = this.form.width / 2;
 titleWindow.title = My title window  + new Date();
 PopUpManager.centerPopUp(titleWindow);
 
 }
 nb! sp;   else
 ! ;  nbsp;  {
 PopUpManager.removePopUp(titleWindow);
 titleWindow = null;
 }
 }
 
 
 ]]
 /mx:Script
 
 
 mx:VBox id=form
 mx:Button label=Capture Image click=captureImage(); /
 mx:TextArea id=txtBox width=800 height=600/
  ! ;   mx:HRule/
 mx:Button label=Pop up box click=showPopUp(); /
 
 /mx:VBox
 
 
 
 /mx:Application





RE: [flexcoders] Binding Model Objects

2009-10-27 Thread Battershall, Jeff
Thanks Gregor,

I think I'm starting to get it.  -  by having client-side bindable objects, 
using custom events, that are generated from DTOs, you minimize the amount of 
generic change events being fired.

What about ObjectProxy?  Can't similar results be obtained there? 
(http://blogs.digitalprimates.net/codeSlinger/index.cfm/2007/8/20/Making-the-unbindable-bindable-with-Object-Proxy).

Jeff


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Gregor Kiddie
Sent: Tuesday, October 27, 2009 10:15 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding  Model Objects




Jeff,

Yeah, I just jumped all over the DTO part of the discussion. Our DOs never get 
near AMF.
We convert everything btw... each record in the DG ends up as an instance of a 
DO (which is why the performance of the service layer is so important).

With DOs, we do make them bindable, but we use custom events to fire the 
bindings, and we never ever make the entire object bindable, only the fields 
required for the UI. The cheat here is when assembling the DO from a DTO, use a 
method that doesn't go through the setters, and then dispatch the change event 
once done, that way the binding operations can be done in a single frame rather 
than being spread out.

Example (not the best architecture though).
public class fooDO extends EventDispatcher {

private var _bar : String;

public function set bar( b : String ) : void {
   if ( _bar != b ) {
 _bar = b;
dispatchEvent( fooChanged );
}
}

[Bindable(fooChanged)]
public function get bar() : String {
return _bar;
}

public function assemble( dto : FooDTO ) : void {
_bar = dto.bar;
dispatchEvent( fooChanged );
}
}

Quickly written out, but if all the bindable properties are fired off 
fooChanged then the non-bindable DTO can be assembled into a Bindable DO and 
cut down on the number of change events being fired. If the default 
changeEvent is used, events will fire on each setter used which is where the 
presentation is going.

Is that explained badly? Non-bindable DTOs assemble to bindable DOs in a way 
that minimizes the amount of event slinging going on...

Gk,

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343
Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
Registered Number: 1788577
Registered in the UK

Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/

The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpd...@inps.co.uk


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Battershall, Jeff
Sent: 27 October 2009 13:43
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Binding  Model Objects


Gregor,

I'm doing a good bit of what you describe already - like chunking the number of 
objects transferred, only transferring what is needed, etc.

My big question based on Sean's preso was making domain objects bindable.  
Right now, I am, for the most part.  For example, when editing a specific 
record in a datagrid, it makes it so much easier to have that object bindable 
so I can load it into a form and have the UI reflect that object instance. To 
NOT make domain model objects bindable would mean creating a third layer for 
binding and loading a non-bindable model object into it.  That is a total 
headache, but I'd do it, if it really made that much difference.  I'm a little 
skeptical that a bindable AMF model object is going to fire off a bunch of 
events when received by the Flex client.

Jeff







[flexcoders] Re: LCDS : creating custom messaging service adapter

2009-10-27 Thread Mete Atamel
Not much difference really. Extending MessagingAdapter allows you to override 
allowSubscribe and allowSend methods which might be useful. If not, you can go 
with ServiceAdapter or even ActionscriptAdapter.

-Mete

--- In flexcoders@yahoogroups.com, Besite - Bart b...@... wrote:

 Hello,
 A short question, to create a custom messaging service adapter, is it 
 best to extend from ServiceAdapter or to extend from MessageServiceAdapter ?
 
 Thanks,
 Bart





RE: [flexcoders] Binding Model Objects

2009-10-27 Thread Gregor Kiddie
I've only ever used ObjectProxy in spikes as a replacement for real
objects which weren't available, never in a production app.

My impression of them was they were quite slow (as with all dynamic
classes), but YMMV...

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Battershall, Jeff
Sent: 27 October 2009 14:34
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Binding  Model Objects

 

  

Thanks Gregor,

 

I think I'm starting to get it.  -  by having client-side bindable
objects, using custom events, that are generated from DTOs, you minimize
the amount of generic change events being fired.  


What about ObjectProxy?  Can't similar results be obtained there?
(http://blogs.digitalprimates.net/codeSlinger/index.cfm/2007/8/20/Making
-the-unbindable-bindable-with-Object-Proxy).

 

Jeff

 



Re: [flexcoders] Binding Model Objects

2009-10-27 Thread Richard Rodseth
This is consistent with the way I've done things. In my case conversion was
necessitated by needing a dirty flag on each record, but I also like it
philosophically.

However, in another portion of the application that I don't own, there is a
large DTO displayed in a table (with user-configurable columns), and I don't
think we can pay the price of conversion without also implementing
pagination/lazy loading.

On Tue, Oct 27, 2009 at 7:15 AM, Gregor Kiddie gkid...@inpses.co.uk wrote:



  Jeff,



 Yeah, I just jumped all over the DTO part of the discussion. Our DOs never
 get near AMF.

 We convert everything btw… each record in the DG ends up as an instance of
 a DO (which is why the performance of the service layer is so important).



 With DOs, we do make them bindable, but we use custom events to fire the
 bindings, and we never ever make the entire object bindable, only the fields
 required for the UI. The cheat here is when assembling the DO from a DTO,
 use a method that doesn’t go through the setters, and then dispatch the
 change event once done, that way the binding operations can be done in a
 single frame rather than being spread out.



 Example (not the best architecture though).

 public class fooDO extends EventDispatcher {



 private var _bar : String;



 public function set bar( b : String ) : void {

if ( _bar != b ) {

  _bar = b;

 dispatchEvent( “fooChanged” );

 }

 }



 [Bindable(“fooChanged”)]

 public function get bar() : String {

 return _bar;

 }



 public function assemble( dto : FooDTO ) : void {

 _bar = dto.bar;

 dispatchEvent( “fooChanged” );

 }

 }



 Quickly written out, but if all the bindable properties are fired off
 “fooChanged” then the non-bindable DTO can be assembled into a Bindable DO
 and cut down on the number of change events being fired. If the default
 “changeEvent” is used, events will fire on each setter used which is where
 the presentation is going.



 Is that explained badly? Non-bindable DTOs assemble to bindable DOs in a
 way that minimizes the amount of event slinging going on…



 Gk,

 *Gregor Kiddie*
 Senior Developer
 *INPS*

 Tel:   01382 564343

 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ

 Registered Number: 1788577

 Registered in the UK

 Visit our Internet Web site at www.inps.co.uk

 The information in this internet email is confidential and is intended
 solely for the addressee. Access, copying or re-use of information in it by
 anyone else is not authorised. Any views or opinions presented are solely
 those of the author and do not necessarily represent those of INPS or any of
 its affiliates. If you are not the intended recipient please contact
 is.helpd...@inps.co.uk
   --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Battershall, Jeff
 *Sent:* 27 October 2009 13:43

 *To:* 'flexcoders@yahoogroups.com'
 *Subject:* RE: [flexcoders] Binding  Model Objects





 Gregor,



 I’m doing a good bit of what you describe already – like chunking the
 number of objects transferred, only transferring what is needed, etc.



 My big question based on Sean’s preso was making domain objects bindable.
 Right now, I am, for the most part.  For example, when editing a specific
 record in a datagrid, it makes it so much easier to have that object
 bindable so I can load it into a form and have the UI reflect that object
 instance. To NOT make domain model objects bindable would mean creating a
 third layer for binding and loading a non-bindable model object into it.
 That is a total headache, but I’d do it, if it really made that much
 difference.  I’m a little skeptical that a bindable AMF model object is
 going to fire off a bunch of events when received by the Flex client.



 Jeff


   



[flexcoders] Re: Button and custom FocusSkins not raising Click events

2009-10-27 Thread taude1
I figured out my problem. 

There was an accidental call to graphics.beginFill.  The ALPHA was set to 0 
(which meant I couldn't visually see anything).

I have now separated my focusSkin out from the regular skin, and have made sure 
that I'm only drawing a thin border since the FOCUS skin is overlayed on top of 
the component.

I will say, the documentation on all this is pretty sparse.

--- In flexcoders@yahoogroups.com, taude1 tpreka...@... wrote:

 Hi All,
   I have a button with a custom skin and a custom focusSkin.  when tabbing 
 into the button and the focus skin is showing, it doesn't raise click events.
   I know that I'm supposed to have a HOLE in my focus skin.  Not just 
 transparent pixels and what not.  However, I'm not really sure how to do this 
 PROGRAMATICALY -- I've tried setting the Alpha to 0 and to even try all black 
 (0x000) and all white (oxff), but still can't get it to work.
 
   My problems are similar to: https://bugs.adobe.com/jira/browse/SDK-15363.
 
Again, this is a programatic skin that requires me drawing the border.
 
 Can this be done?  Should be pretty trivial but I'm stuck.
 
 Thanks





RE: [flexcoders] Binding Model Objects

2009-10-27 Thread Battershall, Jeff
Gregor,

Now that I look at it, I see what you're getting at - dynamic classes by nature 
are going to tax the JIT more.

Binding is encouraged by the framework, and in numerous examples, but you don't 
learn of the potential downside to overuse until months or even years having 
solved problems a particular way.   But this is the nature of the beast, isn't 
it.  Welcome to the world of software development.

Jeff


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Gregor Kiddie
Sent: Tuesday, October 27, 2009 10:58 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding  Model Objects




I've only ever used ObjectProxy in spikes as a replacement for real objects 
which weren't available, never in a production app.
My impression of them was they were quite slow (as with all dynamic classes), 
but YMMV...

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343
Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
Registered Number: 1788577
Registered in the UK

Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/

The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpd...@inps.co.uk


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Battershall, Jeff
Sent: 27 October 2009 14:34
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Binding  Model Objects


Thanks Gregor,

I think I'm starting to get it.  -  by having client-side bindable objects, 
using custom events, that are generated from DTOs, you minimize the amount of 
generic change events being fired.

What about ObjectProxy?  Can't similar results be obtained there? 
(http://blogs.digitalprimates.net/codeSlinger/index.cfm/2007/8/20/Making-the-unbindable-bindable-with-Object-Proxy).

Jeff







[flexcoders] Re: Search Suggestion

2009-10-27 Thread jeffreyr6915
Hi prabowo,

Please check out http://www.flexlcds.com. This is an all encompassing guide 
that will show you step-by-step how to create a full end2end applications. The 
topics included are:

1. Flex
2. LCDS
3. Java
4. Eclipse
5. Maven 2

It took me a long time to learn all of this information and this guide brings 
all the concepts together. 

Thanks,
Jeff




--- In flexcoders@yahoogroups.com, Wiznu Prabowo weeshperb...@... wrote:

 Hi All, 
   

   
   
 
 
 
 
   
 
 
 
 
   
   
 
 
   
   
   
 
 I am new in flex, but have several years experience with coldfusion. anyone 
 have a source/tutorial about making Search Suggestion, it will shows up into 
 the selectable list, the suggestion of word/token we looking for, just like 
 the one we found in facebook or google. 
 Thanks for your help,prabowo





[flexcoders] basic code behind question

2009-10-27 Thread Tim Romano
It seems a class whose constructor takes arguments cannot be used as the 
code-behind class. Is that so? When I try to use this class in the root tag of 
my mxml component, there's an error: no default constructor in the base class 
TestArgs. 
Thanks

package
{
import mx.containers.TitleWindow;
import mx.controls.LinkButton;
public class TestArgs extends TitleWindow
{

public var aLinkButton:LinkButton;
private var _arg1: String;

//public function TestArgs(){}

public function TestArgs(arg1:String)
{
super();
_arg1 = arg1;
}

}
}


[flexcoders] Function Declarations

2009-10-27 Thread Paulo Henrique
Good afternoon people,

i just started developping with Flex Builder 3 and I seem to have found some 
issues. Let me explain my situation:

I have an application on a mxml file.
In this application i have a AS code file, and I've declared the 'script' block 
right at the beggining of the application, with the source property pointing to 
the file.
This block is praticaly the first thing on the application.
But the program wouldn't accept when i referenciate some function of the as 
file, it would accuse that the function might not exist. I put everything back 
on the mxml, and, another day, i put it back on a as file, but this time, it 
accepted just fine. Idid not understood or questioned that.
But yesterday, and today, I am having the same problem.
I have the following declarations:

mx:Script source=CCM.as /
mx:Script
 ![CDATA[
 private var _editWindow:generalEdit_window = new generalEdit_window();
 ]]
/mx:Script
mx:Script source=validation_src.as /
mx:Script source=heights_src.as /

right at the bbeggining of the mxml application,
and after some code I have:

mx:DataGridColumn headerText=Options dataField= width=70
 mx:itemRenderer
 mx:Component
 mx:Image source=assets/imgs/Erro_X_v3.gif 
click=removeItem(data.idheight)/
 /mx:Component
 /mx:itemRenderer
/mx:DataGridColumn

and on the file heights_src.as i have:

private function removeItem(idheight:*):void{

}

I had it as idheight:int, but I changed to * to see if would make any 
difference, but nothing happened.
Even with the function declared, the program still accuses:

Severity and Description Path Resource Location Creation Time Id
1180: Call to a possibly undefined method removeItem. CCM/src CCM.mxml line 120 
1256660977276 253

Right at that mx:Image... line.

Would anyone here know the reason?
Do you guys see anything wrong?

I really could use some help, since I am somewhat begginner at this...

Thanks for you attention.

Paul.



[flexcoders] Adobe-like logo maker

2009-10-27 Thread breizo
Can anybody point me to the Flex example that creates and customizes these nice 
Fx, Fl, Ai, PS... logos that Adobe has?

I played with the application a while back, but I can't find it anymore.

Thanks!
Breizo



[flexcoders] Using Flex and Vb.Net

2009-10-27 Thread shot2flow
Has anyone worked with Flex and VB.Net. Please i am interested in the two. I 
presently use flex and coldfusion, but my company used vb.net so i am wondering 
how to develop flex apps with vb.net.

Thanks



RE: [SPAM] [flexcoders] Accessing a child component,, specifically a checkbox, from an mxml component

2009-10-27 Thread Quantum
Thanks Tracy, I'll try both of those.

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, October 26, 2009 9:56 PM
To: flexcoders@yahoogroups.com
Subject: RE: [SPAM] [flexcoders] Accessing a child component,, specifically
a checkbox, from an mxml component


  


If you cast the return as EditTaskBox, you should be able to reference the
public members.

You could also do this by setting a public property on EditTaskBox and then
binding the checkbox to that property.

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of steveb805
Sent: Monday, October 26, 2009 2:30 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Accessing a child component,, specifically a
checkbox, from an mxml component

  

First of all, thanks for the responses concerning the List Items-detecting.
Hopefully those responses made it. I'm on the Probation list where it takes
a while to get approved.
--

This next particular issue is really disturbing me, but it's probably pretty
simple.

I have a mxml file containing a custom component, called EditTaskBox. It's a
TitleWindow and it's in my components folder.

In main.mxml, I have this to create a custom popup:

var win:TitleWindow = TitleWindow(PopUpManager.createPopUp(this,
EditTaskBox, true));

( I need to set win.title = something, so I cast the return to a
TitleWindow type. )

There is a checkbox in that component, a nested child, but I can't seem to
control it in Actionscript from main.mxml. 

I can't use EditTaskBox.mycheckbox, because it Understandably complains with
possibly undefined project through reference with static type class. And
trying win.mycheckbox doesn't work of course, either.

My googling turned up empty.
Hoping someone knew about this.
Steve




Re: [flexcoders] basic code behind question

2009-10-27 Thread eRoom-D
That is correct. Code behinds for components cannot take constructor
arguments, there isn't a mechanism to pass them in.

You will want to pass them in and act on them at some other point in the
component lifecycle. Such as CreationComplete, or Initialize.

David Moore

Flash and Flex Developer - http://vandermore.com


On Tue, Oct 27, 2009 at 12:28 PM, Tim Romano tim_rom...@yahoo.com wrote:



 It seems a class whose constructor takes arguments cannot be used as the
 code-behind class. Is that so? When I try to use this class in the root tag
 of my mxml component, there's an error: no default constructor in the base
 class TestArgs.
 Thanks

 package
 {
 import mx.containers.TitleWindow;
 import mx.controls.LinkButton;
 public class TestArgs extends TitleWindow
 {

 public var aLinkButton:LinkButton;
 private var _arg1: String;

 //public function TestArgs(){}

 public function TestArgs(arg1:String)
 {
 super();
 _arg1 = arg1;
 }

 }
 }
  



[flexcoders] Getting rid of the Scrollbar in the List Item

2009-10-27 Thread steveb805
After a marathon Google-fest/Adobe Help Site search, I have not been able to 
figure out how an elegant, best-practice, or any other way to get rid of the 
horizontal scroll bar that appears when some text doesn't fit into an Item.  

You probably have been through this before, but I'll show you the image of my 
List control:

http://www.lucidrhino.com/images/list_image.JPG


Should I simply, in my custom ItemRenderer, just check the length of that field 
(which is data.description) and simply truncate it to some short arbitrary 
length ?

Sounds the most straightforward way.

Thanks,
Steve



[flexcoders] Flex and Rails

2009-10-27 Thread flexaustin
Anyone know why this won't work when I call my Update CRUD method?
I have tried it without 
this.service.headers 
={{X_HTTP_METHOD_OVERRIDE:'PUT'}} and using /savedthing/+ id + '?_method=PUT' 
for the urlString, but still now luck.

public function shouldUpdateMapToRails( id:String, name:String, 
customdata:String, origdata:String ) : void
{
// constructor will store a reference to the service 
we're going to call
this.service = new HTTPService();
this.service.method = 'POST';
this.service.contentType = 
application/x-www-form-urlencoded;
this.service.headers ={{X_HTTP_METHOD_OVERRIDE:'PUT'}}
this.service.resultFormat =e4x;
/* PRODUCTION VERSION 
=*/
var  urlString:String = /savedthing/ + id;
_params = { 'saved_thing[myname]': name, 
'saved_thing[customdata]': customdata, 'saved_thing[originaldata]': origdata };
this.service.url=urlString;
}



Re: [flexcoders] Getting rid of the Scrollbar in the List Item

2009-10-27 Thread Jake Churchill
set horizontalScrollPolicy=off in your renderer

On Tue, Oct 27, 2009 at 12:11 AM, steveb805 quantumcheese...@gmail.comwrote:



 After a marathon Google-fest/Adobe Help Site search, I have not been able
 to figure out how an elegant, best-practice, or any other way to get rid of
 the horizontal scroll bar that appears when some text doesn't fit into an
 Item.

 You probably have been through this before, but I'll show you the image of
 my List control:

 http://www.lucidrhino.com/images/list_image.JPG

 Should I simply, in my custom ItemRenderer, just check the length of that
 field (which is data.description) and simply truncate it to some short
 arbitrary length ?

 Sounds the most straightforward way.

 Thanks,
 Steve

  



[flexcoders] Re: AIR Performance

2009-10-27 Thread jwc_wensan
Tom:

Very nice app.

I've read several other articles, blogs, etc. about it and I see no
mention that it is an AIR app.  

It appears to be a browser-based web app.

Did I miss something?

Thanks,

Jack

--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote:

 On Monday 26 Oct 2009, jwc_wensan wrote:
  While I know it can be programmed, my question is should I and/or
  can I use AIR for this size project?
 
 For sure - look at the 'Matrix' trading application, for instance.
 http://www.morganstanley.com/matrixinfo/
 
 -- 
 Helping to professionally network meta-services as part of the IT team of the 
 year, '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.





Re: [flexcoders] Adobe-like logo maker

2009-10-27 Thread thomas parquier
Have a look at riaforge.org

thomas parquier
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/10/27 breizo bre...@yahoo.com



 Can anybody point me to the Flex example that creates and customizes these
 nice Fx, Fl, Ai, PS... logos that Adobe has?

 I played with the application a while back, but I can't find it anymore.

 Thanks!
 Breizo

  



[flexcoders] Re: Flex and Rails

2009-10-27 Thread flexaustin
Fixed  

should be 


this.service.headers ={X_HTTP_METHOD_OVERRIDE:'PUT'}


NOT


  this.service.headers ={{X_HTTP_METHOD_OVERRIDE:'PUT'}}






--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 Anyone know why this won't work when I call my Update CRUD method?
 I have tried it without 
   this.service.headers 
 ={{X_HTTP_METHOD_OVERRIDE:'PUT'}} and using /savedthing/+ id + 
 '?_method=PUT' for the urlString, but still now luck.
 
 public function shouldUpdateMapToRails( id:String, name:String, 
 customdata:String, origdata:String ) : void
   {
   // constructor will store a reference to the service 
 we're going to call
   this.service = new HTTPService();
   this.service.method = 'POST';
   this.service.contentType = 
 application/x-www-form-urlencoded;
   this.service.headers ={{X_HTTP_METHOD_OVERRIDE:'PUT'}}
   this.service.resultFormat =e4x;
   /* PRODUCTION VERSION 
 =*/
   var  urlString:String = /savedthing/ + id;
   _params = { 'saved_thing[myname]': name, 
 'saved_thing[customdata]': customdata, 'saved_thing[originaldata]': origdata 
 };
   this.service.url=urlString;
   }





[flexcoders] Flex Soap Version Mismatch

2009-10-27 Thread Joshua
I have a problem with soap and flex 3.  I have created a webservice through the 
import webservice menu in Flex Builder.  If I use the service as is I get a 
security error because the crossdomain policy on the remote server doesn't 
comply.  So, instead I am using a php proxy to relay the webservice through my 
server and out to the webservice back to the server back to Flex.  When I try 
to do this I get a SOAP mismatch error coming from the below code.

else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI)
{
throw new Error(SOAP Response Version Mismatch);
}

I went back in and checked the value of envNS.uri and 
SOAPConstants.SOAP_ENVELOPE_URI in both the previously described situations 
(php proxy and straight security riddled call).  In the security riddled call 
the two variables match.  In the proxy call I get back differing values of 
envNS.uri and SOAPConstants.SOAP_ENVELOPE_URI.

Can somebody tell me why the variables are not matching when put through the 
php proxy.  The php is simple, just curl, so I've pasted it below.  

///START PHP SNIPPET

$url = $_GET['url'];
$headers = $_GET['headers'];
$mimeType = $_GET['mimeType'];

//Start the Curl session
$session = curl_init();

// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_URL, $url);
curl_setopt($session, CURLOPT_HEADER, ($headers == true) ? true : false);
curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);

// Make the call
$response = curl_exec($session);

if ($mimeType != )
{
// The web service returns XML. Set the Content-Type appropriately
header(Content-Type: .$mimeType);
}

echo $response;

curl_close($session);

//END PHP SNIPPET

Any help would be great.  Thanks,

Josh



[flexcoders] States: SetStyle not returning to base state

2009-10-27 Thread Tracy
I have component that functions as a button.  It has its own styleName 
(menuButton) specified. It has a subcomponent that is a label with its own 
styleName (menuButtonLabel) specified.  

On rollOver, I set the button to a selected State, using SetStyle to set the 
label style:
mx:State name=selectedState 
  mx:SetStyle target={labelHolder} name=styleName 
value=menuButtonLabelSelected /

This correctly sets the label's style per the menuButtonLabelSelected css 
values.

However, when I return the button to its base state (currentState = ;), The 
label styleName does not get reset to it base menuButtonLabel style, but 
instead takes on the parent menuButton style.

Any ideas what I am doing wrong, or suggestions to try?  Is my theory correct?

Tracy Spratt



[flexcoders] Re: Using Flex and Vb.Net

2009-10-27 Thread Tracy
Yes, heavily.

Now, you do not really develop flex apps with vb.net.  There are several ways 
to use the two environments together, however.

What do you want to do?

Tracy Spratt

--- In flexcoders@yahoogroups.com, shot2flow shot2f...@... wrote:

 Has anyone worked with Flex and VB.Net. Please i am interested in the two. I 
 presently use flex and coldfusion, but my company used vb.net so i am 
 wondering how to develop flex apps with vb.net.
 
 Thanks





[flexcoders] Re: Function Declarations

2009-10-27 Thread Tracy
Your problem is not with the script tag.  What you have would work except that 
you are trying to reference the function within an itemRenderer Component.  
mx:Component creates its own scope.  

You can reference the outer function using outerDocument
click=outerDocument.removeItem(data.idheight)

Even if removeItem() was in the same file, you could not reference it directly 
inside the in-line renderer.

Tracy Spratt


--- In flexcoders@yahoogroups.com, Paulo Henrique paulode...@... wrote:

 Good afternoon people,
 
 i just started developping with Flex Builder 3 and I seem to have found some 
 issues. Let me explain my situation:
 
 I have an application on a mxml file.
 In this application i have a AS code file, and I've declared the 'script' 
 block right at the beggining of the application, with the source property 
 pointing to the file.
 This block is praticaly the first thing on the application.
 But the program wouldn't accept when i referenciate some function of the as 
 file, it would accuse that the function might not exist. I put everything 
 back on the mxml, and, another day, i put it back on a as file, but this 
 time, it accepted just fine. Idid not understood or questioned that.
 But yesterday, and today, I am having the same problem.
 I have the following declarations:
 
 mx:Script source=CCM.as /
 mx:Script
  ![CDATA[
  private var _editWindow:generalEdit_window = new generalEdit_window();
  ]]
 /mx:Script
 mx:Script source=validation_src.as /
 mx:Script source=heights_src.as /
 
 right at the bbeggining of the mxml application,
 and after some code I have:
 
 mx:DataGridColumn headerText=Options dataField= width=70
  mx:itemRenderer
  mx:Component
  mx:Image source=assets/imgs/Erro_X_v3.gif 
 click=removeItem(data.idheight)/
  /mx:Component
  /mx:itemRenderer
 /mx:DataGridColumn
 
 and on the file heights_src.as i have:
 
 private function removeItem(idheight:*):void{
 
 }
 
 I had it as idheight:int, but I changed to * to see if would make any 
 difference, but nothing happened.
 Even with the function declared, the program still accuses:
 
 Severity and Description Path Resource Location Creation Time Id
 1180: Call to a possibly undefined method removeItem. CCM/src CCM.mxml line 
 120 1256660977276 253
 
 Right at that mx:Image... line.
 
 Would anyone here know the reason?
 Do you guys see anything wrong?
 
 I really could use some help, since I am somewhat begginner at this...
 
 Thanks for you attention.
 
 Paul.





Re: [flexcoders] Using Flex and Vb.Net

2009-10-27 Thread Angelo Anolin
You can use Flex for the UI (front-end) and the server side processing using 
VB.Net. Your VB.Net comes to the picture as web/http services.

Although I only began doing the same a few months back, I must say that it's 
darn pretty good rather than creating a web app using static HTML/ASP.Net only.

Angelo







From: shot2flow shot2f...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, 28 October, 2009 0:26:38
Subject: [flexcoders] Using Flex and Vb.Net

  
Has anyone worked with Flex and VB.Net. Please i am interested in the two. I 
presently use flex and coldfusion, but my company used vb.net so i am wondering 
how to develop flex apps with vb.net.

Thanks


   


  

[flexcoders] Re: Flex Soap Version Mismatch

2009-10-27 Thread Joshua
Some more info...


I'm running everything over https


When I create the wsdl code from flex builder wizard, I have to select an 
alternative port to connect with the soap1.1 version (on the same screen where 
you specify the services you want to connect to).  Is it possible that when I 
run the php proxy and curl that I somehow lose the correct port to connect to 
1.1 and get 1.2 response back.  If so, anybody know how I could correct that?  

--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 I have a problem with soap and flex 3.  I have created a webservice through 
 the import webservice menu in Flex Builder.  If I use the service as is I get 
 a security error because the crossdomain policy on the remote server doesn't 
 comply.  So, instead I am using a php proxy to relay the webservice through 
 my server and out to the webservice back to the server back to Flex.  When I 
 try to do this I get a SOAP mismatch error coming from the below code.
 
 else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI)
 {
 throw new Error(SOAP Response Version Mismatch);
 }
 
 I went back in and checked the value of envNS.uri and 
 SOAPConstants.SOAP_ENVELOPE_URI in both the previously described situations 
 (php proxy and straight security riddled call).  In the security riddled call 
 the two variables match.  In the proxy call I get back differing values of 
 envNS.uri and SOAPConstants.SOAP_ENVELOPE_URI.
 
 Can somebody tell me why the variables are not matching when put through the 
 php proxy.  The php is simple, just curl, so I've pasted it below.  
 
 ///START PHP SNIPPET
 
 $url = $_GET['url'];
 $headers = $_GET['headers'];
 $mimeType = $_GET['mimeType'];
 
 //Start the Curl session
 $session = curl_init();
 
 // Don't return HTTP headers. Do return the contents of the call
 curl_setopt($session, CURLOPT_URL, $url);
 curl_setopt($session, CURLOPT_HEADER, ($headers == true) ? true : false);
 curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
 curl_setopt($session, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);
 
 // Make the call
 $response = curl_exec($session);
 
 if ($mimeType != )
 {
 // The web service returns XML. Set the Content-Type appropriately
 header(Content-Type: .$mimeType);
 }
 
 echo $response;
 
 curl_close($session);
 
 //END PHP SNIPPET
 
 Any help would be great.  Thanks,
 
 Josh





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-27 Thread Joshua

I just don't get the overall picture here with this wsdl stuff with flex, so 
I've got some more questions and more info.  Firstly, I don't have a 
services-config.xml file... Do I need one?  If so how, where do I create it.  
I've seen a bunch of partial info on the subject but nothing really through.  
All my stuff is going from https to https, the site is hosted on https and the 
service is located on https.  Does that matter.  I have control over my server 
and can put cross-domain files on it.  I have a proxy written with curl trying 
to relay the call to the service.  Do I need to do anything special with that 
because I'm am going across https?  I guess the port deal selector on the flex 
wsdl creation wizard is really a namespace and not a more traditional 
communication port number.. Is that correct?  

Also, here is my crossdomain file on the root of my server

 

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
allow-http-request-headers-from domain=* headers=*/
allow-access-from domain=*/
/cross-domain-policy

 

Does this look good considering https?

-

This is what I get if I don't pass a rootUrl in to the AbstractWebService 
constructor (that's how I use the php proxy)

 

FaultEvent fault=[RPC Fault faultString=Security error accessing url 
faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
messageId=null type=fault bubbles=true cancelable=true eventPhase=2]

 

Which, by the way when I'm working in debug mode on my computer works just fine 
until I upload to server.
--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 Some more info...
 
 
 I'm running everything over https
 
 
 When I create the wsdl code from flex builder wizard, I have to select an 
 alternative port to connect with the soap1.1 version (on the same screen 
 where you specify the services you want to connect to).  Is it possible that 
 when I run the php proxy and curl that I somehow lose the correct port to 
 connect to 1.1 and get 1.2 response back.  If so, anybody know how I could 
 correct that?  
 
 --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
 
  I have a problem with soap and flex 3.  I have created a webservice through 
  the import webservice menu in Flex Builder.  If I use the service as is I 
  get a security error because the crossdomain policy on the remote server 
  doesn't comply.  So, instead I am using a php proxy to relay the webservice 
  through my server and out to the webservice back to the server back to 
  Flex.  When I try to do this I get a SOAP mismatch error coming from the 
  below code.
  
  else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI)
  {
  throw new Error(SOAP Response Version Mismatch);
  }
  
  I went back in and checked the value of envNS.uri and 
  SOAPConstants.SOAP_ENVELOPE_URI in both the previously described situations 
  (php proxy and straight security riddled call).  In the security riddled 
  call the two variables match.  In the proxy call I get back differing 
  values of envNS.uri and SOAPConstants.SOAP_ENVELOPE_URI.
  
  Can somebody tell me why the variables are not matching when put through 
  the php proxy.  The php is simple, just curl, so I've pasted it below.  
  
  ///START PHP SNIPPET
  
  $url = $_GET['url'];
  $headers = $_GET['headers'];
  $mimeType = $_GET['mimeType'];
  
  //Start the Curl session
  $session = curl_init();
  
  // Don't return HTTP headers. Do return the contents of the call
  curl_setopt($session, CURLOPT_URL, $url);
  curl_setopt($session, CURLOPT_HEADER, ($headers == true) ? true : false);
  curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
  curl_setopt($session, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);
  
  // Make the call
  $response = curl_exec($session);
  
  if ($mimeType != )
  {
  // The web service returns XML. Set the Content-Type appropriately
  header(Content-Type: .$mimeType);
  }
  
  echo $response;
  
  curl_close($session);
  
  //END PHP SNIPPET
  
  Any help would be great.  Thanks,
  
  Josh
 





[flexcoders] Re: Flex Soap Version Mismatch

2009-10-27 Thread Joshua
When instantiating webservice (implements webservice) with this line (no 
proxy/destination url, but rootUrl)


this.myService = new ModpayWeb(null, 
https://www.mydomain.com/amfphp/services/mpNd.php?url=https%3A%2F%2Fsecure.modpay.com%2Fws%2Fmodpay.asmx%3Fwsdl;);


I get a soap envelop of


http://schemas.xmlsoap.org/wsdl/


which does not match my static const


public static const SOAP_ENVELOPE_URI:String = 
http://schemas.xmlsoap.org/soap/envelope/;;


and gives me a soap mismatch error


but when I go directly to the source and don't use the proxy I get back an 
envelop of


http://schemas.xmlsoap.org/soap/envelope/


which does match my predefined const


but I get a security error channel  DefaultHttps


??

--- In flexcoders@yahoogroups.com, Joshua w...@... wrote:

 
 I just don't get the overall picture here with this wsdl stuff with flex, so 
 I've got some more questions and more info.  Firstly, I don't have a 
 services-config.xml file... Do I need one?  If so how, where do I create it.  
 I've seen a bunch of partial info on the subject but nothing really through.  
 All my stuff is going from https to https, the site is hosted on https and 
 the service is located on https.  Does that matter.  I have control over my 
 server and can put cross-domain files on it.  I have a proxy written with 
 curl trying to relay the call to the service.  Do I need to do anything 
 special with that because I'm am going across https?  I guess the port deal 
 selector on the flex wsdl creation wizard is really a namespace and not a 
 more traditional communication port number.. Is that correct?  
 
 Also, here is my crossdomain file on the root of my server
 
  
 
 ?xml version=1.0?
 !DOCTYPE cross-domain-policy SYSTEM 
 http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
 cross-domain-policy
 allow-http-request-headers-from domain=* headers=*/
 allow-access-from domain=*/
 /cross-domain-policy
 
  
 
 Does this look good considering https?
 
 -
 
 This is what I get if I don't pass a rootUrl in to the AbstractWebService 
 constructor (that's how I use the php proxy)
 
  
 
 FaultEvent fault=[RPC Fault faultString=Security error accessing url 
 faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTPS] 
 messageId=null type=fault bubbles=true cancelable=true eventPhase=2]
 
  
 
 Which, by the way when I'm working in debug mode on my computer works just 
 fine until I upload to server.
 --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
 
  Some more info...
  
  
  I'm running everything over https
  
  
  When I create the wsdl code from flex builder wizard, I have to select an 
  alternative port to connect with the soap1.1 version (on the same screen 
  where you specify the services you want to connect to).  Is it possible 
  that when I run the php proxy and curl that I somehow lose the correct port 
  to connect to 1.1 and get 1.2 response back.  If so, anybody know how I 
  could correct that?  
  
  --- In flexcoders@yahoogroups.com, Joshua wolf@ wrote:
  
   I have a problem with soap and flex 3.  I have created a webservice 
   through the import webservice menu in Flex Builder.  If I use the service 
   as is I get a security error because the crossdomain policy on the remote 
   server doesn't comply.  So, instead I am using a php proxy to relay the 
   webservice through my server and out to the webservice back to the server 
   back to Flex.  When I try to do this I get a SOAP mismatch error coming 
   from the below code.
   
   else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI)
   {
   throw new Error(SOAP Response Version Mismatch);
   }
   
   I went back in and checked the value of envNS.uri and 
   SOAPConstants.SOAP_ENVELOPE_URI in both the previously described 
   situations (php proxy and straight security riddled call).  In the 
   security riddled call the two variables match.  In the proxy call I get 
   back differing values of envNS.uri and SOAPConstants.SOAP_ENVELOPE_URI.
   
   Can somebody tell me why the variables are not matching when put through 
   the php proxy.  The php is simple, just curl, so I've pasted it below.  
   
   ///START PHP SNIPPET
   
   $url = $_GET['url'];
   $headers = $_GET['headers'];
   $mimeType = $_GET['mimeType'];
   
   //Start the Curl session
   $session = curl_init();
   
   // Don't return HTTP headers. Do return the contents of the call
   curl_setopt($session, CURLOPT_URL, $url);
   curl_setopt($session, CURLOPT_HEADER, ($headers == true) ? true : 
   false);
   curl_setopt($session, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
   curl_setopt($session, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);
   
   // Make the call
   $response = curl_exec($session);
   
   if ($mimeType != )
   {
   // The web service returns XML. Set the Content-Type appropriately
   

[flexcoders] How to save a bytearray to a database

2009-10-27 Thread flexaustin
So I am trying to save a bytearray to a database.  I tried bytearray.toString, 
which works as expected.  

But on retrieving the string (bytearray) from the database how would I convert 
it back to a bytearray?

Thx, J



RE: [flexcoders] I want to create a custom ComboBox with general itemRenderer.

2009-10-27 Thread Alex Harui
You can look at the IconComboBox example on my blog.  There might be  a way to 
extend that to do what you want.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of yms0411
Sent: Tuesday, October 27, 2009 12:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] I want to create a custom ComboBox with general 
itemRenderer.



I have comboboxes that might take in different item renderers depending on the 
situation.
The problem I'm facing is showing the selected item on the Combobox label.
I want to show it exactly same as to the item showing on the dropdown list. I 
found somewhere that i should remove the textInput from the Combobox and 
addChild with a new renderer instance. however I couldnt find a clear solution 
to this.

Any tips on where i should start?



[flexcoders] Re: How to save a bytearray to a database

2009-10-27 Thread bsyyu
encode the bytearray to base64
http://dynamicflash.com/goodies/base64/


--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 So I am trying to save a bytearray to a database.  I tried 
 bytearray.toString, which works as expected.  
 
 But on retrieving the string (bytearray) from the database how would I 
 convert it back to a bytearray?
 
 Thx, J