RE: [flexcoders] Repost: XMLListCollection.copy drop namespaces - Bug or feature?

2008-01-02 Thread Alex Harui
I see the namespace being retained.  Can you post a complete
mini-example?  Your post has some ambiguity.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Ortega
Sent: Wednesday, January 02, 2008 6:13 PM
To: flexcoders
Subject: [flexcoders] Repost: XMLListCollection.copy drop namespaces -
Bug or feature?

 

Sorry for the repost.

Just want to see if I can get some post holiday eyes on this.

Thanks,
Tom

-- Forwarded message --
From: Tom Ortega <[EMAIL PROTECTED]  >
Date: Dec 27, 2007 11:00 AM
Subject: XMLListCollection.copy drop namespaces - Bug or feature?
To: flexcoders mailto:flexcoders%40yahoogroups.com> >

Say you have the following XML:

http://www.somesite.com/someurl
 ">


1
MyItem


2
MyOtherItem




if I do:

rows:XMLListCollection;
rows = new XMLListCollection(node.*.(localName() == "Row"));

Then the sol namespace gets copied. However, if I do,

rowCopy:XMLListCollection;
rowcopy = rows.copy();

rowCopy will lose the namespace. Is that a bug or proper behavior?

Thanks,
Tom

 



RE: [flexcoders] Keyboard Listeners with IE 7

2008-01-02 Thread Alex Harui
IE7 may have more keyboard shortcuts that conflict with yours.  Just a
guess though.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dfalling
Sent: Tuesday, January 01, 2008 12:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Keyboard Listeners with IE 7

 

Are there any known issues with keyboard listeners and IE 7? I've
added a listener to handle Ctrl+1, 2, ...0 for switching tabs inside
my interface, and it works great in everything except IE 7. In IE 6
and Firefox the commands are accepted immediately, causing the
interface to switch to the appropriate tab. In IE 7, I have to
hold the keys down for several seconds before they get passed through.
Does anyone have any suggestions?

Cheers,
Dennis Falling

 



[flexcoders] Re:Offline Work Support in Flex 2

2008-01-02 Thread Anzer
Hi,

Since flex is a client tool and the application will download to the client
browser (Flash player) when the user requests the application I think you
can structure your app to work offline.

When the user has connection to server get all the needed data from server
and store them in memory using array, arraycollection or VOs. When the user
make changes, update the data in memory objects and finally when the user
needs to synch to server check whether connection available and update the
data.

I haven't tried it yet but I think it will work if we structure the app
perfectly. 

Another choice is use Google gears,  http://gears.google.com/ 

 

Best regards

Anz

http://www.digitalmesh.com    ||
http://www.FlickrMailer.com   

 



Re: [flexcoders] Speed test, clear browser cache after each test

2008-01-02 Thread Clint Modien
You have to set the no-cache header on the urlRequest

var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
   var request:URLRequest = new URLRequest("http://yoururl.com";);
   request.requestHeaders.push(header);


On Jan 1, 2008 6:04 PM, Stefan IONESCU <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> Hello,
>
> I'm using some images of different sizes to test speed of the internet
> connection.
> How can I clear (or prevent cacheing) from cache just that 5 images ?
>
> 10x
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  
> Never miss a thing. Make Yahoo your homepage. 


[flexcoders] Re: embedding html in xml

2008-01-02 Thread iilsley

try






--- In flexcoders@yahoogroups.com  ,
"jamalwally" <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I am using an external XML file to define the content for a Text
> component in Flex.  The xml file has HTML tags (e.g.  for bold).
>
> When I assign the XML to the Text component's htmlText property, I get
> unwanted extra line breaks around the HTML tags.
>
> For example, here is the external XML file:
>
> 
>   This is the text with html tags
> 
>
> Then in actionscript I load the XML file and create the Text component
>
>   // create the XML file loader
>   var xmlLoader = new URLLoader();
>   xmlLoader.load(new URLRequest(externalFilename));
>
>   // create an XML object from the file contents
>   var myxml:XML = new XML(xmlLoader.data);
>
>   // make the Text component
>   var mytext:Text = new Text();
>   mytext.htmlText = myxml;
>
> The displayed text component has three lines of text because of
> unwanted line breaks around the HTML  tag:
>   "This is the text with
>   *html*
>   tags"
>
> Instead of just one line of text as I was hoping for:
>   "This is the text with *html* tags"
>
> Is there a way around this (perhaps a way to specify a set of tags
> (e.g. ) that should not be interpreted as XML sub-nodes of ?
>
> Thanks in advance
>



[flexcoders] compc usage

2008-01-02 Thread Stephen Roy J. Tang
Hi all,

Can someone point me to a good example of compc command line usage?

I saw a few but the examples always require a manifest file that list
out the files included in the SWC. Is it possible to do it without a
manifest file, i.e. I just point to the folder where the classes are?

In the middle of development, I expect to be adding classes to the SWC
regularly so I don't want to keep updating a manifest file every time.

Thanks,

Roy



[flexcoders] IE cache

2008-01-02 Thread coder3

Hi All,

I need an auto refresh feature in my flex application, my code is like this: 

var timedProcess:uint = 
setInterval(refreshResults, 30);

it works fine on firefox. but looks like there is a cache problem on IE. the
refreshResults() doesn't get called.

i changed the IE cache settings to 1MB(minimum) but it doesn't work.

any ideas?

thanks

-- 
View this message in context: 
http://www.nabble.com/IE-cache-tp14591464p14591464.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Send event to all objects?

2008-01-02 Thread jrag0n
I get the sense this is very easy, but I haven't been able to make it work yet.

When I click a button, a ball is sent out on the screen and starts moving 
randomly.  I want to 
press a button and have every ball on stage do something, like all get twice as 
large, or all 
turn white or something.

I assume I'm going to capture a MouseEvent.CLICK on the stage, which then 
targets all the 
balls I've dynamically created, and then each ball can respond accordingly.  
But I'm stuck. Any 
thoughts?



RE: [flexcoders] Flex SSL over AMF with ColdFusion services-config.xml

2008-01-02 Thread Peter Farland

If you're loading your SWF via HTTPS then you should be able to make
secure connections from the Flash Player. As for the right channel being
automatically selected, it depends on whether channel failover happens
correctly. I didn't see a destination configuration below, but if the
 snippet represents the list of channels for your destination,
then I believe it will try to connect using the SecureAMFChannel first
and fall back to the AMFChannel on failing. While this might be useful
in development, I wouldn't suggest it for deployment - especially if you
really do have a requirement to connect to a secure endpoint.

Can you add  to your MXML, recompile, and then debug
or look at flashlog.txt for more information about what might be going
wrong in the channel connection phase?






 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nasawebguy
Sent: Wednesday, January 02, 2008 8:45 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex SSL over AMF with ColdFusion
services-config.xml

When I use smartsniff/Charles, my remoteObject content is not
encrypted/https/port 443. IE/Firefox shows SSL to the user, eventhough
the data is NOT actually encrypted over AMF!

Below is my services-config.xml file and remoteObject code snips.

I've been researching this all day with no clear solution. As I
understand it so far, I should be able to use two channels in my
ColdFusion destination and the correct channel would be used
automatically. Not the case. I need https pages to use SSL and http
pages to not.

I tried splitting them up into two destinations, "ColdFusion" and
"ColdFusionSecure", in the same services-config, but I keep getting
errors that ColdFusionSecure cannot be found, when it is used at the
remoteObject destination.
  
I'd appreciate any suggestions.

Thanks,
Don








http://{server.name}:{server.port}/flex2gateway/";
class="flex.messaging.endpoints.AMFEndpoint"/> 


false

false





https://{server.name}:{server.port}/flex2gateway/";
class="flex.messaging.endpoints.SecureAMFEndpoint"/> 



false
false

false











--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links





Re: [flexcoders] Re: BlazeDS and Java 5 Enum Support - works only one way?

2008-01-02 Thread Anatole Tartakovsky
James,
   You might want to consider to add [Enum... to thecompiler metatags -
henerated code provided -in the bottom portion of blog
http://flexblog.faratasystems.com/?p=242
Thanks,
Anatole


On 1/2/08, James Ward <[EMAIL PROTECTED]> wrote:
>
>   Hi Vijay,
>
> Only mapping Strings to Enums is supported. Can you file an enhancement
> request? http://bugs.adobe.com/flex
>
> Let the list know the bug number so those interested can go vote for it.
>
> -James
>
> On Wed, 2007-12-19 at 19:05 -0800, moonusamy wrote:
> > Unfortunately that doesn't work for me. I have an AS class
> > corresponding to every Java class including enums. I want to be able
> > to pass an instance of the AS class as the arg and have it translate
> > to the appropriate Enum.
> >
> > So basically here's what I want to do:
> > on the Java side:
> > public enum Color {RED, GREEN}
> > A method on a Java class Bar as follows:
> > public void foo(Color c);
> >
> > on the AS side:
> > [RemoteClass(alias="Color")]
> > public class ASColor implements IExternalizable
> > {
> > private var _value:String;
> >
> > public function ASColor(val:String=null):void {
> > this._value = val;
> > }
> >
> > public function get value():String {
> > return this._value;
> > }
> >
> > public static const RED:String = "RED";
> > public static const RED:String = "GREEN";
> >
> > public function readExternal(input:IDataInput):void {
> > this._value = input.readUTF();
> > }
> >
> > public function writeExternal(output:IDataOutput):void {
> > output.writeUTF(this._value);
> > }
> > }
> >
> > var c:ASColor = new ASColor(ASColor.RED);
> > invoke foo(c) thru RemoteObject
> >
> > Note: The enum implementation on the AS side is weak but that is just
> > a limitation of AS3 not having an equivalent of readResolve().
> >
> > --- In flexcoders@yahoogroups.com , "Peter
> Farland" <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > If you have an Enum argument in a Java method, you need to send it a
> > > String. During method invocation, BlazeDS will use
> > > Enum.valueOf(desiredClass, yourStringValue) to create an enum on
> > your
> > > behalf.
> > >
> > >
> > > -Original Message-
> > > From: flexcoders@yahoogroups.com [mailto:
> flexcoders@yahoogroups.com ]
> > On
> > > Behalf Of moonusamy
> > > Sent: Wednesday, December 19, 2007 3:45 PM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] BlazeDS and Java 5 Enum Support - works only
> > one
> > > way?
> > >
> > >
> > > If I have a Java method that returns an Enum, it seems to be
> > serialized
> > > ok as a String, but if I have a Java method that takes an Enum
> > argument,
> > > I get the same error I used to get before with LCDS 2.5.1:
> > >
> > > faultDetail = "Types cannot be instantiated without a public, no
> > > arguments constructor."
> > >
> > > Java 5 Enums don't have public no-arg constructors.
> > >
> > > Unless I am missing something, Enum support in BlazeDS works only
> > one
> > > way. Anyone hit this?
> > >
> > > Vijay
> > >
> > >
> > >
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ:
> > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > Yahoo! Groups Links
> > >
> >
> >
> >
> >
> >
> 
>


[flexcoders] Re: Developing Flex against CF Server

2008-01-02 Thread nasawebguy
Dale, I feel your pain. Flex Builder does need more intuitive and 
support different develop/production scenarios, especially where the
developer isn't running locally or even on a local network. It can be
confusing. It is assumed that you're using a dev version of CF on your
dev box. (ideal scenario).

Mapped drive works great when on a LAN, but doesn't if I'm deploying
to a remote server/host.

In my case, I find using the "Basic" project, not CF option, is
easiest for me for remote server work.

On my local PC, I created a folder path
C:\CFusionMX7\wwwroot\web-inf\flex\services-config.xml 
CF8 in your case

Then after compiling/running locally in Flex, I FTP/RDP the /bin to
the remote server.

This lets me build locally and compile locally, then test on the
server with live data. Not ideal, but it works.

But, you do need to right-click on the project, select properties and
enter the following in the complier arguments
-services "C:\CFusionMX7\wwwroot\web-inf\flex\services-config.xml"

It's a workaround that works for me.

When I'm in the office, on a LAN, I map a drive, like Mike suggests.

Don




--- In flexcoders@yahoogroups.com, "Mike Chabot" <[EMAIL PROTECTED]> wrote:
>
> If your development server has CF installed on the C:\ drive, map that
> C drive share onto your local dev box. Let's call it Z drive. Do in
> your Flex settings you write Z:\ColdFusion8\ for the path. I bet you
> could also use UNC paths, such as \\server\c$\ColdFusion8\.
> 
> Enjoy,
> Mike Chabot
> 
> On Jan 1, 2008 10:39 PM, Dale Fraser <[EMAIL PROTECTED]> wrote:
> 
> > I have a CF development server aleady,
> >
> >
> >
> > But what I don't understand, is when I create a new flex project
is that it
> > asks me for the web root and url of CF.
> >
> >
> >
> > What am I supposed to put in here, the server one I assume. It
fails of
> > course as the locally C:\ColdFusion8 is not available.
> >
> >
> >
> > So how do you configure a Flex project that works with a
development server
> > rather than a local development environment?
> >
> >
> >
> > Regards
> >
> > Dale Fraser
>




[flexcoders] Repost: XMLListCollection.copy drop namespaces - Bug or feature?

2008-01-02 Thread Tom Ortega
Sorry for the repost.

Just want to see if I can get some post holiday eyes on this.

Thanks,
Tom

-- Forwarded message --
From: Tom Ortega <[EMAIL PROTECTED]>
Date: Dec 27, 2007 11:00 AM
Subject: XMLListCollection.copy drop namespaces - Bug or feature?
To: flexcoders 


Say you have the following XML:

http://www.somesite.com/someurl";>


1
MyItem


2
MyOtherItem




if I do:

rows:XMLListCollection;
rows = new XMLListCollection(node.*.(localName() == "Row"));

Then the sol namespace gets copied.  However, if I do,

rowCopy:XMLListCollection;
rowcopy = rows.copy();

rowCopy will lose the namespace.  Is that a bug or proper behavior?

Thanks,
Tom


[flexcoders] Re: Offline Work Support in Flex 2

2008-01-02 Thread nasawebguy
Take a look at Adobe AIR. Very cool offline/online sync capability.

Don


--- In flexcoders@yahoogroups.com, "nirav_eng_comp" <[EMAIL PROTECTED]>
wrote:
>
> 
> Hi,
> 
> Offline Work Support is possible in flex or not?
> I want to provide offline mode facility in my web application.
> User can work offline and when server connection/internet connection is
> available the changes which has been done by user, should uploaded on to
> the server.
> 
> Currently i am trying with SharedObjects.
> 
> I heard lots about Google Gears browser plugin which provides Offline
> Mode Facility. How can i integrate it in my web application?
> 
> Thanks,
> Nirav Upadhyay
>




[flexcoders] Flex SSL over AMF with ColdFusion services-config.xml

2008-01-02 Thread nasawebguy
When I use smartsniff/Charles, my remoteObject content is not
encrypted/https/port 443. IE/Firefox shows SSL to the user, eventhough
the data is NOT actually encrypted over AMF!

Below is my services-config.xml file and remoteObject code snips.

I've been researching this all day with no clear solution. As I
understand it so far, I should be able to use two channels in my
ColdFusion destination and the correct channel would be used
automatically. Not the case. I need https pages to use SSL and http
pages to not.

I tried splitting them up into two destinations, "ColdFusion" and
"ColdFusionSecure", in the same services-config, but I keep getting
errors that ColdFusionSecure cannot be found, when it is used at the
remoteObject destination.
  
I'd appreciate any suggestions.

Thanks,
Don








http://{server.name}:{server.port}/flex2gateway/";
class="flex.messaging.endpoints.AMFEndpoint"/> 


false

false





https://{server.name}:{server.port}/flex2gateway/";
class="flex.messaging.endpoints.SecureAMFEndpoint"/> 


false
false

false











[flexcoders] embedding html in xml

2008-01-02 Thread jamalwally
Hi there,

I am using an external XML file to define the content for a Text
component in Flex.  The xml file has HTML tags (e.g.  for bold).

When I assign the XML to the Text component's htmlText property, I get
unwanted extra line breaks around the HTML tags.

For example, here is the external XML file:


  This is the text with html tags


Then in actionscript I load the XML file and create the Text component

  // create the XML file loader
  var xmlLoader = new URLLoader();
  xmlLoader.load(new URLRequest(externalFilename));

  // create an XML object from the file contents
  var myxml:XML = new XML(xmlLoader.data);

  // make the Text component
  var mytext:Text = new Text();
  mytext.htmlText = myxml;

The displayed text component has three lines of text because of
unwanted line breaks around the HTML  tag:
  "This is the text with
  *html*
  tags"

Instead of just one line of text as I was hoping for:
  "This is the text with *html* tags"

Is there a way around this (perhaps a way to specify a set of tags
(e.g. ) that should not be interpreted as XML sub-nodes of ?

Thanks in advance



[flexcoders] Degrafa Beta Released

2008-01-02 Thread scalenine
In case anyone is interested, the beta of Degrafa was released
yesterday. If you're not familiar wit Degrafa, it's a declarative
graphics framework for Flex that allows you to use MXML markup to draw
shapes, make complex graphics, create skins and also includes advanced
CSS support.

Learn more about it at http://www.degrafa.com, check out the code at
http://code.degrafa.com, samples at http://samples.degrafa.com, and
documentation at http://docs.degrafa.com. We'd love to hear your
feedback at http://group.degrafa.com.

Thanks,

Juan

scalenine.com : degrafa.com : ocflex.org



Re: [flexcoders] Re: basic open source video player

2008-01-02 Thread [EMAIL PROTECTED]
thanks, Cato.
I'm surprised there aren't more. .

Cato Paus wrote:
>
> http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=1921&loc=en_US
>  
> 
>  
>
> Cato Paus
>
>  
>
>
> --- In flexcoders@yahoogroups.com, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 
> wrote:
> >
> > Does anyone know of a basic open source video (flv) player for flex?
> >
> > Not like Miro, which scours the net for vidoes etc etc etc.
> > Just something that plays flv files and has basic controls
> >
> > Thanks
> >
>
>  
>
>
>  
>
>  



Re: [flexcoders] Developing Flex against CF Server

2008-01-02 Thread Mike Chabot
If your development server has CF installed on the C:\ drive, map that
C drive share onto your local dev box. Let's call it Z drive. Do in
your Flex settings you write Z:\ColdFusion8\ for the path. I bet you
could also use UNC paths, such as \\server\c$\ColdFusion8\.

Enjoy,
Mike Chabot

On Jan 1, 2008 10:39 PM, Dale Fraser <[EMAIL PROTECTED]> wrote:

> I have a CF development server aleady,
>
>
>
> But what I don't understand, is when I create a new flex project is that it
> asks me for the web root and url of CF.
>
>
>
> What am I supposed to put in here, the server one I assume. It fails of
> course as the locally C:\ColdFusion8 is not available.
>
>
>
> So how do you configure a Flex project that works with a development server
> rather than a local development environment?
>
>
>
> Regards
>
> Dale Fraser


Re: [flexcoders] International date formatting

2008-01-02 Thread Vadim Melnik
Hello Rob,

Thanks for quick answer.
Vadim.


  - Original Message - 
  From: Robert Vollmar 
  To: flexcoders@yahoogroups.com 
  Sent: Thursday, January 03, 2008 12:49 AM
  Subject: Re: [flexcoders] International date formatting


  No, Flex 3's runtime localization will not pick up this information from the 
OS.  These things have to be defined in .properties files for the desired 
locales.

  - Rob


  On 1/2/08 2:43 PM, "Vadim Melnik" <[EMAIL PROTECTED]> wrote:



>>> Flex 3 has runtime localization. <<<
 
Out of curiosity question about localization in Flex 3: 
 
Will Flex 3 runtime provide native built-in access to system defined locale 
settings like number, currency, date, time formats etc. (For example in Windows 
these settings specified in Control Panel | Regional and Language Options | 
Regional Options)?
 
 
>>>
Additionally our globalization team has been working on some exciting new 
formatters that we hope to see out there in a few weeks on Labs.  Stay tuned!
<<<
 
It's good news, can't wait to see it available on Labs...
 
--
Thanks,
Vadim.

 
 


  - Original Message - 
   
  From:  Matt Chotin    
   
  To: flexcoders@yahoogroups.com 
   
  Sent: Thursday, December 13, 2007 6:44  PM
   
  Subject: RE: [flexcoders] International  date formatting
   

   
   

   
   

  Additionally  our globalization team has been working on some exciting 
new formatters that  we hope to see out there in a few weeks on Labs.  Stay  
tuned!

   
  Matt

   
   
   

  From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of 
Alex  Harui
  Sent: Thursday, December 13, 2007 7:47 AM
  To: flexcoders@yahoogroups.com
  Subject:  RE: [flexcoders] International date formatting

   
   
   
   
   

  Flex 3 has  runtime localization.

   





--



  From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of 
Mark  Ingram
  Sent: Thursday, December 13, 2007 7:02 AM
  To:  flexcoders@yahoogroups.com
  Subject: [flexcoders] International  date formatting

   
   
   
   
   

  Hi, is there any localisation  support in Flex? I've got a date that I 
would like to format, but I don't want  to just use the UK format - I would 
rather use a localised version so that  when American customers use our product 
they see their date  formats.

   
  Any clues?

   
  Mark

   
   
   
   







   

Re: [flexcoders] Connecting To Flex from CF

2008-01-02 Thread Igor Costa
You have to pass an argument to the compiler -services
"c:\path_for_your_\services-config.xml" to enable that one.

Take a look in the mail list arquiche and you will see past threads on that.

Regrds
-Igor

On Jan 1, 2008 11:57 PM, Dale Fraser <[EMAIL PROTECTED]> wrote:

>I have done this before but can't get it to work this time (first time
> with CF8).
>
>
>
> I am using Flex to connect to CFC's via mapping. I have enabled mapping
> use in the XML and restarted the server but I get this error.
>
>
>
> [RPC Fault faultString="[MessagingError message='Destination 'ColdFusion'
> either does not exist or the destination has no channels defined (and the
> application does not define any default channels.)']"
> faultCode="InvokeFailed" faultDetail="Couldn't establish a connection to
> 'ColdFusion'"]
>
>  at
> mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invoke
> ()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:264]
>
>  at
> mx.rpc.remoting.mxml::Operation/http://www.adobe.com/2006/flex/mx/internal::invoke
> ()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\remoting\mxml\Operation.as:204]
>
>  at mx.rpc.remoting::Operation/send
> ()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\remoting\Operation.as:120]
>
>  at Function/http://adobe.com/AS3/2006/builtin::apply()
>
>  at mx.rpc.remoting.mxml::Operation/send
> ()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\remoting\mxml\Operation.as:177]
>
>  at Function/http://adobe.com/AS3/2006/builtin::apply()
>
>  at
> mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::callProperty
> ()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractService.as:292]
>
>  at
> DataGrid1/___DataGrid1_Button1_click()[F:\DataGrid1\src\DataGrid1.mxml:17]
>
>
>
>
>
> It seems to be asking for a Channel, but I want to using a mapping and not
> define channels.
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://learncf.com
>
>
>  
>



