[flexcoders] Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
I have developed a REST web service in WCF (Windows communication
Foundation. .NET Technology). I want to use that web service in Flex
3. Can someone let me know is REST calls in supported in FLex3 or not?

Muhammad



Re: [flexcoders] Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
You can only make GET and POST requests from Flex.

-J

On Mon, Jun 2, 2008 at 4:21 PM, javed786pk [EMAIL PROTECTED] wrote:

   I have developed a REST web service in WCF (Windows communication
 Foundation. .NET Technology). I want to use that web service in Flex
 3. Can someone let me know is REST calls in supported in FLex3 or not?

 Muhammad

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] ColumnSet vs Multiple axes

2008-06-02 Thread Sunil Bannur
Can you send a snippet of your code or screenshot for more help.

 

Thanks

-Sunil

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Thursday, May 29, 2008 10:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ColumnSet vs Multiple axes

 

I have two column series related to distinct horizontal axes (of type
DateTimeAxis).

If I include the two series without wrapping them in a ColumnSet, the
columns from each series display overlaid on each other.

However, if I wrap them in a ColumnSet of type clustered, only one
series displays. Has anyone else encountered this?

Thanks in advance.

 

image001.jpgimage002.jpg

[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
thanks for quick response. Is there any workaround to make PUT and
DELETE Requests or its simply limitations of Flex3?

Muhammad Javed
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 You can only make GET and POST requests from Flex.
 
 -J
 
 On Mon, Jun 2, 2008 at 4:21 PM, javed786pk [EMAIL PROTECTED] wrote:
 
I have developed a REST web service in WCF (Windows communication
  Foundation. .NET Technology). I want to use that web service in Flex
  3. Can someone let me know is REST calls in supported in FLex3 or not?
 
  Muhammad
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
It's a limitation of the browser plugin API unfortunately. You can proxy
GET/POST requests via a server that makes the correct requests on your
behalf, but that's about it.

-J

On Mon, Jun 2, 2008 at 4:32 PM, javed786pk [EMAIL PROTECTED] wrote:

   thanks for quick response. Is there any workaround to make PUT and
 DELETE Requests or its simply limitations of Flex3?

 Muhammad Javed

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  You can only make GET and POST requests from Flex.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:21 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   I have developed a REST web service in WCF (Windows communication
   Foundation. .NET Technology). I want to use that web service in Flex
   3. Can someone let me know is REST calls in supported in FLex3 or not?
  
   Muhammad
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
J,
I am sorry but i did not understand the proxy part of your
response.Can you kindly elaborate it for me a little more?

-Muhammad
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 It's a limitation of the browser plugin API unfortunately. You can proxy
 GET/POST requests via a server that makes the correct requests on your
 behalf, but that's about it.
 
 -J
 
 On Mon, Jun 2, 2008 at 4:32 PM, javed786pk [EMAIL PROTECTED] wrote:
 
thanks for quick response. Is there any workaround to make PUT and
  DELETE Requests or its simply limitations of Flex3?
 
  Muhammad Javed
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   You can only make GET and POST requests from Flex.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:
  
I have developed a REST web service in WCF (Windows communication
Foundation. .NET Technology). I want to use that web service
in Flex
3. Can someone let me know is REST calls in supported in FLex3
or not?
   
Muhammad
   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
Well the idea is you run a proxy on your server, make non-rest calls to it
with GET and POST, or Data Services, and the proxy is the one that makes the
GET / POST / PUT / DELETE rest calls and then returns the result to your
Flex program. I think LCDS / BlazeDS has some stuff in it to help with that,
but I don't use it because we don't use rest so I don't know the details.

-J

On Mon, Jun 2, 2008 at 4:47 PM, javed786pk [EMAIL PROTECTED] wrote:

   J,
 I am sorry but i did not understand the proxy part of your
 response.Can you kindly elaborate it for me a little more?

 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  It's a limitation of the browser plugin API unfortunately. You can proxy
  GET/POST requests via a server that makes the correct requests on your
  behalf, but that's about it.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:32 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   thanks for quick response. Is there any workaround to make PUT and
   DELETE Requests or its simply limitations of Flex3?
  
   Muhammad Javed
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
You can only make GET and POST requests from Flex.
   
-J
   
On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:
   
 I have developed a REST web service in WCF (Windows communication
 Foundation. .NET Technology). I want to use that web service
 in Flex
 3. Can someone let me know is REST calls in supported in FLex3
 or not?

 Muhammad



   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Gireesh Kumar
As far as I understand REST invocation is same as any HTTP url loading in
Flex. You can use the HTTPService from Flex.

But I am not sure why you wanted DELETE and PUT methods with REST
webservice, you just need only GET/POST.

I think Flex 'HttpServer' support only GET/POST.


Thanks
Gireesh


On Mon, Jun 2, 2008 at 12:22 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   Well the idea is you run a proxy on your server, make non-rest calls to
 it with GET and POST, or Data Services, and the proxy is the one that makes
 the GET / POST / PUT / DELETE rest calls and then returns the result to your
 Flex program. I think LCDS / BlazeDS has some stuff in it to help with that,
 but I don't use it because we don't use rest so I don't know the details.

 -J

 On Mon, Jun 2, 2008 at 4:47 PM, javed786pk [EMAIL PROTECTED] wrote:

   J,
 I am sorry but i did not understand the proxy part of your
 response.Can you kindly elaborate it for me a little more?

 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  It's a limitation of the browser plugin API unfortunately. You can proxy
  GET/POST requests via a server that makes the correct requests on your
  behalf, but that's about it.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:32 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   thanks for quick response. Is there any workaround to make PUT and
   DELETE Requests or its simply limitations of Flex3?
  
   Muhammad Javed
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
You can only make GET and POST requests from Flex.
   
-J
   
On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:
   
 I have developed a REST web service in WCF (Windows communication
 Foundation. .NET Technology). I want to use that web service
 in Flex
 3. Can someone let me know is REST calls in supported in FLex3
 or not?

 Muhammad



   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 




-- 
Gireesh Kumar G
http://gireeshkumar.ind.in/


Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
If you're only using GET/POST you're not really doing rest, but I don't
wanna kick off a holy war. I don't even like rest :) I don't like SOAP much
either, but I do like the idea of schema definition, and I'm still waiting
for something nice in between the two ;-)

-J

On Mon, Jun 2, 2008 at 4:58 PM, Gireesh Kumar [EMAIL PROTECTED]
wrote:


 As far as I understand REST invocation is same as any HTTP url loading in
 Flex. You can use the HTTPService from Flex.

 But I am not sure why you wanted DELETE and PUT methods with REST
 webservice, you just need only GET/POST.

 I think Flex 'HttpServer' support only GET/POST.


 Thanks
 Gireesh


 On Mon, Jun 2, 2008 at 12:22 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   Well the idea is you run a proxy on your server, make non-rest calls to
 it with GET and POST, or Data Services, and the proxy is the one that makes
 the GET / POST / PUT / DELETE rest calls and then returns the result to your
 Flex program. I think LCDS / BlazeDS has some stuff in it to help with that,
 but I don't use it because we don't use rest so I don't know the details.

 -J

 On Mon, Jun 2, 2008 at 4:47 PM, javed786pk [EMAIL PROTECTED] wrote:

   J,
 I am sorry but i did not understand the proxy part of your
 response.Can you kindly elaborate it for me a little more?

 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  It's a limitation of the browser plugin API unfortunately. You can
 proxy
  GET/POST requests via a server that makes the correct requests on your
  behalf, but that's about it.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:32 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   thanks for quick response. Is there any workaround to make PUT and
   DELETE Requests or its simply limitations of Flex3?
  
   Muhammad Javed
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
You can only make GET and POST requests from Flex.
   
-J
   
On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:
   
 I have developed a REST web service in WCF (Windows communication
 Foundation. .NET Technology). I want to use that web service
 in Flex
 3. Can someone let me know is REST calls in supported in FLex3
 or not?

 Muhammad



   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 




 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 Gireesh Kumar G
 http://gireeshkumar.ind.in/
 




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: Air App - Check connection

2008-06-02 Thread Vadim Melnik
air.net.URLMonitor would be interesting as well, this class automatically 
polls certain URL for availability. I believe it should also internally listen 
for networkChange event and in online mode check service availability.

--
Thanks,
Vadim. 

  - Original Message - 
  From: Sherif Abdou 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, June 02, 2008 5:04 AM
  Subject: Re: [flexcoders] Re: Air App - Check connection



  I think you would need LIveCycle Express for that


  - Original Message 
  From: Michael Labriola [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Sunday, June 1, 2008 8:40:06 PM
  Subject: [flexcoders] Re: Air App - Check connection



  Indra,

  Look in the AIR help files for the presence API. 

  I think this article also covers it, but not sure how up to date it 
  is:

  http://www.adobe. com/devnet/ air/flex/ articles/ flickr_floater_ 06.html

  HTH,
  Labriola

  --- In [EMAIL PROTECTED] ups.com, Indra Prastha indra.prastha@ ... 
  wrote:
  
   Hi Guys,
   
   I'm creating an Air Application that has to check the connections 
  to a
   server.
   So when there's connection to the server, it retrieves XMLs through
   HTTPservice from my backend
   and if there's no connection , it should retrieve XMLs from local 
  disk.
   Reading xml is no problem in both ways, but whats the best way to 
  create
   the connection checking logic.??
   
   Thanks
   - Indra
  






   

[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
Did anyone try calling a simple SOAP service from Flex3? I will
appreciate if some can share the code.My SOAP web service is deployed
on my Local IIS server. Do we need any Flex configuration to run the
service successfully?


-Muhammad

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Well the idea is you run a proxy on your server, make non-rest calls
to it
 with GET and POST, or Data Services, and the proxy is the one that
makes the
 GET / POST / PUT / DELETE rest calls and then returns the result to your
 Flex program. I think LCDS / BlazeDS has some stuff in it to help
with that,
 but I don't use it because we don't use rest so I don't know the
details.
 
 -J
 
 On Mon, Jun 2, 2008 at 4:47 PM, javed786pk [EMAIL PROTECTED] wrote:
 
J,
  I am sorry but i did not understand the proxy part of your
  response.Can you kindly elaborate it for me a little more?
 
  -Muhammad
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   It's a limitation of the browser plugin API unfortunately. You
can proxy
   GET/POST requests via a server that makes the correct requests
on your
   behalf, but that's about it.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@ wrote:
  
thanks for quick response. Is there any workaround to make PUT and
DELETE Requests or its simply limitations of Flex3?
   
Muhammad Javed
   
--- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 You can only make GET and POST requests from Flex.

 -J

 On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:

  I have developed a REST web service in WCF (Windows
communication
  Foundation. .NET Technology). I want to use that web service
  in Flex
  3. Can someone let me know is REST calls in supported in FLex3
  or not?
 
  Muhammad
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It
tolls for
thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: josh@

   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
We use SOAP all the time from flex 3. You won't have a problem because SOAP
over http is always GET and POST

Look at mx:Webservice for more info.

-J

On Mon, Jun 2, 2008 at 5:42 PM, javed786pk [EMAIL PROTECTED] wrote:

   Did anyone try calling a simple SOAP service from Flex3? I will
 appreciate if some can share the code.My SOAP web service is deployed
 on my Local IIS server. Do we need any Flex configuration to run the
 service successfully?


 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Well the idea is you run a proxy on your server, make non-rest calls
 to it
  with GET and POST, or Data Services, and the proxy is the one that
 makes the
  GET / POST / PUT / DELETE rest calls and then returns the result to your
  Flex program. I think LCDS / BlazeDS has some stuff in it to help
 with that,
  but I don't use it because we don't use rest so I don't know the
 details.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:47 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   J,
   I am sorry but i did not understand the proxy part of your
   response.Can you kindly elaborate it for me a little more?
  
   -Muhammad
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
It's a limitation of the browser plugin API unfortunately. You
 can proxy
GET/POST requests via a server that makes the correct requests
 on your
behalf, but that's about it.
   
-J
   
On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@ wrote:
   
 thanks for quick response. Is there any workaround to make PUT and
 DELETE Requests or its simply limitations of Flex3?

 Muhammad Javed

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.comflexcoders%

   40yahoogroups.com,
   Josh
 McDonald dznuts@ wrote:
 
  You can only make GET and POST requests from Flex.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:
 
   I have developed a REST web service in WCF (Windows
 communication
   Foundation. .NET Technology). I want to use that web service
   in Flex
   3. Can someone let me know is REST calls in supported in FLex3
   or not?
  
   Muhammad
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It
 tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 



   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Casting Problem.. Type Coercion Failed

2008-06-02 Thread Manu Dhanda

I am using the WebORB for PHP on my server side.
There am doing a SELECT * query and am sending the returned results to Flex.

How did you create the collection? Did you
use AMF? Did you load from XML?
I am using the RemoteObjects in here and configured the VO's at both ends.

Somehow the objects that got created did not
get created as the proper UserVO objects. So check the collection when it
gets set, it's not getting set right. If you're using AMF then you might
need to include a reference to the UserVO class so the compiler knows to
include it, otherwise it won't get deserialized right.
Am new with PHP stuff, so just experimenting with it to use with Flex.
Here is how my class looks like in php:

?php
require_once(vo/UserVO.php);
class UserDelegate
{
public function getUsers()
{   
$link = mysql_connect(localhost, dbuser, dbpassword);
mysql_select_db('userdb', $link);
$result = mysql_query(SELECT * FROM tbl_user order by 
userId;)or
die(Invalid query:  . mysql_error());
mysql_close($link);
return $result;
}
}
?

So, I am selecting * and returning $result straightforward,  in responder(on
flex side) am getting this in my arraycollection as below:

public function result(data:Object):void
{
//TODO: implement function
var list:ArrayCollection = new ArrayCollection(data.result as Array);
// definition of ALL_USERS - public static var ALL_USERS : 
ICollectionView;
ModelLocator.ALL_USERS = list; // $results is being populated to
this corresponding collection.
}

So, on PHP side, am not sure how I would get the result in the form of
UserVO and populate the $result with vo's and then send it back to Flex.

Thanks for your help.



Doug McCune wrote:
 
 ALL_USERS isn't a collection of UserVO objects it seems. Looks like it's a
 collection of generic Objects. How did you create the collection? Did you
 use AMF? Did you load from XML? Somehow the objects that got created did
 not
 get created as the proper UserVO objects. So check the collection when it
 gets set, it's not getting set right. If you're using AMF then you might
 need to include a reference to the UserVO class so the compiler knows to
 include it, otherwise it won't get deserialized right. If you're using
 some
 other method (like loading XML, etc) then make sure in the parsing of the
 data that you are explicitly creating UserVO objects.
 
 Doug
 
 On Sun, Jun 1, 2008 at 6:35 AM, Manu Dhanda [EMAIL PROTECTED]
 wrote:
 

 Hii

 am writing a simple application where for logging in, am checking the
 values
 against the value objects contained in an ArrayCollection.

 While

 if((evt.userVO.email == ModelLocator.ALL_USERS[i].email) 
 (evt.userVO.pwd
 == ModelLocator.ALL_USERS[i].pwd))

 returns true, then why it throws this Type coercion error at this
 following
 line:

 model.currentUser = ModelLocator.ALL_USERS[i];
 //UserVO(ModelLocator.ALL_USERS[i]);

 currentUser is type UserVO and ALL_USERS is a collection of UserVO
 objects.

 I had tried by explicitely casting the above line(as commented), but
 still
 the same.

 Here is the error, I received while debugging:

 Explicit casting:-

 TypeError: Error #1034: Type Coercion failed: cannot convert
 [EMAIL PROTECTED]
 to com.live.flats.vo.UserVO.
 at

 com.live.flats.commands::LoginInfoCommand/execute()[F:\xampp\htdocs\flats\flex_src\com\live\flats\commands\LoginInfoCommand.as:60]
 at

 com.adobe.cairngorm.control::FrontController/executeCommand()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\FrontController.as:215]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at

 com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEventDispatcher.as:113]
 at

 com.adobe.cairngorm.control::CairngormEvent/dispatch()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEvent.as:77]
 at

 com.live.flats.view::LoginPanelBar/loginUser()[F:\xampp\htdocs\flats\flex_src\com\live\flats\view\LoginPanelBar.mxml:29]
 at

 com.live.flats.view::LoginPanelBar/__loginButton_click()[F:\xampp\htdocs\flats\flex_src\com\live\flats\view\LoginPanelBar.mxml:74]

 Implicit Casting:-

 TypeError: Error #1034: Type Coercion failed: cannot convert
 [EMAIL PROTECTED]
 to com.live.flats.vo.UserVO.
 at

 com.live.flats.commands::LoginInfoCommand/execute()[F:\xampp\htdocs\flats\flex_src\com\live\flats\commands\LoginInfoCommand.as:60]
 at

 com.adobe.cairngorm.control::FrontController/executeCommand()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\FrontController.as:215]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at

 

[flexcoders] First row trouble with datagrid component

2008-06-02 Thread y.mauron

topic summary : 
The first element of my dataprovider is not shown and there is always
an empty line as the first line of my datagrid


Dear all,

I think my question is entirely explained in the topic summary of this
post. I have a datagrid that uses a item renderer. The main app is
defined like in the first part of the attached code. The itemrenderer
looks like the second part of the attached code.

When I run it, the first item of my dataprovider is not shown while
the first line of my datagrid is always empty... Any idea to explain
this strange behavior ?


Thanks in advance...

Attach Code

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


mx:Script
![CDATA[
import mx.containers.VBox;
import mx.controls.Alert;
import mx.controls.Image;
import mx.collections.ArrayCollection;
public var essai2:ArrayCollection = new ArrayCollection();

public function init():void{
var img:Image = new Image();
img.source = 1.gif;
var box1:VBox = new VBox();
box1.addChild(img);
essai2.addItem(box1);
essai2.addItem(box1);
}


]]
/mx:Script

mx:DataGrid x=10 y=10 id=dg dataProvider={essai2}
width=100% height=100%
mx:columns

mx:DataGridColumn itemRenderer={new ClassFactory(relifeData)}

/mx:DataGridColumn
/mx:columns
/mx:DataGrid

/mx:Application

___


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

mx:Script
![CDATA[
import mx.controls.Alert;

function addComp():void{

boxContainer.addChild(DisplayObject(data));

}
]]
/mx:Script


mx:Box id=boxContainer
 
/mx:Box

/mx:Canvas



Re: [flexcoders] Re: New to flex, wonder why one works and the other doesn't...

2008-06-02 Thread Joseph Balderson
In other words, UIComponents /can/ natively contain other UIComponents, 
only the child UIComponent will by default have a 0 width and height.

Which it means it won't show up on the stage. Which means, by default, 
you cannot get a native (non-extended) UIComponent to show up when you 
add it to another UIComponent. Which means you cannot (successfully) add 
a native UIComponent to another UIComponent.

Thanks for catching the technicality, as a writer I love that kind of 
precision.

But basically what Charlie was saying is correct: UIComponent's can't 
contain other UIComponents without being a subclass of Container or 
implementing the IContainer interface. -- only he forgot to add 'and 
have them successfully show up on stage'.

So you're both correct IMO. Thanks for the clarity.

___

Joseph Balderson | http://joeflash.ca
Flex  Flash Platform Developer | Abobe Certified Developer  Trainer
Author, Professional Flex 3 (coming Winter 2008)
Staff Writer, Community MX | http://communitymx.com/author.cfm?cid=4674



