[flexcoders] OpenResource in FlashBuilder 4

2010-08-20 Thread flexcodemonkey
Anyone know how to get the keyboard shortcut ctrl+shift+R for Open Resource to
work in Flash Builder 4?!? Under the Navigate menu in the Flash Perspective
,there is two menu items. One is being created by the Flash Navigation. But, I
am unable to disable this via customizing the Flash perspective as Flash Builder
will not let me select OK and save my changed if I unselect Flash Navigation. 
Hmm... Really annoying not to have the keyboard shortcut work...




[flexcoders] ctrl+shift+r shortcut in FB4

2010-08-19 Thread flexcodemonkey
Anyone know how to get the keyboard shortcut ctrl+shift+R for Open Resource to 
work in Flash Builder 4?!?  Under the Navigate menu in the Flash Perspective 
,there is two menu items.  One is being created by the Flash Navigation.  But, 
I am unable to disable this via customizing the Flash perspective as Flash 
Builder will not let me select OK and save my changed if I unselect Flash 
Navigation.  Hmm...  Really annoying not to have the keyboard shortcut work...





[flexcoders] Radio Buttons and Validation

2010-08-12 Thread flexcodemonkey
I'm trying to do something I thought would be simple.  I have a form with radio 
buttons and some user input for each button.  I want to validate the user 
input, but not show the red invalid box on any input that is part of a radio 
button not selected.  I basically added a change handler for the radio buttons 
and clear out the previous errors for the fields.  This is working, but only 
for the fist time.  If a user types in invalid data, it shows a red box with an 
error.  If they change radio buttons, the first box clears, and, if they enter 
invalid data in the second box, and error is shown as expected.  Now select the 
fist radio button again and enter in invalid data.  The validation code does 
try to validate it, and the ValidationResultEvent.type is INVALID, but no red 
box or error is displayed anymore.  Below is my code which may help understand 
what I'm doing.  I'm sure it is due to setting the errorString of the control 
to an empty string, but I found this was recommended as a way to clear out 
previous errors.  What do I do to validate again?



http://ns.adobe.com/mxml/2009"; 
   xmlns:s="library://ns.adobe.com/flex/spark" 
   xmlns:mx="library://ns.adobe.com/flex/mx" 
minWidth="955" minHeight="600">





































[flexcoders] Re: Push verse Poll in Flash Player

2010-08-12 Thread flexcodemonkey
Have you looked into BlazeDS or LCDS?


--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
 wrote:
>
> Is there a way to get notifications on a regular interval for Flash
> applications? Any and all suggestions about push vs pull vs poll vs etc. We
> would be checking every 30 seconds to 60 seconds.
> 
> JP
>




[flexcoders] Re: Flex Builder 3 Installation?

2010-07-27 Thread flexcodemonkey
Yes, I have done that and it works just fine.  


--- In flexcoders@yahoogroups.com, "markflex2007"  wrote:
>
> Do you think if we can install standalone version and plug in version Flex 
> Builder 3 in same computer?
> 
> Thanks
> 
> Mark
>




[flexcoders] Re: Web Services and ObjectProxy question for the Flex Gurus

2010-07-22 Thread flexcodemonkey
Thank you Mike!!!  This was EXACTLY what I was looking for.  Once I have Flex 
generate all of my VOs, I've added the following code to the sub-class's 
constructor which does the trick for all of my web services without me 
modifying the generated code.