-- 

Igor Costa
www.igorcosta.com
www.igorcosta.org


[flexcoders] TabNavigator and States problem

2008-01-02 Thread tpokrajcic
I have a TitleWindow and a TabNavigator inside with several tabs based
on Canvas.
There are two states - "Base State" and "Edit". TitleWindow goes to
"Edit" state upon click on "Edit" button.

Now a problem:
After clicking on a button, state of current tab changes to Edit, but
when I click other tabs, they're in Base State. 
Actually, after switching tabs I can see in a blink of an eye that
other tab somehow changed state from Edit back to Base State, but when
I place breakpoints in UIComponent state handling functions I can't
catch any state changing there...
And more strange is that the first tab always has a correct state, no
matter on what tab I was when clicking button.
Anyone experienced something like this?


Tomislav






[flexcoders] Dose the Flex 2 Tween, mx.effects.Tween; work?

2008-01-02 Thread jcrobinson08
Why dose the following not work?


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

 

 







[flexcoders] Connecting To Flex from CF

2008-01-02 Thread Dale Fraser
I have done this before but can't get it to work this time (first time with
CF8).

 

I am using Flex to connect to CFC's via mapping. I have enabled mapping use
in the XML and restarted the server but I get this error.

 

[RPC Fault faultString="[MessagingError message='Destination 'ColdFusion'
either does not exist or the destination has no channels defined (and the
application does not define any default channels.)']"
faultCode="InvokeFailed" faultDetail="Couldn't establish a connection to
'ColdFusion'"]

 at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invoke()
[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.
as:264]

 at
mx.rpc.remoting.mxml::Operation/http://www.adobe.com/2006/flex/mx/internal::
invoke()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\remoting
\mxml\Operation.as:204]

 at
mx.rpc.remoting::Operation/send()[E:\dev\flex_3_beta3\sdk\frameworks\project
s\rpc\src\mx\rpc\remoting\Operation.as:120]

 at Function/http://adobe.com/AS3/2006/builtin::apply()

 at
mx.rpc.remoting.mxml::Operation/send()[E:\dev\flex_3_beta3\sdk\frameworks\pr
ojects\rpc\src\mx\rpc\remoting\mxml\Operation.as:177]

 at Function/http://adobe.com/AS3/2006/builtin::apply()

 at
mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::
callProperty()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\Ab
stractService.as:292]

 at
DataGrid1/___DataGrid1_Button1_click()[F:\DataGrid1\src\DataGrid1.mxml:17]

 

 

It seems to be asking for a Channel, but I want to using a mapping and not
define channels.

 

Regards

Dale Fraser

 

http://learncf.com

 



Re: [flexcoders] Re: Mock objects in AS3

2008-01-02 Thread Drew Bourne
As the author of that mock framework Adam linked to I thought I  
should chip in with my thoughts on the issues that have been raised.

Regarding having to hand code the implementation of the class you  
want to mock I have found that with a couple of snippet templates for  
TextMate I can write them quite quickly.

If you are going to hand-code stubs for use in testing without using  
a framework you are adding behaviour to a class which means you  
should then be testing that class too.

To ease some of the pain until we can generate mock objects from  
interfaces I intend to bundle a bunch of support classes that provide  
mocks for many of the core flash class (think URLLoader,  
EventDispatcher, Socket, etc). Speak up if you've got suggestions for  
the classes you would like to see included initially.

I have a couple of ideas about what we would need to be able to  
generate the mock classes:

1) Generate the .as for the mock from reflection information at  
runtime, then compile the generated .as at runtime with a self-hosted  
compiler (AS3 compiler in AS3) then load it via Loader.loadBytes and  
flash.utils.getDefinitionByName

2) Write an AS3 Parser in something like Java or Ruby that would  
provide access to the Abstract Syntax Tree from which we can generate  
the mock class, then compile the generated .as with mxmlc along with  
the test suite.

By implementing a tool that provides the AST for an AS3 class we open  
up the doors for lots of fun like generating mocks, AOP, code  
mutation (think adding hooks for code coverage reporting, mutation  
testing, additional metadata directives)

There is work in the Tamarin project for a self-hosted compiler  
however last I checked it wasn't far enough along for our purposes.

The hxASM library looks interesting and could definately be an avenue  
worth exploring for this. Adam, I would be interested in  
collaborating on getting a port of hxASM to AS3 so that we can  
generate the necessary bytecodes to create mocks from an interface at  
runtime.

cheers,
Drew


[flexcoders] How to use Beta 2 SDK in Flex Builder 3 beta 3?

2008-01-02 Thread Scot
I have a new installation of Flex Builder 3 b 3.  I would like to use this 
version (beta 3) to 
continue developing projects with the beta 2 SDK.

I have set the location to the beta 2 SDK in the "Installed Flex SDK's" tab of 
the 
Flex>Preferences panel.  The beta 2 SDK is recognized as "Flex 3 M3 (Beta 2)".  

The problem occurs when I try to use that as the SDK for a new project.  I get 
an error "An 
internal build error has occurred."  At that point, nothing will compile.  Any 
ideas?



[flexcoders] Keyboard Listeners with IE 7

2008-01-02 Thread dfalling
Are there any known issues with keyboard listeners and IE 7?  I've
added a listener to handle Ctrl+1, 2, ...0 for switching tabs inside
my interface, and it works great in everything except IE 7.  In IE 6
and Firefox the commands are accepted immediately, causing the
interface to switch to the appropriate tab.  In IE 7, I have to
hold the keys down for several seconds before they get passed through.
Does anyone have any suggestions?

Cheers,
Dennis Falling



Re: [flexcoders] International date formatting

2008-01-02 Thread Robert Vollmar
No, Flex 3's runtime localization will not pick up this information from the
OS.  These things have to be defined in .properties files for the desired
locales.

- Rob


On 1/2/08 2:43 PM, "Vadim Melnik" <[EMAIL PROTECTED]> wrote:

 >>> Flex 3 has runtime localization. <<<
>  
> Out of curiosity question about localization in Flex 3:
>  
> Will Flex 3 runtime provide native built-in access to system defined locale
> settings like number, currency, date, time formats etc. (For example in
> Windows these settings specified in Control Panel | Regional and Language
> Options | Regional Options)?
>  
>  
 >>>
> Additionally our globalization team has been working on some exciting new
> formatters that we hope to see out there in a few weeks on Labs.  Stay tuned!
> <<<
>  
> It's good news, can't wait to see it available on Labs...
>  
> --
> Thanks,
> Vadim.
> 
>  
>  
>>  
>> - Original Message -
>>  
>> From:  Matt Chotin 
>>  
>> To: flexcoders@yahoogroups.com
>>  
>> Sent: Thursday, December 13, 2007 6:44  PM
>>  
>> Subject: RE: [flexcoders] International  date formatting
>>  
>> 
>>  
>>  
>> 
>>  
>>  
>> 
>> Additionally  our globalization team has been working on some exciting new
>> formatters that  we hope to see out there in a few weeks on Labs.  Stay
>> tuned!
>>  
>>  
>> Matt
>>  
>>  
>>  
>>  
>> 
>> From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On
>> Behalf Of Alex  Harui
>> Sent: Thursday, December 13, 2007 7:47 AM
>> To: flexcoders@yahoogroups.com
>> Subject:  RE: [flexcoders] International date formatting
>>  
>>  
>>  
>>  
>>  
>>  
>> 
>> Flex 3 has  runtime localization.
>>  
>>  
>>  
>>  
>> 
>>  
>>  
>> 
>> From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On
>> Behalf Of Mark  Ingram
>> Sent: Thursday, December 13, 2007 7:02 AM
>> To:  flexcoders@yahoogroups.com
>> Subject: [flexcoders] International  date formatting
>>  
>>  
>>  
>>  
>>  
>>  
>> 
>> Hi, is there any localisation  support in Flex? I¹ve got a date that I would
>> like to format, but I don¹t want  to just use the UK format ­ I would rather
>> use a localised version so that  when American customers use our product they
>> see their date  formats.
>>  
>>  
>> Any clues?
>>  
>>  
>> Mark
>>  
>>  
>>  
>>  
>>  
> 




[flexcoders] Developing Flex against CF Server

2008-01-02 Thread Dale Fraser
I have a CF development server aleady,

 

But what I don't understand, is when I create a new flex project is that it
asks me for the web root and url of CF.

 

What am I supposed to put in here, the server one I assume. It fails of
course as the locally C:\ColdFusion8 is not available.

 

So how do you configure a Flex project that works with a development server
rather than a local development environment?

 

Regards

Dale Fraser

 

http://learncf.com

 



[flexcoders] Webservice issue

2008-01-02 Thread rahul_mainkar
Hello people,
Recently I got a very tricky problem to deal with. I have a web
service which accepts few parameters and an array of objects. Web
service is working perfectly fine as we have tested it with some tools.
Now when I execute my flex application, I get a strange error which I
am not able to solve for a long time.
Error is:
faultCode:EncodingError faultString:'Cannot find definition for type
'urn:com.ebg.challanparking.ejbs::GetPoItemList'' faultDetail:'null'

As I guess, my flex application is not able to resolve the name space
or it is not getting the correct definition for the Class GetPoItemList.
I tried putting name spaces into  tag but still no luck.

My question is, how do I resolve this issue and Why is this
application not able to recognize the class definition.
Following is the code snippet










I also checked in the WSDL, it has all the necessary details and this
class type is present in the schema.
Any reply will be highly appreciated
Thanks in advance



[flexcoders] Manual Drag & Drop - copying of original component that is bein dragged?

2008-01-02 Thread Fah Queue
Hi there I am using this code as the basis of my project:
http://blogs.adobe.com/flexdoc/2007/03/creating_resizable_and_draggab.html

I modified the code and came up with my own drag/drop functions:

private function tbMouseMoveHandler(event:MouseEvent):void 
{
// create the filterEditObj in order to display its data in the
Filter Settings Edit form
// - form id = 
// == nodeEditObj = Object(Panel(event.currentTarget));
nodeEditObj = Object(Button(event.currentTarget)).data;

//Alert.show("test");
// here call to DB to get the id's information


// == var dragInitiator:Panel=Panel(event.currentTarget);
var dragInitiator:Button = Button(event.currentTarget);
var ds:DragSource= new DragSource();
ds.addData(event.currentTarget, 'panel');

// Update the xOff and yOff variables to show the
// current mouse location in the Panel.  
xOff = event.currentTarget.mouseX;
yOff = event.currentTarget.mouseY;

// Initiate d&d. 
DragManager.doDrag(dragInitiator, ds, event);
}

// Function called by the canvas dragEnter event; enables dropping
private function doDragEnter(event:DragEvent):void 
{
DragManager.acceptDragDrop(Canvas(event.target));
}

// Function called by the Canvas dragDrop event; 
// Sets the panel's position, 
// "dropping" it in its new location.
private function doDragDropMemberCanvas(event:DragEvent):void 
{
// Compensate for the mouse pointer's location in the title bar.
var tempX:int = event.currentTarget.mouseX - xOff;
event.dragInitiator.x = tempX;

var tempY:int = event.currentTarget.mouseY - yOff;
event.dragInitiator.y = tempY;


//var filterSetObj:String = List(event.dragInitiator).toString();

//Alert.show(filterSetObj);

//var testB:Button = new Button();


// drop a child if it is dragged into the canvas
//=memberFilters.addChild(Panel(event.dragInitiator));
memberFilters.addChild(Button(event.dragInitiator));
// Put the dragged panel on top of all other components.
// == memberFilters.setChildIndex(Panel(event.dragInitiator),
memberFilters.numChildren-1);
memberFilters.setChildIndex(Button(event.dragInitiator),
memberFilters.numChildren-1);

// function call to update the filter set
//updateFilterSet();
}

As you can see I'm not using panels but Button componenets that have
the "data" attributes set to an object containing data related to it.

Anyway what I am trying to do is instead of dropping the button that i
have clicked and dra



[flexcoders] How can I connect to webservices (sql server2005 http endpoint)?

2008-01-02 Thread pchris1977
  Is there a way to connect secure to a webservice?

  Consider wService is the service.
-Basic is not working. wService.SetCredential -> error "no proxy". If 
I put proxy -> error no channel or destination.
-Digest: I try with this soapheader but no succes.


http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd">

user
http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-username-token-profile-
1.0#PasswordText">password



...
 wService.addHeader(hSQL)

-Integrated and Kerberos I don't know how to connect with this 
authentication to a webservice.

Thanks in advance
Cristy.





[flexcoders] Offline Work Support in Flex 2

2008-01-02 Thread nirav_eng_comp

Hi,

Offline Work Support is possible in flex or not?
I want to provide offline mode facility in my web application.
User can work offline and when server connection/internet connection is
available the changes which has been done by user, should uploaded on to
the server.

Currently i am trying with SharedObjects.

I heard lots about Google Gears browser plugin which provides Offline
Mode Facility. How can i integrate it in my web application?

Thanks,
Nirav Upadhyay




[flexcoders] Trobule with https web service

2008-01-02 Thread pchris1977
I setup an sql server 2005 endpoint over SSL channel (needed for 
basic or digest authentication).
I try to connect to this webservice from a flex application:
https://mycomp/sql/myap?wsdlsimple"; 
fault="handleFault(event)">
 

{user.text}
{parola.text}




On local computer it works fine. But when I try to work from another 
domain I get "Seccurity error accesing url". Both of application and 
webservices is on the same computer and work on ssl port. I try to 
use SOAPHeader for DIGEST authentication but it does not work (maybe 
I don't know how to work with that). 
When I try to use wWs.setCredentials("user","password") the 
error: "Authentication not supported on DirectHTTPChannel (no 
proxy)." appears.
I added useProxy="true" but the error: "MessagingError" 
message='Destination DefaultHTTPS' either does not ..." I don't know 
hot to configure flex working with destinations.

So if you can, please help me.
Cristy 





[flexcoders] Manual Drag & Drop - copying of original component that is bein dragged?

2008-01-02 Thread Fah Queue
Hi there I am using this code as the basis of my project:
http://blogs.adobe.com/flexdoc/2007/03/creating_resizable_and_draggab.html

I modified the code and came up with my own drag/drop functions:

private function tbMouseMoveHandler(event:MouseEvent):void 
{
// create the filterEditObj in order to display its data in the
Filter Settings Edit form
// - form id = 
// == nodeEditObj = Object(Panel(event.currentTarget));
nodeEditObj = Object(Button(event.currentTarget)).data;

//Alert.show("test");
// here call to DB to get the id's information


// == var dragInitiator:Panel=Panel(event.currentTarget);
var dragInitiator:Button = Button(event.currentTarget);
var ds:DragSource= new DragSource();
ds.addData(event.currentTarget, 'panel');

// Update the xOff and yOff variables to show the
// current mouse location in the Panel.  
xOff = event.currentTarget.mouseX;
yOff = event.currentTarget.mouseY;

// Initiate d&d. 
DragManager.doDrag(dragInitiator, ds, event);
}

// Function called by the canvas dragEnter event; enables dropping
private function doDragEnter(event:DragEvent):void 
{
DragManager.acceptDragDrop(Canvas(event.target));
}

// Function called by the Canvas dragDrop event; 
// Sets the panel's position, 
// "dropping" it in its new location.
private function doDragDropMemberCanvas(event:DragEvent):void 
{
// Compensate for the mouse pointer's location in the title bar.
var tempX:int = event.currentTarget.mouseX - xOff;
event.dragInitiator.x = tempX;

var tempY:int = event.currentTarget.mouseY - yOff;
event.dragInitiator.y = tempY;


//var filterSetObj:String = List(event.dragInitiator).toString();

//Alert.show(filterSetObj);

//var testB:Button = new Button();


// drop a child if it is dragged into the canvas
//=memberFilters.addChild(Panel(event.dragInitiator));
memberFilters.addChild(Button(event.dragInitiator));
// Put the dragged panel on top of all other components.
// == memberFilters.setChildIndex(Panel(event.dragInitiator),
memberFilters.numChildren-1);
memberFilters.setChildIndex(Button(event.dragInitiator),
memberFilters.numChildren-1);