Michael Labriola wrote:
 Guys, sorry, but that's not quite right. UIComponents can contain 
 other UIComponents without being a container. It is a common use 
 case. Take a look at the simple example Adobe includes with their 
 docs:
 
 http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.h
 tm?href=1742.html
 
 You will notice that the mocal text component is a UIComponent but 
 it contains a button and a text area... both UIComponents.
 
 The difference is that containers like Canvas have the logic to size 
 and position any child they contain by default. UIComponent does 
 not. So, in a UIComponent descendant, you need to write code to size 
 and position every child or they will exist as 0 width and 0 height 
 component.
 
 HTH,
 Labriola
 
 
 --- In flexcoders@yahoogroups.com, Charlie Hubbard 
 [EMAIL PROTECTED] wrote:
 Right.  Image is a UIComponent, and TextArea is a UIComponent.
 UIComponent's can't contain other UIComponents without being a
 subclass of Container or implementing the IContainer interface.  
 Not a
 simple task.

 addChild() is defined in DisplayObject which apart of the Flash API
 not the Flex API.  BitmapAsset is a sublcass of DisplayObject and 
 not
 UIComponent.  So you can add it to the text area directly using 
 this
 code:

  var img : BitmapAsset = new imgCls() as BitmapAsset;
  img.x = txtArea.mouseX;
  img.y = txtArea.mouseY;
  txtArea.addChild( img );

 Now, try that out, and you'll start to see some issues that you'll
 have to asess if this is going to work for what you're trying to 
 do.
 Since the bitmap is not apart of the document in the TextArea you 
 are
 going to get clipping or scrolling.  If you want to do that you'll
 have to get really dirty with the TextArea API.  Probably even
 ditching TextArea altogether and writing your own, or modifying 
 rich
 text editor.

 Charlie


 On Thu, May 29, 2008 at 5:37 PM, aarhac [EMAIL PROTECTED] wrote:
 Hello,

 I have figured out how to work around my problem, but I do 
 wonder why
 one of the following methods works, and the other doesn't. I 
 would be
 grateful if someone could explain the error in the failing 
 method.
 The code is pasted below (Below the line of dashes) in it's 
 entirety,
 and is commented as to which works and which doesn't.

 The image referenced in this case is a 32x32 pixel png file on my
 local system. I am attempting to display the image on a text 
 area.
 Using the default example from the flex documentation to embed an
 image, I cannot get the image to show up when added to the text 
 area's
 display list, but it does show just fine when added to the root
 display list. I also added the image to the textArea using
 addChildAt(txtIcon, txtArea.numChildren) with no change in 
 effect.
 The second method works just fine. I imagine that the problem has
 something to do with applying the image as a byte array to
 image.source, but I wonder why exactly? Is this a bug?

 Thanks in advance,

 --Aaron

 

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute

 !--Works--
 mx:Image id=txtIcon source=@Embed(source='c:/icon.png')/

 mx:TextArea id=txtArea width=400 height=200 
 click=addImage()/
 mx:Script
 ![CDATA[
 import mx.controls.Image;
 import mx.core.BitmapAsset;

 // Doesn't work
 [Embed(source=c:/icon.png)]
 [Bindable]
 public var imgCls:Class;

 public function addImage():void
 {
 // Doesn't work
 var loadedImg:Image = new Image();
 loadedImg.source = new imgCls() as BitmapAsset;

 loadedImg.x = 10;
 loadedImg.y = 10;
 txtArea.addChild(loadedImg);

 // Note: While the above doesn't work, adding the
 // image to the root display list does work:
 //addChild(loadedImg);

 // Works
 txtIcon.x = 50;
 txtIcon.y = 10;
 txtArea.addChild(txtIcon);
 }
 ]]
 /mx:Script

 

Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
If you get a security exception, it usually means you need a crossdomain.xml
file in the root directory of your server. Google knows all about this :)

On Mon, Jun 2, 2008 at 7:05 PM, javed786pk [EMAIL PROTECTED] wrote:

   J,
 Can you Kindly some sample Code(Flex3)that can call the webserivce.
 Actually i tried to use the mx:Webservice but i am getting security
 exceptions . Is there any configuration that needs to be made @ flex
 side to overcome these security issues?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  We use SOAP all the time from flex 3. You won't have a problem
 because SOAP
  over http is always GET and POST
 
  Look at mx:Webservice for more info.
 
  -J
 
  On Mon, Jun 2, 2008 at 5:42 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   Did anyone try calling a simple SOAP service from Flex3? I will
   appreciate if some can share the code.My SOAP web service is deployed
   on my Local IIS server. Do we need any Flex configuration to run the
   service successfully?
  
  
   -Muhammad
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
Well the idea is you run a proxy on your server, make non-rest calls
   to it
with GET and POST, or Data Services, and the proxy is the one that
   makes the
GET / POST / PUT / DELETE rest calls and then returns the result
 to your
Flex program. I think LCDS / BlazeDS has some stuff in it to help
   with that,
but I don't use it because we don't use rest so I don't know the
   details.
   
-J
   
On Mon, Jun 2, 2008 at 4:47 PM, javed786pk javed786pk@ wrote:
   
 J,
 I am sorry but i did not understand the proxy part of your
 response.Can you kindly elaborate it for me a little more?

 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.comflexcoders%

   40yahoogroups.com,
   Josh
 McDonald dznuts@ wrote:
 
  It's a limitation of the browser plugin API unfortunately. You
   can proxy
  GET/POST requests via a server that makes the correct requests
   on your
  behalf, but that's about it.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@ wrote:
 
   thanks for quick response. Is there any workaround to make
 PUT and
   DELETE Requests or its simply limitations of Flex3?
  
   Muhammad Javed
  
   --- In flexcoders@yahoogroups.comflexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.com
   flexcoders%40yahoogroups.comflexcoders%
  
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
You can only make GET and POST requests from Flex.
   
-J
   
On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@
 wrote:
   
 I have developed a REST web service in WCF (Windows
   communication
 Foundation. .NET Technology). I want to use that web
 service
 in Flex
 3. Can someone let me know is REST calls in supported
 in FLex3
 or not?

 Muhammad



   
   
   
--
Therefore, send not to know For whom the bell tolls. It
   tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It
 tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 



   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] MXML schema

2008-06-02 Thread Tom Chiverton
On Saturday 31 May 2008, Mark Volkmann wrote:
 Is there an official XML Schema for MXML? 

Not for Flex 3.

 If so, where can I get it? 

The xsd4mxml project can make you one though.

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
J,
Can you Kindly some sample Code(Flex3)that can call the webserivce.
Actually i tried to use the mx:Webservice but i am getting security
exceptions . Is there any configuration that needs to be made @ flex
side to overcome these security issues?

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 We use SOAP all the time from flex 3. You won't have a problem
because SOAP
 over http is always GET and POST
 
 Look at mx:Webservice for more info.
 
 -J
 
 On Mon, Jun 2, 2008 at 5:42 PM, javed786pk [EMAIL PROTECTED] wrote:
 
Did anyone try calling a simple SOAP service from Flex3? I will
  appreciate if some can share the code.My SOAP web service is deployed
  on my Local IIS server. Do we need any Flex configuration to run the
  service successfully?
 
 
  -Muhammad
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   Well the idea is you run a proxy on your server, make non-rest calls
  to it
   with GET and POST, or Data Services, and the proxy is the one that
  makes the
   GET / POST / PUT / DELETE rest calls and then returns the result
to your
   Flex program. I think LCDS / BlazeDS has some stuff in it to help
  with that,
   but I don't use it because we don't use rest so I don't know the
  details.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:47 PM, javed786pk javed786pk@ wrote:
  
J,
I am sorry but i did not understand the proxy part of your
response.Can you kindly elaborate it for me a little more?
   
-Muhammad
   
--- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 It's a limitation of the browser plugin API unfortunately. You
  can proxy
 GET/POST requests via a server that makes the correct requests
  on your
 behalf, but that's about it.

 -J

 On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@ wrote:

  thanks for quick response. Is there any workaround to make
PUT and
  DELETE Requests or its simply limitations of Flex3?
 
  Muhammad Javed
 
  --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com
  flexcoders%40yahoogroups.comflexcoders%
 
40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   You can only make GET and POST requests from Flex.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@
wrote:
  
I have developed a REST web service in WCF (Windows
  communication
Foundation. .NET Technology). I want to use that web
service
in Flex
3. Can someone let me know is REST calls in supported
in FLex3
or not?
   
Muhammad
   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It
  tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It
tolls for
thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: josh@

   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] MXML namespace

2008-06-02 Thread Tom Chiverton
On Saturday 31 May 2008, Mark Volkmann wrote:
 Why does nearly all MXML use the mx prefix to refer to elements in the MXML
 namespace instead of making that be the default namespace? 

'Convention'.

 When you make it 
 the default, the MXML looks much cleaner.

Until you start throwing your own namespaces, maybe with conflicting component 
names in, maybe... 

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Accessing the sub-items of a Menu command

2008-06-02 Thread Marty Pitt
Hi all.

This is a stupid question, but I can't work it out!

Given the following XML and code, how am I supposed to access the Do 
Something menu item that is created?


var xml:XML = new XML(
root
 menuItem label=File
   menuItem label=Do Something /
  /menuItem
/root
);

var menuBar:MenuBar = new MenuBar();
menuBar.dataProvider = xml;
menuBar.showRoot = false;
menuBar.labelField = @label


By making a call to menuBar.getMenuAt(0) I get a reference to the File menu, 
returned as type Menu.

Menu doesn't seem to expose either a collection of sub-items, or a getMenuAt() 
method.

I'm stumped!

Any help greatly appreciated.

Cheers

Marty



  

[flexcoders] GroupingCollection with good performance

2008-06-02 Thread sreeni_r
I created a GroupingCollection2 with better performance (in 
comparision with GroupingCollection) by tweaking the implementation. 
You can find a sample/swc here 

http://flexpearls.blogspot.com/2008/06/groupingcollection-with-some-
better.html

If you have some free time please test it and let me know if you find 
any bugs !

Of-course if you like the performance and would like to use it in your 
app, feel free :) 



Re: [flexcoders] ColumnSet vs Multiple axes

2008-06-02 Thread Sangavi G
This is an issue and is similar to
https://bugs.adobe.com/jira/browse/FLEXDMV-1669

Regards,
Sangavi

On Mon, Jun 2, 2008 at 11:58 AM, Sunil Bannur [EMAIL PROTECTED] wrote:

Can you send a snippet of your code or screenshot for more help.



 Thanks

 -Sunil



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Richard Rodseth
 *Sent:* Thursday, May 29, 2008 10:33 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] ColumnSet vs Multiple axes



 I have two column series related to distinct horizontal axes (of type
 DateTimeAxis).

 If I include the two series without wrapping them in a ColumnSet, the
 columns from each series display overlaid on each other.

 However, if I wrap them in a ColumnSet of type clustered, only one
 series displays. Has anyone else encountered this?

 Thanks in advance.

   



Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
Not much more I can suggest really, besides getting a copy of charles the
debugging proxy to see exactly what's going on. What's the exact error
you're getting?

-J

On Mon, Jun 2, 2008 at 9:15 PM, javed786pk [EMAIL PROTECTED] wrote:

   J,
 I already have place crossdomain.xml is my root directory. Here are
 conents of crossdomain.xml

 ?xml version=1.0?

 !DOCTYPE cross-domain-policy SYSTEM
 http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;

 cross-domain-policy

 allow-access-from domain='*' /

 /cross-domain-policy

 but i am still getting the error.Any clue?
 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  If you get a security exception, it usually means you need a
 crossdomain.xml
  file in the root directory of your server. Google knows all about
 this :)
 
  On Mon, Jun 2, 2008 at 7:05 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   J,
   Can you Kindly some sample Code(Flex3)that can call the webserivce.
   Actually i tried to use the mx:Webservice but i am getting security
   exceptions . Is there any configuration that needs to be made @ flex
   side to overcome these security issues?
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
We use SOAP all the time from flex 3. You won't have a problem
   because SOAP
over http is always GET and POST
   
Look at mx:Webservice for more info.
   
-J
   
On Mon, Jun 2, 2008 at 5:42 PM, javed786pk javed786pk@ wrote:
   
 Did anyone try calling a simple SOAP service from Flex3? I will
 appreciate if some can share the code.My SOAP web service is
 deployed
 on my Local IIS server. Do we need any Flex configuration to
 run the
 service successfully?


 -Muhammad

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.comflexcoders%

   40yahoogroups.com,
   Josh
 McDonald dznuts@ wrote:
 
  Well the idea is you run a proxy on your server, make
 non-rest calls
 to it
  with GET and POST, or Data Services, and the proxy is the
 one that
 makes the
  GET / POST / PUT / DELETE rest calls and then returns the result
   to your
  Flex program. I think LCDS / BlazeDS has some stuff in it to
 help
 with that,
  but I don't use it because we don't use rest so I don't know the
 details.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:47 PM, javed786pk javed786pk@ wrote:
 
   J,
   I am sorry but i did not understand the proxy part of your
   response.Can you kindly elaborate it for me a little more?
  
   -Muhammad
  
   --- In flexcoders@yahoogroups.comflexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.com
   flexcoders%40yahoogroups.comflexcoders%
  
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
It's a limitation of the browser plugin API
 unfortunately. You
 can proxy
GET/POST requests via a server that makes the correct
 requests
 on your
behalf, but that's about it.
   
-J
   
On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@
 wrote:
   
 thanks for quick response. Is there any workaround to make
   PUT and
 DELETE Requests or its simply limitations of Flex3?

 Muhammad Javed

 --- In
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com
   flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.comflexcoders%

   40yahoogroups.com,
   Josh
 McDonald dznuts@ wrote:
 
  You can only make GET and POST requests from Flex.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@
   wrote:
 
   I have developed a REST web service in WCF (Windows
 communication
   Foundation. .NET Technology). I want to use that web
   service
   in Flex
   3. Can someone let me know is REST calls in supported
   in FLex3
   or not?
  
   Muhammad
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It
 tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 



   
   
   
--
Therefore, send not to know For whom the bell tolls. It
   tolls for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It
 tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 



   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls 

Re: [flexcoders] Passing an email *subject* when opening email client?

2008-06-02 Thread JRBower

With your help I could put together a solution. Here's what worked for me:

private function launchMailer(e:Event):void{
var mailLink:URLRequest = new URLRequest(mailto://; +
e.currentTarget.label + ?subject=Hello Nabble:  + someID.text +  ::  +
anicelyformattedDate.text);
navigateToURL( mailLink, _self );
}


Cheers,
JRB 



JRBower wrote:
 
 The function below works great for passing the email address but I'd like
 to also pass the subject also. Any ideas how to include the subject in
 this function?
 
 
 private function launchMailer(e:Event):void
{
  var mailLink:URLRequest = new URLRequest(mailto://; +
 e.currentTarget.label);
  navigateToURL( mailLink, _self );
}
 
 Thanks,
 James
 

-- 
View this message in context: 
http://www.nabble.com/Passing-an-email-*subject*-when-opening-email-client--tp17582920p17599551.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
J,
I already have place crossdomain.xml is my root directory. Here are
conents of crossdomain.xml

?xml version=1.0?

   !DOCTYPE cross-domain-policy SYSTEM
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;

   cross-domain-policy

   allow-access-from domain='*' /

   /cross-domain-policy


but i am still getting the error.Any clue?
-Muhammad
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 If you get a security exception, it usually means you need a
crossdomain.xml
 file in the root directory of your server. Google knows all about
this :)
 
 On Mon, Jun 2, 2008 at 7:05 PM, javed786pk [EMAIL PROTECTED] wrote:
 
J,
  Can you Kindly some sample Code(Flex3)that can call the webserivce.
  Actually i tried to use the mx:Webservice but i am getting security
  exceptions . Is there any configuration that needs to be made @ flex
  side to overcome these security issues?
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   We use SOAP all the time from flex 3. You won't have a problem
  because SOAP
   over http is always GET and POST
  
   Look at mx:Webservice for more info.
  
   -J
  
   On Mon, Jun 2, 2008 at 5:42 PM, javed786pk javed786pk@ wrote:
  
Did anyone try calling a simple SOAP service from Flex3? I will
appreciate if some can share the code.My SOAP web service is
deployed
on my Local IIS server. Do we need any Flex configuration to
run the
service successfully?
   
   
-Muhammad
   
--- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 Well the idea is you run a proxy on your server, make
non-rest calls
to it
 with GET and POST, or Data Services, and the proxy is the
one that
makes the
 GET / POST / PUT / DELETE rest calls and then returns the result
  to your
 Flex program. I think LCDS / BlazeDS has some stuff in it to
help
with that,
 but I don't use it because we don't use rest so I don't know the
details.

 -J

 On Mon, Jun 2, 2008 at 4:47 PM, javed786pk javed786pk@ wrote:

  J,
  I am sorry but i did not understand the proxy part of your
  response.Can you kindly elaborate it for me a little more?
 
  -Muhammad
 
  --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com
  flexcoders%40yahoogroups.comflexcoders%
 
40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   It's a limitation of the browser plugin API
unfortunately. You
can proxy
   GET/POST requests via a server that makes the correct
requests
on your
   behalf, but that's about it.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@
wrote:
  
thanks for quick response. Is there any workaround to make
  PUT and
DELETE Requests or its simply limitations of Flex3?
   
Muhammad Javed
   
--- In
flexcoders@yahoogroups.comflexcoders%40yahoogroups.com
  flexcoders%40yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
   
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 You can only make GET and POST requests from Flex.

 -J

 On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@
  wrote:

  I have developed a REST web service in WCF (Windows
communication
  Foundation. .NET Technology). I want to use that web
  service
  in Flex
  3. Can someone let me know is REST calls in supported
  in FLex3
  or not?
 
  Muhammad
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It
tolls for
thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: josh@

   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It
  tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It
tolls for
thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: josh@

   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread javed786pk
Here is the exact error
[RPC Fault faultString=Security error accessing url
faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTP]

-Muhammad
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Not much more I can suggest really, besides getting a copy of
charles the
 debugging proxy to see exactly what's going on. What's the exact error
 you're getting?
 
 -J
 
 On Mon, Jun 2, 2008 at 9:15 PM, javed786pk [EMAIL PROTECTED] wrote:
 
J,
  I already have place crossdomain.xml is my root directory. Here are
  conents of crossdomain.xml
 
  ?xml version=1.0?
 
  !DOCTYPE cross-domain-policy SYSTEM
  http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
 
  cross-domain-policy
 
  allow-access-from domain='*' /
 
  /cross-domain-policy
 
  but i am still getting the error.Any clue?
  -Muhammad
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   If you get a security exception, it usually means you need a
  crossdomain.xml
   file in the root directory of your server. Google knows all about
  this :)
  
   On Mon, Jun 2, 2008 at 7:05 PM, javed786pk javed786pk@ wrote:
  
J,
Can you Kindly some sample Code(Flex3)that can call the
webserivce.
Actually i tried to use the mx:Webservice but i am getting
security
exceptions . Is there any configuration that needs to be made
@ flex
side to overcome these security issues?
   
   
--- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 We use SOAP all the time from flex 3. You won't have a problem
because SOAP
 over http is always GET and POST

 Look at mx:Webservice for more info.

 -J

 On Mon, Jun 2, 2008 at 5:42 PM, javed786pk javed786pk@ wrote:

  Did anyone try calling a simple SOAP service from Flex3? I
will
  appreciate if some can share the code.My SOAP web service is
  deployed
  on my Local IIS server. Do we need any Flex configuration to
  run the
  service successfully?
 
 
  -Muhammad
 
  --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com
  flexcoders%40yahoogroups.comflexcoders%
 
40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   Well the idea is you run a proxy on your server, make
  non-rest calls
  to it
   with GET and POST, or Data Services, and the proxy is the
  one that
  makes the
   GET / POST / PUT / DELETE rest calls and then returns
the result
to your
   Flex program. I think LCDS / BlazeDS has some stuff in it to
  help
  with that,
   but I don't use it because we don't use rest so I don't
know the
  details.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:47 PM, javed786pk javed786pk@
wrote:
  
J,
I am sorry but i did not understand the proxy part of your
response.Can you kindly elaborate it for me a little more?
   
-Muhammad
   