public function MyClass() {
   super();
   for each (var operation:Operation in operations) {
   operation.forcePartArrays = true;
   } 

Now all of my web services work as expected!




--- In flexcoders@yahoogroups.com, "Mike"  wrote:
>
> 
> 
> Michael,
> 
> The Flex SDK can do what you want, but the default behavior is for it to 
> unwrap collections and enclosing types which only contain one item.  This 
> default was not a good idea, IMO.
> 
> Have you tried setting Operation.forcePartArrays true?
> http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/Operation.html#forcePartArrays
> You will need to obtain the mx.rpc.soap.Operation from the WebService first.
> 
> You can alter the default behavior by writing a custom deserializer (which is 
> a non-trivial task, made more difficult by the ASDoc being turned off.)
> 
> For more information about Flex WebService, see my slide show and YouTube 
> video at 
> http://www.slideshare.net/mslinn/using-flex-with-enterprise-web-services
> 
> Mike
> 
> 
> > I'm using Flex 4 and I set the returntype for the webservice to return an 
> > array 
> > of Cars - Cars[].  If the web service returns more than 1, it successfully 
> > deserialized the data and returns an array of Car objects.  BUT, if only 
> > one is 
> > returned, it returns an ObjectProxy, obviously because it cannot convert it 
> > to 
> > an array.
>




[flexcoders] Re: Web Services and ObjectProxy question for the Flex Gurus

2010-07-22 Thread flexcodemonkey
Thanks for the replies.  I'm not wanting an array.  Yes, I could just stick the 
returned single ObjectProxy in an array, but now I have an undefined object 
inside of an array.  This works if I'm taking the returned data and binding it 
to some control, but I'm actually needing tp parse the returned data in an 
intelligent way.  I'd like to access the object directly as the VO, not a 
generic object, that is, typed to my VO, not ObjectProxy.  I understand why it 
does this, it does this because it was expecting an array of VOs and when it 
only gets one, it can't deserialize it to the VO.  The problem is, how to get 
it to work in both cases (single object returned, and array of objects).

The VOs are defined on the client side.





[flexcoders] Re: Web Services and ObjectProxy question for the Flex Gurus

2010-07-22 Thread flexcodemonkey
Thanks!  I will look into all of this.  Greatly appreciated for the pointers!

 - Michael

--- In flexcoders@yahoogroups.com, "Mike"  wrote:
>
> 
> 
> Michael,
> 
> The Flex SDK can do what you want, but the default behavior is for it to 
> unwrap collections and enclosing types which only contain one item.  This 
> default was not a good idea, IMO.
> 
> Have you tried setting Operation.forcePartArrays true?
> http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/Operation.html#forcePartArrays
> You will need to obtain the mx.rpc.soap.Operation from the WebService first.
> 
> You can alter the default behavior by writing a custom deserializer (which is 
> a non-trivial task, made more difficult by the ASDoc being turned off.)
> 
> For more information about Flex WebService, see my slide show and YouTube 
> video at 
> http://www.slideshare.net/mslinn/using-flex-with-enterprise-web-services
> 
> Mike
> 
> 
> > I'm using Flex 4 and I set the returntype for the webservice to return an 
> > array 
> > of Cars - Cars[].  If the web service returns more than 1, it successfully 
> > deserialized the data and returns an array of Car objects.  BUT, if only 
> > one is 
> > returned, it returns an ObjectProxy, obviously because it cannot convert it 
> > to 
> > an array.
>




[flexcoders] Web Services and ObjectProxy question for the Flex Gurus

2010-07-22 Thread flexcodemonkey
It seems like a common problem, I'm seeing tons of posts on the web, but no 
solid solution.  I'm making a web service call which will return a complex data 
type, say Car.  The Car has internal complex data types like Wheel, Door, etc.

I'm using Flex 4 and I set the returntype for the webservice to return an array 
of Cars - Cars[].  If the web service returns more than 1, it successfully 
deserialized the data and returns an array of Car objects.  BUT, if only one is 
returned, it returns an ObjectProxy, obviously because it cannot convert it to 
an array.  

Most solutions on the web show how to add this one item to an array.  What I 
want is the actual object to be of type Car.  If I change the returntype for 
the web service to return a single Car object, then when it returns one, it 
works, but more than one, it returns an array of ObjectProxy objects.

I could check if the returned object is a single object, then spin through each 
attribute and convert it to a car, but because the car has other objects within 
it, they too show up as ObjectProxy objects, so I'd hve to spin through the 
tires, the doors, etc. which in my case is a lot of attributes, just to 
deserialize the object.

Is there a solution for a web service to either a) always return an array, even 
if it is an array of 1, or b) a way for the Flex code to correctly deserialize 
both an array of Cars and 1 Car?

Thanks!