// function call to update the filter set
//updateFilterSet();
}

As you can see I'm not using panels but Button componenets that have
the "data" attributes set to an object containing data related to it.

Anyway what I am trying to do is instead of dropping the button that i
have clicked and dragged to instead create an instance (a copy) of a
button that has been clicked AND dragged at the same time so that if
there is only one button after I click and drag there will be two
buttons with identical data except that their "id" will be different -
i will probably use some way to make sure that no two ids are the same.

Any ideas, tips? thank you so much!



Re: [flexcoders] Re: interface inheretence

2008-01-02 Thread Aaron Miller
Hi Simon,

I definitely understand your position. In fact this was how the code used to
work. The problem we were running into is that there are a lot of different
child users types which frequently change during the execution of the
program. What's worse is more child user types keep getting added and much
of the program execution throughout the application depends on which type of
user is currently in use. We were finding that making frequent updates to
this system was becoming quite a chore, and usually introduced new bugs.

I've actually finished the conversion to the more polymorphic system, and it
seems to be working quite well. I've even found that I could utilize binding
by creating a "morphUserType" function that dispatches a propertyChange
event. This would allow me to do something like:

# selectedIndex="{(myAuthUser.userModel is IChildUserModel )? 1 : 0}"

However, this does introduce another question. Is there a good way in AS3 to
determine the exact implementation of a class? Right now, I can only check
to see if it's not an IChildUserModel which means it must then be an
IUserModel. What if down the road a third type was added? I was thinking I
might be able to do something like a switch statement without breaks to see
how far down the line it goes, but this would bring me back to the updating
problem where switch statements would have to be updated throughout the
application.

This is really just a question for my own curiosity, so anyones  thoughts on
the matter will be greatly appreciated.

Thanks again!
...aaron

On 1/1/08, simonjpalmer <[EMAIL PROTECTED]> wrote:
>
>   Just a thought, do you really need all these subclasses? With a bit
> of creativity, and a little less purity, could you just roll them all
> into a single class with some different properties and then
> externalise an interface from it?
>
> I don't know what your application is, and apologies if I am making a
> silly suggestion, but I do know that it is easy to get carried away
> with the OO paradigm and sometimes it's better to forego some
> architectural purity in the name of simplicity and understandability
> (is that a word?).
>
> --- In flexcoders@yahoogroups.com , "Aaron
> Miller" <[EMAIL PROTECTED]> wrote:
> >
> > Thanks for the good information! I'll go ahead and give it a shot
> and add in
> > your suggestions as well.
> >
> > When I said it "becomes" an IChildUserModel class, this was probably
> not the
> > technical OOP term. What it does is get reinstantiated as a new
> class and
> > uses the memento pattern to restore it's state. The end result is an
> > IChildUserModel class which starts with the same state as the previous
> > IUserModel class, with a few extra properties and methods tacked on.
> Do you
> > think this is an ok approach? I don't have any formal education with
> this,
> > so I'm just kind of winging it.
> >
> > Thanks for the help!
> > ...aaron
> >
> > On 1/1/08, simonjpalmer <[EMAIL PROTECTED]> wrote:
> > >
> > > If you are strict about only referring to methods/properties through
> > > IUserModel and IChildUserModel and not the concrete classes then I
> > > don't see that you have any problems with your implementation and
> > > there's nothing inherently unsafe about it.
> > >
> > > You should probably check the type at runtime e.g...
> > > if (user is ChildUserModel1)
> > > if (user is IChildUserModel1)
> > >
> > > Everything in your class hierarchy is IUserModel. That doesn't make
> > > it redundant it means that you never have to refer to a concrete
> > > class, which is generally a good practice.
> > >
> > > However you do say that something starts off as a UserModel and
> > > becomes a ChildUserModel. I'm not sure how you can make that happen
> > > because an object gets strongly typed on creation using the new
> > > operator, so you can't switch from a class to a sub-class - but maybe
> > > I have just misunderstood what you meant.
> > >
> > > btw, I think that ChildUserModel1 implicitly implements IUserModel
> > > through extending UserModel, so you get that through inheritance which
> > > means your class declarations can be cleaned up a little. If you want
> > > to overrride the UserModel implementations of the IUserModel methods
> > > in your subclass you'll have to use the override keyword.
> > >
> > > hth
> > >
> > >
> > > --- In flexcoders@yahoogroups.com 
> > > ,
>
> "Aaron
> > > Miller"  wrote:
> > > >
> > > > Hello,
> > > >
> > > > I just wanted to make sure my logic was correct so I don't waste a
> > > bunch of
> > > > time typing up all this code to find out it doesn't work.
> > > >
> > > > With the given class structure:
> > > >
> > > > # UserModel implements IUserModel
> > > > # ChildUserModel1 extends UserModel implements IUserModel,
> > > IChildUserModel
> > > > # ChildUserModel2 extends UserModel implements IUserModel,
> > > IChildUserModel
> > > > # ChildUserModel3 extends UserModel implements IUserModel,
> > > IChildUserModel
> > > > etc.
> > > >
> > > > If I have a c

Re: [flexcoders] International date formatting

2008-01-02 Thread Vadim Melnik
>>> Flex 3 has runtime localization. <<<

Out of curiosity question about localization in Flex 3: 

Will Flex 3 runtime provide native built-in access to system defined locale 
settings like number, currency, date, time formats etc. (For example in Windows 
these settings specified in Control Panel | Regional and Language Options | 
Regional Options)?


>>>
Additionally our globalization team has been working on some exciting new 
formatters that we hope to see out there in a few weeks on Labs.  Stay tuned!
<<<

It's good news, can't wait to see it available on Labs...

--
Thanks,
Vadim.




  - Original Message - 
  From: Matt Chotin 
  To: flexcoders@yahoogroups.com 
  Sent: Thursday, December 13, 2007 6:44 PM
  Subject: RE: [flexcoders] International date formatting



  Additionally our globalization team has been working on some exciting new 
formatters that we hope to see out there in a few weeks on Labs.  Stay tuned!


  Matt


  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex 
Harui
  Sent: Thursday, December 13, 2007 7:47 AM
  To: flexcoders@yahoogroups.com
  Subject: RE: [flexcoders] International date formatting


  Flex 3 has runtime localization.



--

  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark 
Ingram
  Sent: Thursday, December 13, 2007 7:02 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] International date formatting


  Hi, is there any localisation support in Flex? I've got a date that I would 
like to format, but I don't want to just use the UK format - I would rather use 
a localised version so that when American customers use our product they see 
their date formats.


  Any clues?


  Mark






   

[flexcoders] Late formitem bining

2008-01-02 Thread markgoldin_2000
I am trying to bind a formitem using "late" binding in AS file:

import accidents.*;

accidentsModule = mainApp.moduleLoader.child;
accidentsModule.otherfilenumber.text = 
{accidentsModule.modelGeneral.otherfilenumber};

I am getting a compiler error:
1084: Syntax error: expecting colon before dot. 

accidents.mxml:
...
xmlns:moduleCode="accidents.ModuleCode.*"
...

...