--- In
flexcoders@yahoogroups.comflexcoders%40yahoogroups.com
  flexcoders%40yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
   
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 It's a limitation of the browser plugin API
  unfortunately. You
  can proxy
 GET/POST requests via a server that makes the correct
  requests
  on your
 behalf, but that's about it.

 -J

 On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@
  wrote:

  thanks for quick response. Is there any workaround
to make
PUT and
  DELETE Requests or its simply limitations of Flex3?
 
  Muhammad Javed
 
  --- In
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders%
  40yahoogroups.com
flexcoders%40yahoogroups.com
  flexcoders%40yahoogroups.comflexcoders%
 
40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   You can only make GET and POST requests from Flex.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:21 PM, javed786pk
javed786pk@
wrote:
  
I have developed a REST web service in WCF
(Windows
  communication
Foundation. .NET Technology). I want to use
that web
service
in Flex
3. Can someone let me know is REST calls in
supported
in FLex3
or not?
   
Muhammad
   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell
tolls. It
  tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It
tolls for
thee.

[flexcoders] Re: Questions regarding updating dataProviders after a drag drop

2008-06-02 Thread bredwards358
Okay, I kind of get what you're saying, it makes sense however I have
some questions to clear things up further, nothing big, just simple
things. Check below for the blue text, in the meantime I'll experiment,
Thanks a bunch I appreciate it.

Brian Ross Edwards,
Tech-Connect LLC.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Normally, you listen for dragDrop or dragComplete events and if you
 don't want default behavior, you call preventDefault on the event and
do
 whatever you want.



 So, if I were handling dragging products to a shopping list, I would
 write something like this:



 public function dragDropHandler(event:DragEvent):void

 {

 var draggedItems:Array =
 event.dragSource.dataForFormat(items);//Is items simply a generic
name or the name of what you're dragging from?

 var draggedItem:Product = draggeItems[0];//Am I correct in
assuming that this is the row of the dataGrid being dragged from?



 // search array collection for existing object

 var ac:ArrayCollection = dataProvider;//This is the
dataProvider of the dataGrid being dropped on, right?

 var n:int = ac.length;

 for (var i:int = 0; I  n; i++)

 {

 If (ac[i].productKey ==
draggedItem.productKey)

 {

 ac[i].quantity ++;

 event.preventDefault();

 return;

 }

 }

 // if we don't exit via preventDefault()/return, then
 default behavior will add it to the dataProvider

 }




Re: [flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread Josh McDonald
Hmm not sure, the crossdomain thing usually comes as a sandbox violation. I
guess I'm not that much use after all :)

-J

On Mon, Jun 2, 2008 at 10:29 PM, javed786pk [EMAIL PROTECTED] wrote:

   Here is the exact error
 [RPC Fault faultString=Security error accessing url
 faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTP]


 -Muhammad
 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Not much more I can suggest really, besides getting a copy of
 charles the
  debugging proxy to see exactly what's going on. What's the exact error
  you're getting?
 
  -J
 
  On Mon, Jun 2, 2008 at 9:15 PM, javed786pk [EMAIL PROTECTED] wrote:
 
   J,
   I already have place crossdomain.xml is my root directory. Here are
   conents of crossdomain.xml
  
   ?xml version=1.0?
  
   !DOCTYPE cross-domain-policy SYSTEM
   http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
  
   cross-domain-policy
  
   allow-access-from domain='*' /
  
   /cross-domain-policy
  
   but i am still getting the error.Any clue?
   -Muhammad
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
If you get a security exception, it usually means you need a
   crossdomain.xml
file in the root directory of your server. Google knows all about
   this :)
   
On Mon, Jun 2, 2008 at 7:05 PM, javed786pk javed786pk@ wrote:
   
 J,
 Can you Kindly some sample Code(Flex3)that can call the
 webserivce.
 Actually i tried to use the mx:Webservice but i am getting
 security
 exceptions . Is there any configuration that needs to be made
 @ flex
 side to overcome these security issues?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.comflexcoders%

   40yahoogroups.com,
   Josh
 McDonald dznuts@ wrote:
 
  We use SOAP all the time from flex 3. You won't have a problem
 because SOAP
  over http is always GET and POST
 
  Look at mx:Webservice for more info.
 
  -J
 
  On Mon, Jun 2, 2008 at 5:42 PM, javed786pk javed786pk@ wrote:
 
   Did anyone try calling a simple SOAP service from Flex3? I
 will
   appreciate if some can share the code.My SOAP web service is
   deployed
   on my Local IIS server. Do we need any Flex configuration to
   run the
   service successfully?
  
  
   -Muhammad
  
   --- In flexcoders@yahoogroups.comflexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.com
   flexcoders%40yahoogroups.comflexcoders%
  
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
Well the idea is you run a proxy on your server, make
   non-rest calls
   to it
with GET and POST, or Data Services, and the proxy is the
   one that
   makes the
GET / POST / PUT / DELETE rest calls and then returns
 the result
 to your
Flex program. I think LCDS / BlazeDS has some stuff in it to
   help
   with that,
but I don't use it because we don't use rest so I don't
 know the
   details.
   
-J
   
On Mon, Jun 2, 2008 at 4:47 PM, javed786pk javed786pk@
 wrote:
   
 J,
 I am sorry but i did not understand the proxy part of your
 response.Can you kindly elaborate it for me a little more?

 -Muhammad

 --- In
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com
   flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.comflexcoders%

   40yahoogroups.com,
   Josh
 McDonald dznuts@ wrote:
 
  It's a limitation of the browser plugin API
   unfortunately. You
   can proxy
  GET/POST requests via a server that makes the correct
   requests
   on your
  behalf, but that's about it.
 
  -J
 
  On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@
   wrote:
 
   thanks for quick response. Is there any workaround
 to make
 PUT and
   DELETE Requests or its simply limitations of Flex3?
  
   Muhammad Javed
  
   --- In
   flexcoders@yahoogroups.com flexcoders%40yahoogroups.com flexcoders%
 40yahoogroups.comflexcoders%
   40yahoogroups.com
 flexcoders%40yahoogroups.com
   flexcoders%40yahoogroups.comflexcoders%
  
 40yahoogroups.com,
 Josh
   McDonald dznuts@ wrote:
   
You can only make GET and POST requests from Flex.
   
-J
   
On Mon, Jun 2, 2008 at 4:21 PM, javed786pk
 javed786pk@
 wrote:
   
 I have developed a REST web service in WCF
 (Windows
   communication
 Foundation. .NET Technology). I want to use
 that web
 service
 in Flex
 3. Can 

Re: [flexcoders] Re: How to convert a powerpoint to AS3 swf for loading in Flex?

2008-06-02 Thread Paul Andrews

- Original Message - 
From: rdebled [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, June 01, 2008 11:16 PM
Subject: [flexcoders] Re: How to convert a powerpoint to AS3 swf for loading 
in Flex?


snip

 Finally, and most successfully, I started playing with print2flash
 which can convert a ppt to a swf and has a flex component that can
 open that swf and move around it.  It's early stages right now, but
 it seems to do everything I need, with API calls for moving from one
 page to another, zooming, scrolling, etc.  The Pro edition is $80 and
 there's a server edition that has an automation API, letting you
 integrate conversion into your application.  Very cool. Anyone facing
 this powerpoint to Flex problem should take a look to see if this
 meets your needs.

I've had a quick look at print2flash and it looks good, but I think the 
problem for powerpoint conversion is the use of animation and transitions - 
something I don't think that print2flash can handle. I'm sure that 
conversion of static slides (via the print interface) would work fine.

If you know different, let me know fast!

Paul

 Robin

snip



Re: [flexcoders] The different between generial Flex 3 and Flex 3 Profesional?

2008-06-02 Thread Scott Barnes
I thought of a number of replies to this thread, but I'm sure this is going
nowhere? Suffice to say:

..You don't change the course of history by turning the faces of portraits
to the wall..

I'd rather spend more of my time influencing our future, then trying to
defend our past? As I had no input or control over the previous folks before
me.

I don't think the community is in such a fragile state to suddenly firewall
itself away from the Microsoft brand. Reading the below it almost sounds as
if my infomercial will in turn suddenly cause a mass exodus from Flex?
People's technology adoption behaviour is a lot more complex than a product
fact placement in a random list?. Protect your community yes, but don't
blind them as their ability to see will be that much more diminished.


Scott.
Product Manager
Microsoft.


On Sun, Jun 1, 2008 at 10:49 PM, Paul Andrews [EMAIL PROTECTED] wrote:

Hi Scott,

 Wow . Well maybe.

 I'm trying to make my mind up about whether I should really be bothered
 about your presence or not. As I said in another post, I've seen similar
 things in another technical area and the helpful posts were more about
 promotion of the rival technology rather than really helping the community.
 In the case in question the helpful posts contained very valid information
 for the community, particularly at first, but gradually the posts had
 subtexts inferring the superiority of the rival product and even at one
 stage offers of discounting to encourage people to jump ship. Then, as here,
 the poster was an expert in using both technologies and had many personal
 friends on the forum: no mistake about it the guy was loved by the community
 he left and really he was exploiting the situation to grow users of his
 product. His interventions split the community badly and eventually he
 desisted. Anyway, that gives an idea of where I come from. That particular
 forum often has discussions about the merits of the two products involved
 and generally it's not provocative.

 I'm not saying that you are behaving as this guy did, but for me there's an
 echo of what happened elsewhere.

 Seeing your posts really unsettled me. Maybe I'm wrong. Given your position
 at Microsoft, it's inevitable that your aim must be to encourage users of
 rival technologies to adopt your technologies. If you don't have that aim
 Microsoft recruited the wrong person. As impartial as you may try to be in
 your posts they effectively are an infomercial.

 I have no idea if Adobe staff are regularly correcting misconceptions on
 Silverlight forums. If they are, as a silverlight user, I'd have similar
 feelings.

 Ultimately developers will cross over and mix technologies and I'm not
 bothered about that. It's when the actual parties get involved that I get
 nervous.

 I think I've made my point, as have you and others. I'm going to let things
 be. Just don't offer any discounts here for Silverlight for Flex
 developers..  ;-)

 Paul



  - Original Message -
 *From:* Scott Barnes [EMAIL PROTECTED]
   *To:* flexcoders@yahoogroups.com
 *Sent:* Monday, June 02, 2008 6:04 AM
 *Subject:* Re: [flexcoders] The different between generial Flex 3 and Flex
 3 Profesional?

 wow :)

 I only joined Microsoft in 2007 (prior to which I was on this list coding
 away in Flex since this list was born), I don't know what we did prior to
 2007 nor do I really care (can't change the past, can only influence the
 future!), suffice to say while I'm on the job, the tactics and strategies
 aren't underhanded and the compete is kept clean (which we have been really
 good about). That being said, when I see assumptions or inaccurate
 information being presented in a forum (couldn't care as to what theme or
 where) i'll simply step forward, make sure our opinion is heard and step
 back. I don't draw battle lines, I don't buy into this is our gangs turf,
 go to your own mentality as to me it just is a waste of brain matter to
 think in that mode. Suffice to say, should you still think it's not
 appropriate, Adobe Staffers have done similar posts to this on Silverlight
 related forums? (which I welcome! as I'm sure folks in the .NET community
 aren't kind to Adobe messaging either).

 It doesn't bother me that folks dislike Silverlight or say negative things
 about it, if it's not for you, great, enjoy Flex and all the best. I'd
 rather you dislike us with an accurate amount of information vs reading a
 friend of a friends blog post or picked up some random text byte on a forum
 somewhere.

 I'd encourage all to interact with various communities (don't be restricted
 by just one technology, explore more), as you learn more about your approach
 by seeing how others complete theirs.

 All the best and have another glass of wine! :) (if it's good, keep the
 flow going!).

 Scott Barnes
 Product Manager
 Microsoft.

 On Sat, May 31, 2008 at 4:27 PM, Paul Andrews [EMAIL PROTECTED] wrote:

oops too much red wine.

 I was going to say I wouldn't have 

Re: [flexcoders] MXML namespace

2008-06-02 Thread Mark Volkmann
On Jun 2, 2008, at 5:49 AM, Tom Chiverton wrote:

 On Saturday 31 May 2008, Mark Volkmann wrote:
 Why does nearly all MXML use the mx prefix to refer to elements in  
 the MXML
 namespace instead of making that be the default namespace?

 'Convention'.

 When you make it
 the default, the MXML looks much cleaner.

 Until you start throwing your own namespaces, maybe with conflicting  
 component
 names in, maybe...

Even then I think 99% of the time the most used namespace with be the  
one for MXML. It seems logical for the most used namespace to be the  
one that's the default. I think it would be better to use prefixes for  
your own namespaces and none for MXML.

 -- 
 Tom Chiverton

 

 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. Any reference to a partner  
 in relation to Halliwells LLP means a member of Halliwells LLP.   
 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 Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo 
 ! Groups Links





---
Mark Volkmann






[flexcoders] ColdFusion/LiveCycle/Mysql + Flex

2008-06-02 Thread Francois Dejardin
Hi all !!

I just have a project that use LiveCycle a lot... I begin from the scratch with 
integrated ColdFusion LiveCycle,
so i've tried the example in devnet : 
http://www.adobe.com/devnet/coldfusion/articles/data_app.html and everything 
seems to work with the Coldfusion embedded databases ( I 've just noticed that 
in some field when wanted to upgrade a field i get un 'contructor' error, issue 
that wasn't resolved, even by his author.
Now my problem is that i use a proper mysql database and when i lauch the same 
application i get a blank page without anyresult in the datagrid and no error 
messages from flex, coldfusion or mysql...
Is it a known issue or have i to configure Mysql in other way in Coldfusion ??

Any helps will be appreciated

Francois

[flexcoders] Re: adding a label to a Panel header?

2008-06-02 Thread fb6668
Yippee!
Awesome, thanks guys, added a height and width and it worked a treat.

F

--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:

  Is the size of the label actually being set?
 
 My guess would be no. Raw children are not automatically sized like
 normal children are so if its not being explicitly sized its probably
 got a width and height of 0.
 
 HTH,
 Ben
 
 
 
 --- In flexcoders@yahoogroups.com, Daniel Freiman FreimanCQ@ wrote:
 
  Is the size of the label actually being set?
  
  - Daniel Freiman
  
  On Fri, May 30, 2008 at 11:18 AM, fb6668 fiona@ wrote:
  
 Hi, I've extended the Panel container, and would now like to add a
   second text field to the header.
  
   I currently have code which has added am expand/contract button
to the
   header, using:
  
   rawChildren.addChild(btStateUp);
   rawChildren.addChild(btStateDown);
  
   but when I try to add a label, as follows, nothing is displayed:
  
   in createChildren():
  
   lblTotal = new Label();
   lblTotal.text = £200**;
   rawChildren.addChild(lblTotal);
  
   and in updateDisplayList():
  
   lblTotal.move(unscaledWidth - lblTotal.width - 10, y);
  
   Can anyone shed any light why it's not showing? I can include the
   whole script if required, but it's based on MaxRestorePanel which is
   in the FlexGrocer app.
  
   Thanks!
  

  
 





[flexcoders] Coldfusion/LCDS/Mysql + Flex

2008-06-02 Thread Francois Dejardin
Hi all !!

I just have a project that use LiveCycle a lot... I begin from the scratch with 
integrated ColdFusion LiveCycle,
so i've tried the example in devnet : 
http://www.adobe.com/devnet/coldfusion/articles/data_app.html and everything 
seems to work with the Coldfusion embedded databases ( I 've just noticed that 
in some field when wanted to upgrade a field i get un 'contructor' error, issue 
that wasn't resolved, even by his author.
Now my problem is that i use a proper mysql database and when i lauch the same 
application i get a blank page without anyresult in the datagrid and no error 
messages from flex, coldfusion or mysql...
Is it a known issue or have i to configure Mysql in other way in Coldfusion ??

Any helps will be appreciated

Francois

[flexcoders] Re: Flex / Air sharewware app: what database to use in network environment?

2008-06-02 Thread andrewwestberg
PostgreSQL is probably a good solution for you.  The license is more
friendly(free) than MySQL since you're developing a commercial
application.
The pgAdmin III tool is also quite good at manipulating a PostgreSQL
database while in development.

-Andrew




Re: [flexcoders] The different between generial Flex 3 and Flex 3 Profesional?

2008-06-02 Thread Paul Andrews
It sounds very heroic. I'll keep and eye out for further enlightenment.

Paul
  - Original Message - 
  From: Scott Barnes 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, June 02, 2008 8:01 AM
  Subject: Re: [flexcoders] The different between generial Flex 3 and Flex 3 
Profesional?


  I thought of a number of replies to this thread, but I'm sure this is going 
nowhere? Suffice to say:

  ..You don't change the course of history by turning the faces of portraits 
to the wall..

  I'd rather spend more of my time influencing our future, then trying to 
defend our past? As I had no input or control over the previous folks before me.

  I don't think the community is in such a fragile state to suddenly firewall 
itself away from the Microsoft brand. Reading the below it almost sounds as if 
my infomercial will in turn suddenly cause a mass exodus from Flex? People's 
technology adoption behaviour is a lot more complex than a product fact 
placement in a random list?. Protect your community yes, but don't blind them 
as their ability to see will be that much more diminished.


  Scott.
  Product Manager
  Microsoft.


  On Sun, Jun 1, 2008 at 10:49 PM, Paul Andrews [EMAIL PROTECTED] wrote:


Hi Scott,

Wow . Well maybe.

I'm trying to make my mind up about whether I should really be bothered 
about your presence or not. As I said in another post, I've seen similar things 
in another technical area and the helpful posts were more about promotion of 
the rival technology rather than really helping the community. In the case in 
question the helpful posts contained very valid information for the community, 
particularly at first, but gradually the posts had subtexts inferring the 
superiority of the rival product and even at one stage offers of discounting to 
encourage people to jump ship. Then, as here, the poster was an expert in using 
both technologies and had many personal friends on the forum: no mistake about 
it the guy was loved by the community he left and really he was exploiting the 
situation to grow users of his product. His interventions split the community 
badly and eventually he desisted. Anyway, that gives an idea of where I come 
from. That particular forum often has discussions about the merits of the two 
products involved and generally it's not provocative.

I'm not saying that you are behaving as this guy did, but for me there's an 
echo of what happened elsewhere.

Seeing your posts really unsettled me. Maybe I'm wrong. Given your position 
at Microsoft, it's inevitable that your aim must be to encourage users of rival 
technologies to adopt your technologies. If you don't have that aim Microsoft 
recruited the wrong person. As impartial as you may try to be in your posts 
they effectively are an infomercial.

I have no idea if Adobe staff are regularly correcting misconceptions on 
Silverlight forums. If they are, as a silverlight user, I'd have similar 
feelings.

Ultimately developers will cross over and mix technologies and I'm not 
bothered about that. It's when the actual parties get involved that I get 
nervous.

I think I've made my point, as have you and others. I'm going to let things 
be. Just don't offer any discounts here for Silverlight for Flex developers..  
;-)

Paul


  - Original Message - 
  From: Scott Barnes 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, June 02, 2008 6:04 AM
  Subject: Re: [flexcoders] The different between generial Flex 3 and Flex 
3 Profesional?


  wow :) 

  I only joined Microsoft in 2007 (prior to which I was on this list coding 
away in Flex since this list was born), I don't know what we did prior to 2007 
nor do I really care (can't change the past, can only influence the future!), 
suffice to say while I'm on the job, the tactics and strategies aren't 
underhanded and the compete is kept clean (which we have been really good 
about). That being said, when I see assumptions or inaccurate information being 
presented in a forum (couldn't care as to what theme or where) i'll simply step 
forward, make sure our opinion is heard and step back. I don't draw battle 
lines, I don't buy into this is our gangs turf, go to your own mentality as 
to me it just is a waste of brain matter to think in that mode. Suffice to say, 
should you still think it's not appropriate, Adobe Staffers have done similar 
posts to this on Silverlight related forums? (which I welcome! as I'm sure 
folks in the .NET community aren't kind to Adobe messaging either).

  It doesn't bother me that folks dislike Silverlight or say negative 
things about it, if it's not for you, great, enjoy Flex and all the best. I'd 
rather you dislike us with an accurate amount of information vs reading a 
friend of a friends blog post or picked up some random text byte on a forum 
somewhere. 

  I'd encourage all to interact with various communities (don't be 
restricted by just one technology, 

[flexcoders] Re: What next after getting FLEX ?

2008-06-02 Thread valdhor
You may be better off looking into the WAMP project. This is a simple
installer to get you Apache, MySQL and PHP on Windows.

After that, there are many tutorials, books etc to get you up and running.



--- In flexcoders@yahoogroups.com, itdanny2002 [EMAIL PROTECTED] wrote:

 Dear All,
 
 Thank you very much. 
 Then I need to learn Linux + PHP + MySQL. 
 I would like to ask one more questions since
 I never use Linux stuff before. I only use 
 IIS in windows envirnoment. What should I use 
 in Linux ? Tomcat ? JBoss ? I can't distinguish it.
 
 Thanks in advance
 
 --- In flexcoders@yahoogroups.com, Justin Stanczak rizenine@ 
 wrote:
 
  I throw in my vote for Tomcat, and Java Berkley DB. I'm trying to 
 use Blaze
  DS, but still not there yet, so I can't point to it yet. I've been 
 using
  Flex Builder as well.
  
  On Tue, May 27, 2008 at 11:26 AM, itdanny2002 Chow.Danny@ 
 wrote:
  
 Hi All,
  
   I'm new FLEXer. I wanna to buy an application
   with database in server as well as locally.
   What should I get for Web Server and Database ?
  
   1. IIS + MS-Access ?
   2. JBoss (Window) + MySQL ?
   3. JBoss (Linus) + MySQL ?
   4. Tomcat + MySQL ?
   5
  
   Indeed, I prefer to use in IIS + MS-Access as
   I'm familiar with it. If not What do you suggest ?
  
   Many Thanks
  

  
  
  
  
  -- 
  All that is necessary for the triumph of evil is that good men do 
 nothing.
  - Edmund Burke
 





[flexcoders] Re: Calling a REST webservice from Flex

2008-06-02 Thread meteatamel
Yes, BlazeDS (which is an open source project) has Proxy Service that
does exactly what you need. It proxies HTTP calls using Apache commons
Http Client and it enables you to do HTTP GET, POST, PUT, DELETE.

Check out BlazeDS here:

http://opensource.adobe.com/wiki/display/blazeds

-Mete

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Well the idea is you run a proxy on your server, make non-rest calls
to it
 with GET and POST, or Data Services, and the proxy is the one that
makes the
 GET / POST / PUT / DELETE rest calls and then returns the result to your
 Flex program. I think LCDS / BlazeDS has some stuff in it to help
with that,
 but I don't use it because we don't use rest so I don't know the
details.
 
 -J
 
 On Mon, Jun 2, 2008 at 4:47 PM, javed786pk [EMAIL PROTECTED] wrote:
 
J,
  I am sorry but i did not understand the proxy part of your
  response.Can you kindly elaborate it for me a little more?
 
  -Muhammad
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   It's a limitation of the browser plugin API unfortunately. You
can proxy
   GET/POST requests via a server that makes the correct requests
on your
   behalf, but that's about it.
  
   -J
  
   On Mon, Jun 2, 2008 at 4:32 PM, javed786pk javed786pk@ wrote:
  
thanks for quick response. Is there any workaround to make PUT and
DELETE Requests or its simply limitations of Flex3?
   
Muhammad Javed
   
--- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.comflexcoders%
  40yahoogroups.com,
  Josh
McDonald dznuts@ wrote:

 You can only make GET and POST requests from Flex.

 -J

 On Mon, Jun 2, 2008 at 4:21 PM, javed786pk javed786pk@ wrote:

  I have developed a REST web service in WCF (Windows
communication
  Foundation. .NET Technology). I want to use that web service
  in Flex
  3. Can someone let me know is REST calls in supported in FLex3
  or not?
 
  Muhammad
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It
tolls for
thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: josh@

   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Flex drag n drop, zoom issue

2008-06-02 Thread Gireesh Kumar
Hi Rick,


I have integrated the fix, and its working like charm , Thank you very much.
Now I know whom to look for If i have any issue with Flex :-).   I have also
updated my url with the new code.

Now the only issue left is, when I drag and drop item to the plan, it get
slightly shifted not getting dropped when I dropped, Guess I need to adjust
my x/y point calculations.

http://gireeshkumar.ind.in/designDemo/floorDesign2.html

Thanks
Gireesh

On Mon, Jun 2, 2008 at 9:39 AM, Gireesh Kumar [EMAIL PROTECTED]
wrote:

 Hi Rick,

It worked, I need to make some adjustment to my application to get this
 integrated.

 Thanks you very much.
 Gireesh.


 On Mon, Jun 2, 2008 at 9:06 AM, Rick Winscot [EMAIL PROTECTED]
 wrote:

Right… I don't have the time to fix your application for you – but I
 do have time to give you a quickie example that will set you in the right
 direction. This example works as-is if you replace the house_plans.png and
 couch.png images. The 'take-aways' are listed below the example.



 ?xml version=1.0 encoding=utf-8?

 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=
 absolute



 mx:Script

   ![CDATA[



 *private* *function* doZoom():*void*

 {

   myCanvas.scaleX = myCanvas.scaleY = ( myZoomer.value /
 100 );

 }



   ]]

 /mx:Script



   mx:VSlider x=414 y=151 minimum=10 maximum=100
 snapInterval=5 liveDragging=true id=myZoomer change=doZoom();
 value=100/



   mx:Canvas x=439 y=151 width=400 height=400 id=myHolder

 mx:Canvas id=myCanvas horizontalScrollPolicy=off
 verticalScrollPolicy=off

   mx:Image source=house_plans.png/

   mx:Image x=62 y=26 source=couch.png/

 /mx:Canvas

   /mx:Canvas



 /mx:Application





 Key Take-aways:



 #1 – a container in container approach helps eliminate scroll bar scaling
 issues

 #2 – a container in container approach helps reduce the number of scalable
 objects you have to keep track of to one (myCanvas – children should be
 added here)

 #3 – position of all objects is maintained without having to after-manage
 coordinates



 How you manage the size/ratio of objects after you get this all setup…
 should probably be done just setting the unscaledWith and unscaledHeight
 appropriately.



 Rick Winscot











 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Gireesh Kumar
 *Sent:* Sunday, June 01, 2008 2:04 PM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Flex drag n drop, zoom issue




 Actually it is a canvas, and I am placing the objects on the canvas, I
 tried setting the plan image as background of canvas also.

 And if I change only the canvas scaleX and scaleY the placed object is not
 zooming properly.
 If you look at the source you will see this.


 Thanks
 Gireesh

 On Sun, Jun 1, 2008 at 11:06 PM, Rick Winscot [EMAIL PROTECTED]
 wrote:

 It crossed my mind that you might be doing something like this… can I
 recommend an alternate solution? Use a canvas/container to host your plan _
 *and*_ all of your placed objects – then just set the scaleX/scaleY of
 that canvas/container. If you do it this way – you won't have to worry about
 object placement or spacing.



 Rick Winscot





 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Gireesh Kumar
 *Sent:* Sunday, June 01, 2008 1:06 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Flex drag n drop, zoom issue



 Hi,

 Here is the code I use to set the scaleX and Y values

 private function doZoom(event:Event):void{
 if(currentPlanCanvas == null){
 return;
 }
 doComponentZoom(currentPlanCanvas,
 (HSlider(event.currentTarget).value));
 }
 private function
 doComponentZoom(component:UIComponent,val:Number):void{
 component.scaleX = val;
 component.scaleY = val;
 if(component is Container){
 var children:Array = Container(component).getChildren();
 for(var i:int = 0; i  children.length; i++){
 doComponentZoom(children[i], val);
 }
 }
 }




 Thanks
 Gireesh




  On Sun, Jun 1, 2008 at 10:22 PM, Rick Winscot [EMAIL PROTECTED]
 wrote:

 I took a quick look at your sample… and it looks like you are doing
 something strange with your scaleX/scaleY – they aren't being set uniformly.
 You'll only need a single change so I would think: scaleX = scaleY =
 zoomer.value  -- no?



 Rick Winscot





 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *gireeshgiri
 *Sent:* Sunday, June 01, 2008 3:11 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Flex drag n drop, zoom issue



 Hi,

 I am having an issue with the application currently I am
 developing, the issue after dropping object to the canvas and if i try
 to 

[flexcoders] FocusRect troubles

2008-06-02 Thread Mark Winterhalder
Hello,

I'm fairly new to Flex and have some questions about the FocusRect:

How would I globally change the color?
How would I globally remove all focusRects?

If that doesn't work, how can I do that at least for the
NumericStepper arrow buttons, and how can I do it for UITextField?

Thanks,
Mark


[flexcoders] Re: Casting Problem.. Type Coercion Failed

2008-06-02 Thread valdhor
I don't use WebORB; I use AMFPHP (I found AMFPHP faster, more reliable
and easier to use than WebORB).

Anyway, you include the UserVO.php file at the top of your PHP file and
then never use it (I assume this is the value object for your user). You
should create an array of UserVO objects and return this array:

?php
require_once(vo/UserVO.php);
class UserDelegate
{
 public function getUsers()
 {
 $users = array();
 $link = mysql_connect(localhost, dbuser, dbpassword);
 mysql_select_db('userdb', $link);
 $result = mysql_query(SELECT * FROM tbl_user order by
userId;)or die(Invalid query:  . mysql_error());
 mysql_close($link);
 while ($row = mysql_fetch_object($result, UserVO))
 {
 $users[] = $row;
 }
 return $users;
 }
}
?

Now, at the flex end, you will need a UserVO class so that the objects
can be deserialized correctly: (The variable names will be wrong - just
change/add your own)

package myservices
{
 [RemoteClass(alias=services.UserVO)]
 [Bindable]
 public class UserVO
 {
 //instance variables
 private var _FirstName:String;
 private var _LastName:String;

 //accessor methods
 public function get FirstName():String {return _FirstName;}
 public function get LastName():String {return _LastName;}

 //mutator methods
 public function set FirstName(FirstName:String):void {_FirstName
= FirstName;}
 public function set LastName(LastName:String):void {_LastName =
LastName;}
 }
}


So, when you get your result back, convert it to an arrayCollection:

var ALL_USERS:ArrayCollection = new
ArrayCollection(ArrayUtil.toArray(event.result));


Now, I can use each user object:

var currentUser:UserVO = ALL_USERS[i] as UserVO;


HTH.


--- In flexcoders@yahoogroups.com, Manu Dhanda [EMAIL PROTECTED]
wrote:


 I am using the WebORB for PHP on my server side.
 There am doing a SELECT * query and am sending the returned results to
Flex.

 How did you create the collection? Did you
 use AMF? Did you load from XML?
 I am using the RemoteObjects in here and configured the VO's at both
ends.

 Somehow the objects that got created did not
 get created as the proper UserVO objects. So check the collection when
it
 gets set, it's not getting set right. If you're using AMF then you
might
 need to include a reference to the UserVO class so the compiler knows
to
 include it, otherwise it won't get deserialized right.
 Am new with PHP stuff, so just experimenting with it to use with Flex.
 Here is how my class looks like in php:

 ?php
 require_once(vo/UserVO.php);
 class UserDelegate
 {
 public function getUsers()
 {
 $link = mysql_connect(localhost, dbuser, dbpassword);
 mysql_select_db('userdb', $link);
 $result = mysql_query(SELECT * FROM tbl_user order by
userId;)or
 die(Invalid query:  . mysql_error());
 mysql_close($link);
 return $result;
 }
 }
 ?

 So, I am selecting * and returning $result straightforward,  in
responder(on
 flex side) am getting this in my arraycollection as below:

 public function result(data:Object):void
 {
 //TODO: implement function
 var list:ArrayCollection = new ArrayCollection(data.result as
Array);
 // definition of ALL_USERS - public static var ALL_USERS :
ICollectionView;
 ModelLocator.ALL_USERS = list; // $results is being populated
to
 this corresponding collection.
 }

 So, on PHP side, am not sure how I would get the result in the form of
 UserVO and populate the $result with vo's and then send it back to
Flex.

 Thanks for your help.





[flexcoders] Re: Casting Problem.. Type Coercion Failed

2008-06-02 Thread valdhor
I don't use WebORB; I use AMFPHP (I found AMFPHP faster, more reliable
and easier to use than WebORB).

Anyway, you include the UserVO.php file at the top of your PHP file and
then never use it (I assume this is the value object for your user). You
should create an array of UserVO objects and return this array:

?php
require_once(vo/UserVO.php);
class UserDelegate
{
 public function getUsers()
 {
 $users = array();
 $link = mysql_connect(localhost, dbuser, dbpassword);
 mysql_select_db('userdb', $link);
 $result = mysql_query(SELECT * FROM tbl_user order by
userId;)or die(Invalid query:  . mysql_error());
 mysql_close($link);
 while ($row = mysql_fetch_object($result, UserVO))
 {
 $users[] = $row;
 }
 return $users;
 }
}
?

Now, at the flex end, you will need a UserVO class so that the objects
can be deserialized correctly: (The variable names will be wrong - just
change/add your own)

package myservices
{
 [RemoteClass(alias=services.UserVO)]
 [Bindable]
 public class UserVO
 {
 //instance variables
 private var _FirstName:String;
 private var _LastName:String;

 //accessor methods
 public function get FirstName():String {return _FirstName;}
 public function get LastName():String {return _LastName;}

 //mutator methods
 public function set FirstName(FirstName:String):void {_FirstName
= FirstName;}
 public function set LastName(LastName:String):void {_LastName =
LastName;}
 }
}


So, when you get your result back, convert it to an arrayCollection:

var ALL_USERS:ArrayCollection = new
ArrayCollection(ArrayUtil.toArray(event.result));


Now, I can use each user object:

var currentUser:UserVO = ALL_USERS[i] as UserVO;


HTH.


--- In flexcoders@yahoogroups.com, Manu Dhanda [EMAIL PROTECTED]
wrote:


 I am using the WebORB for PHP on my server side.
 There am doing a SELECT * query and am sending the returned results to
Flex.

 How did you create the collection? Did you
 use AMF? Did you load from XML?
 I am using the RemoteObjects in here and configured the VO's at both
ends.

 Somehow the objects that got created did not
 get created as the proper UserVO objects. So check the collection when
it
 gets set, it's not getting set right. If you're using AMF then you
might
 need to include a reference to the UserVO class so the compiler knows
to
 include it, otherwise it won't get deserialized right.
 Am new with PHP stuff, so just experimenting with it to use with Flex.
 Here is how my class looks like in php:

 ?php
 require_once(vo/UserVO.php);
 class UserDelegate
 {
 public function getUsers()
 {
 $link = mysql_connect(localhost, dbuser, dbpassword);
 mysql_select_db('userdb', $link);
 $result = mysql_query(SELECT * FROM tbl_user order by
userId;)or
 die(Invalid query:  . mysql_error());
 mysql_close($link);
 return $result;
 }
 }
 ?

 So, I am selecting * and returning $result straightforward,  in
responder(on
 flex side) am getting this in my arraycollection as below:

 public function result(data:Object):void
 {
 //TODO: implement function
 var list:ArrayCollection = new ArrayCollection(data.result as
Array);
 // definition of ALL_USERS - public static var ALL_USERS :
ICollectionView;
 ModelLocator.ALL_USERS = list; // $results is being populated
to
 this corresponding collection.
 }

 So, on PHP side, am not sure how I would get the result in the form of
 UserVO and populate the $result with vo's and then send it back to
Flex.

 Thanks for your help.





[flexcoders] Listening for a value change

2008-06-02 Thread Jeff Douglas
This seems like this should be easy but I'm hititng my head against the 
wall trying to figure it out. 

I have the following String:

[Bindable] var myString:String;

The value of myString changes throughout the application. Based upon 
the value of myString I want to perform different tasks. How can I 
write a listener that determines 1) that the value has changed and 2) 
what the new value is?

Thanks
Jeff





[flexcoders] FlexReport not showing report first time in tab navigator

2008-06-02 Thread Derrick Anderson
I know there are many here who use FlexReport library so I hope somebody
here can help with this.  I am loading reports into a tab navigator, the
reports do not show content until i switch tabs, then come back to that
one.  I suspect the 'show' event being dispatched does something to the
content to make it re-appear but I'm not sure.

When I load a report, I do it with the following lines in my function

//CODE//
var viewer:ReportViewer = new ReportViewer();
viewer.reportLabel = item.label;
viewer.reportClass = item.data;
viewer.label = item.label;

reportsTabNavigator.addChild(DisplayObject(viewer));

//END CODE//

ReportViewer just loads reports dynamically like so

//CODE//
private function generateDocument():void
{
var productivityReport:ProductivityReport;
var productivityReportDP:ProductivityReportModel;
//it's only setup for 1 report now, the ProductivityReport
//get the names of the report and dataprovider classes
var
reportClass:String=com.winn.view.reports.+this.reportClass;
var
dpClass:String=com.winn.model.reports.+this.reportClass+Model;
// create class references
var ReportClassReference:Class =
getDefinitionByName(reportClass) as Class;
var DPClassReference:Class = getDefinitionByName(dpClass) as
Class;
DPClassReference.projectDSN = global.projectDSN;
// instantiate report and dataprovider classes
var report:Report = new ReportClassReference();
var source:Object = new DPClassReference();
// create the report document
 doc = new Document(report, source, PaperFormat.A4);
 doc.pdfScript = ;
 doc.pdfEnabled = true;
//doc.title = Productivity Report;
printPreview.doc = doc;
}


Re: [flexcoders] Coldfusion/LCDS/Mysql + Flex

2008-06-02 Thread Sherif Abdou
well it works for me, i just did a little example on my site. are you sure you 
have it uploaded in http://localhost:8500 and using it as a datasource in the 
cfcomponent




- Original Message 
From: Francois Dejardin [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, June 2, 2008 4:10:18 AM
Subject: [flexcoders] Coldfusion/LCDS/Mysql + Flex


Hi all !!
 
I just have a project that use LiveCycle a lot... I 
begin from the scratch with integrated ColdFusion LiveCycle,
so i've tried the example in devnet : http://www.adobe. com/devnet/ coldfusion/ 
articles/ data_app. html and 
everything seems to work with the Coldfusion embedded databases ( I 've just 
noticed that in some field when wanted to upgrade a field i get un 'contructor' 
error, issue that wasn't resolved, even by his author.
Now my problem is that i use a proper mysql 
database and when i lauch the same application i get a blank page without 
anyresult in the datagrid and no error messages from flex, coldfusion or 
mysql...
Is it a known issue or have i to configure Mysql in 
other way in Coldfusion ??
 
Any helps will be appreciated
 
Francois


  

[flexcoders] configuring for a headless server

2008-06-02 Thread netdeep
I have seen a few posts about setting up flex to run on a headless server but 
I'm a bit 
confused about how to actually do this or even if this will fix my problem.  
This is what the 
documentation says should be done to set things up:

---

define the value of the headless-server tag in the flex-config.xml file. 
Setting this 
property to true is required to support fonts and SVG images in a nongraphical 
environment. The headless-server tag is a child tag of compiler. The 
following 
example sets headless-server to true:

headless-servertrue/headless-server

---

Seems straight forward enough, but when I deploy to the server using a war 
file, I am not 
providing the flex-config.xml file.  Do I need to get my sys admin to update 
this on the 
server manually?

What I am doing is launching flex from the server as a thread to run in the 
background 
and save snapshots of charts drawn in flex every time new data is sent from the 
server to 
the flex app running in the browser.  So in this instance of flex, no user is 
involved.  The 
server is a headless rack mounted computer.






[flexcoders] Run-time debugging

2008-06-02 Thread markgoldin_2000
Sometimes, when I run my program I am getting a run-time error shown in 
the popup window. Is it possible to open that window with some 
debugging info while the program is runing?

Thanks



Re: [flexcoders] Listening for a value change

2008-06-02 Thread Felipe Fernandes
Jeff,

Look at setter and getter functions it´s just what you need.

Felipe

On Mon, Jun 2, 2008 at 10:40 AM, Jeff Douglas
[EMAIL PROTECTED] wrote:
 This seems like this should be easy but I'm hititng my head against the
 wall trying to figure it out.

 I have the following String:

 [Bindable] var myString:String;

 The value of myString changes throughout the application. Based upon
 the value of myString I want to perform different tasks. How can I
 write a listener that determines 1) that the value has changed and 2)
 what the new value is?

 Thanks
 Jeff

 