package accidents.ModuleCode
{
public class accidentsGeneralModel
{
private var _otherfilenumber:int = 0;

[Bindable]
public var modelValid:Boolean = false;

[Bindable]
public function get otherfilenumber():int
{
trace("1");
return _otherfilenumber;
}

.


Is it really possible what I am trying to do?




RE: [flexcoders] Re: Custom Tooltips in UIComponent

2008-01-02 Thread Gordon Smith
Handle the toolTipCreate event and create whatever kind of tool tip you
want.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Wednesday, January 02, 2008 1:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Tooltips in UIComponent



I'm hooking up dynamic data to it. I also like to customize the
appearance of it(multiple rows, bold, maybe a background color change).

Is that enough info?

--- In flexcoders@yahoogroups.com 
, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> I don't understand. UIComponents already have a toolTip property. When
> it is set, a tool tip automatically appears when the mouse moves over
> that component and stays there for a little while.
> 
> Gordon Smith
> Adobe Flex SDK Team
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Nate Pearson
> Sent: Wednesday, January 02, 2008 1:37 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Custom Tooltips in UIComponent
> 
> 
> 
> I'm extending UIComponent to make some custom components.
> 
> I want to add a custom tooltip to it when someone mouse overs it.
> 
> I can't figure out how to do it...I might need to implement
> ToolTipManager and use controls.ToolTip but that seems like too much
> work. I wouldn't want to listen for every time the mouse moves for
> the tooltip to follow it.
> 
> What I would really like is a function like "dataTipFunction" that's
> on charts.
> 
> Thanks everyone,
> 
> Nate
>



 


[flexcoders] Re: Custom Tooltips in UIComponent

2008-01-02 Thread Nate Pearson
I'm hooking up dynamic data to it.  I also like to customize the
appearance of it(multiple rows, bold, maybe a background color change).

Is that enough info?

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> I don't understand. UIComponents already have a toolTip property. When
> it is set, a tool tip automatically appears when the mouse moves over
> that component and stays there for a little while.
>  
> Gordon Smith
> Adobe Flex SDK Team
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Nate Pearson
> Sent: Wednesday, January 02, 2008 1:37 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Custom Tooltips in UIComponent
> 
> 
> 
> I'm extending UIComponent to make some custom components.
> 
> I want to add a custom tooltip to it when someone mouse overs it.
> 
> I can't figure out how to do it...I might need to implement
> ToolTipManager and use controls.ToolTip but that seems like too much
> work. I wouldn't want to listen for every time the mouse moves for
> the tooltip to follow it.
> 
> What I would really like is a function like "dataTipFunction" that's
> on charts.
> 
> Thanks everyone,
> 
> Nate
>




RE: [flexcoders] Custom Tooltips in UIComponent

2008-01-02 Thread Gordon Smith
I don't understand. UIComponents already have a toolTip property. When
it is set, a tool tip automatically appears when the mouse moves over
that component and stays there for a little while.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Wednesday, January 02, 2008 1:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom Tooltips in UIComponent



I'm extending UIComponent to make some custom components.

I want to add a custom tooltip to it when someone mouse overs it.

I can't figure out how to do it...I might need to implement
ToolTipManager and use controls.ToolTip but that seems like too much
work. I wouldn't want to listen for every time the mouse moves for
the tooltip to follow it.

What I would really like is a function like "dataTipFunction" that's
on charts.

Thanks everyone,

Nate



 


[flexcoders] Custom Tooltips in UIComponent

2008-01-02 Thread Nate Pearson
I'm extending UIComponent to make some custom components.

I want to add a custom tooltip to it when someone mouse overs it.

I can't figure out how to do it...I might need to implement
ToolTipManager and use controls.ToolTip but that seems like too much
work.  I wouldn't want to listen for every time the mouse moves for
the tooltip to follow it.

What I would really like is a function like "dataTipFunction" that's
on charts.

Thanks everyone,

Nate



Re: [flexcoders] Re: BlazeDS and Java 5 Enum Support - works only one way?

2008-01-02 Thread James Ward
Hi Vijay,

Only mapping Strings to Enums is supported.  Can you file an enhancement
request?  http://bugs.adobe.com/flex

Let the list know the bug number so those interested can go vote for it.

-James


On Wed, 2007-12-19 at 19:05 -0800, moonusamy wrote:
> Unfortunately that doesn't work for me. I have an AS class
> corresponding to every Java class including enums. I want to be able
> to pass an instance of the AS class as the arg and have it translate
> to the appropriate Enum. 
> 
> So basically here's what I want to do:
> on the Java side:
> public enum Color {RED, GREEN}
> A method on a Java class Bar as follows:
> public void foo(Color c);
> 
> on the AS side:
> [RemoteClass(alias="Color")]
> public class ASColor implements IExternalizable
> {
> private var _value:String;
> 
> public function ASColor(val:String=null):void {
> this._value = val;
> }
> 
> public function get value():String {
> return this._value;
> }
> 
> public static const RED:String = "RED";
> public static const RED:String = "GREEN"; 
> 
> public function readExternal(input:IDataInput):void {
> this._value = input.readUTF();
> }
> 
> public function writeExternal(output:IDataOutput):void {
> output.writeUTF(this._value);
> }
> }
> 
> var c:ASColor = new ASColor(ASColor.RED);
> invoke foo(c) thru RemoteObject
> 
> Note: The enum implementation on the AS side is weak but that is just
> a limitation of AS3 not having an equivalent of readResolve(). 
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> >
> > If you have an Enum argument in a Java method, you need to send it a
> > String. During method invocation, BlazeDS will use
> > Enum.valueOf(desiredClass, yourStringValue) to create an enum on
> your
> > behalf.
> > 
> > 
> > -Original Message-
> > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of moonusamy
> > Sent: Wednesday, December 19, 2007 3:45 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] BlazeDS and Java 5 Enum Support - works only
> one
> > way?
> > 
> > 
> > If I have a Java method that returns an Enum, it seems to be
> serialized
> > ok as a String, but if I have a Java method that takes an Enum
> argument,
> > I get the same error I used to get before with LCDS 2.5.1:
> > 
> > faultDetail = "Types cannot be instantiated without a public, no
> > arguments constructor."
> > 
> > Java 5 Enums don't have public no-arg constructors.
> > 
> > Unless I am missing something, Enum support in BlazeDS works only
> one
> > way. Anyone hit this?
> > 
> > Vijay
> > 
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> 
> 
> 
> 
>  


[flexcoders] Re: Help with an error message

2008-01-02 Thread markgoldin_2000
O yes, that's right.
But I am using this 
http://www.adobe.com/devnet/flex/quickstart/defining_data_models/
and it does not have bindable for each getter. I think.


--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> You haven't made otherfilenumber bindable, so
> {modelGeneral.otherfilenumber} is causing this warning.
>  
> Gordon Smith
> Adobe Flex SDK Team
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of markgoldin_2000
> Sent: Wednesday, January 02, 2008 1:20 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Help with an error message
> 
> 
> 
> warning: unable to bind to property 'otherfilenumber' on 
> class 'accidents.ModuleCode::accidentsGeneralModel
> 
> How should I understand that?
> 
> my form:
> ...
> 
> ...
> 
>  text="{modelGeneral.otherfilenumber}" id="otherfilenumber" 
> width="72"/>
> 
> 
> package accidents.ModuleCode
> {
> public class accidentsGeneralModel
> {
> private var _otherfilenumber:int = 0;
> 
> [Bindable]
> public var modelValid:Boolean = false;
> 
> public function get otherfilenumber():int
> {
> return _otherfilenumber;
> }
> 
> ..
>




RE: [flexcoders] Help with an error message

2008-01-02 Thread Gordon Smith
You haven't made otherfilenumber bindable, so
{modelGeneral.otherfilenumber} is causing this warning.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Wednesday, January 02, 2008 1:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help with an error message



warning: unable to bind to property 'otherfilenumber' on 
class 'accidents.ModuleCode::accidentsGeneralModel

How should I understand that?

my form:
...

...




package accidents.ModuleCode
{
public class accidentsGeneralModel
{
private var _otherfilenumber:int = 0;

[Bindable]
public var modelValid:Boolean = false;

public function get otherfilenumber():int
{
return _otherfilenumber;
}

..



 


[flexcoders] Help with an error message

2008-01-02 Thread markgoldin_2000
warning: unable to bind to property 'otherfilenumber' on 
class 'accidents.ModuleCode::accidentsGeneralModel

How should I understand that?

my form:
...

...




package accidents.ModuleCode
{
public class accidentsGeneralModel
{
private var _otherfilenumber:int = 0;

[Bindable]
public var modelValid:Boolean = false;

public function get otherfilenumber():int
{
return _otherfilenumber;
}

..



RE: [flexcoders] setting mxml attributes in actionscript when those properties don't exist

2008-01-02 Thread Gordon Smith
> what would happen if you had an attribute the same name as a style and
the same name as an event
> and you tried to set this in the mxml?
 
I'm not sure what the compiler does in this case, but even if it allows
it we'd consider it bad practice because of the ambiguity.
 
> events and styles should automatically create getters/setters
 
This is an interesting idea, but it would increase the SWF size while
gaining relatively minor benefit (at least in my opinion).
 
> It just feels sort of hackish if you know what I mean.
 
You probably feel it's hackish because the syntax for setting
properties, styles, and events is the same in MXML but different in AS.
But the AS syntax is "real" in the sense of showing what is actually
happening at the level of the Player and framework APIs. The MXML syntax
is "sugar" due to the simplicity of using XML attributes to specify
three things which under the covers are really quite different. You're
advocating hiding these differences at the AS level as well, which I
think could cause more confusion than you're trying to solve.
 
I'd be interested to hear others' opinions on this.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Seth Caldwell
Sent: Friday, December 21, 2007 5:19 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] setting mxml attributes in actionscript when
those properties don't exist



Thanks Gordon. Can I ask what would happen if you had an attribute the
same name as a style and the same name as an event and you tried to set
this in the mxml? 

Or would this not be allowed? If its not allowed it seems like events
and styles should automatically create getters/setters of their variable
types on the classes so that you programmatically could do something
like component.someEventName = someFunctionName; instead of
component.addEventListener("foo",bar);  and the variable would be of
type EventListener, or something. /shrug

It just feels sort of hackish if you know what I mean.

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Friday, December 21, 2007 1:55 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] setting mxml attributes in actionscript when
those properties don't exist

Some MXML attributes specify properties, some specify styles, some
specify event handler bodies, and some specify effects. (And some, like
'id', get special handling.)

The programmatic way to set a property is

component.foo = bar;

The programmatic way to set a style or effect is

component.setStyle("foo", "bar");

The programmatic way to set an event handler is

component.addEventListener("foo", bar);

Gordon Smith

Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Seth Caldwell
Sent: Friday, December 21, 2007 11:25 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] setting mxml attributes in actionscript when
those properties don't exist

Well, I solved the problem by using
adgc.setStyle("headerStyleName","someStyle");  - however I'm still
confused as to how there are attributes you can specify in mxml that
can't be set programmatically.

I've encountered this elsewhere also - is it just a styles thing?

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Seth Caldwell
Sent: Friday, December 21, 2007 11:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] setting mxml attributes in actionscript when those
properties don't exist

For example, I'm wanting to set the headerStyleName on an
AdvancedDataGridColumn... which you can do with mxml:


However, when I try to do it with actionscript:

var adgc:AdvancedDataGridColumn = new AdvancedDataGridColumn();

adgc.headerStyleName = "someStyle";

I get the error that headerStyleName is not defined on
AdvancedDataGridColumn.

Huh?

Whats going on here, and how can I set it programmatically? 

Thanks,

Seth

 


Re: [flexcoders] Strange compiler error

2008-01-02 Thread Sheriff
are u trying to use namespaces or it usually means ur import statments are not 
at a package level or u have some variables at the pacakge


- Original Message 
From: Gordon Smith <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, January 2, 2008 2:44:55 PM
Subject: RE: [flexcoders] Strange compiler error

If you can repro this in a simple case, please file a bug at http://bugs. 
adobe.com/ flex.
 
Gordon Smith
Adobe Flex SDK Team




From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Mark Ingram
Sent: Wednesday, January 02, 2008 9:00 AM
To: [EMAIL PROTECTED] ups.com
Subject: RE: [flexcoders] Strange compiler error


I’ve managed to fix this (after much deleting and undoing and redoing). The 
problem was a missing “;” on one line. Strangely, the contents of the code had 
been copied from another file where it worked just fine. I have a feeling the 
line below this one was [Bindable]. But I’m not sure why that would make a 
difference.



From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Mark Ingram
Sent: 02 January 2008 15:59
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Strange compiler error
I’m getting this error:
“1046: Type was not found or was not a compile-time constant: .”
Note: It doesn’t give me a type at all. Sometimes when I jig around the import 
statements it gives me the error in the generated actionscript. But I’ve 
checked that and the error is usually on the last “}”.
Has anyone come across this before?
Mark



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


RE: [flexcoders] Strange compiler error

2008-01-02 Thread Gordon Smith
If you can repro this in a simple case, please file a bug at
http://bugs.adobe.com/flex.
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: Wednesday, January 02, 2008 9:00 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Strange compiler error



I've managed to fix this (after much deleting and undoing and redoing).
The problem was a missing ";" on one line. Strangely, the contents of
the code had been copied from another file where it worked just fine. I
have a feeling the line below this one was [Bindable]. But I'm not sure
why that would make a difference.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: 02 January 2008 15:59
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Strange compiler error

I'm getting this error:

"1046: Type was not found or was not a compile-time constant: ."

Note: It doesn't give me a type at all. Sometimes when I jig around the
import statements it gives me the error in the generated actionscript.
But I've checked that and the error is usually on the last "}".

Has anyone come across this before?

Mark

 


RE: [flexcoders] Cannot access a property or method of a null object reference

2008-01-02 Thread Gordon Smith
That's because when you simply declare
 
var test:testClass;
 
the variable 'test' is automatically assigned a default value of null.
 
The default value of a var depends on its type, as follows:
 
Boolean --> false
int/uint --> 0
Number --> NaN
Object --> undefined
All other types --> null
 
Gordon Smith
Adobe Flex SDK Team



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Christophe Herreman
Sent: Tuesday, January 01, 2008 12:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Cannot access a property or method of a null
object reference



Hi,

you need to create an instance of the testClass like this

var test:testClass = new testClass();

regards,
Christophe

--
Christophe Herreman
http://www.herrodius.com  
http://www.pranaframework.com  


2008/1/1, [EMAIL PROTECTED]   < [EMAIL PROTECTED]
 >: 


This compiles but when you hit the test button, it says

TypeError: Error #1009: Cannot access a property or method of a
null 
object reference.
at Main/test()
at Main/__b1_click()

Can anyone explain what this means ? It totally does not make
any sense 
to me.

>>main.mxml:


http://www.adobe.com/2006/mxml
 ">





>>MainCode.as:
Public function test():void
{ 
var test:testClass;
test.justtesting();

}

>>testClass.as:
package {
public class testClass {
public function testClass() {

}
public function justtesting():void {
trace("just testing");
}
}

}







-- 
Christophe Herreman
http://www.herrodius.com  
http://www.pranaframework.org   

 


[flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread j_lentzz
Will do from now on.  Thanks again Alex.

John
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> My rule is: don't use Bindable unless you absolutely need it.  It adds
> overhead to your application.  You'll get warning if you try to bind to
> something that isn't bindable and then you can decide how to deal with
> it.
> 
>  
> 
> I use [Bindable] in prototypes, but I would use it more sparingly in
> real apps.  In the framework, we always use [Bindable(event=...)] so we
> have full control over all the code.  If you did that, then you have to
> write more code, but you can fully see what is running and opt-in to
> having change detection or not.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of j_lentzz
> Sent: Wednesday, January 02, 2008 11:02 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Datagrid Renderer not showing updated
> ArrayCollection
> 
>  
> 
> Thank You! That fixed it. Are there 'rules' to follow about when/if
> things need to be bindable? I've been using the [Bindable] tag pretty
> often. Should I not use it until it seems like something is not working?
> 
> Thanks again,
> 
> John
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > Try removing [Bindable] from the data setter. I don't see where you
> are
> > using it, and it autogenerates change detection logic that may prevent
> > your setter from running since the comparision is done by reference
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of j_lentzz
> > Sent: Wednesday, January 02, 2008 10:44 AM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] Re: Datagrid Renderer not showing updated
> > ArrayCollection
> > 
> > 
> > 
> > Here is the code for the renderer. I extend Label and add a
> > dataProvider to make it act like a combobox, so that I can specify an
> > index to show. That way it doesn't look like a combobox when it
> > renders. I'm not doing anything special to look for a change, just
> > implementing what I thought was necessary.
> > 
> > public class LabelWithDownArrow extends Label
> > {
> > 
> > private var _dataProvider:ArrayCollection = null;
> > 
> > private var _prompt:String = null;
> > private var defaultPrompt:String = "Select Item...";
> > private var _selectedIndex:int = -1;
> > 
> > public function LabelWithDownArrow()
> > {
> > super();
> > }
> > 
> > public function set dataProvider(value:ArrayCollection):void {
> > _dataProvider = value;
> > }
> > 
> > public function get dataProvider():ArrayCollection {
> > return _dataProvider;
> > }
> > 
> > public function set selectedIndex(value:int):void {
> > _selectedIndex = value;
> > }
> > 
> > public function get selectedIndex():int {
> > return _selectedIndex;
> > }
> > 
> > public function set prompt(value:String):void {
> > _prompt = value;
> > }
> > 
> > public function get prompt():String {
> > return _prompt;
> > }
> > 
> > override protected function updateDisplayList(w:Number, h:Number):void
> {
> > super.updateDisplayList(w-15, h); // subtract from width to allow
> > for down arrow
> > 
> > var g:Graphics = graphics;
> > 
> > g.clear();
> > 
> > // add arrow to box
> > // Draw the triangle.
> > g.beginFill(0x00); // black
> > g.moveTo(w - 11.5, h / 2 + 3);
> > g.lineTo(w - 15, h / 2 - 2);
> > g.lineTo(w - 8, h / 2 - 2);
> > g.lineTo(w - 11.5, h / 2 + 3);
> > g.endFill();
> > }
> > 
> > // method used to change what is displayed
> > [Bindable]
> > override public function set data(value:Object):void {
> > super.data = value;
> > 
> > if (listData != null && dataProvider != null) { 
> > 
> > // now iterate through dp to find a matching data value, when
> > found put its label in the Label widget 
> > var dpLen:int = dataProvider.length;
> > for (var j:int=0; j > if (dataProvider.getItemAt(j).data ==
> > data[DataGridListData(listData).dataField]) { // found match
> > this.text = dataProvider.getItemAt(j).label; // + " " +
> > dp.getItemAt(j).data;
> > trace('found LabelWithDownArrow');
> > return;
> > }
> > }
> > 
> > // not found, so show comboBox prompt
> > if (prompt == null || prompt == "-1" || selectedIndex == -1)
> > this.text = defaultPrompt;
> > else if (selectedIndex < dataProvider.length)
> > this.text = dataProvider.getItemAt(selectedIndex).label;
> > else
> > this.text = "";
> > 
> > trace('not found LabelWithDownArrow');
> > }
> > }
> > 
> > }
> > 
> > --- In flexcoders@yahoogroups.com
> 
> 
> > , "Alex Harui"  wrote:
> > >
> > > What does the renderer look like? How will it detect changes to the
> > > underlying data?
> > > 
> > > 
> > > 
> > > 

[flexcoders] Re: Creating tooltip for datagrid column header(s)?

2008-01-02 Thread candysmate
--- In flexcoders@yahoogroups.com, "chuyler1" <[EMAIL PROTECTED]> wrote:
>
> Try defining the component in-line instead. You also don't want to use
> the ToolTip component because you still need to display the header
> text.  Instead, just use a Label component and set the toolTip string
> for the label like so...
> 
>width="26"
>   textAlign="center"
>   editable="false">
>   
> 
>   
> 
>   
>   
> 
>click="outerDocument.moveToActive();">
>source="@Embed('/images/backwardicon.png')" 
>   toolTip="Click to make 'Active'" >
> 
>   
> 
>   
> 
>

Many thanks for that.



[flexcoders] Re: tileList displaying items order other than that represented by dataProvider

2008-01-02 Thread Alex
If I alter the code as follows:

  public function get thumbLabel(): String {
  return data.name;

to 

  [Bindable]
  public function get thumbLabel(): String {
  return data.name;

I get the following compiler warning:

  [Bindable] on read-only getter is unnecessary and will be ignored.

Ignoring the warning and running anyway exhibits the same (incorrect)
behavior.

FYI: the name of the data item has not changed, the data is itself
static. Only the sort order has changed. Something seems to not be
being reset to cause the tileLists's renderer to pick up the change in
order in all cases; some icons are in the right order, others are not.



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I don't see any [Bindable] metadata, so I would expect you  to get
> warnings in the console about binding to thumbLabel and the renderer
> won't know that data.name changed.
> 
>  
> 
>  
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Alex
> Sent: Wednesday, January 02, 2008 5:49 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: tileList displaying items order other than
> that represented by dataProvider
> 
>  
> 
> Posted a response to another responder in the thread...
> 
> I have vastly simplified the application source to focus on the
> problem and what I find is that my itemRenderer for the tileList view
> if coded as follows works showing the expected sort in both views:
> 
> 
> 
> If coded as follows (as I want, so that I can override the renderer
> and provide a different attribute other than 'name' for a label) the
> issue with incorrect sorting in tileList view arises:
> 
> 
> 
> where the following is also defined
> 
> /**
> * Retrieve the label to be used for the thumbnail
> * associated with each data item. This method may
> * be overridden in a derived class to customize
> * the icon label associated with the thumbnail
> * for each data item.
> */
> public function get thumbLabel(): String {
> return data.name;
> }
> 
> Is there a solution which will allow me to provide the string to be
> displayed via a function? The intent is to be able to override the
> thumbLabel function in an itemRenderer derived from this 'base'
> itemRenderer class for cases where the dataset displayed uses an
> attribute named other than 'name', for example an override might
> simply return data.title or even conditionalize the string returned
> based on other data attributes.
> 
> As I suggested the source for this entire simplified application is
> now something that I could provide as I've boiled it down
> substantially. The above issue is however the crux of the problem in
> both the simplified sample and the original application.
> 
> Thanks for your continued assistance.
> Alex M
> 
> PS: The tileList is defined as follows
> 
>  itemRenderer="components.CEMDataviewThumbGeneratorIcon"
> left="0" right="0" top="0" bottom="0" />
> 
> The CEMDataviewThumbGeneratorIcon as follows
> 
> http://www.adobe.com/2006/mxml
>  ">
> 
> 
> 
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > Are you using a custom renderer? Sounds like it doesn't know how to be
> > recycled. More about renderer recycling on my blog
> > (blogs.adobe.com/aharui)
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of Alex
> > Sent: Friday, December 21, 2007 2:11 PM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] tileList displaying items order other than that
> > represented by dataProvider
> > 
> > 
> > 
> > I have a problem with a viewStack that has 2 views, a dataGrid and a
> > tileList view both of which which share a common dataProvider.
> > 
> > - The tileList uses an itemRenderer to draw an icon/name for each
> item.
> > - The datagrid affords the ability to sort the displayed items by
> > clicking on the column headers.
> > 
> > The initial display of both views is as expected, the sort order in
> > the tileList view matches that of the items in the dataGrid view.
> > 
> > A "trace" of the data items in the dataProvider invoked whenever I
> > switch between views [via trace(datagrid.dataProvider) and
> > trace(tilelist.dataProvider)] both show the items in the list in the
> > order expected regardless of how many times I switch views back and
> > forth.
> > 
> > The items (a ListCollectionView of items of type "Foo") listed by the
> > trace as expected reflect the format of the "toString" function in the
> > Foo class.
> > 
> > Now the problem...
> > 
> > 1) When I click a header in the dataGrid view to re-sort the data
> > subsequent trace output of the dataProvider's list of objects changes
> > to another format:
> > 

[flexcoders] Re: Creating tooltip for datagrid column header(s)?

2008-01-02 Thread chuyler1
Try defining the component in-line instead. You also don't want to use
the ToolTip component because you still need to display the header
text.  Instead, just use a Label component and set the toolTip string
for the label like so...


  

  

  
  

  


  

  




RE: [flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread Alex Harui
My rule is: don't use Bindable unless you absolutely need it.  It adds
overhead to your application.  You'll get warning if you try to bind to
something that isn't bindable and then you can decide how to deal with
it.

 

I use [Bindable] in prototypes, but I would use it more sparingly in
real apps.  In the framework, we always use [Bindable(event=...)] so we
have full control over all the code.  If you did that, then you have to
write more code, but you can fully see what is running and opt-in to
having change detection or not.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of j_lentzz
Sent: Wednesday, January 02, 2008 11:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Datagrid Renderer not showing updated
ArrayCollection

 

Thank You! That fixed it. Are there 'rules' to follow about when/if
things need to be bindable? I've been using the [Bindable] tag pretty
often. Should I not use it until it seems like something is not working?

Thanks again,

John
--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Try removing [Bindable] from the data setter. I don't see where you
are
> using it, and it autogenerates change detection logic that may prevent
> your setter from running since the comparision is done by reference
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of j_lentzz
> Sent: Wednesday, January 02, 2008 10:44 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Datagrid Renderer not showing updated
> ArrayCollection
> 
> 
> 
> Here is the code for the renderer. I extend Label and add a
> dataProvider to make it act like a combobox, so that I can specify an
> index to show. That way it doesn't look like a combobox when it
> renders. I'm not doing anything special to look for a change, just
> implementing what I thought was necessary.
> 
> public class LabelWithDownArrow extends Label
> {
> 
> private var _dataProvider:ArrayCollection = null;
> 
> private var _prompt:String = null;
> private var defaultPrompt:String = "Select Item...";
> private var _selectedIndex:int = -1;
> 
> public function LabelWithDownArrow()
> {
> super();
> }
> 
> public function set dataProvider(value:ArrayCollection):void {
> _dataProvider = value;
> }
> 
> public function get dataProvider():ArrayCollection {
> return _dataProvider;
> }
> 
> public function set selectedIndex(value:int):void {
> _selectedIndex = value;
> }
> 
> public function get selectedIndex():int {
> return _selectedIndex;
> }
> 
> public function set prompt(value:String):void {
> _prompt = value;
> }
> 
> public function get prompt():String {
> return _prompt;
> }
> 
> override protected function updateDisplayList(w:Number, h:Number):void
{
> super.updateDisplayList(w-15, h); // subtract from width to allow
> for down arrow
> 
> var g:Graphics = graphics;
> 
> g.clear();
> 
> // add arrow to box
> // Draw the triangle.
> g.beginFill(0x00); // black
> g.moveTo(w - 11.5, h / 2 + 3);
> g.lineTo(w - 15, h / 2 - 2);
> g.lineTo(w - 8, h / 2 - 2);
> g.lineTo(w - 11.5, h / 2 + 3);
> g.endFill();
> }
> 
> // method used to change what is displayed
> [Bindable]
> override public function set data(value:Object):void {
> super.data = value;
> 
> if (listData != null && dataProvider != null) { 
> 
> // now iterate through dp to find a matching data value, when
> found put its label in the Label widget 
> var dpLen:int = dataProvider.length;
> for (var j:int=0; j if (dataProvider.getItemAt(j).data ==
> data[DataGridListData(listData).dataField]) { // found match
> this.text = dataProvider.getItemAt(j).label; // + " " +
> dp.getItemAt(j).data;
> trace('found LabelWithDownArrow');
> return;
> }
> }
> 
> // not found, so show comboBox prompt
> if (prompt == null || prompt == "-1" || selectedIndex == -1)
> this.text = defaultPrompt;
> else if (selectedIndex < dataProvider.length)
> this.text = dataProvider.getItemAt(selectedIndex).label;
> else
> this.text = "";
> 
> trace('not found LabelWithDownArrow');
> }
> }
> 
> }
> 
> --- In flexcoders@yahoogroups.com


> , "Alex Harui"  wrote:
> >
> > What does the renderer look like? How will it detect changes to the
> > underlying data?
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com


> [mailto:flexcoders@yahoogroups.com


> ] On
> > Behalf Of j_lentzz
> > Sent: Wednesday, January 02, 2008 7:21 AM
> > To: flexcoders@yahoogroups.com 
 
> > Subje

Re: [flexcoders] Re: Tab Navigator : how to set corner Radius to only the left-right bottom?

2008-01-02 Thread Yochikoh Haruomi
Thank you so much  Juan. This is exactly what I'm looking for.
At first, I faked it by creating a rectangular background underneath the 
unwanted top rounded corner and painted it the same color as the container. But 
your solution is much more effective.

Thank again!
-Kt

scalenine <[EMAIL PROTECTED]> wrote:   You may need 
to "fake it" by using the child container to overlap the
 top rounded corners by adjusting paddingTop of the TabNavigator, like
 this:
 
 
 http://www.adobe.com/2006/mxml";
 layout="absolute">
  
   
   
  
 
 
 Depending on what you're trying to do, this may/may not be the
 solution you're looking for.
 
 Juan Sanchez
 
 scalenine.com // Degrafa Beta Now Available : http://www.degrafa.com
 
 --- In flexcoders@yahoogroups.com, "thebeginnersmind"
 <[EMAIL PROTECTED]> wrote:
 >
 > Hi list,
 > 
 > Does anyone know if there is a way to set cornerRadius of Tab
 > Navigator to only bottom left and bottom right corners ? ( when I use
 > the below code , the cornerRadius applies to all 4 corners)
 > 
 > // css file
 > TabNavigator {
 > 
 > cornerRadius: 10;
 > 
 > }
 > 
 > Thanks!
 > -Kt
 >
 
 
 
   

   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

Re: [flexcoders] Re: Tab Navigator : how to set corner Radius to only the left-right bottom?

2008-01-02 Thread Yochikoh Haruomi
Thank you so much  Juan. This is exactly what I'm looking for.
At first, I faked it by creating a rectangular background underneath the 
unwanted top rounded corner and painted it the same color as the container. But 
your solution is much more effective.

Thank again!
-Kt

scalenine <[EMAIL PROTECTED]> wrote:   You may need 
to "fake it" by using the child container to overlap the
 top rounded corners by adjusting paddingTop of the TabNavigator, like
 this:
 
 
 http://www.adobe.com/2006/mxml";
 layout="absolute">
  
   
   
  
 
 
 Depending on what you're trying to do, this may/may not be the
 solution you're looking for.
 
 Juan Sanchez
 
 scalenine.com // Degrafa Beta Now Available : http://www.degrafa.com
 
 --- In flexcoders@yahoogroups.com, "thebeginnersmind"
 <[EMAIL PROTECTED]> wrote:
 >
 > Hi list,
 > 
 > Does anyone know if there is a way to set cornerRadius of Tab
 > Navigator to only bottom left and bottom right corners ? ( when I use
 > the below code , the cornerRadius applies to all 4 corners)
 > 
 > // css file
 > TabNavigator {
 > 
 > cornerRadius: 10;
 > 
 > }
 > 
 > Thanks!
 > -Kt
 >
 
 
 
   

   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

Re: [flexcoders] Re: Autocomplete from the browser in a login username field

2008-01-02 Thread Ralf Bokelberg
Would be nice though.
Maybe you can add a enhancement request to the bugbase.

Cheers
Ralf.

On Jan 2, 2008 7:00 PM, iilsley <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> I dont believe its possible to use the 'browsers' autofill ..
>
> However you could potentially implement your own 'application' specific
> 'autofill' like behavior
> with 'Shared Objects' ..
>
> http://learn.adobe.com/wiki/display/Flex/Shared+Objects
>
>
>
>
> --- In flexcoders@yahoogroups.com, "simonjpalmer" <[EMAIL PROTECTED]> wrote:
> >
> > I have a form I use for login into which my users type their username
> > and password. Does anyone know of a way of using the browser autofill
> > to populate form text fields?
> >
>  



-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany


[flexcoders] Re: displaying the results of a UNION query in Flex DataGrid

2008-01-02 Thread Abyss Knight
Data is data, I would presume it'd just work. It all depends on how
you want to display it in the grid and how you set up the AS/MXML.

-- William

--- In flexcoders@yahoogroups.com, Mr Greg Murnock <[EMAIL PROTECTED]> wrote:
>
> Can this be done in a Flex 2 DataGrid?  anything I need to be aware
of?  Currently returning results via Remote Object as an Array from CF.
> 
> Thanks,
>  
> Greg
> 
> 
>  

> Never miss a thing.  Make Yahoo your home page. 
> http://www.yahoo.com/r/hs
>




Re: [flexcoders] Re: Unwanted arguement?

2008-01-02 Thread Ralf Bokelberg
Sometimes i use the following code to make clear
that i'm not using the arguments

private function staffGridFocus( ... ignore ):void

Cheers
Ralf.


RE: [flexcoders] Re: Two way binding

2008-01-02 Thread mark goldin
But where is the Binding mechanism taking place? What exactly do we bind? What 
is the most "bindable" solution?

Tracy Spratt <[EMAIL PROTECTED]> wrote:  A few problems:
  When you assign the result from the server to the xml model, it will 
overwrite the entire xml.  So you can’t bind the form elements to the dynamic 
model using binding braces.  I don’t think.  You might test that though.
  
  Then, selecting an item in a ComboBox does not automatically save the 
selectedItem to anything.  You will either need to manually update the 
appropriate xml element or attribute in a change handler function on the Combo, 
or as Douglas K. suggested, you can try using the Binding tag.  But since you 
are replacing the model with data from the server, I don’t think that will work.
  
  I’d go with a straight update of the xml from change event handlers.
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
markgoldin_2000
Sent: Wednesday, January 02, 2008 1:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding

  
Just conceptually:

Model:

http://www.adobe.com/2006/mxml";>


{dateofaccident.text}


{otherrailroadinvolved.selectedItem.data}
{dateofaccident.text}


{dateofaccident.selectedItem.data}




Form:

xmlns:moduleCode="accidents.ModuleCode.*"
.













.
data assignment:
accidentsGeneral = event.result as XML;

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> I can't understand what you have from your description. Post the
> relevant code snippets.
> 
> Tracy
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mark goldin
> Sent: Wednesday, January 02, 2008 1:34 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Re: Two way binding
> 
> 
> 
> Alright. Is the following correct: 
> 
> Inside of a model I have it nodes bound to form items. In the form I
> have it items bound to model's nodes, and xmlmodelvar = 
event.result as
> XML will pull data into the model as well as show int in the form's
> controls?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
> The simplest is to declare an instance variable typed as XML:
> 
> var _xmlEmployee:XML;
> 
> Then assign the event.result as XML in a result handler:
> 
> _xmlEmployee = event.result as XML;
> 
> If you want to use the declarative style, do:
> 
> 
> 
> And in the result handler, do:
> 
> xmlEmployee = event.result as XML;
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000
> Sent: Wednesday, January 02, 2008 12:59 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Two way binding
> 
> Are you talking about something like this:
> 
> 
> http://www.adobe.com/2006/mxml
>  ">
> 
> 
> 
> {firstName.text}
> {lastName.text}
> 
> {department.text}
> {email.text}
> 
> 
> 
> 
> 
> 
> 
> 
> If it is then how do I let data from the server into this 
model?
> 
> --- In flexcoders@yahoogroups.com
>  , "Tracy Spratt" 
> wrote:
> >
> > But don't use mx:Model, that creates the nested dynamic 
object
> 
> structure
> > I mentioned.
> > 
> > 
> > 
> > Use mx:XML, or use an instance variable typed as XML, and
> assign it 
> in a
> > result handler.
> > 
> > 
> > 
> > Tracy
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
>  
> [mailto:flexcoders@yahoogroups.com
>  ] On
> > Behalf Of mark goldin
> > Sent: Monday, December 31, 2007 1:18 PM
> > To: flexcoders@yahoogroups.com
>  
> > Subject: RE: [flexcoders] Two way binding
> > 
> > 
> > 
> > Let me make sure I understand.
> > 
> > You are talking about something like this:
> > 
> > 
> > 
> > 
> > 
> > http://www.adobe.com/2006/mxml
>  "
> > layout="absolute">
> > 
> >  
> > 
> > where httpmodelsource returns the following xml:
> > 
> > 
> > 
> > 
> > 
> > John Doe
> > 555-777-66555
> > jdoe@
> > true
> > 
> > 
> > Jane Doe
> > 555-777-66555
> > jndoe@
> > true
> > 
> > 
> > 
> > 
> > 
> > Tracy Spratt  wrote:
> > 
> > Simplicity. Less code. Maintainability. Standardization, 
> well
> > known API. 
> > 
> > Note that in the scenario I describe, the simplicity 
produces 
> a
> > dependency between the client data model and the data
> transport. If
> > someone changes the XML you are consuming, you will have to
> change 
> the
> > code. For some this is unacceptable and they require level 
of
> > abstraction between the transport and the model. It is just 
up
> to 
> your
> > particular requirements.
> > 
> > Tracy
> > 
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
> 

RE: [flexcoders] Re: Two way binding

2008-01-02 Thread Tracy Spratt
A few problems:

When you assign the result from the server to the xml model, it will
overwrite the entire xml.  So you can't bind the form elements to the
dynamic model using binding braces.  I don't think.  You might test that
though.

 

Then, selecting an item in a ComboBox does not automatically save the
selectedItem to anything.  You will either need to manually update the
appropriate xml element or attribute in a change handler function on the
Combo, or as Douglas K. suggested, you can try using the Binding tag.
But since you are replacing the model with data from the server, I don't
think that will work.

 

I'd go with a straight update of the xml from change event handlers.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Wednesday, January 02, 2008 1:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding

 

Just conceptually:

Model:

http://www.adobe.com/2006/mxml
 ">


{dateofaccident.text}


{otherrailroadinvolved.selectedItem.data}
{dateofaccident.text}


{dateofaccident.selectedItem.data}




Form:
...
xmlns:moduleCode="accidents.ModuleCode.*"















data assignment:
accidentsGeneral = event.result as XML;

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> I can't understand what you have from your description. Post the
> relevant code snippets.
> 
> Tracy
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of mark goldin
> Sent: Wednesday, January 02, 2008 1:34 PM
> To: flexcoders@yahoogroups.com  
> Subject: RE: [flexcoders] Re: Two way binding
> 
> 
> 
> Alright. Is the following correct: 
> 
> Inside of a model I have it nodes bound to form items. In the form I
> have it items bound to model's nodes, and xmlmodelvar = 
event.result as
> XML will pull data into the model as well as show int in the form's
> controls?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
> The simplest is to declare an instance variable typed as XML:
> 
> var _xmlEmployee:XML;
> 
> Then assign the event.result as XML in a result handler:
> 
> _xmlEmployee = event.result as XML;
> 
> If you want to use the declarative style, do:
> 
> 
> 
> And in the result handler, do:
> 
> xmlEmployee = event.result as XML;
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

> [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of markgoldin_2000
> Sent: Wednesday, January 02, 2008 12:59 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Two way binding
> 
> Are you talking about something like this:
> 
> 
> http://www.adobe.com/2006/mxml
 
>  > ">
> 
> 
> 
> {firstName.text}
> {lastName.text}
> 
> {department.text}
> {email.text}
> 
> 
> 
> 
> 
> 
> 
> 
> If it is then how do I let data from the server into this 
model?
> 
> --- In flexcoders@yahoogroups.com
 
>  , "Tracy Spratt" 
> wrote:
> >
> > But don't use mx:Model, that creates the nested dynamic 
object
> 
> structure
> > I mentioned.
> > 
> > 
> > 
> > Use mx:XML, or use an instance variable typed as XML, and
> assign it 
> in a
> > result handler.
> > 
> > 
> > 
> > Tracy
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
 
>  
> [mailto:flexcoders@yahoogroups.com
 
>  ] On
> > Behalf Of mark goldin
> > Sent: Monday, December 31, 2007 1:18 PM
> > To: flexcoders@yahoogroups.com 

>  
> > Subject: RE: [flexcoders] Two way binding
> > 
> > 
> > 
> > Let me make sure I understand.
> > 
> > You are talking about something like this:
> > 
> > 
> > 
> > 
> > 
> > http://www.adobe.com/2006/mxml
 
>  > "
> > layout="absolute">
> > 
> >  
> > 
> > where httpmodelsource returns the following xml:
> > 
> > 
> > 
> > 
> > 
> > John Doe
> > 555-777-66555
> > jdoe@
> > true
> > 
> > 
> > Jane Doe
> > 555-777-66555
> > jndoe@
> > true
> > 
> > 
> > 
> > 
> > 
> > Tracy Spratt  wrote:
> > 
> > Simplicity. Less code. Maintainability. Standardization, 
> well
> > known API. 
> > 
> > Note that in the scenario I describe, the simplicity 
produces 
> a
> > dependency between the client data m

RE: [flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread Alex Harui
Try removing [Bindable] from the data setter.  I don't see where you are
using it, and it autogenerates change detection logic that may prevent
your setter from running since the comparision is done by reference

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of j_lentzz
Sent: Wednesday, January 02, 2008 10:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Datagrid Renderer not showing updated
ArrayCollection

 

Here is the code for the renderer. I extend Label and add a
dataProvider to make it act like a combobox, so that I can specify an
index to show. That way it doesn't look like a combobox when it
renders. I'm not doing anything special to look for a change, just
implementing what I thought was necessary.

public class LabelWithDownArrow extends Label
{

private var _dataProvider:ArrayCollection = null;

private var _prompt:String = null;
private var defaultPrompt:String = "Select Item...";
private var _selectedIndex:int = -1;

public function LabelWithDownArrow()
{
super();
}

public function set dataProvider(value:ArrayCollection):void {
_dataProvider = value;
}

public function get dataProvider():ArrayCollection {
return _dataProvider;
}

public function set selectedIndex(value:int):void {
_selectedIndex = value;
}

public function get selectedIndex():int {
return _selectedIndex;
}

public function set prompt(value:String):void {
_prompt = value;
}

public function get prompt():String {
return _prompt;
}

override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w-15, h); // subtract from width to allow
for down arrow

var g:Graphics = graphics;

g.clear();

// add arrow to box
// Draw the triangle.
g.beginFill(0x00); // black
g.moveTo(w - 11.5, h / 2 + 3);
g.lineTo(w - 15, h / 2 - 2);
g.lineTo(w - 8, h / 2 - 2);
g.lineTo(w - 11.5, h / 2 + 3);
g.endFill();
}

// method used to change what is displayed
[Bindable]
override public function set data(value:Object):void {
super.data = value;

if (listData != null && dataProvider != null) { 

// now iterate through dp to find a matching data value, when
found put its label in the Label widget 
var dpLen:int = dataProvider.length;
for (var j:int=0; jmailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> What does the renderer look like? How will it detect changes to the
> underlying data?
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of j_lentzz
> Sent: Wednesday, January 02, 2008 7:21 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Datagrid Renderer not showing updated
> ArrayCollection
> 
> 
> 
> Hi,
> 
> I've got a datagrid with a custom renderer. I'm not editing in the
> datagrid, but when a row is selected, I populate some TextInputs and
> ComboBoxes to let them edit the data. When they are done, I use
> itemUpdated on the datagrid ArrayCollection. This seems to work just
> fine. However, after they edit the data, it isn't being updated in
> the datagrid. I can select a different row, then select the original
> row and the new data appears in the edit locations, but only the old
> data is displayed in the datagrid. I've tried all the invalidateXXX
> methods I could find, but nothing seems to get the datagrid do display
> the new data. Also, I can set a breakpoint, examine the
> arraycollection the datagrid uses, and the correct data is present -
> just not being displayed. What do I need to do to get the datagrid to
> be forced to used the arraycollection and update all the
> itemrenderers? I'm using 2.01, would Flex 3 be better?
> 
> Thanks,
> 
> John
>

 



[flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread j_lentzz
Thank You!  That fixed it.  Are there 'rules' to follow about when/if
things need to be bindable?  I've been using the [Bindable] tag pretty
often.  Should I not use it until it seems like something is not working?

Thanks again,

John
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Try removing [Bindable] from the data setter.  I don't see where you are
> using it, and it autogenerates change detection logic that may prevent
> your setter from running since the comparision is done by reference
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of j_lentzz
> Sent: Wednesday, January 02, 2008 10:44 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Datagrid Renderer not showing updated
> ArrayCollection
> 
>  
> 
> Here is the code for the renderer. I extend Label and add a
> dataProvider to make it act like a combobox, so that I can specify an
> index to show. That way it doesn't look like a combobox when it
> renders. I'm not doing anything special to look for a change, just
> implementing what I thought was necessary.
> 
> public class LabelWithDownArrow extends Label
> {
> 
> private var _dataProvider:ArrayCollection = null;
> 
> private var _prompt:String = null;
> private var defaultPrompt:String = "Select Item...";
> private var _selectedIndex:int = -1;
> 
> public function LabelWithDownArrow()
> {
> super();
> }
> 
> public function set dataProvider(value:ArrayCollection):void {
> _dataProvider = value;
> }
> 
> public function get dataProvider():ArrayCollection {
> return _dataProvider;
> }
> 
> public function set selectedIndex(value:int):void {
> _selectedIndex = value;
> }
> 
> public function get selectedIndex():int {
> return _selectedIndex;
> }
> 
> public function set prompt(value:String):void {
> _prompt = value;
> }
> 
> public function get prompt():String {
> return _prompt;
> }
> 
> override protected function updateDisplayList(w:Number, h:Number):void {
> super.updateDisplayList(w-15, h); // subtract from width to allow
> for down arrow
> 
> var g:Graphics = graphics;
> 
> g.clear();
> 
> // add arrow to box
> // Draw the triangle.
> g.beginFill(0x00); // black
> g.moveTo(w - 11.5, h / 2 + 3);
> g.lineTo(w - 15, h / 2 - 2);
> g.lineTo(w - 8, h / 2 - 2);
> g.lineTo(w - 11.5, h / 2 + 3);
> g.endFill();
> }
> 
> // method used to change what is displayed
> [Bindable]
> override public function set data(value:Object):void {
> super.data = value;
> 
> if (listData != null && dataProvider != null) { 
> 
> // now iterate through dp to find a matching data value, when
> found put its label in the Label widget 
> var dpLen:int = dataProvider.length;
> for (var j:int=0; j if (dataProvider.getItemAt(j).data ==
> data[DataGridListData(listData).dataField]) { // found match
> this.text = dataProvider.getItemAt(j).label; // + " " +
> dp.getItemAt(j).data;
> trace('found LabelWithDownArrow');
> return;
> }
> }
> 
> // not found, so show comboBox prompt
> if (prompt == null || prompt == "-1" || selectedIndex == -1)
> this.text = defaultPrompt;
> else if (selectedIndex < dataProvider.length)
> this.text = dataProvider.getItemAt(selectedIndex).label;
> else
> this.text = "";
> 
> trace('not found LabelWithDownArrow');
> }
> }
> 
> }
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > What does the renderer look like? How will it detect changes to the
> > underlying data?
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of j_lentzz
> > Sent: Wednesday, January 02, 2008 7:21 AM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] Datagrid Renderer not showing updated
> > ArrayCollection
> > 
> > 
> > 
> > Hi,
> > 
> > I've got a datagrid with a custom renderer. I'm not editing in the
> > datagrid, but when a row is selected, I populate some TextInputs and
> > ComboBoxes to let them edit the data. When they are done, I use
> > itemUpdated on the datagrid ArrayCollection. This seems to work just
> > fine. However, after they edit the data, it isn't being updated in
> > the datagrid. I can select a different row, then select the original
> > row and the new data appears in the edit locations, but only the old
> > data is displayed in the datagrid. I've tried all the invalidateXXX
> > methods I could find, but nothing seems to get the datagrid do display
> > the new data. Also, I can set a breakpoint, examine the
> > arraycollection the datagrid uses, and the correct data is present -
> > just not being displayed. What do I need to do to get the datagrid to
> > be forced to used the arraycollection and update all the
> > itemrenderers? I'm using 2.01, would Flex 3 be better?
> > 
> > Thanks,
> > 
> > John
> >
>




[flexcoders] Re: Two way binding

2008-01-02 Thread markgoldin_2000
Just conceptually:

Model:

http://www.adobe.com/2006/mxml";>


{dateofaccident.text}


{otherrailroadinvolved.selectedItem.data}
{dateofaccident.text}


{dateofaccident.selectedItem.data}




Form:
...
xmlns:moduleCode="accidents.ModuleCode.*"















data assignment:
accidentsGeneral = event.result as XML;


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> I can't understand what you have from your description.  Post the
> relevant code snippets.
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mark goldin
> Sent: Wednesday, January 02, 2008 1:34 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Re: Two way binding
> 
>  
> 
> Alright. Is the following correct: 
> 
> Inside of a model I have it nodes bound to form items. In the form I
> have it items bound to model's nodes, and xmlmodelvar = 
event.result as
> XML will pull data into the model as well as show int in the form's
> controls?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
>   The simplest is to declare an instance variable typed as XML:
> 
>   var _xmlEmployee:XML;
> 
>   Then assign the event.result as XML in a result handler:
> 
>   _xmlEmployee = event.result as XML;
> 
>   If you want to use the declarative style, do:
> 
>   
> 
>   And in the result handler, do:
> 
>   xmlEmployee = event.result as XML;
> 
>   Tracy
> 
>   
>   
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000
>   Sent: Wednesday, January 02, 2008 12:59 PM
>   To: flexcoders@yahoogroups.com
>   Subject: [flexcoders] Re: Two way binding
> 
>   Are you talking about something like this:
>   
>   
>   http://www.adobe.com/2006/mxml
>  ">
>   
>   
>   
>   {firstName.text}
>   {lastName.text}
>   
>   {department.text}
>   {email.text}
>   
>   
>   
>   
>   
>   
>   
>   
>   If it is then how do I let data from the server into this 
model?
>   
>   --- In flexcoders@yahoogroups.com
>  , "Tracy Spratt" 
> wrote:
>   >
>   > But don't use mx:Model, that creates the nested dynamic 
object
> 
>   structure
>   > I mentioned.
>   > 
>   > 
>   > 
>   > Use mx:XML, or use an instance variable typed as XML, and
> assign it 
>   in a
>   > result handler.
>   > 
>   > 
>   > 
>   > Tracy
>   > 
>   > 
>   > 
>   > 
>   > 
>   > From: flexcoders@yahoogroups.com
>   
>   [mailto:flexcoders@yahoogroups.com
>  ] On
>   > Behalf Of mark goldin
>   > Sent: Monday, December 31, 2007 1:18 PM
>   > To: flexcoders@yahoogroups.com
>  
>   > Subject: RE: [flexcoders] Two way binding
>   > 
>   > 
>   > 
>   > Let me make sure I understand.
>   > 
>   > You are talking about something like this:
>   > 
>   > 
>   > 
>   > 
>   > 
>   > http://www.adobe.com/2006/mxml
>  "
>   > layout="absolute">
>   > 
>   >  
>   > 
>   > where httpmodelsource returns the following xml:
>   > 
>   > 
>   > 
>   > 
>   > 
>   > John Doe
>   > 555-777-66555
>   > jdoe@
>   > true
>   > 
>   > 
>   > Jane Doe
>   > 555-777-66555
>   > jndoe@
>   > true
>   > 
>   > 
>   > 
>   > 
>   > 
>   > Tracy Spratt  wrote:
>   > 
>   > Simplicity. Less code. Maintainability. Standardization, 
>   well
>   > known API. 
>   > 
>   > Note that in the scenario I describe, the simplicity 
produces 
>   a
>   > dependency between the client data model and the data
> transport. If
>   > someone changes the XML you are consuming, you will have to
> change 
>   the
>   > code. For some this is unacceptable and they require level 
of
>   > abstraction between the transport and the model. It is just 
up
> to 
>   your
>   > particular requirements.
>   > 
>   > Tracy
>   > 
>   > 
>   > 
>   > 
>   > 
>   > 
>   > From: flexcoders@yahoogroups.com
>  
>   > [mailto:flexcoders@yah

[flexcoders] Re: Save data from datagrid to database?

2008-01-02 Thread candysmate
--- In flexcoders@yahoogroups.com, Mark Shen <[EMAIL PROTECTED]> wrote:
>
> Thanks. Mike.
> 
> I know how to use mx:RemoteObject .
> 
> My question is how to get all the data from datagrid and pass it to
mx:RemoteObject .Thanks
> 
> Mark
> 

Mark, the dataGrid is merely a visual means of viewing / editing the
data held in the dataprovider. I usually loop through my dataprovider
(arrayCollection in my case)and generate dynamic sql queries to
saving/reading/updating data. 



RE: [flexcoders] Re: Two way binding

2008-01-02 Thread Tracy Spratt
I can't understand what you have from your description.  Post the
relevant code snippets.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mark goldin
Sent: Wednesday, January 02, 2008 1:34 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Two way binding

 

Alright. Is the following correct: 

Inside of a model I have it nodes bound to form items. In the form I
have it items bound to model's nodes, and xmlmodelvar = event.result as
XML will pull data into the model as well as show int in the form's
controls?

Tracy Spratt <[EMAIL PROTECTED]> wrote:

The simplest is to declare an instance variable typed as XML:

var _xmlEmployee:XML;

Then assign the event.result as XML in a result handler:

_xmlEmployee = event.result as XML;

If you want to use the declarative style, do:



And in the result handler, do:

xmlEmployee = event.result as XML;

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000
Sent: Wednesday, January 02, 2008 12:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding

Are you talking about something like this:


http://www.adobe.com/2006/mxml
 ">



{firstName.text}
{lastName.text}

{department.text}
{email.text}








If it is then how do I let data from the server into this model?

--- In flexcoders@yahoogroups.com
 , "Tracy Spratt" <[EMAIL PROTECTED]>
wrote:
>
> But don't use mx:Model, that creates the nested dynamic object

structure
> I mentioned.
> 
> 
> 
> Use mx:XML, or use an instance variable typed as XML, and
assign it 
in a
> result handler.
> 
> 
> 
> Tracy
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
  
[mailto:flexcoders@yahoogroups.com
 ] On
> Behalf Of mark goldin
> Sent: Monday, December 31, 2007 1:18 PM
> To: flexcoders@yahoogroups.com
 
> Subject: RE: [flexcoders] Two way binding
> 
> 
> 
> Let me make sure I understand.
> 
> You are talking about something like this:
> 
> 
> 
> 
> 
> http://www.adobe.com/2006/mxml
 "
> layout="absolute">
> 
>  
> 
> where httpmodelsource returns the following xml:
> 
> 
> 
> 
> 
> John Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> Jane Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> 
> 
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
> Simplicity. Less code. Maintainability. Standardization, 
well
> known API. 
> 
> Note that in the scenario I describe, the simplicity produces 
a
> dependency between the client data model and the data
transport. If
> someone changes the XML you are consuming, you will have to
change 
the
> code. For some this is unacceptable and they require level of
> abstraction between the transport and the model. It is just up
to 
your
> particular requirements.
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
 
> [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of mark goldin
> Sent: Monday, December 31, 2007 12:36 PM
> To: flexcoders@yahoogroups.com
 
> Subject: RE: [flexcoders] Two way binding
> 
> Aha, I see. Why would you suggest am xml based model over a
> class based one?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
> By "dataModel", are you referring to the ShoppingCart
> class you posted? You have to put the data into it. Get the
data 
from
> the server, however you wish, and in the result handler,
assign the 
data
> to an instance of the data model class, using the methods or 
properties

[flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread j_lentzz
Here is the code for the renderer.  I extend Label and add a
dataProvider to make it act like a combobox, so that I can specify an
index to show.  That way it doesn't look like a combobox when it
renders.  I'm not doing anything special to look for a change, just
implementing what I thought was necessary.

public class LabelWithDownArrow extends Label
{

private var _dataProvider:ArrayCollection = null;

private var _prompt:String= null;
private var defaultPrompt:String  = "Select Item...";
private var _selectedIndex:int = -1;

public function LabelWithDownArrow()
{
super();
}

public function set dataProvider(value:ArrayCollection):void {
_dataProvider = value;
}

public function get dataProvider():ArrayCollection {
return _dataProvider;
}

public function set selectedIndex(value:int):void {
_selectedIndex = value;
}

public function get selectedIndex():int {
return _selectedIndex;
}

public function set prompt(value:String):void {
_prompt = value;
}

public function get prompt():String {
return _prompt;
}

override protected function updateDisplayList(w:Number, 
h:Number):void {
super.updateDisplayList(w-15, h); // subtract from 
width to allow
for down arrow

var g:Graphics = graphics;

g.clear();

// add arrow to box
// Draw the triangle.
g.beginFill(0x00); // black
g.moveTo(w - 11.5, h / 2 + 3);
g.lineTo(w - 15, h / 2 - 2);
g.lineTo(w - 8, h / 2 - 2);
g.lineTo(w - 11.5, h / 2 + 3);
g.endFill();
}

// method used to change what is displayed
[Bindable]
override public function set data(value:Object):void {
super.data = value;

if (listData != null && dataProvider != null) { 


// now iterate through dp to find a matching 
data value, when
found put its label in the Label widget 
var dpLen:int = dataProvider.length;
for (var j:int=0; j wrote:
>
> What does the renderer look like?  How will it detect changes to the
> underlying data?
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of j_lentzz
> Sent: Wednesday, January 02, 2008 7:21 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Datagrid Renderer not showing updated
> ArrayCollection
> 
>  
> 
> Hi,
> 
> I've got a datagrid with a custom renderer. I'm not editing in the
> datagrid, but when a row is selected, I populate some TextInputs and
> ComboBoxes to let them edit the data. When they are done, I use
> itemUpdated on the datagrid ArrayCollection. This seems to work just
> fine. However, after they edit the data, it isn't being updated in
> the datagrid. I can select a different row, then select the original
> row and the new data appears in the edit locations, but only the old
> data is displayed in the datagrid. I've tried all the invalidateXXX
> methods I could find, but nothing seems to get the datagrid do display
> the new data. Also, I can set a breakpoint, examine the
> arraycollection the datagrid uses, and the correct data is present -
> just not being displayed. What do I need to do to get the datagrid to
> be forced to used the arraycollection and update all the
> itemrenderers? I'm using 2.01, would Flex 3 be better?
> 
> Thanks,
> 
> John
>




Re: [flexcoders] Save data from datagrid to database?

2008-01-02 Thread Mark Shen
Thanks. Mike.

I know how to use mx:RemoteObject .

My question is how to get all the data from datagrid and pass it to 
mx:RemoteObject .Thanks

Mark


- Original Message 
From: Mike Chabot <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, January 2, 2008 1:02:39 PM
Subject: Re: [flexcoders] Save data from datagrid to database?

There are many ways to do this, and no single best way. I would
suggest looking at the mx:RemoteObject tag for starters. You could
send ColdFusion a typed "RemoteClass" object that directly corresponds
to a CFC, a generic object, an array, a string of data, etc.

One thing to experiment with is the ColdFusion plug-in to FlexBuilder,
which gives you these wizard features that create all the CRUD code
for you. You will probably find that the wizard-generated code needs a
lot of tweaking, but it is a good way to get started. If you were
hoping for some built-in magic where you just data-bind the grid to
the server, similar to what ASP.NET does, you will be disappointed.
You need to write the SQL and CFC at some point, although the wizard
helps.

Good luck,
MIke Chabot

On Jan 2, 2008 12:21 PM, markflex2007  wrote:
>
>
>
>
> Hi,
>
> I have a datagrid that is changed by events.
>
> I want to save all the data in datagrid to database with coldfusion,I am not
> sure how to get all the data from datagrid and save them to db.
>
> Please give me a hit.
>
> Thanks
>
> Mark




  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

RE: [flexcoders] Re: Two way binding

2008-01-02 Thread mark goldin
Alright. Is the following correct: 
  Inside of a model I have it nodes bound to form items. In the form I have it 
items bound to model's nodes, and xmlmodelvar = event.result as XML will pull 
data into the model as well as show int in the form's controls?

Tracy Spratt <[EMAIL PROTECTED]> wrote:
  The simplest is to declare an instance variable typed as XML:
  var _xmlEmployee:XML;
  Then assign the event.result as XML in a result handler:
  _xmlEmployee = event.result as XML;
  
  If you want to use the declarative style, do:
  
  
  And in the result handler, do:
  xmlEmployee = event.result as XML;
  
  Tracy
  
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
markgoldin_2000
Sent: Wednesday, January 02, 2008 12:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding

  
Are you talking about something like this:


http://www.adobe.com/2006/mxml";>



{firstName.text}
{lastName.text}

{department.text}
{email.text}








If it is then how do I let data from the server into this model?

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> But don't use mx:Model, that creates the nested dynamic object 
structure
> I mentioned.
> 
> 
> 
> Use mx:XML, or use an instance variable typed as XML, and assign it 
in a
> result handler.
> 
> 
> 
> Tracy
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mark goldin
> Sent: Monday, December 31, 2007 1:18 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Two way binding
> 
> 
> 
> Let me make sure I understand.
> 
> You are talking about something like this:
> 
> 
> 
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute">
> 
>  
> 
> where httpmodelsource returns the following xml:
> 
> 
> 
> 
> 
> John Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> Jane Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> 
> 
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
> Simplicity. Less code. Maintainability. Standardization, 
well
> known API. 
> 
> Note that in the scenario I describe, the simplicity produces 
a
> dependency between the client data model and the data transport. If
> someone changes the XML you are consuming, you will have to change 
the
> code. For some this is unacceptable and they require level of
> abstraction between the transport and the model. It is just up to 
your
> particular requirements.
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin
> Sent: Monday, December 31, 2007 12:36 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Two way binding
> 
> Aha, I see. Why would you suggest am xml based model over a
> class based one?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
> By "dataModel", are you referring to the ShoppingCart
> class you posted? You have to put the data into it. Get the data 
from
> the server, however you wish, and in the result handler, assign the 
data
> to an instance of the data model class, using the methods or 
properties
> it provides. Then bind the form elements to propeties in the model.
> 
> Now, I would suggest using an XML object instance as 
the
> data model. In the result handler, assign the result xml to an 
instance
> variable typed as XML. Then bind the form elements to that:
> 
>   ...?>
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin
> Sent: Monday, December 31, 2007 11:45 AM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Two way binding
> 
> I am probably a complete dumb. But dataModel does not
> have dataProvider property. How do I pull data into model then?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
> Or the short answer, the same way you got the
> data into the dataProvider for the DataGrid.
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen
> Sent: Monday, December 31, 2007 10:22 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Two way binding
> 
> That's a wholly different thread. You would 
use
> WebService, HTTPservice, or RemoteObject to perform some sort of 
server
> call. Take a look at the docs on these tags and also at the 
examples on
> Adobe.com  . For a ColdFusion based example, 
you can
> check this out
> 
> http://www.acfug.org/index.cfm?fa=meetings.meetingdetail&EventID=177
>  
> 
> DK
> 
> On Dec 31, 2007 10:14 AM, mark goldin
> <[EMAIL PROTECTED]  > wrote:
> 
> And how data from server gets into the Model?
> 
> 
> 
> Douglas Knudsen <[EMAIL PROTECTED]
> 

[flexcoders] displaying the results of a UNION query in Flex DataGrid

2008-01-02 Thread Mr Greg Murnock
Can this be done in a Flex 2 DataGrid?  anything I need to be aware of?  
Currently returning results via Remote Object as an Array from CF.

Thanks,
 
Greg


  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: [flexcoders] Re: Unwanted arguement?

2008-01-02 Thread Frederico Garcia
Tracy Spratt escreveu:
>
> You might want to examine that value:Object in the function to make 
> sure your theory is correct.
>
> Tracy
>
>  
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *candysmate
> *Sent:* Wednesday, January 02, 2008 1:11 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: Unwanted arguement?
>
>  
>
>
> > Try this
> >
> > private function staffGridFocus(value:Object=null):void
> >
> > Regards,
> >
> > Frederico Garcia
> >
>
> Thanks Frederico, that nailed it!
>
> 
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Alex,

the value:Object is not intended to be used. It will be an event if 
called by Alert window, null if no argument passed. It's just a 
workaround to maintain current usage (no arguments) but accept 1 
argument of any kind.

Regards,

Frederico




RE: [flexcoders] Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread Alex Harui
What does the renderer look like?  How will it detect changes to the
underlying data?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of j_lentzz
Sent: Wednesday, January 02, 2008 7:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid Renderer not showing updated
ArrayCollection

 

Hi,

I've got a datagrid with a custom renderer. I'm not editing in the
datagrid, but when a row is selected, I populate some TextInputs and
ComboBoxes to let them edit the data. When they are done, I use
itemUpdated on the datagrid ArrayCollection. This seems to work just
fine. However, after they edit the data, it isn't being updated in
the datagrid. I can select a different row, then select the original
row and the new data appears in the edit locations, but only the old
data is displayed in the datagrid. I've tried all the invalidateXXX
methods I could find, but nothing seems to get the datagrid do display
the new data. Also, I can set a breakpoint, examine the
arraycollection the datagrid uses, and the correct data is present -
just not being displayed. What do I need to do to get the datagrid to
be forced to used the arraycollection and update all the
itemrenderers? I'm using 2.01, would Flex 3 be better?

Thanks,

John

 



RE: [flexcoders] Re: tileList displaying items order other than that represented by dataProvider

2008-01-02 Thread Alex Harui
I don't see any [Bindable] metadata, so I would expect you  to get
warnings in the console about binding to thumbLabel and the renderer
won't know that data.name changed.

 

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex
Sent: Wednesday, January 02, 2008 5:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: tileList displaying items order other than
that represented by dataProvider

 

Posted a response to another responder in the thread...

I have vastly simplified the application source to focus on the
problem and what I find is that my itemRenderer for the tileList view
if coded as follows works showing the expected sort in both views:



If coded as follows (as I want, so that I can override the renderer
and provide a different attribute other than 'name' for a label) the
issue with incorrect sorting in tileList view arises:



where the following is also defined

/**
* Retrieve the label to be used for the thumbnail
* associated with each data item. This method may
* be overridden in a derived class to customize
* the icon label associated with the thumbnail
* for each data item.
*/
public function get thumbLabel(): String {
return data.name;
}

Is there a solution which will allow me to provide the string to be
displayed via a function? The intent is to be able to override the
thumbLabel function in an itemRenderer derived from this 'base'
itemRenderer class for cases where the dataset displayed uses an
attribute named other than 'name', for example an override might
simply return data.title or even conditionalize the string returned
based on other data attributes.

As I suggested the source for this entire simplified application is
now something that I could provide as I've boiled it down
substantially. The above issue is however the crux of the problem in
both the simplified sample and the original application.

Thanks for your continued assistance.
Alex M

PS: The tileList is defined as follows



The CEMDataviewThumbGeneratorIcon as follows

http://www.adobe.com/2006/mxml
 ">








--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Are you using a custom renderer? Sounds like it doesn't know how to be
> recycled. More about renderer recycling on my blog
> (blogs.adobe.com/aharui)
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Alex
> Sent: Friday, December 21, 2007 2:11 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] tileList displaying items order other than that
> represented by dataProvider
> 
> 
> 
> I have a problem with a viewStack that has 2 views, a dataGrid and a
> tileList view both of which which share a common dataProvider.
> 
> - The tileList uses an itemRenderer to draw an icon/name for each
item.
> - The datagrid affords the ability to sort the displayed items by
> clicking on the column headers.
> 
> The initial display of both views is as expected, the sort order in
> the tileList view matches that of the items in the dataGrid view.
> 
> A "trace" of the data items in the dataProvider invoked whenever I
> switch between views [via trace(datagrid.dataProvider) and
> trace(tilelist.dataProvider)] both show the items in the list in the
> order expected regardless of how many times I switch views back and
> forth.
> 
> The items (a ListCollectionView of items of type "Foo") listed by the
> trace as expected reflect the format of the "toString" function in the
> Foo class.
> 
> Now the problem...
> 
> 1) When I click a header in the dataGrid view to re-sort the data
> subsequent trace output of the dataProvider's list of objects changes
> to another format:
> 
> (Array)#0
> [0] (com.emc.sspg.cem.data::Foo)#1
> attribute1_name = value1
> attribute2_name = value2
> [1] (com.emc.sspg.cem.data::Foo)#1
> 
> etc.
> 
> I'm not sure why this happens..
> 
> 2) The array elements in the trace output are reordered to reflect the
> expected sort order as displayed in the dataGrid view AND the tileList
> view BUT the order of the actual icons drawn in the tileList view does
> not match the order of the items traced. (In fact I've yet to be able
> to discern what order they are now drawn in, its not the original
> "pre-sorted" order either.)
> 
> -
> 
> Another subtlety my trace statements have pointed out is that only the
> 1st time the icon view is drawn do the item renderers get called to
> actually get the icon and name to display.
> 
> Solution-wise, while not a great solution I've tried to insert various
> functions to invalidate the drawing such that subsequent views of the
> icon view would re-call the renderers to prove to me that they are
> being drawn in the order that I'm seeing them left-to-righ

RE: [flexcoders] Re: Loading mask or overlay for datagrids while loading

2008-01-02 Thread Alex Harui
Yes.  Good luck.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of brey_magenta
Sent: Wednesday, January 02, 2008 5:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Loading mask or overlay for datagrids while
loading

 

Ok, so just using a popupmanager, size it to cover the component and
remove it when the loading is done should do the trick?

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> A mask in Flash is a specific thing that clips the object it masks. I
> think you really want an overlay and PopUpManager is a good way to
> overlay things temporarily. Whether you want it for the datagrid or
> other components doesn't matter. The Alert puts up a transparent blur
> over the whole app via PopUpManager. You can popup some animation in a
> similar way at specific sizes and positions.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of brey_magenta
> Sent: Thursday, December 20, 2007 3:06 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Loading mask or overlay for datagrids while
> loading
> 
> 
> 
> 
> Because that is not the way I want?
> 
> It's not only ment for datagrids, also for components that load data.
> 
> --- In flexcoders@yahoogroups.com


> , "Alex Harui"  wrote:
> >
> > How about using PopUpManager to popup something over the datagrid?
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com


> [mailto:flexcoders@yahoogroups.com


> ] On
> > Behalf Of brey_magenta
> > Sent: Monday, December 17, 2007 12:08 AM
> > To: flexcoders@yahoogroups.com 
 
> > Subject: [flexcoders] Re: Loading mask or overlay for datagrids
while
> > loading
> > 
> > 
> > 
> > Well, for example, using a mask? I know you can put a 'mask' over
any
> > visible object but I don't know how to make a mask which shows a
> > animated loading swf/image.
> > 
> > --- In flexcoders@yahoogroups.com
 
> 
> 
> > , "Alex Harui"  wrote:
> > >
> > > There are so many options, I don't know where to start. You can
use
> > > masks, overlays, popups, effects, transitions. 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > From: flexcoders@yahoogroups.com
 
> 
> 
> > [mailto:flexcoders@yahoogroups.com
 
> 
> 
> > ] On
> > > Behalf Of brey_magenta
> > > Sent: Wednesday, December 12, 2007 11:50 PM
> > > To: flexcoders@yahoogroups.com


>  
> > > Subject: [flexcoders] Loading mask or overlay for datagrids while
> > > loading
> > > 
> > > 
> > > 
> > > I've been wondering how to show a nice loading animation while a
> > > datagrid or other component is loading and fading it out when it's
> > > done loading. 
> > > 
> > > I've been looking everywhere for a nice solution but I haven't
found
> a
> > > decent one so far. Is there an easy way? By using a mask or
> something?
> > >
> >
>

 



RE: [flexcoders] Re: Unwanted arguement?

2008-01-02 Thread Tracy Spratt
You might want to examine that value:Object in the function to make sure
your theory is correct.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of candysmate
Sent: Wednesday, January 02, 2008 1:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Unwanted arguement?

 


> Try this
> 
> private function staffGridFocus(value:Object=null):void
> 
> Regards,
> 
> Frederico Garcia
>

Thanks Frederico, that nailed it!

 



RE: [flexcoders] Session Defining

2008-01-02 Thread Tracy Spratt
What do you need the session for?  Remember that a Flex client is
stateful.  

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of NileAge, Mail
Sent: Tuesday, January 01, 2008 9:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Session Defining

 

Hi all

   I want to define a session in flex 2 as we use in asp.net

I use asp.net

 



[flexcoders] Re: Unwanted arguement?

2008-01-02 Thread candysmate

> Try this
> 
> private function staffGridFocus(value:Object=null):void
> 
> Regards,
> 
> Frederico Garcia
>

Thanks Frederico, that nailed it!




RE: [flexcoders] Re: Two way binding

2008-01-02 Thread Tracy Spratt
The simplest is to declare an instance variable typed as XML:

var _xmlEmployee:XML;

Then assign the event.result as XML in a result handler:

_xmlEmployee = event.result as XML;

 

If you want to use the declarative style, do:



 

And in the result handler, do:

xmlEmployee = event.result as XML;

 

Tracy

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Wednesday, January 02, 2008 12:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding

 

Are you talking about something like this:


http://www.adobe.com/2006/mxml
 ">



{firstName.text}
{lastName.text}

{department.text}
{email.text}








If it is then how do I let data from the server into this model?

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> But don't use mx:Model, that creates the nested dynamic object 
structure
> I mentioned.
> 
> 
> 
> Use mx:XML, or use an instance variable typed as XML, and assign it 
in a
> result handler.
> 
> 
> 
> Tracy
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of mark goldin
> Sent: Monday, December 31, 2007 1:18 PM
> To: flexcoders@yahoogroups.com  
> Subject: RE: [flexcoders] Two way binding
> 
> 
> 
> Let me make sure I understand.
> 
> You are talking about something like this:
> 
> 
> 
> 
> 
> http://www.adobe.com/2006/mxml
 "
> layout="absolute">
> 
>  
> 
> where httpmodelsource returns the following xml:
> 
> 
> 
> 
> 
> John Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> Jane Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> 
> 
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
> Simplicity. Less code. Maintainability. Standardization, 
well
> known API. 
> 
> Note that in the scenario I describe, the simplicity produces 
a
> dependency between the client data model and the data transport. If
> someone changes the XML you are consuming, you will have to change 
the
> code. For some this is unacceptable and they require level of
> abstraction between the transport and the model. It is just up to 
your
> particular requirements.
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

> [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of mark goldin
> Sent: Monday, December 31, 2007 12:36 PM
> To: flexcoders@yahoogroups.com  
> Subject: RE: [flexcoders] Two way binding
> 
> Aha, I see. Why would you suggest am xml based model over a
> class based one?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
> By "dataModel", are you referring to the ShoppingCart
> class you posted? You have to put the data into it. Get the data 
from
> the server, however you wish, and in the result handler, assign the 
data
> to an instance of the data model class, using the methods or 
properties
> it provides. Then bind the form elements to propeties in the model.
> 
> Now, I would suggest using an XML object instance as 
the
> data model. In the result handler, assign the result xml to an 
instance
> variable typed as XML. Then bind the form elements to that:
> 
>   ...?>
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

> [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of mark goldin
> Sent: Monday, December 31, 2007 11:45 AM
> To: flexcoders@yahoogroups.com  
> Subject: RE: [flexcoders] Two way binding
> 
> I am probably a complete dumb. But dataModel does not
> have dataProvider property. How do I pull data into model then?
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
> Or the short answer, the same way you got the
> data into the dataProvider for the DataGrid.
> 
> Tracy
> 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

> [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of Douglas Knudsen
> Sent: Monday, December 31, 2007 10:22 AM
> To: flexcoders@yahoogroups.com  
> Subject: Re: [flexcoders] Two way binding
> 
> That's a wholly different thread. You would 
use
> WebService, HTTPservice, or RemoteObject to perform some sort of 
server
> call. Take a look at the docs on these tags and also at the 
examples on
> Adobe.com  > . For a ColdFusion
based example, 
you can
> check this out
> 
> http://www.acfug.org/index.cfm?fa=meetings.meetingdetail&EventID=1

Re: [flexcoders] Save data from datagrid to database?

2008-01-02 Thread Mike Chabot
There are many ways to do this, and no single best way. I would
suggest looking at the mx:RemoteObject tag for starters. You could
send ColdFusion a typed "RemoteClass" object that directly corresponds
to a CFC, a generic object, an array, a string of data, etc.

One thing to experiment with is the ColdFusion plug-in to FlexBuilder,
which gives you these wizard features that create all the CRUD code
for you. You will probably find that the wizard-generated code needs a
lot of tweaking, but it is a good way to get started. If you were
hoping for some built-in magic where you just data-bind the grid to
the server, similar to what ASP.NET does, you will be disappointed.
You need to write the SQL and CFC at some point, although the wizard
helps.

Good luck,
MIke Chabot

On Jan 2, 2008 12:21 PM, markflex2007 <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
> I have a datagrid that is changed by events.
>
> I want to save all the data in datagrid to database with coldfusion,I am not
> sure how to get all the data from datagrid and save them to db.
>
> Please give me a hit.
>
> Thanks
>
> Mark


[flexcoders] Re: Autocomplete from the browser in a login username field

2008-01-02 Thread iilsley
I dont believe its possible to use the 'browsers' autofill ..

However you could potentially implement your own 'application' specific
'autofill' like behavior
with 'Shared Objects' ..

http://learn.adobe.com/wiki/display/Flex/Shared+Objects




--- In flexcoders@yahoogroups.com, "simonjpalmer" <[EMAIL PROTECTED]>
wrote:
>
> I have a form I use for login into which my users type their username
> and password.  Does anyone know of a way of using the browser autofill
> to populate form text fields?
>



[flexcoders] Re: Two way binding

2008-01-02 Thread markgoldin_2000
Are you talking about something like this:


http://www.adobe.com/2006/mxml";>



{firstName.text}
{lastName.text}

{department.text}
{email.text}








If it is then how do I let data from the server into this model?

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> But don't use mx:Model, that creates the nested dynamic object 
structure
> I mentioned.
> 
>  
> 
> Use mx:XML, or use an instance variable typed as XML, and assign it 
in a
> result handler.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mark goldin
> Sent: Monday, December 31, 2007 1:18 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Two way binding
> 
>  
> 
> Let me make sure I understand.
> 
> You are talking about something  like this:
> 
>  
> 
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute">
> 
> 
> 
>  where httpmodelsource returns the following xml:
> 
>  
> 
> 
> 
> John Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> Jane Doe
> 555-777-66555
> [EMAIL PROTECTED]
> true
> 
> 
> 
> 
> 
> Tracy Spratt <[EMAIL PROTECTED]> wrote:
> 
>   Simplicity.  Less code.  Maintainability.  Standardization, 
well
> known API.   
> 
>   Note that in the scenario I describe, the simplicity produces 
a
> dependency between the client data model and the data transport.  If
> someone changes the XML you are consuming, you will have to change 
the
> code.  For some this is unacceptable and they require  level of
> abstraction between the transport and the model.  It is just up to 
your
> particular requirements.
> 
>   Tracy
> 
>   
>   
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin
>   Sent: Monday, December 31, 2007 12:36 PM
>   To: flexcoders@yahoogroups.com
>   Subject: RE: [flexcoders] Two way binding
> 
>   Aha, I see. Why would you suggest am xml based model over a
> class based one?
>   
>   Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
>   By "dataModel", are you referring to the ShoppingCart
> class you posted?  You have to put the data into it.  Get the data 
from
> the server, however you wish, and in the result handler, assign the 
data
> to an instance of the data model class, using the methods or 
properties
> it provides.  Then bind the form elements to propeties in the model.
> 
>   Now, I would suggest using an XML object instance as 
the
> data model.  In the result handler, assign the result xml to an 
instance
> variable typed as XML.  Then bind the form elements to that:
> 
>  ...?>
> 
>   Tracy
> 
>   
>   
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin
>   Sent: Monday, December 31, 2007 11:45 AM
>   To: flexcoders@yahoogroups.com
>   Subject: RE: [flexcoders] Two way binding
> 
>   I am probably a complete dumb. But dataModel does not
> have dataProvider property. How do I pull data into model then?
>   
>   Tracy Spratt <[EMAIL PROTECTED]> wrote: 
> 
>   Or the short answer, the same way you got the
> data into the dataProvider for the DataGrid.
> 
>   Tracy
> 
>   
>   
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen
>   Sent: Monday, December 31, 2007 10:22 AM
>   To: flexcoders@yahoogroups.com
>   Subject: Re: [flexcoders] Two way binding
> 
>   That's a wholly different thread.  You would 
use
> WebService, HTTPservice, or RemoteObject to perform some sort of 
server
> call.  Take a look at the docs on these tags and also at the 
examples on
> Adobe.com  .  For a ColdFusion based example, 
you can
> check this out
>   
> http://www.acfug.org/index.cfm?fa=meetings.meetingdetail&EventID=177
>  
>   
>   DK
> 
>   On Dec 31, 2007 10:14 AM, mark goldin
> <[EMAIL PROTECTED]  > wrote:
> 
>   And how data from server gets into the Model?
> 
>   
>   
>   Douglas Knudsen <[EMAIL PROTECTED]
>   > wrote: 
> 
>   What's wrong with this?
>   
>  

RE: [flexcoders] Two way binding

2008-01-02 Thread Tracy Spratt
But don't use mx:Model, that creates the nested dynamic object structure
I mentioned.

 

Use mx:XML, or use an instance variable typed as XML, and assign it in a
result handler.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mark goldin
Sent: Monday, December 31, 2007 1:18 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Two way binding

 

Let me make sure I understand.

You are talking about something  like this:

 



http://www.adobe.com/2006/mxml";
layout="absolute">



 where httpmodelsource returns the following xml:

 



John Doe
555-777-66555
[EMAIL PROTECTED]
true


Jane Doe
555-777-66555
[EMAIL PROTECTED]
true





Tracy Spratt <[EMAIL PROTECTED]> wrote:

Simplicity.  Less code.  Maintainability.  Standardization, well
known API.   

Note that in the scenario I describe, the simplicity produces a
dependency between the client data model and the data transport.  If
someone changes the XML you are consuming, you will have to change the
code.  For some this is unacceptable and they require  level of
abstraction between the transport and the model.  It is just up to your
particular requirements.

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mark goldin
Sent: Monday, December 31, 2007 12:36 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Two way binding

Aha, I see. Why would you suggest am xml based model over a
class based one?

Tracy Spratt <[EMAIL PROTECTED]> wrote: 

By "dataModel", are you referring to the ShoppingCart
class you posted?  You have to put the data into it.  Get the data from
the server, however you wish, and in the result handler, assign the data
to an instance of the data model class, using the methods or properties
it provides.  Then bind the form elements to propeties in the model.

Now, I would suggest using an XML object instance as the
data model.  In the result handler, assign the result xml to an instance
variable typed as XML.  Then bind the form elements to that:

mailto:[EMAIL PROTECTED]>  ...?>

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mark goldin
Sent: Monday, December 31, 2007 11:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Two way binding

I am probably a complete dumb. But dataModel does not
have dataProvider property. How do I pull data into model then?

Tracy Spratt <[EMAIL PROTECTED]> wrote: 

Or the short answer, the same way you got the
data into the dataProvider for the DataGrid.

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen
Sent: Monday, December 31, 2007 10:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Two way binding

That's a wholly different thread.  You would use
WebService, HTTPservice, or RemoteObject to perform some sort of server
call.  Take a look at the docs on these tags and also at the examples on
Adobe.com  .  For a ColdFusion based example, you can
check this out

http://www.acfug.org/index.cfm?fa=meetings.meetingdetail&EventID=177
 

DK

On Dec 31, 2007 10:14 AM, mark goldin
<[EMAIL PROTECTED]  > wrote:

And how data from server gets into the Model?



Douglas Knudsen <[EMAIL PROTECTED]
  > wrote: 

What's wrong with this?


Now, you can use the Binding tag to bind
the value in the above back to the source, your datagrid in this case,
but its not really a good idea, though YMMV. 

DK

On Dec 31, 2007 9:33 AM, markgoldin_2000
<[EMAIL PROTECTED]  > wrote:

I am trying to figure out what both ways
of data binding are.
Basically we have two subjects for data
binding: DataGrid and a Form. 
With DataGrid it is pr

[flexcoders] Re: Tab Navigator : how to set corner Radius to only the left-right bottom?

2008-01-02 Thread scalenine
You may need to "fake it" by using the child container to overlap the
top rounded corners by adjusting paddingTop of the TabNavigator, like
this:


http://www.adobe.com/2006/mxml";
layout="absolute">






Depending on what you're trying to do, this may/may not be the
solution you're looking for.

Juan Sanchez

scalenine.com // Degrafa Beta Now Available : http://www.degrafa.com

--- In flexcoders@yahoogroups.com, "thebeginnersmind"
<[EMAIL PROTECTED]> wrote:
>
> Hi list,
> 
> Does anyone know if there is a way to set cornerRadius of Tab
> Navigator to only bottom left and bottom right corners ? ( when I use
> the below code , the cornerRadius applies to all 4 corners)
> 
> // css file
> TabNavigator {
> 
> cornerRadius: 10;
> 
> }
> 
> Thanks!
> -Kt
>




[flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread j_lentzz
Previously, I tried:
LPA_TimeRecord.dataProvider.dispatchEvent(new
CollectionEvent(mx.events.CollectionEvent.COLLECTION_CHANGE));
, which didn't work.

But who is supposed to listen and respond to it?  Will the datagrid
automatically listen and redraw?

John

--- In flexcoders@yahoogroups.com, "Johannes Nel" <[EMAIL PROTECTED]>
wrote:
>
> try dispatching a custom change event
> [Bindable (event='myEvent')]
> instead of just
> [Bindable]
> 
> On Jan 2, 2008 11:59 AM, j_lentzz <[EMAIL PROTECTED]> wrote:
> 
> >   Just tried it, but no change. I could change the values and see
it in
> > my editing locations, but they weren't reflected in the datagrid, but
> > are really there if I select that row again.
> > --- In flexcoders@yahoogroups.com ,
> > "Johannes Nel" 
> >
> > wrote:
> > >
> > > have you tried dispatching the collection_change event from the
array
> > > collection?
> > >
> > > On Jan 2, 2008 10:20 AM, j_lentzz  wrote:
> > >
> > > > Hi,
> > > >
> > > > I've got a datagrid with a custom renderer. I'm not editing in the
> > > > datagrid, but when a row is selected, I populate some
TextInputs and
> > > > ComboBoxes to let them edit the data. When they are done, I use
> > > > itemUpdated on the datagrid ArrayCollection. This seems to
work just
> > > > fine. However, after they edit the data, it isn't being updated in
> > > > the datagrid. I can select a different row, then select the
original
> > > > row and the new data appears in the edit locations, but only
the old
> > > > data is displayed in the datagrid. I've tried all the
invalidateXXX
> > > > methods I could find, but nothing seems to get the datagrid do
display
> > > > the new data. Also, I can set a breakpoint, examine the
> > > > arraycollection the datagrid uses, and the correct data is
present -
> > > > just not being displayed. What do I need to do to get the
datagrid to
> > > > be forced to used the arraycollection and update all the
> > > > itemrenderers? I'm using 2.01, would Flex 3 be better?
> > > >
> > > > Thanks,
> > > >
> > > > John
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > j:pn
> > > \\no comment
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> j:pn
> \\no comment
>




Re: [flexcoders] Alert window position?

2008-01-02 Thread Frederico Garcia
Mark Shen escreveu:
> What is the  'your alert popup'?
>  
> Please give me a demo for this.Thanks
>  
> Mark
>
> - Original Message 
> From: Savan Patel <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Saturday, December 29, 2007 1:21:30 AM
> Subject: Re: [flexcoders] Alert window position?
>
> Hi Mark,
>  
> You can use following property :
> PopUpManager. centerPopUp( 'your alert popup');
>  
> Thanks & Regards,
> Savan
> - Original Message 
> From: Dominique Bessette - Halsema <[EMAIL PROTECTED] com>
> To: [EMAIL PROTECTED] ups.com <http://ups.com/>
> Sent: Saturday, 29 December, 2007 1:28:36 AM
> Subject: Re: [flexcoders] Alert window position?
>
> i created my own popup using TitleWindow and in there you can control 
> the placement.
>  
> //in the main class call the popup
>  private  function getAtomPopUp( ):void{
>   var helpWindow:IFlexDis playObject;  
>   helpWindow = PopUpManager. createPopUp( this, getPopUp, false);
> }
>
>  
> On 12/28/07, *markflex2007*  <mailto:[EMAIL PROTECTED]>> wrote:
>
> Hi,
>
> I have the Alert popup window(Alert. show) but it appear in the
> right side of
> the screen,I want to know how to make it popup at center of the
> screen.
>
> Thanks
>
> Mark
>
>
>
>
> 
> Explore your hobbies and interests. Click here to begin. 
> <http://in.rd.yahoo.com/tagline_groups_6/*http://in.promos.yahoo.com/groups> 
>
>
>
> ----
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20>
>  
> 
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
Could you please post the code you use to display the Alert? I've been 
trying to recreate your scenario with no success. Alert.show("text"); is 
always centered by default.

Regards,

Frederico Garcia


RE: [flexcoders] Two way binding

2008-01-02 Thread mark goldin
But if I use XML based model how do I assign data to it that I am pulling from 
the server?

Tracy Spratt <[EMAIL PROTECTED]> wrote:  Simplicity.  Less code.  
Maintainability.  Standardization, well known API.   
  
  Note that in the scenario I describe, the simplicity produces a dependency 
between the client data model and the data transport.  If someone changes the 
XML you are consuming, you will have to change the code.  For some this is 
unacceptable and they require  level of abstraction between the transport and 
the model.  It is just up to your particular requirements.
  
  Tracy
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark 
goldin
Sent: Monday, December 31, 2007 12:36 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Two way binding

  
Aha, I see. Why would you suggest am xml based model over a class based 
one?

Tracy Spratt <[EMAIL PROTECTED]> wrote: 
By “dataModel”, are you referring to the ShoppingCart class you 
posted?  You have to put the data into it.  Get the data from the server, 
however you wish, and in the result handler, assign the data to an instance of 
the data model class, using the methods or properties it provides.  Then bind 
the form elements to propeties in the model.

Now, I would suggest using an XML object instance as the data model.  In 
the result handler, assign the result xml to an instance variable typed as XML. 
 Then bind the form elements to that:



Tracy

  
-
  
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
mark goldin
Sent: Monday, December 31, 2007 11:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Two way binding


  I am probably a complete dumb. But dataModel does not have 
dataProvider property. How do I pull data into model then?

Tracy Spratt <[EMAIL PROTECTED]> wrote: 

  Or the short answer, the same way you got the data into the 
dataProvider for the DataGrid.


  Tracy


  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Douglas Knudsen
Sent: Monday, December 31, 2007 10:22 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Two way binding



That's a wholly different thread.  You would use WebService, 
HTTPservice, or RemoteObject to perform some sort of server call.  Take a look 
at the docs on these tags and also at the examples on Adobe.com.  For a 
ColdFusion based example, you can check this out
http://www.acfug.org/index.cfm?fa=meetings.meetingdetail&EventID=177 

DK


On Dec 31, 2007 10:14 AM, mark goldin <[EMAIL PROTECTED]> wrote:


  And how data from server gets into the Model?


  

Douglas Knudsen <[EMAIL PROTECTED] > wrote: 




What's wrong with this?


Now, you can use the Binding tag to bind the value in the above back to the 
source, your datagrid in this case, but its not really a good idea, though 
YMMV. 

DK


On Dec 31, 2007 9:33 AM, markgoldin_2000 <[EMAIL PROTECTED]> wrote:


I am trying to figure out what both ways of data binding are.
Basically we have two subjects for data binding: DataGrid and a Form. 
With DataGrid it is pretty clear: dataProvider. But with form? It 
does not have such a dataProvider property (Which is in my opinion it 
should have). So, what's a solution for that? DataModel? Which it 
turn does not have dataProvider either. But it does have a source. 
Source of what? Data? Ok, let's stick to dataModel. But then I am 
reading that it's better to use class-based models. Here is an 
example of class-based model form Help:
package
{

[Bindable]
public class ShoppingCart {
public var items:Array = [];

public var total:Number = 0;

public var shippingCost:Number = 0;

public function ShoppingCart() {
}

public function addItem(item:Object, qty:int = 1,
index:int = 0):void {
items.splice(index, 0, { id: item.id,
name: item.name,
description: item.description,
image: item.image,
price: item.price,
qty: qty });
total += parseFloat(item.price) * qty;
}

public function removeItemAt(index:Number):void {
total -= parseFloat(items[index].price) * items[index].qty; 
items.splice(index, 1);
if (getItemCount() == 0)
shippingCost = 0;
}

public function getItemCount():int {
return items.length;
}

public function getTotal():Number {
return total;
}
}
}

Two questions:
1. How the data is getting into a picture here?
2. How am I using this model in my mxml file?

Sorry if I am asking something obvious, but I am just having problem 
understanding why data-centric environment does not have a straight 
way of binding data both ways. All I would want is to assign a data 
source to my form and then specify data fields for each control in 
the form. Simple as this. Is this possible in Flex? 

Thanks








  






   

Re: [flexcoders] Unwanted arguement?

2008-01-02 Thread Frederico Garcia
candysmate escreveu:
> Focus can be a real pain, as we all know.  
>
> I have a function which re-focuses a datagrid so:
>
> private function staffGridFocus():void
> {
> salesStaffGrid.setFocus();
> salesStaffGrid.selectedIndex = gridSelectLine;
> editStaffCell = {columnIndex:0, rowIndex: gridSelectLine};
> salesStaffGrid.editedItemPosition = editStaffCell;
> }
>
> no arguements are expected or required.
>
> After my user saves data to MS SQL 2005, via Janus, I alert them that
> the action has been completed with:
>
> Alert.show("Staff data updated", 'Information:', 0, this,
> staffGridFocus, informationIcon);
>
> However, I get a runtime error:
>
> ArgumentError: Error #1063: Argument count mismatch on
> main/main::staffGridFocus(). Expected 0, got 1.
>
> I'm  *guessing* that the Alert windows's closeEvent is being passed as
> an arguement to the function for some reason.
>
> How can I prevent this, or have you guys any other ideas please?
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>
>
>
>
> __ NOD32 2760 (20080102) Information __
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Try this

private function staffGridFocus(value:Object=null):void

Regards,

Frederico Garcia




[flexcoders] Save data from datagrid to database?

2008-01-02 Thread markflex2007
Hi,

I have a datagrid that is changed by events.

I want to save all the data in datagrid to database with coldfusion,I am not 
sure how to get all the data from datagrid and save them to db.

Please give me a hit.

Thanks

Mark



Re: [flexcoders] Alert window position?

2008-01-02 Thread Mark Shen
What is the  'your alert popup'?

Please give me a demo for this.Thanks

Mark


- Original Message 
From: Savan Patel <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, December 29, 2007 1:21:30 AM
Subject: Re: [flexcoders] Alert window position?

Hi Mark,
 
You can use following property :
PopUpManager. centerPopUp( 'your alert popup');
 
Thanks & Regards,
Savan

- Original Message 
From: Dominique Bessette - Halsema <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Saturday, 29 December, 2007 1:28:36 AM
Subject: Re: [flexcoders] Alert window position?


i created my own popup using TitleWindow and in there you can control the 
placement.
 
//in the main class call the popup
 private  function getAtomPopUp( ):void{
  var helpWindow:IFlexDis playObject;   
  helpWindow = PopUpManager. createPopUp( this, getPopUp, false);
}

 
On 12/28/07, markflex2007  wrote: 
Hi,

I have the Alert popup window(Alert. show) but it appear in the right side of 
the screen,I want to know how to make it popup at center of the screen.

Thanks

Mark









Explore your hobbies and interests. Click here to begin. 



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: [flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread Johannes Nel
try dispatching a custom change event
[Bindable (event='myEvent')]
instead of just
[Bindable]

On Jan 2, 2008 11:59 AM, j_lentzz <[EMAIL PROTECTED]> wrote:

>   Just tried it, but no change. I could change the values and see it in
> my editing locations, but they weren't reflected in the datagrid, but
> are really there if I select that row again.
> --- In flexcoders@yahoogroups.com ,
> "Johannes Nel" <[EMAIL PROTECTED]>
>
> wrote:
> >
> > have you tried dispatching the collection_change event from the array
> > collection?
> >
> > On Jan 2, 2008 10:20 AM, j_lentzz <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I've got a datagrid with a custom renderer. I'm not editing in the
> > > datagrid, but when a row is selected, I populate some TextInputs and
> > > ComboBoxes to let them edit the data. When they are done, I use
> > > itemUpdated on the datagrid ArrayCollection. This seems to work just
> > > fine. However, after they edit the data, it isn't being updated in
> > > the datagrid. I can select a different row, then select the original
> > > row and the new data appears in the edit locations, but only the old
> > > data is displayed in the datagrid. I've tried all the invalidateXXX
> > > methods I could find, but nothing seems to get the datagrid do display
> > > the new data. Also, I can set a breakpoint, examine the
> > > arraycollection the datagrid uses, and the correct data is present -
> > > just not being displayed. What do I need to do to get the datagrid to
> > > be forced to used the arraycollection and update all the
> > > itemrenderers? I'm using 2.01, would Flex 3 be better?
> > >
> > > Thanks,
> > >
> > > John
> > >
> > >
> > >
> >
> >
> >
> > --
> > j:pn
> > \\no comment
> >
>
>  
>



-- 
j:pn
\\no comment


Re: [flexcoders] Strange compiler error

2008-01-02 Thread Johannes Nel
i have noticed the reverse in B3, if you do not put a semi colon in then the
bindable throws a compiler error. i logged it on the bug system

On Jan 2, 2008 12:00 PM, Mark Ingram <[EMAIL PROTECTED]> wrote:

>I've managed to fix this (after much deleting and undoing and redoing).
> The problem was a missing ";" on one line. Strangely, the contents of the
> code had been copied from another file where it worked just fine. I have a
> feeling the line below this one was [Bindable]. But I'm not sure why that
> would make a difference.
>
>
>
>
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Mark Ingram
> *Sent:* 02 January 2008 15:59
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Strange compiler error
>
>
>
> I'm getting this error:
>
>
>
> "1046: Type was not found or was not a compile-time constant: ."
>
>
>
> Note: It doesn't give me a type at all. Sometimes when I jig around the
> import statements it gives me the error in the generated actionscript. But
> I've checked that and the error is usually on the last "}".
>
>
>
>
>
> Has anyone come across this before?
>
>
>
> Mark
>
>
>
>
>
>
>
>   
>



-- 
j:pn
\\no comment


RE: [flexcoders] Strange compiler error

2008-01-02 Thread Mark Ingram
I've managed to fix this (after much deleting and undoing and redoing).
The problem was a missing ";" on one line. Strangely, the contents of
the code had been copied from another file where it worked just fine. I
have a feeling the line below this one was [Bindable]. But I'm not sure
why that would make a difference.

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: 02 January 2008 15:59
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Strange compiler error

 

I'm getting this error:

 

"1046: Type was not found or was not a compile-time constant: ."

 

Note: It doesn't give me a type at all. Sometimes when I jig around the
import statements it gives me the error in the generated actionscript.
But I've checked that and the error is usually on the last "}".

 

 

Has anyone come across this before?

 

Mark

 

 

 

 



[flexcoders] Re: Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread j_lentzz
Just tried it, but no change.  I could change the values and see it in
my editing locations, but they weren't reflected in the datagrid, but
are really there if I select that row again.
--- In flexcoders@yahoogroups.com, "Johannes Nel" <[EMAIL PROTECTED]>
wrote:
>
> have you tried dispatching the collection_change event from the array
> collection?
> 
> On Jan 2, 2008 10:20 AM, j_lentzz <[EMAIL PROTECTED]> wrote:
> 
> >   Hi,
> >
> > I've got a datagrid with a custom renderer. I'm not editing in the
> > datagrid, but when a row is selected, I populate some TextInputs and
> > ComboBoxes to let them edit the data. When they are done, I use
> > itemUpdated on the datagrid ArrayCollection. This seems to work just
> > fine. However, after they edit the data, it isn't being updated in
> > the datagrid. I can select a different row, then select the original
> > row and the new data appears in the edit locations, but only the old
> > data is displayed in the datagrid. I've tried all the invalidateXXX
> > methods I could find, but nothing seems to get the datagrid do display
> > the new data. Also, I can set a breakpoint, examine the
> > arraycollection the datagrid uses, and the correct data is present -
> > just not being displayed. What do I need to do to get the datagrid to
> > be forced to used the arraycollection and update all the
> > itemrenderers? I'm using 2.01, would Flex 3 be better?
> >
> > Thanks,
> >
> > John
> >
> >  
> >
> 
> 
> 
> -- 
> j:pn
> \\no comment
>




[flexcoders] Unwanted arguement?

2008-01-02 Thread candysmate
Focus can be a real pain, as we all know.  

I have a function which re-focuses a datagrid so:

private function staffGridFocus():void
{
salesStaffGrid.setFocus();
salesStaffGrid.selectedIndex = gridSelectLine;
editStaffCell = {columnIndex:0, rowIndex: gridSelectLine};
salesStaffGrid.editedItemPosition = editStaffCell;
}

no arguements are expected or required.

After my user saves data to MS SQL 2005, via Janus, I alert them that
the action has been completed with:

Alert.show("Staff data updated", 'Information:', 0, this,
staffGridFocus, informationIcon);

However, I get a runtime error:

ArgumentError: Error #1063: Argument count mismatch on
main/main::staffGridFocus(). Expected 0, got 1.

I'm  *guessing* that the Alert windows's closeEvent is being passed as
an arguement to the function for some reason.

How can I prevent this, or have you guys any other ideas please?



RE: [flexcoders] Re: Actionscript - Canvas.addChild() - objects overwritting eachother???

2008-01-02 Thread Mark Ingram
You would normally only need to do something like this:

var myVBox:VBox = new VBox();
this.addChild(myVBox);

var textBox1:TextArea = new TextArea();
myVBox.addChild(textBox1);

var textBox2:TextArea = new TextArea();
myVBox.addChild(textArea2);

Mark

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of anthony_morsey
Sent: 02 January 2008 15:59
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Actionscript - Canvas.addChild() - objects
overwritting eachother???

Mark,

I've tried VBox with the same results.  How do I "auto-arrange" the
children so I don't have to worry about the Y coordinate?  I'de like
to just call addChild() for all of my components.  I tried the following

var myVBox:VBox = new  VBox();  
myVBox.setStyle('backgroundColor', '#FF'); 
myVBox.autoLayout = true;
myVBox.creationPolicy = 'auto';

What am I missing?  Is it because I'm creating the VBox control in
actionscript instead of in the mxml code?

Thanks

Tony
--- In flexcoders@yahoogroups.com, "Mark Ingram" <[EMAIL PROTECTED]> wrote:
>
> You're missing the coordinates of your text boxes. A canvas arranges
> children by exact coordinates (default 0, 0). Look at the HBox / VBox
> controls if you want to auto-arrange child controls.
> 
> Mark
> 
>  
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of anthony_morsey
> Sent: 02 January 2008 13:43
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Actionscript - Canvas.addChild() - objects
> overwritting eachother???
> 
> In Actionscript - I'm trying to us a Canvas object to paste multiple
> objects such as textarea, ColumnChart, Legend, and Labels using
> Canvas.addChild(objectname). I started by adding 2 textarea objects
> and when I send the Canvas to the printer, the 2 textareas are
> overlaying/overwriting each other. How do I add these objects and have
> them appear sequential - one right after the other? What am I missing
> here?
> 
> Here is the current code:
> 
> private function doPrint():void {
> var pj:PrintJob = new PrintJob();
> var pagesToPrint:uint = 0;
> if (pj.start()) {
> var myCanvas:Canvas = new Canvas();
> myCanvas.setStyle('backgroundColor', '#FF');
> myCanvas.height = 2000;
> myCanvas.percentHeight = 100;
> 
> myCanvas.addChild(myPrintText1);
> myCanvas.addChild(myPrintText2);
> 
> pj.addPage(myCanvas);
> pj.send();
> }
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links





[flexcoders] Strange compiler error

2008-01-02 Thread Mark Ingram
I'm getting this error:

 

"1046: Type was not found or was not a compile-time constant: ."

 

Note: It doesn't give me a type at all. Sometimes when I jig around the
import statements it gives me the error in the generated actionscript.
But I've checked that and the error is usually on the last "}".

 

 

Has anyone come across this before?

 

Mark

 

 

 



[flexcoders] Re: Actionscript - Canvas.addChild() - objects overwritting eachother???

2008-01-02 Thread anthony_morsey
Mark,

I've tried VBox with the same results.  How do I "auto-arrange" the
children so I don't have to worry about the Y coordinate?  I'de like
to just call addChild() for all of my components.  I tried the following

var myVBox:VBox = new  VBox();  
myVBox.setStyle('backgroundColor', '#FF'); 
myVBox.autoLayout = true;
myVBox.creationPolicy = 'auto';

What am I missing?  Is it because I'm creating the VBox control in
actionscript instead of in the mxml code?

Thanks

Tony
--- In flexcoders@yahoogroups.com, "Mark Ingram" <[EMAIL PROTECTED]> wrote:
>
> You're missing the coordinates of your text boxes. A canvas arranges
> children by exact coordinates (default 0, 0). Look at the HBox / VBox
> controls if you want to auto-arrange child controls.
> 
> Mark
> 
>  
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of anthony_morsey
> Sent: 02 January 2008 13:43
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Actionscript - Canvas.addChild() - objects
> overwritting eachother???
> 
> In Actionscript - I'm trying to us a Canvas object to paste multiple
> objects such as textarea, ColumnChart, Legend, and Labels using
> Canvas.addChild(objectname). I started by adding 2 textarea objects
> and when I send the Canvas to the printer, the 2 textareas are
> overlaying/overwriting each other. How do I add these objects and have
> them appear sequential - one right after the other? What am I missing
> here?
> 
> Here is the current code:
> 
> private function doPrint():void {
> var pj:PrintJob = new PrintJob();
> var pagesToPrint:uint = 0;
> if (pj.start()) {
> var myCanvas:Canvas = new Canvas();
> myCanvas.setStyle('backgroundColor', '#FF');
> myCanvas.height = 2000;
> myCanvas.percentHeight = 100;
> 
> myCanvas.addChild(myPrintText1);
> myCanvas.addChild(myPrintText2);
> 
> pj.addPage(myCanvas);
> pj.send();
> }
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>




Re: [flexcoders] Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread Johannes Nel
have you tried dispatching the collection_change event from the array
collection?

On Jan 2, 2008 10:20 AM, j_lentzz <[EMAIL PROTECTED]> wrote:

>   Hi,
>
> I've got a datagrid with a custom renderer. I'm not editing in the
> datagrid, but when a row is selected, I populate some TextInputs and
> ComboBoxes to let them edit the data. When they are done, I use
> itemUpdated on the datagrid ArrayCollection. This seems to work just
> fine. However, after they edit the data, it isn't being updated in
> the datagrid. I can select a different row, then select the original
> row and the new data appears in the edit locations, but only the old
> data is displayed in the datagrid. I've tried all the invalidateXXX
> methods I could find, but nothing seems to get the datagrid do display
> the new data. Also, I can set a breakpoint, examine the
> arraycollection the datagrid uses, and the correct data is present -
> just not being displayed. What do I need to do to get the datagrid to
> be forced to used the arraycollection and update all the
> itemrenderers? I'm using 2.01, would Flex 3 be better?
>
> Thanks,
>
> John
>
>  
>



-- 
j:pn
\\no comment


[flexcoders] Datagrid Renderer not showing updated ArrayCollection

2008-01-02 Thread j_lentzz
Hi,

I've got a datagrid with a custom renderer.  I'm not editing in the
datagrid, but when a row is selected, I populate some TextInputs and
ComboBoxes to let them edit the data.  When they are done, I use
itemUpdated on the datagrid ArrayCollection.  This seems to work just
fine.  However, after they edit the data, it isn't being updated in
the datagrid.  I can select a different row, then select the original
row and the new data appears in the edit locations, but only the old
data is displayed in the datagrid.  I've tried all the invalidateXXX
methods I could find, but nothing seems to get the datagrid do display
the new data.  Also, I can set a breakpoint, examine the
arraycollection the datagrid uses, and the correct data is present -
just not being displayed.  What do I need to do to get the datagrid to
be forced to used the arraycollection and update all the
itemrenderers?  I'm using 2.01, would Flex 3 be better?

Thanks,

John



[flexcoders] Re: basic open source video player

2008-01-02 Thread Cato Paus

http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails\
&productId=2&postId=1921&loc=en_US


Cato Paus




--- In flexcoders@yahoogroups.com, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 
wrote:
>
> Does anyone know of a basic open source video (flv) player for flex?
>
> Not like Miro, which scours the net for vidoes etc etc etc.
> Just something that plays flv files and has basic controls
>
> Thanks
>








  1   2   >