[flexcoders] Re: book errata

2008-06-02 Thread Michael Labriola

If you find anything specific and it is not yet on the peachpit 
site, feel free to email me directly off-list.


--- In flexcoders@yahoogroups.com, Joseph Balderson [EMAIL PROTECTED] wrote:

 Check the peachpit website.
 
_
__
 
 Joseph Balderson | http://joeflash.ca
 Flex  Flash Platform Developer | Abobe Certified Developer  
Trainer
 Author, Professional Flex 3 (coming Winter 2008)
 Staff Writer, Community MX | http://communitymx.com/author.cfm?
cid=4674
 
 
 
 Mark Volkmann wrote:
  Is there an errata page for the book Adobe Flex 3 - Training 
from the Source?
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.comYahoo! Groups Links
  
  
  
 





[flexcoders] Re: New to flex, wonder why one works and the other doesn't...

2008-06-02 Thread Michael Labriola

Close, but no.

In Flex, parents are responsible for sizing their children. Flex 
Containers (which are just UIComponents with more code) do size 
their children, but you can also create UIComponents that know how 
to size their children. 

Neither a container, nor a component that implements a container 
interface needs to be involved in any way to handle this. That is 
the fallacy I am addressing.

Look at the example I provided and you will not see a Container or 
implementor of that interface.

In other words: 
* UIComponents can contain other UIComponents. 
* Containers are UIComponents which know how to automatically size 
their children through the component lifecycle

Does this make sense?
Mike



--- In flexcoders@yahoogroups.com, Joseph Balderson [EMAIL PROTECTED] wrote:

 In other words, UIComponents /can/ natively contain other 
UIComponents, 
 only the child UIComponent will by default have a 0 width and 
height.
 
 Which it means it won't show up on the stage. Which means, by 
default, 
 you cannot get a native (non-extended) UIComponent to show up when 
you 
 add it to another UIComponent. Which means you cannot 
(successfully) add 
 a native UIComponent to another UIComponent.
 
 Thanks for catching the technicality, as a writer I love that kind 
of 
 precision.
 
 But basically what Charlie was saying is correct: UIComponent's 
can't 
 contain other UIComponents without being a subclass of Container 
or 
 implementing the IContainer interface. -- only he forgot to 
add 'and 
 have them successfully show up on stage'.
 
 So you're both correct IMO. Thanks for the clarity.
 
 
_
__
 
 Joseph Balderson | http://joeflash.ca
 Flex  Flash Platform Developer | Abobe Certified Developer  
Trainer
 Author, Professional Flex 3 (coming Winter 2008)
 Staff Writer, Community MX | http://communitymx.com/author.cfm?
cid=4674
 
 
 
 Michael Labriola wrote:
  Guys, sorry, but that's not quite right. UIComponents can 
contain 
  other UIComponents without being a container. It is a common use 
  case. Take a look at the simple example Adobe includes with 
their 
  docs:
  
  
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.h
  tm?href=1742.html
  
  You will notice that the mocal text component is a UIComponent 
but 
  it contains a button and a text area... both UIComponents.
  
  The difference is that containers like Canvas have the logic to 
size 
  and position any child they contain by default. UIComponent does 
  not. So, in a UIComponent descendant, you need to write code to 
size 
  and position every child or they will exist as 0 width and 0 
height 
  component.
  
  HTH,
  Labriola
  
  
  --- In flexcoders@yahoogroups.com, Charlie Hubbard 
  charlie.hubbard@ wrote:
  Right.  Image is a UIComponent, and TextArea is a UIComponent.
  UIComponent's can't contain other UIComponents without being a
  subclass of Container or implementing the IContainer 
interface.  
  Not a
  simple task.
 
  addChild() is defined in DisplayObject which apart of the Flash 
API
  not the Flex API.  BitmapAsset is a sublcass of DisplayObject 
and 
  not
  UIComponent.  So you can add it to the text area directly using 
  this
  code:
 
 var img : BitmapAsset = new imgCls() as BitmapAsset;
 img.x = txtArea.mouseX;
 img.y = txtArea.mouseY;
 txtArea.addChild( img );
 
  Now, try that out, and you'll start to see some issues that 
you'll
  have to asess if this is going to work for what you're trying 
to 
  do.
  Since the bitmap is not apart of the document in the TextArea 
you 
  are
  going to get clipping or scrolling.  If you want to do that 
you'll
  have to get really dirty with the TextArea API.  Probably even
  ditching TextArea altogether and writing your own, or modifying 
  rich
  text editor.
 
  Charlie
 
 
  On Thu, May 29, 2008 at 5:37 PM, aarhac aaronh@ wrote:
  Hello,
 
  I have figured out how to work around my problem, but I do 
  wonder why
  one of the following methods works, and the other doesn't. I 
  would be
  grateful if someone could explain the error in the failing 
  method.
  The code is pasted below (Below the line of dashes) in it's 
  entirety,
  and is commented as to which works and which doesn't.
 
  The image referenced in this case is a 32x32 pixel png file on 
my
  local system. I am attempting to display the image on a text 
  area.
  Using the default example from the flex documentation to embed 
an
  image, I cannot get the image to show up when added to the 
text 
  area's
  display list, but it does show just fine when added to the root
  display list. I also added the image to the textArea using
  addChildAt(txtIcon, txtArea.numChildren) with no change in 
  effect.
  The second method works just fine. I imagine that the problem 
has
  something to do with applying the image as a byte array to
  image.source, but I wonder why exactly? Is 

Re: [flexcoders] Listening for a value change

2008-06-02 Thread Daniel Gold
It sounds like you need to set up a ChangeWatcher, take a look at the docs,
but basically you can listen for updates to a property on an object and call
a function when the update occurs

On Mon, Jun 2, 2008 at 9:01 AM, Felipe Fernandes 
[EMAIL PROTECTED] wrote:

   Jeff,

 Look at setter and getter functions it´s just what you need.

 Felipe


 On Mon, Jun 2, 2008 at 10:40 AM, Jeff Douglas
 [EMAIL PROTECTED] donotspamme%40jeffdouglas.com wrote:
  This seems like this should be easy but I'm hititng my head against the
  wall trying to figure it out.
 
  I have the following String:
 
  [Bindable] var myString:String;
 
  The value of myString changes throughout the application. Based upon
  the value of myString I want to perform different tasks. How can I
  write a listener that determines 1) that the value has changed and 2)
  what the new value is?
 
  Thanks
  Jeff
 
 
  



RE: [flexcoders] Accessing the sub-items of a Menu command

2008-06-02 Thread Tracy Spratt
var xmlMenuItem:XML = xml..menuItem.(attribute(label) == Do
Something)[0];

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Marty Pitt
Sent: Monday, June 02, 2008 6:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Accessing the sub-items of a Menu command

 

Hi all.

This is a stupid question, but I can't work it out!

Given the following XML and code, how am I supposed to access the Do
Something menu item that is created?

var xml:XML = new XML(
root
 menuItem label=File
   menuItem label=Do Something /
  /menuItem
/root
);

var menuBar:MenuBar = new MenuBar();
menuBar.dataProvider = xml;
menuBar.showRoot = false;
menuBar.labelField = @label



By making a call to menuBar.getMenuAt(0) I get a reference to the File
menu, returned as type Menu.

Menu doesn't seem to expose either a collection of sub-items, or a
getMenuAt() method.

I'm stumped!

Any help greatly appreciated.

Cheers

Marty

 

 



RE: [flexcoders] First row trouble with datagrid component

2008-06-02 Thread Tracy Spratt
First, a dataProvider should contain data.  It looks like you are
putting ui components in the dataProvider.  Unless you are working a
very extreme edge-case, you do not want to do that.  What are you trying
to accomplish?

 

Second, you cannot use creationComplete to show row/item level UI in a
renderer.  All display work in a renderer must happen as the result of
the framework's call to the set data() function.  Typically, one
overrides set data().

 

I think you may have some basic misconceptions to work through.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of y.mauron
Sent: Monday, June 02, 2008 4:04 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] First row trouble with datagrid component

 


topic summary : 
The first element of my dataprovider is not shown and there is always
an empty line as the first line of my datagrid

Dear all,

I think my question is entirely explained in the topic summary of this
post. I have a datagrid that uses a item renderer. The main app is
defined like in the first part of the attached code. The itemrenderer
looks like the second part of the attached code.

When I run it, the first item of my dataprovider is not shown while
the first line of my datagrid is always empty... Any idea to explain
this strange behavior ?

Thanks in advance...

Attach Code

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

mx:Script
![CDATA[
import mx.containers.VBox;
import mx.controls.Alert;
import mx.controls.Image;
import mx.collections.ArrayCollection;
public var essai2:ArrayCollection = new ArrayCollection();

public function init():void{
var img:Image = new Image();
img.source = 1.gif;
var box1:VBox = new VBox();
box1.addChild(img);
essai2.addItem(box1);
essai2.addItem(box1);
}


]]
/mx:Script

mx:DataGrid x=10 y=10 id=dg dataProvider={essai2}
width=100% height=100%
mx:columns

mx:DataGridColumn itemRenderer={new ClassFactory(relifeData)}

/mx:DataGridColumn
/mx:columns
/mx:DataGrid

/mx:Application

__

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
creationComplete=addComp()

mx:Script
![CDATA[
import mx.controls.Alert;

function addComp():void{

boxContainer.addChild(DisplayObject(data));

}
]]
/mx:Script


mx:Box id=boxContainer

/mx:Box

/mx:Canvas

 



Re: [flexcoders] FlexReport not showing report first time in tab navigator

2008-06-02 Thread Felipe Fernandes
Derrick,

My guess is that you are setting the heigth and width to percent
values, try to set it to an axplicity value.
That´s because flex only know the size that things have when it draws
them, so your percentage values would evaluate to 0.
It´s just a guess but I had the same problem before and it took a
while to figure it out.

Felipe

On Mon, Jun 2, 2008 at 10:53 AM, Derrick Anderson
[EMAIL PROTECTED] wrote:
 I know there are many here who use FlexReport library so I hope somebody
 here can help with this.  I am loading reports into a tab navigator, the
 reports do not show content until i switch tabs, then come back to that
 one.  I suspect the 'show' event being dispatched does something to the
 content to make it re-appear but I'm not sure.

 When I load a report, I do it with the following lines in my function

 //CODE//
 var viewer:ReportViewer = new ReportViewer();
 viewer.reportLabel = item.label;
 viewer.reportClass = item.data;
 viewer.label = item.label;

 reportsTabNavigator.addChild(DisplayObject(viewer));

 //END CODE//

 ReportViewer just loads reports dynamically like so

 //CODE//
 private function generateDocument():void
 {
 var productivityReport:ProductivityReport;
 var productivityReportDP:ProductivityReportModel;
 //it's only setup for 1 report now, the ProductivityReport
 //get the names of the report and dataprovider classes
 var
 reportClass:String=com.winn.view.reports.+this.reportClass;
 var
 dpClass:String=com.winn.model.reports.+this.reportClass+Model;
 // create class references
 var ReportClassReference:Class =
 getDefinitionByName(reportClass) as Class;
 var DPClassReference:Class = getDefinitionByName(dpClass) as
 Class;
 DPClassReference.projectDSN = global.projectDSN;
 // instantiate report and dataprovider classes
 var report:Report = new ReportClassReference();
 var source:Object = new DPClassReference();
 // create the report document
  doc = new Document(report, source, PaperFormat.A4);
  doc.pdfScript = ;
  doc.pdfEnabled = true;
 //doc.title = Productivity Report;
 printPreview.doc = doc;
 }

 


[flexcoders] Re: Two questions: Nested applications styles colllisions, flashvars injection

2008-06-02 Thread mydarkspoon
Hi Alex,
thanks for your reply.
I guess you're right about the styles, since we use modal window to
open the loaded swf, we simply unloaded the main app styles before
loading the 2nd app.
Then, when the user is done with the loaded swf, we called it's
deactivate() method which unloads its styles and the main app reloads
its styles.

About the flashvars, I made it work, in a very hacky way, but I can't
think of anything else.
Basically, the solution is to catch the right moment to inject data to
the application.parameters, which is between when the application gets
a copy of the SystemManager.parameters and the tyime when the
application dispatces a preinitialize event, which is the time for
the app to start kicking.
The only way I found to catch this moment was to use the event
UIComponent.dispatchEventHook and check for the first preinitialize
event.
I had 2 problems with that:
1. I use actionscript only application for the wrapper, otherwise it
will make no sense to use a wrapper - that can be solved by copying
the mx_internal to access the UIComponent.dispatchEventHook and using
ApplicationDomain.getDefinition()
2. The UIComponent class definition is only avialable through
ApplicationDomain.getDefinition() at the SystemManager 2nd frame
So at first, I thought I could simply add an event listener to the
enterFrame, but then I found out, that the enterFrame is always
dispatched after the frameScript function, which in some cases can be
too late, because the application can get initialized and disapcth the
preinitialize before the first enterFrame event for frame 2 is dispacthed.
So, to overcome these timing issues I had to override the call to the
SystemManager.docFrameHandler, by passing my own frameScript function
where I first acquire the UICompoennt class definition to use its
dispatch hook, and only then call the SystemManager.docFrameHandler 
manually

Enough bubbling, here is the code, it's hacky, I'm aware of the risk
of using the mx_internal, but currently it works, so here it is:

package {
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.net.URLRequest;

import mx.managers.SystemManager; SystemManager;
import mx.core.mx_internal;
import mx.core.EventPriority;
//import mx.core.mx_internal;

public class SWFWrapper extends MovieClip
{
//import mx.core.mx_internal;
private var _loader:Loader = new Loader;
private var _systemManager:MovieClip;
private var _classUiComponent:Class;

use namespace mx_internal;

public function SWFWrapper()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
_loader.contentLoaderInfo.addEventListener(Event.INIT, 
loaderCompleteHandler, false, EventPriority.DEFAULT_HANDLER);
_loader.load(new URLRequest(Loadee.swf));
this.addChild(_loader);
}

private function loaderCompleteHandler(completeEvent:Event):void
{
_systemManager = _loader.content as MovieClip;
_systemManager.addFrameScript(1, docFrameHandler);
}

private function docFrameHandler(e:Event = null):void
{
_classUiComponent =
_systemManager.loaderInfo.applicationDomain.getDefinition(mx.core.UIComponent)
as Class;
_classUiComponent.mx_internal::[dispatchEventHook] = 
myEventHook;
_systemManager.mx_internal::[docFrameHandler]();
}

private function myEventHook(event:Event, uic:Object):void
{
if (event.type == preinitialize  _firstTime)
{
_firstTime = false;

_systemManager[application][parameters][message] = Great
success!;
}
}
}
}

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 There is no good way to have a loaded SWF keep its own styles.  There
 might be in 3.x later this year.
 
  
 
 Since you own both SWFs, I'd simply have a handshake between the loader
 and the loaded app.  Sublcass App, override its parameters property and
 have it query the loading Apps loaderInfo.parameters.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of mydarkspoon
 Sent: Saturday, May 31, 2008 4:22 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Two questions: Nested applications styles
 colllisions, flashvars injection
 
  
 
 Hi all, 
 I'm 

Re: [flexcoders] Accessing the sub-items of a Menu command

2008-06-02 Thread Marty Pitt
Hi Tracy

Thanks for the reply.

I'm not trying to access the XML of the data provider for the Menu, rather 
generated Menu instance itself.

I can access the Menu instance of the top level object (the file menu), but 
not the sub-menu's beneath, also of type Menu.

Anyone have any ideas?



- Original Message 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, June 2, 2008 3:44:14 PM
Subject: RE: [flexcoders] Accessing the sub-items of a Menu command


var xmlMenuItem: XML =
xml..menuItem. (attribute(“label”) == “Do Something”)[0];
Tracy


 
From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of Marty Pitt
Sent: Monday, June 02, 2008 6:11
AM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Accessing
the sub-items of a Menu command
 
Hi all.

This is a stupid question, but I can't work it out!

Given the following XML and code, how am I supposed to access the Do
Something menu item that is created?
var xml:XML = new XML(
root
 menuItem label=File
   menuItem label=Do
Something /
  /menuItem
/root
);

var menuBar:MenuBar = new MenuBar();
menuBar.dataProvide r = xml;
menuBar.showRoot = false;
menuBar.labelField = @label


By making a call to menuBar.getMenuAt( 0) I get a reference to the
File menu, returned as type Menu.

Menu doesn't seem to expose either a collection of sub-items, or a getMenuAt()
method.

I'm stumped!

Any help greatly appreciated.

Cheers

Marty
 


  

[flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread y.mauron
Thank you Tracy for your answer, 


You are probably right about the bad design of my application. I know
that the dataprovider  component is used to pass data and not complete
object. However my case is a little bit different (maybe there is an
other way to assess my issue...) because I don't want to display a
basic visual compound. Each of the displayed compound has to do an
additional task; in my case a remote call via a RemoteObject.

The only way I found to display these living object was to build the
object, then to store it in an ArrayCollection and finally to reactive
it in the datagrid (relifeData).

Thanks for the data() function. I didn't know what was triggered by
the addition of items in my grid.



--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 First, a dataProvider should contain data.  It looks like you are
 putting ui components in the dataProvider.  Unless you are working a
 very extreme edge-case, you do not want to do that.  What are you trying
 to accomplish?
 
  
 
 Second, you cannot use creationComplete to show row/item level UI in a
 renderer.  All display work in a renderer must happen as the result of
 the framework's call to the set data() function.  Typically, one
 overrides set data().
 
  
 
 I think you may have some basic misconceptions to work through.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of y.mauron
 Sent: Monday, June 02, 2008 4:04 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] First row trouble with datagrid component
 
  
 
 
 topic summary : 
 The first element of my dataprovider is not shown and there is always
 an empty line as the first line of my datagrid
 
 Dear all,
 
 I think my question is entirely explained in the topic summary of this
 post. I have a datagrid that uses a item renderer. The main app is
 defined like in the first part of the attached code. The itemrenderer
 looks like the second part of the attached code.
 
 When I run it, the first item of my dataprovider is not shown while
 the first line of my datagrid is always empty... Any idea to explain
 this strange behavior ?
 
 Thanks in advance...
 
 Attach Code
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
 layout=absolute creationComplete=init()
 
 mx:Script
 ![CDATA[
 import mx.containers.VBox;
 import mx.controls.Alert;
 import mx.controls.Image;
 import mx.collections.ArrayCollection;
 public var essai2:ArrayCollection = new ArrayCollection();
 
 public function init():void{
 var img:Image = new Image();
 img.source = 1.gif;
 var box1:VBox = new VBox();
 box1.addChild(img);
 essai2.addItem(box1);
 essai2.addItem(box1);
 }
 
 
 ]]
 /mx:Script
 
 mx:DataGrid x=10 y=10 id=dg dataProvider={essai2}
 width=100% height=100%
 mx:columns
 
 mx:DataGridColumn itemRenderer={new ClassFactory(relifeData)}
 
 /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid
 
 /mx:Application
 
 __
 
 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
 creationComplete=addComp()
 
 mx:Script
 ![CDATA[
 import mx.controls.Alert;
 
 function addComp():void{
 
 boxContainer.addChild(DisplayObject(data));
 
 }
 ]]
 /mx:Script
 
 
 mx:Box id=boxContainer
 
 /mx:Box
 
 /mx:Canvas





[flexcoders] Re: Listening for a value change

2008-06-02 Thread Jeff Douglas
Thanks Felipe... you are my hero.

FYI... here's a good link that explains using getters/setters for 
this scenario:

http://www.tricedesigns.com/tricedesigns_home/blog/2006/12/getters-
and-setters-vs-public.html

Jeff

--- In flexcoders@yahoogroups.com, Felipe Fernandes 
[EMAIL PROTECTED] wrote:

 Jeff,
 
 Look at setter and getter functions it´s just what you need.
 
 Felipe
 
 On Mon, Jun 2, 2008 at 10:40 AM, Jeff Douglas
 [EMAIL PROTECTED] wrote:
  This seems like this should be easy but I'm hititng my head 
against the
  wall trying to figure it out.
 
  I have the following String:
 
  [Bindable] var myString:String;
 
  The value of myString changes throughout the application. Based 
upon
  the value of myString I want to perform different tasks. How can I
  write a listener that determines 1) that the value has changed 
and 2)
  what the new value is?
 
  Thanks
  Jeff
 
 





Re: [flexcoders] Re: Flex / Air sharewware app: what database to use in network environment?

2008-06-02 Thread Tom Chiverton
On Monday 02 Jun 2008, andrewwestberg wrote:
 PostgreSQL is probably a good solution for you.  The license is more
 friendly(free) than MySQL since you're developing a commercial
 application.

Although neither has a built in way to communicate to Flex...

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] MXML namespace

2008-06-02 Thread Tom Chiverton
On Monday 02 Jun 2008, Mark Volkmann wrote:
 one that's the default. I think it would be better to use prefixes for
 your own namespaces and none for MXML.

Ok, but suppose I then show you a random snippit of code:
SomeComponentName dataProvider={foo}/

Is that Adobe's SomeComponentName (it might be one you've not seen before) or 
mine ?

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Re: Two questions: Nested applications styles colllisions, flashvars injection

2008-06-02 Thread mydarkspoon
The _firstTime var declaration was dropped out of the code.
it's:
private static var _firstTime:Boolean = true;

Actually, the reason I used the first time is quite weird, if I set
the dispatchEventHook to null after getting the first preinitialize
event, it keeps calling it...
However, if I set it to ther fucntion it will call the other function.

Thanks,

Almog Kurtser,
http://www.kaltura.com/

--- In flexcoders@yahoogroups.com, mydarkspoon [EMAIL PROTECTED] wrote:

 Hi Alex,
 thanks for your reply.
 I guess you're right about the styles, since we use modal window to
 open the loaded swf, we simply unloaded the main app styles before
 loading the 2nd app.
 Then, when the user is done with the loaded swf, we called it's
 deactivate() method which unloads its styles and the main app reloads
 its styles.
 
 About the flashvars, I made it work, in a very hacky way, but I can't
 think of anything else.
 Basically, the solution is to catch the right moment to inject data to
 the application.parameters, which is between when the application gets
 a copy of the SystemManager.parameters and the tyime when the
 application dispatces a preinitialize event, which is the time for
 the app to start kicking.
 The only way I found to catch this moment was to use the event
 UIComponent.dispatchEventHook and check for the first preinitialize
 event.
 I had 2 problems with that:
 1. I use actionscript only application for the wrapper, otherwise it
 will make no sense to use a wrapper - that can be solved by copying
 the mx_internal to access the UIComponent.dispatchEventHook and using
 ApplicationDomain.getDefinition()
 2. The UIComponent class definition is only avialable through
 ApplicationDomain.getDefinition() at the SystemManager 2nd frame
 So at first, I thought I could simply add an event listener to the
 enterFrame, but then I found out, that the enterFrame is always
 dispatched after the frameScript function, which in some cases can be
 too late, because the application can get initialized and disapcth the
 preinitialize before the first enterFrame event for frame 2 is
dispacthed.
 So, to overcome these timing issues I had to override the call to the
 SystemManager.docFrameHandler, by passing my own frameScript function
 where I first acquire the UICompoennt class definition to use its
 dispatch hook, and only then call the SystemManager.docFrameHandler 
 manually
 
 Enough bubbling, here is the code, it's hacky, I'm aware of the risk
 of using the mx_internal, but currently it works, so here it is:
 
 package {
   import flash.display.Loader;
   import flash.display.MovieClip;
   import flash.display.StageAlign;
   import flash.display.StageScaleMode;
   import flash.events.Event;
   import flash.net.URLRequest;
 
   import mx.managers.SystemManager; SystemManager;
   import mx.core.mx_internal;
   import mx.core.EventPriority;
   //import mx.core.mx_internal;
 
   public class SWFWrapper extends MovieClip
   {
   //import mx.core.mx_internal;
   private var _loader:Loader = new Loader;
   private var _systemManager:MovieClip;
   private var _classUiComponent:Class;
 
   use namespace mx_internal;
 
   public function SWFWrapper()
   {
   stage.scaleMode = StageScaleMode.NO_SCALE;
   stage.align = StageAlign.TOP_LEFT;
   _loader.contentLoaderInfo.addEventListener(Event.INIT, 
 loaderCompleteHandler, false, EventPriority.DEFAULT_HANDLER);
   _loader.load(new URLRequest(Loadee.swf));
   this.addChild(_loader);
   }
 
   private function loaderCompleteHandler(completeEvent:Event):void
   {
   _systemManager = _loader.content as MovieClip;
   _systemManager.addFrameScript(1, docFrameHandler);
   }
 
   private function docFrameHandler(e:Event = null):void
   {
   _classUiComponent =

_systemManager.loaderInfo.applicationDomain.getDefinition(mx.core.UIComponent)
 as Class;
   _classUiComponent.mx_internal::[dispatchEventHook] = 
 myEventHook;
   _systemManager.mx_internal::[docFrameHandler]();
   }
 
   private function myEventHook(event:Event, uic:Object):void
   {
   if (event.type == preinitialize  _firstTime)
   {
   _firstTime = false;
   
 _systemManager[application][parameters][message] = Great
 success!;
   }
   }
   }
 }
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  There is no good way to have a loaded SWF keep its own styles.  There
  might be in 3.x later this year.
  
   
  
  Since you own both SWFs, I'd simply have a 

[flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread y.mauron

Actually not, but I don't know why. I didn't manage to add item like
that. 


PS : My code with the override of the set data() function (instead of
the CreationComplete event) do the job I want to do. The next step is
now the design of the app ;-) 

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Monday 02 Jun 2008, y.mauron wrote:
  The only way I found to display these living object was to build the
  object, then to store it in an ArrayCollection and finally to reactive
  it in the datagrid (relifeData).
 
 Would addChild() not do the job ?
 
 -- 
 Tom Chiverton
 
 
 
 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. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  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] FlexReport not showing report first time in tab navigator

2008-06-02 Thread Derrick Anderson
well turns out i'm not explicitly setting the height/width- i did add this
to the script that loads the report

reportsTabNavigator.selectedChild.dispatchEvent(new
FlexEvent(FlexEvent.SHOW));

after the report loads and it fixed the issue (although now there is a
flicker on the screen).  I should also mention that I have a chart on this
report and it is what is not showing on the first attempt.  the header and
footer appear just fine.

thanks,
d.

On Mon, Jun 2, 2008 at 10:12 AM, Felipe Fernandes 
[EMAIL PROTECTED] wrote:

   Derrick,

 My guess is that you are setting the heigth and width to percent
 values, try to set it to an axplicity value.
 That´s because flex only know the size that things have when it draws
 them, so your percentage values would evaluate to 0.
 It´s just a guess but I had the same problem before and it took a
 while to figure it out.

 Felipe


 On Mon, Jun 2, 2008 at 10:53 AM, Derrick Anderson
 [EMAIL PROTECTED] no.way.this.is.in.use%40gmail.com
 wrote:
  I know there are many here who use FlexReport library so I hope somebody
  here can help with this. I am loading reports into a tab navigator, the
  reports do not show content until i switch tabs, then come back to that
  one. I suspect the 'show' event being dispatched does something to the
  content to make it re-appear but I'm not sure.
 
  When I load a report, I do it with the following lines in my function
 
  //CODE//
  var viewer:ReportViewer = new ReportViewer();
  viewer.reportLabel = item.label;
  viewer.reportClass = item.data;
  viewer.label = item.label;
 
  reportsTabNavigator.addChild(DisplayObject(viewer));
 
  //END CODE//
 
  ReportViewer just loads reports dynamically like so
 
  //CODE//
  private function generateDocument():void
  {
  var productivityReport:ProductivityReport;
  var productivityReportDP:ProductivityReportModel;
  //it's only setup for 1 report now, the ProductivityReport
  //get the names of the report and dataprovider classes
  var
  reportClass:String=com.winn.view.reports.+this.reportClass;
  var
  dpClass:String=com.winn.model.reports.+this.reportClass+Model;
  // create class references
  var ReportClassReference:Class =
  getDefinitionByName(reportClass) as Class;
  var DPClassReference:Class = getDefinitionByName(dpClass) as
  Class;
  DPClassReference.projectDSN = global.projectDSN;
  // instantiate report and dataprovider classes
  var report:Report = new ReportClassReference();
  var source:Object = new DPClassReference();
  // create the report document
  doc = new Document(report, source, PaperFormat.A4);
  doc.pdfScript = ;
  doc.pdfEnabled = true;
  //doc.title = Productivity Report;
  printPreview.doc = doc;
  }
 
 
  



Re: [flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread Tom Chiverton
On Monday 02 Jun 2008, y.mauron wrote:
 The only way I found to display these living object was to build the
 object, then to store it in an ArrayCollection and finally to reactive
 it in the datagrid (relifeData).

Would addChild() not do the job ?

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Two difficult problems regarding synchronization of RPC in Flash

2008-06-02 Thread Dave Kong
Problem 1: How can I make sure multiple asynch remote method calls do
not end up canceling each other?

Consider this pseudo code:

onButtonClick()
{
  doStuff();
  requestSoapData.addEventListener(..., handleSoapResult);
  requestSoapData.send();
}

handleSoapResult()
{
  doMoreStuff();
  requestSoapData.removeEventListener(..., handleSoapResult); 
  // remove handler so this handler doesn't get called again when some
other control fires requestSoapData.
}

I add the listener before the call and remove after processing the
result, so that there will be no side-effect if another function calls
the same remote method. This was a pattern suggested to me previously
which I find is better than registering listeners permanently.

Now the problem is that since remote calls are asynchronous in nature,
how can I prevent the first result from coming back and removing the
listener BEFORE the second (or any subsequent) calls from invoking the
correct listener? Or am I somehow guaranteed that listeners will not
be removed until a pending remote call returns?

If this is not the correct pattern, then can anyone suggest a better
way of making sure each call to the *same* remote method invokes the
correct listener upon return w/o any side-effects from each other?

The single threaded nature of Flash Player that forces the asynch I/O
pattern leads me to my 2nd problem.

Problem 2: Is there an easy way to synchronize a string of network
calls at all?

I'm attempting to write a test script to test both my Flash frontend
and server backend. However, in order to run a series of tests, I need
to wait for the result from each previous remote call to come back
before invoking the next one.

One proven, but tedious way, is to have a string of listeners that
registers the next listener, then kicks off the next remote call. But
this just doesn't seem like good programming. The ugliness is next to
using nested if statements where a switch would do.

Can anyone suggest a better way of synchronizing remote calls for
testing purposes? Or is this just impossible due to Flash architecture?

Thanks!



Re: [flexcoders] Re: How to convert a powerpoint to AS3 swf for loading in Flex?

2008-06-02 Thread Paul Andrews

- Original Message - 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, June 02, 2008 1:34 PM
Subject: Re: [flexcoders] Re: How to convert a powerpoint to AS3 swf for 
loading in Flex?
 - Original Message - 
 From: rdebled [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Sunday, June 01, 2008 11:16 PM
 Subject: [flexcoders] Re: How to convert a powerpoint to AS3 swf for 
 loading
 in Flex?

 Finally, and most successfully, I started playing with print2flash
 which can convert a ppt to a swf and has a flex component that can
 open that swf and move around it.  It's early stages right now, but
 it seems to do everything I need, with API calls for moving from one
 page to another, zooming, scrolling, etc.  The Pro edition is $80 and
 there's a server edition that has an automation API, letting you
 integrate conversion into your application.  Very cool. Anyone facing
 this powerpoint to Flex problem should take a look to see if this
 meets your needs.

 I've had a quick look at print2flash and it looks good, but I think the
 problem for powerpoint conversion is the use of animation and 
 transitions -
 something I don't think that print2flash can handle. I'm sure that
 conversion of static slides (via the print interface) would work fine.

 If you know different, let me know fast!

I checked with the developers. The slide conversion is AS2 based and only 
via the printer mechanism, so static conversion only.

Paul

 Paul

 Robin



[flexcoders] Flex 3 - Help sorting formatted data in datagrid

2008-06-02 Thread Kevin Ford
I need someone to help verify a problem I'm running into and perhaps
recommend a solution. What I'm trying to do should be very simple: I want to
allow users to sort a datagrid column containing data formatted using a
CurrencyFormatter. The problem I'm finding is that sorting (by clicking the
column header) works fine on raw numbers, but trying to do the same on
formatted numbers doesn't do anything. I'm using Flex Builder 3, but have
tried this using both the Flex 2 and Flex 3 compilers on two different
systems. Initially I was trying this using an AdvancedDataGrid, but found
the same problem using just a basic DataGrid.

Attached is a simple mxml file that fully demonstrates my problem. I also
have a bug logged with Adobe(http://bugs.adobe.com/jira/browse/FLEXDMV-1769)
that I'd love to cancel. Am I missing something? Am I just going to have to
define my own sort function?

Thanks!
Kevin


test.mxml
Description: Binary data


[flexcoders] Pausing / Waiting During Execution

2008-06-02 Thread kenny14390
In my code, I'd like to wait about 5 seconds before executing the next
line. The implementation is this:

- show notification
- wait 5 seconds
- hide notification

I tried to use mx:Pause dynamically in the ActionScript, but I had
trouble executing it. The pause component id is wait:

wait.play([wait]);

What's the best way to do this?



RE: [flexcoders] Run-time debugging

2008-06-02 Thread Alex Harui
No, but you can put up your own popup.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Monday, June 02, 2008 6:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Run-time debugging

 

Sometimes, when I run my program I am getting a run-time error shown in 
the popup window. Is it possible to open that window with some 
debugging info while the program is runing?

Thanks

 



RE: [flexcoders] Re: Two questions: Nested applications styles colllisions, flashvars injection

2008-06-02 Thread Alex Harui
I still think I'd override the parameters getter in Application.

 

Class MyApp extends Application

{

Override public function get paramters():Object

{

Return systemManager.parent.loaderInfo.parameters.

}

}

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mydarkspoon
Sent: Monday, June 02, 2008 8:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two questions: Nested applications styles
colllisions, flashvars injection

 

The _firstTime var declaration was dropped out of the code.
it's:
private static var _firstTime:Boolean = true;

Actually, the reason I used the first time is quite weird, if I set
the dispatchEventHook to null after getting the first preinitialize
event, it keeps calling it...
However, if I set it to ther fucntion it will call the other function.

Thanks,

Almog Kurtser,
http://www.kaltura.com/ http://www.kaltura.com/ 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, mydarkspoon [EMAIL PROTECTED] wrote:

 Hi Alex,
 thanks for your reply.
 I guess you're right about the styles, since we use modal window to
 open the loaded swf, we simply unloaded the main app styles before
 loading the 2nd app.
 Then, when the user is done with the loaded swf, we called it's
 deactivate() method which unloads its styles and the main app reloads
 its styles.
 
 About the flashvars, I made it work, in a very hacky way, but I can't
 think of anything else.
 Basically, the solution is to catch the right moment to inject data to
 the application.parameters, which is between when the application gets
 a copy of the SystemManager.parameters and the tyime when the
 application dispatces a preinitialize event, which is the time for
 the app to start kicking.
 The only way I found to catch this moment was to use the event
 UIComponent.dispatchEventHook and check for the first preinitialize
 event.
 I had 2 problems with that:
 1. I use actionscript only application for the wrapper, otherwise it
 will make no sense to use a wrapper - that can be solved by copying
 the mx_internal to access the UIComponent.dispatchEventHook and using
 ApplicationDomain.getDefinition()
 2. The UIComponent class definition is only avialable through
 ApplicationDomain.getDefinition() at the SystemManager 2nd frame
 So at first, I thought I could simply add an event listener to the
 enterFrame, but then I found out, that the enterFrame is always
 dispatched after the frameScript function, which in some cases can be
 too late, because the application can get initialized and disapcth the
 preinitialize before the first enterFrame event for frame 2 is
dispacthed.
 So, to overcome these timing issues I had to override the call to the
 SystemManager.docFrameHandler, by passing my own frameScript function
 where I first acquire the UICompoennt class definition to use its
 dispatch hook, and only then call the SystemManager.docFrameHandler 
 manually
 
 Enough bubbling, here is the code, it's hacky, I'm aware of the risk
 of using the mx_internal, but currently it works, so here it is:
 
 package {
 import flash.display.Loader;
 import flash.display.MovieClip;
 import flash.display.StageAlign;
 import flash.display.StageScaleMode;
 import flash.events.Event;
 import flash.net.URLRequest;
 
 import mx.managers.SystemManager; SystemManager;
 import mx.core.mx_internal;
 import mx.core.EventPriority;
 //import mx.core.mx_internal;
 
 public class SWFWrapper extends MovieClip
 {
 //import mx.core.mx_internal;
 private var _loader:Loader = new Loader;
 private var _systemManager:MovieClip;
 private var _classUiComponent:Class;
 
 use namespace mx_internal;
 
 public function SWFWrapper()
 {
 stage.scaleMode = StageScaleMode.NO_SCALE;
 stage.align = StageAlign.TOP_LEFT;
 _loader.contentLoaderInfo.addEventListener(Event.INIT, 
 loaderCompleteHandler, false, EventPriority.DEFAULT_HANDLER);
 _loader.load(new URLRequest(Loadee.swf));
 this.addChild(_loader);
 }
 
 private function loaderCompleteHandler(completeEvent:Event):void
 {
 _systemManager = _loader.content as MovieClip;
 _systemManager.addFrameScript(1, docFrameHandler);
 }
 
 private function docFrameHandler(e:Event = null):void
 {
 _classUiComponent =

_systemManager.loaderInfo.applicationDomain.getDefinition(mx.core.UICom
ponent)
 as Class;
 _classUiComponent.mx_internal::[dispatchEventHook] = myEventHook;
 _systemManager.mx_internal::[docFrameHandler]();
 }
 
 private function myEventHook(event:Event, uic:Object):void
 {
 if (event.type == preinitialize  _firstTime)
 {
 _firstTime = false;
 _systemManager[application][parameters][message] = Great
 success!;
 }
 }
 }
 }
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
 
  There is no good way to have a loaded SWF keep its own styles. There
  might be in 3.x later this year.
  
  
  
  Since you own both SWFs, I'd simply have a handshake between the
loader
  and the loaded 

RE: [flexcoders] Re: Questions regarding updating dataProviders after a drag drop

2008-06-02 Thread Alex Harui
I thought you were dragging Products

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bredwards358
Sent: Monday, June 02, 2008 7:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Questions regarding updating dataProviders
after a drag  drop

 


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Normally, you listen for dragDrop or dragComplete events and if you
 don't want default behavior, you call preventDefault on the event and
do
 whatever you want.
 
 
 
 So, if I were handling dragging products to a shopping list, I would
 write something like this:
 
 
 
 public function dragDropHandler(event:DragEvent):void
 
 {
 
 var draggedItems:Array =
 event.dragSource.dataForFormat(items);
 
 var draggedItem:Product = draggeItems[0];//Also, what is this Product
data type? I don't quite understand where this comes from
 

 



RE: [flexcoders] Re: Questions regarding updating dataProviders after a drag drop

2008-06-02 Thread Alex Harui
draggedItems should be the row from the source

 

dataProvider is the dataProvider for the destination

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bredwards358
Sent: Monday, June 02, 2008 5:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Questions regarding updating dataProviders
after a drag  drop

 

Okay, I kind of get what you're saying, it makes sense however I have
some questions to clear things up further, nothing big, just simple
things. Check below for the blue text, in the meantime I'll experiment,
Thanks a bunch I appreciate it.

Brian Ross Edwards,
Tech-Connect LLC.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Normally, you listen for dragDrop or dragComplete events and if you
 don't want default behavior, you call preventDefault on the event and
do
 whatever you want.
 
 
 
 So, if I were handling dragging products to a shopping list, I would
 write something like this:
 
 
 
 public function dragDropHandler(event:DragEvent):void
 
 {
 
 var draggedItems:Array =
 event.dragSource.dataForFormat(items);//Is items simply a generic
name or the name of what you're dragging from?
 
 var draggedItem:Product = draggeItems[0];//Am I correct in assuming
that this is the row of the dataGrid being dragged from?
 
 
 
 // search array collection for existing object
 
 var ac:ArrayCollection = dataProvider;//This is the dataProvider of
the dataGrid being dropped on, right?
 
 var n:int = ac.length;
 
 for (var i:int = 0; I  n; i++)
 
 {
 
 If (ac[i].productKey == draggedItem.productKey)
 
 {
 
 ac[i].quantity ++;
 
 ! event.preventDefault();
 
! ; return;
 
 } 
 
 }
 
 // if we don't exit via preventDefault()/return, then
 default behavior will add it to the dataProvider
 
 }

 



Re: [flexcoders] Flex 3 - Help sorting formatted data in datagrid

2008-06-02 Thread Tom Chiverton
On Monday 02 Jun 2008, Kevin Ford wrote:
 Attached is a simple mxml file that fully demonstrates my problem. I also
 have a bug logged with

Does adding a dataField attribute to the last DataGridColumn help ?

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread Tom Chiverton
On Monday 02 Jun 2008, y.mauron wrote:
 Actually not, but I don't know why. I didn't manage to add item like
 PS : My code with the override of the set data() function (instead of

You should be able to do, in the parent during or after CreationComplete:

myLiveObj=new LiveObj();
myLiveObj.data='foo';
addChild(myLiveObj);

depends what component your 'LiveObj' extends of course.

-- 
Tom Chiverton



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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Error in Adobe class MultiTopicConsumer

2008-06-02 Thread Pedro Sena
Hi Andrew,

Can't you subclass MultiTopicConsumer and override this method to use your
instead of use this one?



On Mon, Jun 2, 2008 at 12:43 PM, bbloggs96 [EMAIL PROTECTED] wrote:

   I am using the MultiTopicConsumer with Blaze.

 I have had problems with removeSubscription, it gives me an error when
 I remove the last subtopic in the array of subscriptions. It works OK
 if any other subtopic is removed.

 I tracked down the problem to the actual Adobe Class
 MultiTopicConsumer and method removeSubscription.

 The code removes the subtopic, but then does a check afterwards to see
 if it is ttrying to remove a subtopic that does not exist. But when it
 is the last subtopic, it always fails.

 Does anybody have a work around?

 This is the method from Adobe Class MultiTopicConsumer:

 public function removeSubscription(subtopic:String = null,
 selector:String = null):void
 {
 for (var i:int = 0; i  subscriptions.length; i++)
 {
 var si:SubscriptionInfo =
 SubscriptionInfo(subscriptions.getItemAt(i));
 if (si.subtopic == subtopic  si.selector == selector)
 {
 subscriptions.removeItemAt(i);
 break;
 }
 }
 if (i == subscriptions.length)
 throw new MessagingError(Attempt to remove a subscription
 with subtopic:  +
 subtopic +  and selector:  + selector +  that this
 consumer does not have);
 }

 The problem is the if (i == subscriptions.length), which always is
 true because it has just been removed.

 Andrew

  




-- 
/**
* Pedro Sena
* System Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


[flexcoders] Error in Adobe class MultiTopicConsumer

2008-06-02 Thread bbloggs96
I am using the MultiTopicConsumer with Blaze.

I have had problems with removeSubscription, it gives me an error when
I remove the last subtopic in the array of subscriptions. It works OK
if any other subtopic is removed.

I tracked down the problem to the actual Adobe Class
MultiTopicConsumer and method removeSubscription.

The code removes the subtopic, but then does a check afterwards to see
if it is ttrying to remove a subtopic that does not exist. But when it
is the last subtopic, it always fails.

Does anybody have a work around?

This is the method from Adobe Class MultiTopicConsumer:

public function removeSubscription(subtopic:String = null,
selector:String = null):void
{
for (var i:int = 0; i  subscriptions.length; i++)
{
var si:SubscriptionInfo =
SubscriptionInfo(subscriptions.getItemAt(i));
if (si.subtopic == subtopic  si.selector == selector)
{
subscriptions.removeItemAt(i);
break;
}
}
if (i == subscriptions.length)
throw new MessagingError(Attempt to remove a subscription
with subtopic:  + 
subtopic +  and selector:  + selector +  that this
consumer does not have);
}

The problem is the if (i == subscriptions.length), which always is
true because it has just been removed.

Andrew



[flexcoders] Re: Questions regarding updating dataProviders after a drag drop

2008-06-02 Thread bredwards358
I am but its not its own data type, unless I need to declare a new
class or public variable within an already existing class to hold the
row from the dragSource. Either would work for me.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 I thought you were dragging Products
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of bredwards358
 Sent: Monday, June 02, 2008 7:18 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Questions regarding updating dataProviders
 after a drag  drop
 
  
 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Normally, you listen for dragDrop or dragComplete events and if you
  don't want default behavior, you call preventDefault on the event and
 do
  whatever you want.
  
  
  
  So, if I were handling dragging products to a shopping list, I would
  write something like this:
  
  
  
  public function dragDropHandler(event:DragEvent):void
  
  {
  
  var draggedItems:Array =
  event.dragSource.dataForFormat(items);
  
  var draggedItem:Product = draggeItems[0];//Also, what is this Product
 data type? I don't quite understand where this comes from
 





Re: [flexcoders] Re: How to convert a powerpoint to AS3 swf for loading in Flex?

2008-06-02 Thread Paul Andrews
- Original Message - 
From: Amy [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, June 02, 2008 5:19 PM
Subject: [flexcoders] Re: How to convert a powerpoint to AS3 swf for loading 
in Flex?


snip

 Connect (Breeze) does a pretty good translation of Powerpoint to
 Flash, but doesn't handle it well if you mix animation schemes with
 other animations.  AFAIK, Connect is Flex under the skin, so surely
 it is possible.  I know there was a guy in Italy rewriting Connect to
 be open source, Giorgio Natali, and I've seen him post occasionally
 on here.  Maybe he will pop in with an opinion.

 If not, maybe a member of the engineering team could check with the
 Connect engineers and see if they can give you a hint.


 HTH;

 Amy

I was just looking for a way to avoid using an AS2 bridge, but it looks like 
I'll be using the bridge..

Thanks Amy.

Paul 



[flexcoders] Re: How to convert a powerpoint to AS3 swf for loading in Flex?

2008-06-02 Thread Amy
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: rdebled [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Sunday, June 01, 2008 11:16 PM
 Subject: [flexcoders] Re: How to convert a powerpoint to AS3 swf 
for loading 
 in Flex?
 
 
 snip
 
  Finally, and most successfully, I started playing with print2flash
  which can convert a ppt to a swf and has a flex component that can
  open that swf and move around it.  It's early stages right now, 
but
  it seems to do everything I need, with API calls for moving from 
one
  page to another, zooming, scrolling, etc.  The Pro edition is $80 
and
  there's a server edition that has an automation API, letting you
  integrate conversion into your application.  Very cool. Anyone 
facing
  this powerpoint to Flex problem should take a look to see if this
  meets your needs.
 
 I've had a quick look at print2flash and it looks good, but I think 
the 
 problem for powerpoint conversion is the use of animation and 
transitions - 
 something I don't think that print2flash can handle. I'm sure that 
 conversion of static slides (via the print interface) would work 
fine.
 
 If you know different, let me know fast!
 
 Paul


Connect (Breeze) does a pretty good translation of Powerpoint to 
Flash, but doesn't handle it well if you mix animation schemes with 
other animations.  AFAIK, Connect is Flex under the skin, so surely 
it is possible.  I know there was a guy in Italy rewriting Connect to 
be open source, Giorgio Natali, and I've seen him post occasionally 
on here.  Maybe he will pop in with an opinion.

If not, maybe a member of the engineering team could check with the 
Connect engineers and see if they can give you a hint.


HTH;

Amy




[flexcoders] Re: Not sure what to do here...

2008-06-02 Thread mr_delphi_developer
It does get data back from the server, it sends the error message,
The result handler is entered because that is where it sows the
error dialog.



Re: [flexcoders] Casting Problem.. Type Coercion Failed

2008-06-02 Thread Manu Dhanda

while ($row = mysql_fetch_object($result, UserVO)) 

While your solution is very effective, still I noticed that the return array
consists of only String types.

Doesn't matter whether the field is of type date or int or anything.., it
converts everything to string.
So, on the Flex side, I need to cast everything back to their original
types.

If you have any solution to this return type[of String], please share it
here.

Thanks for your valuable info.
Manu.


Manu Dhanda wrote:
 
 Hii
 
 am writing a simple application where for logging in, am checking the
 values against the value objects contained in an ArrayCollection.
 
 While 
 
 if((evt.userVO.email == ModelLocator.ALL_USERS[i].email) 
 (evt.userVO.pwd == ModelLocator.ALL_USERS[i].pwd))
 
 returns true, then why it throws this Type coercion error at this
 following line:
 
 model.currentUser = ModelLocator.ALL_USERS[i];
 //UserVO(ModelLocator.ALL_USERS[i]);
 
 currentUser is type UserVO and ALL_USERS is a collection of UserVO
 objects.
 
 I had tried by explicitely casting the above line(as commented), but still
 the same.
 
 Here is the error, I received while debugging:
 
 Explicit casting:-
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 [EMAIL PROTECTED] to com.live.flats.vo.UserVO.
   at
 com.live.flats.commands::LoginInfoCommand/execute()[F:\xampp\htdocs\flats\flex_src\com\live\flats\commands\LoginInfoCommand.as:60]
   at
 com.adobe.cairngorm.control::FrontController/executeCommand()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\FrontController.as:215]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at
 com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEventDispatcher.as:113]
   at
 com.adobe.cairngorm.control::CairngormEvent/dispatch()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEvent.as:77]
   at
 com.live.flats.view::LoginPanelBar/loginUser()[F:\xampp\htdocs\flats\flex_src\com\live\flats\view\LoginPanelBar.mxml:29]
   at
 com.live.flats.view::LoginPanelBar/__loginButton_click()[F:\xampp\htdocs\flats\flex_src\com\live\flats\view\LoginPanelBar.mxml:74]
 
 
 Implicit Casting:-
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 [EMAIL PROTECTED] to com.live.flats.vo.UserVO.
   at
 com.live.flats.commands::LoginInfoCommand/execute()[F:\xampp\htdocs\flats\flex_src\com\live\flats\commands\LoginInfoCommand.as:60]
   at
 com.adobe.cairngorm.control::FrontController/executeCommand()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\FrontController.as:215]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at
 com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEventDispatcher.as:113]
   at
 com.adobe.cairngorm.control::CairngormEvent/dispatch()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEvent.as:77]
   at
 com.live.flats.view::LoginPanelBar/loginUser()[F:\xampp\htdocs\flats\flex_src\com\live\flats\view\LoginPanelBar.mxml:29]
   at
 com.live.flats.view::LoginPanelBar/__loginButton_click()[F:\xampp\htdocs\flats\flex_src\com\live\flats\view\LoginPanelBar.mxml:74]
 
 
 Any help would be great.
 Thanks.
 
 
 
csd
-- 
View this message in context: 
http://www.nabble.com/Casting-Problem..-Type-Coercion-Failed-tp17585702p17605531.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread y.mauron
I'm pretty sure I can to as you mentioned in your code. However I have
to do something like this: 

myLiveObj = new LiveObj();
service = new remoteObject();

myLiveObj.dataProvider = service.doSomething.lastResult;
service.doSomething();

And I don't know why and how, but all the things get desynchronized
when I add a big number of those myLiveObj objects.


--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Monday 02 Jun 2008, y.mauron wrote:
  Actually not, but I don't know why. I didn't manage to add item like
  PS : My code with the override of the set data() function (instead of
 
 You should be able to do, in the parent during or after
CreationComplete:
 
 myLiveObj=new LiveObj();
 myLiveObj.data='foo';
 addChild(myLiveObj);
 
 depends what component your 'LiveObj' extends of course.
 
 -- 
 Tom Chiverton
 
 
 
 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. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  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] Enable / Disable Flex Menu Items Programmatically using AS 3.0

2008-06-02 Thread Marty Pitt
this is extremely close to what I'm trying to do.
(I posted here earlier today looking for a solution!)

You can modify the dataProvider of the XML, setting the @enabled attribute, 
which will cause the menu to update.

Eg.,.

myMenuData..menuitem.(@id==menuUp)[EMAIL PROTECTED] = false

will disable the menuUp entry.

If you're trying to get access directly to the menu instance, then I'm afraid I 
don't know the answerthat's what my post was about this morning.

(I'm trying to get a reference for a unit test so I can do an assertion on the 
enabled property of the menuItem itself.)

Hope that helps

Marty


- Original Message 
From: bc24fl [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, June 2, 2008 4:29:11 PM
Subject: [flexcoders] Enable / Disable Flex Menu Items Programmatically using 
AS 3.0


I have the following XML data defined in my app:

=
!-- Define the menu data. --
mx:XML format=e4x id=myMenuData 
root
menuitem id=menuDrill label=Drill = 
menuitem id=menuDown label=Down toggled=false
enabled=true /
menuitem id=menuUp label=Up toggled=false
enabled=true /
/menuitem
menuitem type=separator /
menuitem label=Lock / Unlock type=check toggled=false /
menuitem type=separator / 
menuitem label=Reset Graph toggled=false / 
/root
/mx:XML
===

I can statically disable one of the items by setting enabled=false ,
however I need to disable the item by using Action Script 3.0. 

I've tried using dataDescriptor like so but it does not work:

===
myMenu.dataDescript or.setEnabled( myMenuData. menuDrill. menuDown, false);
===

I've posted this on a few forums and haven't received a solution.  I
hope I can find one here.

Any help would be much appreciated.

Thanks.




  

RE: [flexcoders] Error in Adobe class MultiTopicConsumer

2008-06-02 Thread Seth Hodgson
Hi Andrew,

Definitely a bug, and I've logged it: https://bugs.adobe.com/jira/browse/BLZ-189
I'd recommend voting for it and adding yourself as a watcher.

Thanks,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
bbloggs96
Sent: Monday, June 02, 2008 8:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Error in Adobe class MultiTopicConsumer

I am using the MultiTopicConsumer with Blaze.

I have had problems with removeSubscription, it gives me an error when
I remove the last subtopic in the array of subscriptions. It works OK
if any other subtopic is removed.

I tracked down the problem to the actual Adobe Class
MultiTopicConsumer and method removeSubscription.

The code removes the subtopic, but then does a check afterwards to see
if it is ttrying to remove a subtopic that does not exist. But when it
is the last subtopic, it always fails.

Does anybody have a work around?

This is the method from Adobe Class MultiTopicConsumer:

public function removeSubscription(subtopic:String = null,
selector:String = null):void
{
for (var i:int = 0; i  subscriptions.length; i++)
{
var si:SubscriptionInfo =
SubscriptionInfo(subscriptions.getItemAt(i));
if (si.subtopic == subtopic  si.selector == selector)
{
subscriptions.removeItemAt(i);
break;
}
}
if (i == subscriptions.length)
throw new MessagingError(Attempt to remove a subscription
with subtopic:  + 
subtopic +  and selector:  + selector +  that this
consumer does not have);
}

The problem is the if (i == subscriptions.length), which always is
true because it has just been removed.

Andrew
 


[flexcoders] Anyone know why Air drops the first letter of file during coldfusion remoting?

2008-06-02 Thread Sherif Abdou
if i create an Air project with ColdFusion remoting, and say the Project name 
is FlexCoders, then it tries to connect to lexCoders. If i create a Flex 
Project, the flex project is able to execute everything properly. Thanks



  

Re: [flexcoders] Enable / Disable Flex Menu Items Programmatically using AS 3.0

2008-06-02 Thread Michael Schmalle
Hi,

Have you tried;

myMenu.dataDescriptor.setEnabled(myMenuData.menuDrill.menuDown[0],false);

Mike

On Mon, Jun 2, 2008 at 12:38 PM, Marty Pitt [EMAIL PROTECTED] wrote:

   this is extremely close to what I'm trying to do.
 (I posted here earlier today looking for a solution!)

 You can modify the dataProvider of the XML, setting the @enabled attribute,
 which will cause the menu to update.

 Eg.,.

 myMenuData..menuitem.(@id==menuUp)[EMAIL PROTECTED] = false

 ...will disable the menuUp entry.

 If you're trying to get access directly to the menu instance, then I'm
 afraid I don't know the answerthat's what my post was about this
 morning.

 (I'm trying to get a reference for a unit test so I can do an assertion on
 the enabled property of the menuItem itself.)

 Hope that helps

 Marty

 - Original Message 
 From: bc24fl [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, June 2, 2008 4:29:11 PM
 Subject: [flexcoders] Enable / Disable Flex Menu Items Programmatically
 using AS 3.0

 I have the following XML data defined in my app:

 =
 !-- Define the menu data. --
 mx:XML format=e4x id=myMenuData 
 root
 menuitem id=menuDrill label=Drill = 
 menuitem id=menuDown label=Down toggled=false
 enabled=true /
 menuitem id=menuUp label=Up toggled=false
 enabled=true /
 /menuitem
 menuitem type=separator /
 menuitem label=Lock / Unlock type=check toggled=false /
 menuitem type=separator /
 menuitem label=Reset Graph toggled=false /
 /root
 /mx:XML
 ===

 I can statically disable one of the items by setting enabled=false ,
 however I need to disable the item by using Action Script 3.0.

 I've tried using dataDescriptor like so but it does not work:

 ===
 myMenu.dataDescript or.setEnabled( myMenuData. menuDrill. menuDown, false);
 ===

 I've posted this on a few forums and haven't received a solution. I
 hope I can find one here.

 Any help would be much appreciated.

 Thanks.


  




-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Grahix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: Error in Adobe class MultiTopicConsumer

2008-06-02 Thread bbloggs96
--- In flexcoders@yahoogroups.com, Pedro Sena [EMAIL PROTECTED] wrote:

 Hi Andrew,
 
 Can't you subclass MultiTopicConsumer and override this method to
use your
 instead of use this one?
 

I haven't considered subclassing, but I suppose it is one solution.

The quick and dirty solution I came up with was before doing a
removeSubscription, to check if it was the last one and then add a
dummy subscription, so when the real one is removed, it is not the
last one in the array.

Andrew



[flexcoders] Re: New to flex, wonder why one works and the other doesn't...

2008-06-02 Thread aarhac
Excellent, thanks very much for the responses. 

As an aside, I did solve the problem by using the bitmap classes
instead as they seemed to have more consistent behavior. (And I
couldn't find a straightforward way to copy the image data with the
Image class)

Michael and Joseph, that makes perfect sense and is reproducible;
setting an explicit width and height causes the image to show as expected.

Thanks very much for the enlightenment.

-- Aaron Hachez

--- In flexcoders@yahoogroups.com, Michael Labriola [EMAIL PROTECTED]
wrote:

 
 Close, but no.
 
 In Flex, parents are responsible for sizing their children. Flex 
 Containers (which are just UIComponents with more code) do size 
 their children, but you can also create UIComponents that know how 
 to size their children. 
 
 Neither a container, nor a component that implements a container 
 interface needs to be involved in any way to handle this. That is 
 the fallacy I am addressing.
 
 Look at the example I provided and you will not see a Container or 
 implementor of that interface.
 
 In other words: 
 * UIComponents can contain other UIComponents. 
 * Containers are UIComponents which know how to automatically size 
 their children through the component lifecycle
 
 Does this make sense?
 Mike
 
 
 
 --- In flexcoders@yahoogroups.com, Joseph Balderson news@ wrote:
 
  In other words, UIComponents /can/ natively contain other 
 UIComponents, 
  only the child UIComponent will by default have a 0 width and 
 height.
  
  Which it means it won't show up on the stage. Which means, by 
 default, 
  you cannot get a native (non-extended) UIComponent to show up when 
 you 
  add it to another UIComponent. Which means you cannot 
 (successfully) add 
  a native UIComponent to another UIComponent.
  
  Thanks for catching the technicality, as a writer I love that kind 
 of 
  precision.
  
  But basically what Charlie was saying is correct: UIComponent's 
 can't 
  contain other UIComponents without being a subclass of Container 
 or 
  implementing the IContainer interface. -- only he forgot to 
 add 'and 
  have them successfully show up on stage'.
  
  So you're both correct IMO. Thanks for the clarity.
  
  
 _
 __
  
  Joseph Balderson | http://joeflash.ca
  Flex  Flash Platform Developer | Abobe Certified Developer  
 Trainer
  Author, Professional Flex 3 (coming Winter 2008)
  Staff Writer, Community MX | http://communitymx.com/author.cfm?
 cid=4674
  
  
  
  Michael Labriola wrote:
   Guys, sorry, but that's not quite right. UIComponents can 
 contain 
   other UIComponents without being a container. It is a common use 
   case. Take a look at the simple example Adobe includes with 
 their 
   docs:
   
   
 http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.h
   tm?href=1742.html
   
   You will notice that the mocal text component is a UIComponent 
 but 
   it contains a button and a text area... both UIComponents.
   
   The difference is that containers like Canvas have the logic to 
 size 
   and position any child they contain by default. UIComponent does 
   not. So, in a UIComponent descendant, you need to write code to 
 size 
   and position every child or they will exist as 0 width and 0 
 height 
   component.
   
   HTH,
   Labriola
   
   
   --- In flexcoders@yahoogroups.com, Charlie Hubbard 
   charlie.hubbard@ wrote:
   Right.  Image is a UIComponent, and TextArea is a UIComponent.
   UIComponent's can't contain other UIComponents without being a
   subclass of Container or implementing the IContainer 
 interface.  
   Not a
   simple task.
  
   addChild() is defined in DisplayObject which apart of the Flash 
 API
   not the Flex API.  BitmapAsset is a sublcass of DisplayObject 
 and 
   not
   UIComponent.  So you can add it to the text area directly using 
   this
   code:
  
var img : BitmapAsset = new imgCls() as BitmapAsset;
img.x = txtArea.mouseX;
img.y = txtArea.mouseY;
txtArea.addChild( img );
  
   Now, try that out, and you'll start to see some issues that 
 you'll
   have to asess if this is going to work for what you're trying 
 to 
   do.
   Since the bitmap is not apart of the document in the TextArea 
 you 
   are
   going to get clipping or scrolling.  If you want to do that 
 you'll
   have to get really dirty with the TextArea API.  Probably even
   ditching TextArea altogether and writing your own, or modifying 
   rich
   text editor.
  
   Charlie
  
  
   On Thu, May 29, 2008 at 5:37 PM, aarhac aaronh@ wrote:
   Hello,
  
   I have figured out how to work around my problem, but I do 
   wonder why
   one of the following methods works, and the other doesn't. I 
   would be
   grateful if someone could explain the error in the failing 
   method.
   The code is pasted below (Below the line of dashes) in it's 
   entirety,
   and is commented as to which works and which 

[flexcoders] Re: Flex 3 - Help sorting formatted data in datagrid

2008-06-02 Thread valdhor
You need a sortCompareFunction:

In your script area add...

import mx.utils.ObjectUtil;

Then add the following function...

private function myCompareFunc(itemA:Object, itemB:Object):int
{
 return ObjectUtil.numericCompare(itemA.Quoted_Total,
itemB.Quoted_Total);
}

Now change your DataGridColumn component to...

mx:DataGridColumn headerText=Formatted Total (Flex will now sort)
sortCompareFunction=myCompareFunc

That should do it.


HTH.



--- In flexcoders@yahoogroups.com, Kevin Ford [EMAIL PROTECTED] wrote:

 I need someone to help verify a problem I'm running into and perhaps
 recommend a solution. What I'm trying to do should be very simple: I
want to
 allow users to sort a datagrid column containing data formatted using
a
 CurrencyFormatter. The problem I'm finding is that sorting (by
clicking the
 column header) works fine on raw numbers, but trying to do the same on
 formatted numbers doesn't do anything. I'm using Flex Builder 3, but
have
 tried this using both the Flex 2 and Flex 3 compilers on two different
 systems. Initially I was trying this using an AdvancedDataGrid, but
found
 the same problem using just a basic DataGrid.

 Attached is a simple mxml file that fully demonstrates my problem. I
also
 have a bug logged with
Adobe(http://bugs.adobe.com/jira/browse/FLEXDMV-1769)
 that I'd love to cancel. Am I missing something? Am I just going to
have to
 define my own sort function?

 Thanks!
 Kevin





[flexcoders] Re: Flex 3 - Help sorting formatted data in datagrid

2008-06-02 Thread valdhor
You need a sortCompareFunction:

In your script area add...

import mx.utils.ObjectUtil;

Then add the following function...

private function myCompareFunc(itemA:Object, itemB:Object):int
{
 return ObjectUtil.numericCompare(itemA.Quoted_Total,
itemB.Quoted_Total);
}

Now change your DataGridColumn component to...

mx:DataGridColumn headerText=Formatted Total (Flex will now sort)
sortCompareFunction=myCompareFunc

That should do it.


HTH.



--- In flexcoders@yahoogroups.com, Kevin Ford [EMAIL PROTECTED] wrote:

 I need someone to help verify a problem I'm running into and perhaps
 recommend a solution. What I'm trying to do should be very simple: I
want to
 allow users to sort a datagrid column containing data formatted using
a
 CurrencyFormatter. The problem I'm finding is that sorting (by
clicking the
 column header) works fine on raw numbers, but trying to do the same on
 formatted numbers doesn't do anything. I'm using Flex Builder 3, but
have
 tried this using both the Flex 2 and Flex 3 compilers on two different
 systems. Initially I was trying this using an AdvancedDataGrid, but
found
 the same problem using just a basic DataGrid.

 Attached is a simple mxml file that fully demonstrates my problem. I
also
 have a bug logged with
Adobe(http://bugs.adobe.com/jira/browse/FLEXDMV-1769)
 that I'd love to cancel. Am I missing something? Am I just going to
have to
 define my own sort function?

 Thanks!
 Kevin





RE: [flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread Tracy Spratt
This will not work:

myLiveObj.dataProvider = service.doSomething.lastResult;
service.doSomething();

 

Data service calls are asynchronous, so you either have  to use a result
handler, or bind to the result.  The first row above does NOT establish
a binding, it just assigns lastResult, (which will be either null or
contain the wrong value) to the dataProvider property.  You should not
assign lastResult in any case, you should use it only for binding.

 

Why are you doing the data service calls from each item?

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of y.mauron
Sent: Monday, June 02, 2008 12:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: First row trouble with datagrid component

 

I'm pretty sure I can to as you mentioned in your code. However I have
to do something like this: 

myLiveObj = new LiveObj();
service = new remoteObject();

myLiveObj.dataProvider = service.doSomething.lastResult;
service.doSomething();

And I don't know why and how, but all the things get desynchronized
when I add a big number of those myLiveObj objects.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Monday 02 Jun 2008, y.mauron wrote:
  Actually not, but I don't know why. I didn't manage to add item like
  PS : My code with the override of the set data() function (instead
of
 
 You should be able to do, in the parent during or after
CreationComplete:
 
 myLiveObj=new LiveObj();
 myLiveObj.data='foo';
 addChild(myLiveObj);
 
 depends what component your 'LiveObj' extends of course.
 
 -- 
 Tom Chiverton
 
 
 
 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. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP. 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] working with resulthandler httpservice and referencing lastresult?

2008-06-02 Thread Jason B
im very lost when i need to handle things in the resulthandler from an
httpservice

heres what i got Not working

public function stationloadResult(event:ResultEvent){   
var result:Object = event.result;

if(event.lastResult.DATARESULTS.SEVEND_ALOWED == N)
  Alert.show(sevenD not allowed);
  else
  Alert.show(sevenD is allowed);


}

im trying to understand how to handle referencing the httpservice when
it finishes loading data i can manipulate the flex front end while
looking at specific return data?
hope that makes sense.





Re: [flexcoders] Anyone know why Air drops the first letter of file during coldfusion remoting?

2008-06-02 Thread Sherif Abdou
I guess i should include the error
[RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend 
faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: 
Failed: url: 'http:/lexCoders.swf/flex2gateway/']

Project Name: FlexCoders


- Original Message 
From: Sherif Abdou [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, June 2, 2008 12:21:44 PM
Subject: [flexcoders] Anyone know why Air drops the first letter of file during 
coldfusion remoting?


if i create an Air project with ColdFusion remoting, and say the Project name 
is FlexCoders, then it tries to connect to lexCoders. If i create a Flex 
Project, the flex project is able to execute everything properly. Thanks




  

Re: [flexcoders] Anyone know why Air drops the first letter of file during coldfusion remoting?

2008-06-02 Thread Moss
This is already an old bug and apparantly still not fixed. The solution 
is to set the destination attribute of the RemoteObject element in your 
MXML file and not in the XML configuration file. Be sure to set the 
whole path.

Brgds,

Eduard

Sherif Abdou schreef:
 I guess i should include the error
 [RPC Fault faultString=Send failed 
 faultCode=Client.Error.MessageSend 
 faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: 
 HTTP: Failed: url: 'http:/lexCoders.swf/flex2gateway/']

 Project Name: FlexCoders

 - Original Message 
 From: Sherif Abdou [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, June 2, 2008 12:21:44 PM
 Subject: [flexcoders] Anyone know why Air drops the first letter of 
 file during coldfusion remoting?

 if i create an Air project with ColdFusion remoting, and say the 
 Project name is FlexCoders, then it tries to connect to lexCoders. If 
 i create a Flex Project, the flex project is able to execute 
 everything properly. Thanks


  



[flexcoders] Re: First row trouble with datagrid component

2008-06-02 Thread y.mauron
I actualy did a biding through Bindable ArrayCollection but did it
with lastresult. 

I have to do it within the object because this call is dependant of
the data recieved in the object...

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 This will not work:
 
 myLiveObj.dataProvider = service.doSomething.lastResult;
 service.doSomething();
 
  
 
 Data service calls are asynchronous, so you either have  to use a result
 handler, or bind to the result.  The first row above does NOT establish
 a binding, it just assigns lastResult, (which will be either null or
 contain the wrong value) to the dataProvider property.  You should not
 assign lastResult in any case, you should use it only for binding.
 
  
 
 Why are you doing the data service calls from each item?
 
  
 
 Tracy
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of y.mauron
 Sent: Monday, June 02, 2008 12:14 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: First row trouble with datagrid component
 
  
 
 I'm pretty sure I can to as you mentioned in your code. However I have
 to do something like this: 
 
 myLiveObj = new LiveObj();
 service = new remoteObject();
 
 myLiveObj.dataProvider = service.doSomething.lastResult;
 service.doSomething();
 
 And I don't know why and how, but all the things get desynchronized
 when I add a big number of those myLiveObj objects.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tom Chiverton tom.chiverton@
 wrote:
 
  On Monday 02 Jun 2008, y.mauron wrote:
   Actually not, but I don't know why. I didn't manage to add item like
   PS : My code with the override of the set data() function (instead
 of
  
  You should be able to do, in the parent during or after
 CreationComplete:
  
  myLiveObj=new LiveObj();
  myLiveObj.data='foo';
  addChild(myLiveObj);
  
  depends what component your 'LiveObj' extends of course.
  
  -- 
  Tom Chiverton
  
  
  
  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. Any reference to a partner in relation to
 Halliwells LLP means a member of Halliwells LLP. 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: Enable / Disable Flex Menu Items Programmatically using AS 3.0

2008-06-02 Thread bc24fl
I tried the following:

myMenuData.menuitem.(@id==menuUp)[EMAIL PROTECTED] = false;

But it returns an error:

A term is undefined and has no properties.  

Any Ideas?

Thanks.

--- In flexcoders@yahoogroups.com, Marty Pitt [EMAIL PROTECTED] wrote:

 this is extremely close to what I'm trying to do.
 (I posted here earlier today looking for a solution!)
 
 You can modify the dataProvider of the XML, setting the @enabled
attribute, which will cause the menu to update.
 
 Eg.,.
 
 myMenuData..menuitem.(@id==menuUp)[EMAIL PROTECTED] = false
 
 will disable the menuUp entry.
 
 If you're trying to get access directly to the menu instance, then
I'm afraid I don't know the answerthat's what my post was about
this morning.
 
 (I'm trying to get a reference for a unit test so I can do an
assertion on the enabled property of the menuItem itself.)
 
 Hope that helps
 
 Marty
 
 
 - Original Message 
 From: bc24fl [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Monday, June 2, 2008 4:29:11 PM
 Subject: [flexcoders] Enable / Disable Flex Menu Items
Programmatically using AS 3.0
 
 
 I have the following XML data defined in my app:
 
 =
 !-- Define the menu data. --
 mx:XML format=e4x id=myMenuData 
 root
 menuitem id=menuDrill label=Drill = 
 menuitem id=menuDown label=Down toggled=false
 enabled=true /
 menuitem id=menuUp label=Up toggled=false
 enabled=true /
 /menuitem
 menuitem type=separator /
 menuitem label=Lock / Unlock type=check toggled=false /
 menuitem type=separator / 
 menuitem label=Reset Graph toggled=false / 
 /root
 /mx:XML
 ===
 
 I can statically disable one of the items by setting enabled=false ,
 however I need to disable the item by using Action Script 3.0. 
 
 I've tried using dataDescriptor like so but it does not work:
 
 ===
 myMenu.dataDescript or.setEnabled( myMenuData. menuDrill. menuDown,
false);
 ===
 
 I've posted this on a few forums and haven't received a solution.  I
 hope I can find one here.
 
 Any help would be much appreciated.
 
 Thanks.





[flexcoders] Re: Flex / Air sharewware app: what database to use in network environment?

2008-06-02 Thread andrewwestberg
I believe this is a direct to MySQL library.  Haven't tried it myself
though.

http://code.google.com/p/assql/




[flexcoders] Using AdvancedDataGridRendererProvider for AdvancedDatagrid

2008-06-02 Thread Adrian Gillette
I'm using AdvancedDataGridRendererProvider to use custom itemEditors
in an advanced datagrid.  BTW - Thanks to Peter Ent for his blogs on
the subject of itemrenderers.  It was very helpful in showing how to
bind textInputs to data in datagrids.

But I having a problem with trying to determine whether a cell in the
advanced datagrid is the 1st child.  Does anyone know of a good solution?

Thanks in advance for any helpful advice.



[flexcoders] Re: Enable / Disable Flex Menu Items Programmatically using AS 3.0

2008-06-02 Thread bc24fl
Just tried it but did not work.  Any ideas?

--- In flexcoders@yahoogroups.com, Michael Schmalle
[EMAIL PROTECTED] wrote:

 Hi,
 
 Have you tried;
 

myMenu.dataDescriptor.setEnabled(myMenuData.menuDrill.menuDown[0],false);
 
 Mike
 
 On Mon, Jun 2, 2008 at 12:38 PM, Marty Pitt [EMAIL PROTECTED] wrote:
 
this is extremely close to what I'm trying to do.
  (I posted here earlier today looking for a solution!)
 
  You can modify the dataProvider of the XML, setting the @enabled
attribute,
  which will cause the menu to update.
 
  Eg.,.
 
  myMenuData..menuitem.(@id==menuUp)[EMAIL PROTECTED] = false
 
  ...will disable the menuUp entry.
 
  If you're trying to get access directly to the menu instance, then I'm
  afraid I don't know the answerthat's what my post was about this
  morning.
 
  (I'm trying to get a reference for a unit test so I can do an
assertion on
  the enabled property of the menuItem itself.)
 
  Hope that helps
 
  Marty
 
  - Original Message 
  From: bc24fl [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Monday, June 2, 2008 4:29:11 PM
  Subject: [flexcoders] Enable / Disable Flex Menu Items
Programmatically
  using AS 3.0
 
  I have the following XML data defined in my app:
 
  =
  !-- Define the menu data. --
  mx:XML format=e4x id=myMenuData 
  root
  menuitem id=menuDrill label=Drill = 
  menuitem id=menuDown label=Down toggled=false
  enabled=true /
  menuitem id=menuUp label=Up toggled=false
  enabled=true /
  /menuitem
  menuitem type=separator /
  menuitem label=Lock / Unlock type=check toggled=false /
  menuitem type=separator /
  menuitem label=Reset Graph toggled=false /
  /root
  /mx:XML
  ===
 
  I can statically disable one of the items by setting enabled=false ,
  however I need to disable the item by using Action Script 3.0.
 
  I've tried using dataDescriptor like so but it does not work:
 
  ===
  myMenu.dataDescript or.setEnabled( myMenuData. menuDrill.
menuDown, false);
  ===
 
  I've posted this on a few forums and haven't received a solution. I
  hope I can find one here.
 
  Any help would be much appreciated.
 
  Thanks.
 
 
   
 
 
 
 
 -- 
 Teoti Graphix, LLC
 http://www.teotigraphix.com
 
 Teoti Grahix Blog
 http://www.blog.teotigraphix.com
 
 You can find more by solving the problem then by 'asking the question'.





RE: [flexcoders] referencing inside resulthandler error 1009

2008-06-02 Thread Tracy Spratt
Actually, I think the error is coming from this:

event.target.lastResult.DATARESULTS.SEVEND_ALOWED == N

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Monday, June 02, 2008 3:11 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] referencing inside resulthandler error 1009

 

When you say stationslicense_7D is a checkbox item, what do you mean?
Do you mean you have a checkbox with an id= stationslicense_7D?

 

If so, where is that checkbox declared in relation to the result
handler?  Same file?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason B
Sent: Monday, June 02, 2008 2:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] referencing inside resulthandler error 1009

 

when trying to reference a item on the flex form inside a
resulthandler from an httpservice i run into error 1009 cannot access
method or property

example stationslicense_7D throws the error below

public function stationloadResult(event:ResultEvent){
var result:Object = event.result;

//stationslicense_7D is a checkbox item

if(event.target.lastResult.DATARESULTS.SEVEND_ALOWED == N){
stationslicense_7D.selected = false;
}else{
stationslicense_7D.selected = true;
} 

 



  1   2   >