RE: [flexcoders] - MXMLC -includes

2009-08-31 Thread Alex Harui
-includes takes classnames not file or directory names.  If you don't want an 
ever-growing commandline, use a -config file.

For example, for the project Foo.mxml, the file Foo-config.xml can contain 
other mxmlc options like




somepackage.somesubpackage.SomeClass
someotherpackage.someothersubpackage.SomeOtherClass

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Eduardo Dias
Sent: Monday, August 31, 2009 9:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] - MXMLC -includes



Hello Guys,

I would like to force the flex compiler to include a set of class from a 
specific dir. I'm using ant to compile my project and i know that i can use the 
compiler option -includes to links one or more classes. However i don't want to 
everytime I create a new class have to add it at the compiler arguments. Do you 
guys know how can I include a entire dir and force the compiler to include 
these classes?

Thank for your time



RE: [flexcoders] Re: BrowserManager crossdomain issues

2009-08-31 Thread Alex Harui
Smells like a JS/Flash security issue and maybe a JS side call will fix it.  
I'm not an expert in this area though.

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of david.keutgens
Sent: Monday, August 31, 2009 7:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BrowserManager crossdomain issues



Both domains are https. Yeah, I'll use the debugger but I get the impression 
that this is a Flash Player security restriction.

-David

--- In flexcoders@yahoogroups.com, Alex 
Harui  wrote:
>
> Is one domain https and the other http? Are you calling setTitle in your 
> code? Maybe debug through that to see what is going on.
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of david.keutgens
> Sent: Monday, August 31, 2009 4:09 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: BrowserManager crossdomain issues
>
>
>
> Hi Alex,
>
> This is a SWF compiled with Flex SDK 3.3 running in Firefox 3.5. The 
> BrowserManager code works fine when the HTML/JavaScript and SWF are hosted in 
> the same domain, only separating them breaks it.
>
> Thanks,
> David
>
> --- In 
> flexcoders@yahoogroups.com,
>  Alex Harui  wrote:
> >
> > Which browser? Might be an issue with HistoryFrame.html on IE?
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: 
> > flexcoders@yahoogroups.com
> >  
> > [mailto:flexcoders@yahoogroups.com]
> >  On Behalf Of david.keutgens
> > Sent: Monday, August 31, 2009 5:05 AM
> > To: 
> > flexcoders@yahoogroups.com
> > Subject: [flexcoders] BrowserManager crossdomain issues
> >
> >
> >
> > Hi All,
> >
> > I'm trying to host the html-template files provided by Flex Builder 
> > (including all necessary JavaScript) on one domain ("www.mydomain.com") and 
> > the embedded SWF on another ("swf.mydomain.com").
> >
> > Now, even though I call Security.allowDomain("*.mydomain.com") in my Flex 
> > app and allowScriptAccess="always" in the embedding html, FlashPlayer 
> > complains about a SecurityViolation in flashlog.txt. It actually happens as 
> > soon as I hit the browser's back button.
> >
> > Firebug reports: "uncaught exception: Error calling method on NPObject! 
> > [plugin
> > exception: Error in Actionscript. Use a try/catch block to find
> > error.]."
> > The exception gets thrown in the setTitle function in history.js.
> >
> > Crossdomain files don't seem to be the issue, they're set up and working 
> > fine for other content.
> >
> > I cannot really find any reference of others who tried this before, does 
> > anyone know if it is actually possible at all to host the history related 
> > JavaScript in a different domain than the SWF?
> >
>



[flexcoders] - MXMLC -includes

2009-08-31 Thread Eduardo Dias
Hello Guys,

I would like to force the flex compiler to include a set of class from a
specific dir. I'm using ant to compile my project and i know that i can use
the compiler option -includes to links one or more classes. However i don't
want to everytime I create a new class have to add it at the compiler
arguments. Do you guys know how can I include a entire dir and force the
compiler to include these classes?

Thank for your time


Re: [flexcoders] How to get X, Y position/coordinates of a specific character/letter in a text field

2009-08-31 Thread cholid cholid
can any body know how to get x, y position of chart?

--- On Mon, 8/31/09, Ian Thomas  wrote:

From: Ian Thomas 
Subject: Re: [flexcoders] How to get X, Y position/coordinates of a specific  
character/letter in a text field
To: flexcoders@yahoogroups.com
Date: Monday, August 31, 2009, 8:35 PM






 





  The mx.controls. TextInput component has the .textField 
property that I

mentioned in my second email.



Are you using spark.components. TextInput instead? In which case I

don't know, I'm afraid - haven't delved that deep into Spark yet.



Sorry!



Ian



On Mon, Aug 31, 2009 at 9:29 PM, Baz wrote:

>

>

> Hey Thanks Ian,

>

> I was just looking at that actually but TextInput doesn't seem to have it

> (Flex 4). I read that you can use:

>

> import mx.core.mx_internal ;

> use namespace mx_internal;

>

> to access TextField and then getCharBoundaries( ) but that doesn't seem to

> work in Flex 4.

>

> Any ideas?

>

> Thanks,

> Baz

>

>

>

> On Mon, Aug 31, 2009 at 1:19 PM, Ian Thomas  wrote:

>>

>>

>>

>> Take a look at flash.text.TextFiel d.getCharBoundar ies() (and other

>> TextField methods).

>>

>> HTH,

>> Ian

>>

>> On Mon, Aug 31, 2009 at 8:53 PM, Baz wrote:

>> >

>> >

>> > Anyone know how to get the X/Y coordinates of a specific

>> > character/letter in

>> > a text field or text input?

>> >

>> > Thanks!

>> >

>> >

>

> 


 

  




 

















  

[flexcoders] Re: manual update of air by opening new version fails - but update framework works

2009-08-31 Thread arieljake
Basically, now, when we click to open a .air file that has a newer version, it 
only opens the existing app, like a shortcut.

Doesn't this cause an update for others?

--- In flexcoders@yahoogroups.com, "arieljake"  wrote:
>
> We are able to use the update framework to update our apps, and I remember at 
> one point, users could double click a newer version of our .air file to 
> update their program, but that has stopped working.
> 
> What needs to be in place for that type of manual update to work?
> 
> Thanks.
>




[flexcoders] Re: BrowserManager crossdomain issues

2009-08-31 Thread david.keutgens
Both domains are https. Yeah, I'll use the debugger but I get the impression 
that this is a Flash Player security restriction.

-David


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Is one domain https and the other http?  Are you calling setTitle in your 
> code?  Maybe debug through that to see what is going on.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of david.keutgens
> Sent: Monday, August 31, 2009 4:09 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: BrowserManager crossdomain issues
> 
> 
> 
> Hi Alex,
> 
> This is a SWF compiled with Flex SDK 3.3 running in Firefox 3.5. The 
> BrowserManager code works fine when the HTML/JavaScript and SWF are hosted in 
> the same domain, only separating them breaks it.
> 
> Thanks,
> David
> 
> --- In flexcoders@yahoogroups.com, Alex 
> Harui  wrote:
> >
> > Which browser? Might be an issue with HistoryFrame.html on IE?
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com 
> > [mailto:flexcoders@yahoogroups.com] On 
> > Behalf Of david.keutgens
> > Sent: Monday, August 31, 2009 5:05 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] BrowserManager crossdomain issues
> >
> >
> >
> > Hi All,
> >
> > I'm trying to host the html-template files provided by Flex Builder 
> > (including all necessary JavaScript) on one domain ("www.mydomain.com") and 
> > the embedded SWF on another ("swf.mydomain.com").
> >
> > Now, even though I call Security.allowDomain("*.mydomain.com") in my Flex 
> > app and allowScriptAccess="always" in the embedding html, FlashPlayer 
> > complains about a SecurityViolation in flashlog.txt. It actually happens as 
> > soon as I hit the browser's back button.
> >
> > Firebug reports: "uncaught exception: Error calling method on NPObject! 
> > [plugin
> > exception: Error in Actionscript. Use a try/catch block to find
> > error.]."
> > The exception gets thrown in the setTitle function in history.js.
> >
> > Crossdomain files don't seem to be the issue, they're set up and working 
> > fine for other content.
> >
> > I cannot really find any reference of others who tried this before, does 
> > anyone know if it is actually possible at all to host the history related 
> > JavaScript in a different domain than the SWF?
> >
>




RE: [flexcoders] Re: BrowserManager crossdomain issues

2009-08-31 Thread Alex Harui
Is one domain https and the other http?  Are you calling setTitle in your code? 
 Maybe debug through that to see what is going on.

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of david.keutgens
Sent: Monday, August 31, 2009 4:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BrowserManager crossdomain issues



Hi Alex,

This is a SWF compiled with Flex SDK 3.3 running in Firefox 3.5. The 
BrowserManager code works fine when the HTML/JavaScript and SWF are hosted in 
the same domain, only separating them breaks it.

Thanks,
David

--- In flexcoders@yahoogroups.com, Alex 
Harui  wrote:
>
> Which browser? Might be an issue with HistoryFrame.html on IE?
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of david.keutgens
> Sent: Monday, August 31, 2009 5:05 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] BrowserManager crossdomain issues
>
>
>
> Hi All,
>
> I'm trying to host the html-template files provided by Flex Builder 
> (including all necessary JavaScript) on one domain ("www.mydomain.com") and 
> the embedded SWF on another ("swf.mydomain.com").
>
> Now, even though I call Security.allowDomain("*.mydomain.com") in my Flex app 
> and allowScriptAccess="always" in the embedding html, FlashPlayer complains 
> about a SecurityViolation in flashlog.txt. It actually happens as soon as I 
> hit the browser's back button.
>
> Firebug reports: "uncaught exception: Error calling method on NPObject! 
> [plugin
> exception: Error in Actionscript. Use a try/catch block to find
> error.]."
> The exception gets thrown in the setTitle function in history.js.
>
> Crossdomain files don't seem to be the issue, they're set up and working fine 
> for other content.
>
> I cannot really find any reference of others who tried this before, does 
> anyone know if it is actually possible at all to host the history related 
> JavaScript in a different domain than the SWF?
>



RE: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps

2009-08-31 Thread Alex Harui
The rule for fonts in Flex is that whatever TextField or subclass of TextFIeld 
(like DataGridItemRenderer) is displaying the font must be created in the 
module containing the font.  I haven't used pureMVC so I don't know how it 
could break that.  Most Flex components use a lookup scheme to figure out which 
moduleFactory to use.  Others like Charts and DataGrid need to use 
ContextualClassFactory instead of the default ClassFactory.  Could you have 
changed something in there?

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of djhatrick
Sent: Monday, August 31, 2009 2:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps



Alex,

My problem I think is because i accessed my modules model directly from one of 
my commands in my shell -- on accident... (using puremvc)

Is kind of thing normal? Any reason to why this would make one of my fonts 
disappear. I want to prevent accidents like this in the future, Link reports 
are next on my hit-list with this project.

Thanks for responding,
Patrick

--- In flexcoders@yahoogroups.com, Alex 
Harui  wrote:
>
> Most common scenario: you switched to using a bold font, but didn't embed the 
> bold font, just the normal font.
>
> Second: The font didn't get embedded. Use -keep-generated-actionscript or 
> -link-report to see if the font is really there
>
> Third: If fonts are in modules, make sure they are loaded and didn't get 
> unloaded
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of djhatrick
> Sent: Monday, August 31, 2009 9:59 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps
>
>
>
> All of a sudden this happened again, to my modules, all my fonts are missing? 
> I don't know how to restore my previous changes and see what simple change 
> could have caused this. Other than replacing about 5 hours work and trying to 
> re-add each change one at a time.
>
> On a scale of 1-10 for annoying problems this off the chart. I am not doing 
> anything unusual here. I just made a few changes to some properties and 
> collections and now I don't see any fonts.
>
> Any suggestions here?
>
> Thanks,
> Patrick
>
> --- In 
> flexcoders@yahoogroups.com,
>  Alex Harui  wrote:
> >
> > Not sure I understood the problem, but the first thing to know about 
> > sub-modules is that by default they load into sibling applicationdomains. 
> > This is due to the way applicationdomains work. You can look at the 
> > diagrams in the modules presentation on my blog to help visualize it.
> >
> > The main Flex app almost always has ModuleManager in it to support CSS and 
> > Resource Modules. When you load a module, the main app's appDom is the 
> > parent and the module gets loaded as a child of that appdom. That's what we 
> > want, right? But the problem is that when that module tries to load a 
> > sub-module, it is going to use the main apps' ModuleManager and thus the 
> > sub-module loads as a child of the main app's appdom and not the module's 
> > appdom and then sub-module can't see the module's classes. I'm guessing 
> > that's your problem.
> >
> > The solution is to explicitly set the applicationDomain parameter when 
> > loading the sub-module. But even that can be tricky because when you say 
> > "new ApplicationDomain(ApplicationDomain.currentDomain)" if that code is in 
> > a class loaded in the main app's appdom, currentDomain is the main app's 
> > appdom. So be sure the code that calls load is in the module and nowhere 
> > else.
> >
> > Maybe that'll help.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: 
> > flexcoders@yahoogroups.com
> >  
> > [mailto:flexcoders@yahoogroups.com]
> >  On Behalf Of djhatrick
> > Sent: Friday, August 07, 2009 10:13 AM
> > To: 
> > flexcoders@yahoogroups.com
> > Subject: [flexcoders] Modules and fonts vanishing is giving me the cramps
> >
> >
> >
> > Alex (or/and others)
> >
> > Here's my issue, I have a module that loads another module, a sub module. I 
> > am trying to access the loaded module, the problem is that first, if I add 
> > it to my shared code file, doesn't it compiled into the

[flexcoders] Re: BrowserManager crossdomain issues

2009-08-31 Thread david.keutgens
Hi Alex,

This is a SWF compiled with Flex SDK 3.3 running in Firefox 3.5. The 
BrowserManager code works fine when the HTML/JavaScript and SWF are hosted in 
the same domain, only separating them breaks it.

Thanks,
David



--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Which browser?  Might be an issue with HistoryFrame.html on IE?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of david.keutgens
> Sent: Monday, August 31, 2009 5:05 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] BrowserManager crossdomain issues
> 
> 
> 
> Hi All,
> 
> I'm trying to host the html-template files provided by Flex Builder 
> (including all necessary JavaScript) on one domain ("www.mydomain.com") and 
> the embedded SWF on another ("swf.mydomain.com").
> 
> Now, even though I call Security.allowDomain("*.mydomain.com") in my Flex app 
> and allowScriptAccess="always" in the embedding html, FlashPlayer complains 
> about a SecurityViolation in flashlog.txt. It actually happens as soon as I 
> hit the browser's back button.
> 
> Firebug reports: "uncaught exception: Error calling method on NPObject! 
> [plugin
> exception: Error in Actionscript. Use a try/catch block to find
> error.]."
> The exception gets thrown in the setTitle function in history.js.
> 
> Crossdomain files don't seem to be the issue, they're set up and working fine 
> for other content.
> 
> I cannot really find any reference of others who tried this before, does 
> anyone know if it is actually possible at all to host the history related 
> JavaScript in a different domain than the SWF?
>




[flexcoders] CSV file: Coldfusion to Flex/Air

2009-08-31 Thread Scott
Has anyone created a dynamic query to csv through Coldfusion and been
able to receive it through Flex or Air?

 

When I was doing straight Coldfusion code I could create a CSV file on
the fly without dumping it on the webserver first.  I can't see anyway
to pass that back through to Air, does anyone know if a way?

 

sj

 



[flexcoders] Re: Modules and fonts vanishing is giving me the cramps

2009-08-31 Thread djhatrick
Alex,

My problem I think is because i accessed my modules model directly from one of 
my commands in my shell -- on accident... (using puremvc)  

Is kind of thing normal?  Any reason to why this would make one of my fonts 
disappear.  I want to prevent accidents like this in the future, Link reports 
are next on my hit-list with this project.

Thanks for responding,
Patrick





--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Most common scenario:  you switched to using a bold font, but didn't embed 
> the bold font, just the normal font.
> 
> Second:  The font didn't get embedded.  Use -keep-generated-actionscript or 
> -link-report to see if the font is really there
> 
> Third:  If fonts are in modules, make sure they are loaded and didn't get 
> unloaded
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of djhatrick
> Sent: Monday, August 31, 2009 9:59 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps
> 
> 
> 
> All of a sudden this happened again, to my modules, all my fonts are missing? 
> I don't know how to restore my previous changes and see what simple change 
> could have caused this. Other than replacing about 5 hours work and trying to 
> re-add each change one at a time.
> 
> On a scale of 1-10 for annoying problems this off the chart. I am not doing 
> anything unusual here. I just made a few changes to some properties and 
> collections and now I don't see any fonts.
> 
> Any suggestions here?
> 
> Thanks,
> Patrick
> 
> --- In flexcoders@yahoogroups.com, Alex 
> Harui  wrote:
> >
> > Not sure I understood the problem, but the first thing to know about 
> > sub-modules is that by default they load into sibling applicationdomains. 
> > This is due to the way applicationdomains work. You can look at the 
> > diagrams in the modules presentation on my blog to help visualize it.
> >
> > The main Flex app almost always has ModuleManager in it to support CSS and 
> > Resource Modules. When you load a module, the main app's appDom is the 
> > parent and the module gets loaded as a child of that appdom. That's what we 
> > want, right? But the problem is that when that module tries to load a 
> > sub-module, it is going to use the main apps' ModuleManager and thus the 
> > sub-module loads as a child of the main app's appdom and not the module's 
> > appdom and then sub-module can't see the module's classes. I'm guessing 
> > that's your problem.
> >
> > The solution is to explicitly set the applicationDomain parameter when 
> > loading the sub-module. But even that can be tricky because when you say 
> > "new ApplicationDomain(ApplicationDomain.currentDomain)" if that code is in 
> > a class loaded in the main app's appdom, currentDomain is the main app's 
> > appdom. So be sure the code that calls load is in the module and nowhere 
> > else.
> >
> > Maybe that'll help.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@yahoogroups.com 
> > [mailto:flexcoders@yahoogroups.com] On 
> > Behalf Of djhatrick
> > Sent: Friday, August 07, 2009 10:13 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Modules and fonts vanishing is giving me the cramps
> >
> >
> >
> > Alex (or/and others)
> >
> > Here's my issue, I have a module that loads another module, a sub module. I 
> > am trying to access the loaded module, the problem is that first, if I add 
> > it to my shared code file, doesn't it compiled into the shell? or just a 
> > reference
> >
> > I can access methods on my module through it's public properties, but I 
> > have to assign it as wildcard, "*"? Which works 90 percent of the time, but 
> > once in a while the module's or it's properties come back as undefined. So, 
> > I tried the shared code solution again, but then my fonts mysteriously 
> > vanish out of my app.
> >
> > Help, I am gonna go smack my head with a hammer a few times, Thanks,
> > Patrick
> >
>




Re: [flexcoders] Largest DataGrid

2009-08-31 Thread Richard Rodseth
Here's an excellent resource:

http://www.jamesward.com/census/

On Mon, Aug 31, 2009 at 10:31 AM, Tracy Spratt  wrote:

>
>
>  Not a simple question.
>
>
>
> The issue with performance and datagrid is rendering. Poorly optimized item
> renderers are the primary problem.  A large number of accesses of XML nodes
> has also been shown to be problematic.
>
>
>
> Understand that what matters is what is visible on screen.  Beyond that,
> there will be no significant difference in performance for large data sets.
>
>
>
> Data service latency and user experience are additional issues to consider.
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> Behalf Of *Scott
> *Sent:* Sunday, August 30, 2009 10:45 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Largest DataGrid
>
>
>
>
>
> What’s the largest DataGrid you have populated with data?  And speed and/or
> memory issues with really large ones?
>
>
>
> Thanks
>
>   Scott
>   
>


[flexcoders] Re: RegExpValidator Not working with code-behind - SOLVED

2009-08-31 Thread gtb104
The solution was to declare the regexp in the mxml, escaping the { and } 
characters.  Once I did that, it worked as expected.




Geoff

--- In flexcoders@yahoogroups.com, "Geoffrey"  wrote:
>
> Didn't seem to help.
> 
> I changed the String to a RegExp, escaped and didn't escape the {} 
> characters, and also tried with and without the [Bindable] metadata tag.  As 
> long as the regular expression is in the actionscript file, it just doesn't 
> work properly.  Actually, in this instance, nothing ever validates as a valid 
> IP address.
> 
> Geoff
> 
> --- In flexcoders@yahoogroups.com, Ian Thomas  wrote:
> >
> > Geoff,
> >Try:
> > 
> > public var validIPExpression:RegExp =
> > /^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$/;
> > 
> > instead.
> > 
> > Could be because by directly specifying the expression, the MXML->AS
> > parser correctly decides to treat it as a RegExp. But when directly
> > binding to the value, binding sees it just as a String.
> > 
> > HTH,
> >Ian
> > 
> > On Thu, Aug 13, 2009 at 5:17 PM, Geoffrey wrote:
> > >
> > >
> > > We use the code-behind technique to attach AS to MXML. Doing this has 
> > > caused
> > > an interesting issue with RegExpValidator. If the regular expression is
> > > defined in the AS file and contains a quantifier, it causes validation to
> > > act funky.
> > >
> > > In the following example, if you type about 20 zeroes into the IP field it
> > > goes from invalid, to valid, and back to invalid. Obviously it should be
> > > invalid after the first zero is typed and stay that way unless a proper IP
> > > is entered. However, if you take the same regExp string and put it in the
> > > MXML file it works as expected. Note that escaping or not escaping the { 
> > > or
> > > } characters while the string is in the AS file has no effect on the
> > > validation.
> > >
> > > Test.mxml
> > > -
> > > http://www.adobe.com/2006/mxml";
> > > xmlns:local="*"
> > > minWidth="800" minHeight="600">
> > >
> > > 
> > >
> > > 
> > >
> > > MyComp.mxml
> > > ---
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > xmlns:custom="*">
> > >
> > >  > > label="IP Address: "
> > > required="true">
> > > 
> > > 
> > >
> > >  > > expression="{validIPExpression}"
> > > source="{tiIPAddress}"
> > > property="text"
> > > trigger="{tiIPAddress}"
> > > triggerEvent="change"
> > > noMatchError="Invalid IP Address Format."/>
> > >
> > > 
> > >
> > > 
> > >
> > > MyCompScript.as
> > > ---
> > > package
> > > {
> > > import mx.containers.Form;
> > >
> > > public class MyCompScript extends Form
> > > {
> > > [Bindable]
> > > public var validIPExpression:String =
> > > "^(([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])$";
> > > //public var validIPExpression:String =
> > > "^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$";
> > > // Neither of the above work
> > >
> > > public function MyCompScript()
> > > {
> > > super();
> > > }
> > > }
> > > }
> > >
> > > Does this seem like a bug, or just a limitation introduced by using the
> > > code-behind technique?
> > >
> > > Thanks,
> > > Geoff
> > >
> > > p.s. Don't know what code-behind is?
> > > http://learn.adobe.com/wiki/display/Flex/Code+Behind
> > >
> > >
> >
>




Re: [flexcoders] How to get X, Y position/coordinates of a specific character/letter in a text field

2009-08-31 Thread Ian Thomas
The mx.controls.TextInput component has the .textField property that I
mentioned in my second email.

Are you using spark.components.TextInput instead? In which case I
don't know, I'm afraid - haven't delved that deep into Spark yet.

Sorry!

Ian

On Mon, Aug 31, 2009 at 9:29 PM, Baz wrote:
>
>
> Hey Thanks Ian,
>
> I was just looking at that actually but TextInput doesn't seem to have it
> (Flex 4). I read that you can use:
>
> import mx.core.mx_internal;
> use namespace mx_internal;
>
> to access TextField and then getCharBoundaries() but that doesn't seem to
> work in Flex 4.
>
> Any ideas?
>
> Thanks,
> Baz
>
>
>
> On Mon, Aug 31, 2009 at 1:19 PM, Ian Thomas  wrote:
>>
>>
>>
>> Take a look at flash.text.TextField.getCharBoundaries() (and other
>> TextField methods).
>>
>> HTH,
>> Ian
>>
>> On Mon, Aug 31, 2009 at 8:53 PM, Baz wrote:
>> >
>> >
>> > Anyone know how to get the X/Y coordinates of a specific
>> > character/letter in
>> > a text field or text input?
>> >
>> > Thanks!
>> >
>> >
>
> 


[flexcoders] Re: Text Effect: One Letter at a Time

2009-08-31 Thread Baz
I am thinking that I need to isolate the position of the specific letter,
then create a new text element with that letter to animate then destroy.
What do you guys think, is that the way to go? Is there a more efficient
way?

Cheers,
Baz



On Mon, Aug 31, 2009 at 10:56 AM, Baz  wrote:

> Is it possible to apply an effect on a single letter in a textinput field?
> For example, when a letter gets typed (*change* effect), that letter expands
> and fades out. So if someone types a word, each letter of that word
> independently and sequentially expands and fades out as they are typed.
>
> Cheers.
>


Re: [flexcoders] How to get X, Y position/coordinates of a specific character/letter in a text field

2009-08-31 Thread Baz
Hey Thanks Ian,

I was just looking at that actually but TextInput doesn't seem to have it
(Flex 4). I read that you can use:

import mx.core.mx_internal;
use namespace mx_internal;

to access TextField and then getCharBoundaries() but that doesn't seem to
work in Flex 4.

Any ideas?

Thanks,
Baz



On Mon, Aug 31, 2009 at 1:19 PM, Ian Thomas  wrote:

>
>
> Take a look at flash.text.TextField.getCharBoundaries() (and other
> TextField methods).
>
> HTH,
> Ian
>
>
> On Mon, Aug 31, 2009 at 8:53 PM, 
> Baz>
> wrote:
> >
> >
> > Anyone know how to get the X/Y coordinates of a specific character/letter
> in
> > a text field or text input?
> >
> > Thanks!
> >
> >
>  
>


Re: [flexcoders] How to get X, Y position/coordinates of a specific character/letter in a text field

2009-08-31 Thread Ian Thomas
Oh - sorry, should have said - you'll need to get at the .textField
property of (for example) your mx.controls.Text object, which will
give you back the raw flash.text.TextField for you to then call
getCharBoundaries() on it.

Unfortunately, .textField is a protected property of mx.controls.Text,
so can't be seen from outside the class.

The simplest way to get at it is to extend mx.controls.Text - build
your own component that inherits from Text. That will give you access
to the .textField property you need; then you can call methods on it
as appropriate.

HTH,
   Ian

On Mon, Aug 31, 2009 at 9:19 PM, Ian Thomas wrote:
> Take a look at flash.text.TextField.getCharBoundaries() (and other
> TextField methods).
>
> HTH,
>   Ian
>
> On Mon, Aug 31, 2009 at 8:53 PM, Baz wrote:
>>
>>
>> Anyone know how to get the X/Y coordinates of a specific character/letter in
>> a text field or text input?
>>
>> Thanks!
>>
>> 
>


Re: [flexcoders] How to get X, Y position/coordinates of a specific character/letter in a text field

2009-08-31 Thread Ian Thomas
Take a look at flash.text.TextField.getCharBoundaries() (and other
TextField methods).

HTH,
   Ian

On Mon, Aug 31, 2009 at 8:53 PM, Baz wrote:
>
>
> Anyone know how to get the X/Y coordinates of a specific character/letter in
> a text field or text input?
>
> Thanks!
>
> 


[flexcoders] How to get X, Y position/coordinates of a specific character/letter in a text field

2009-08-31 Thread Baz
Anyone know how to get the X/Y coordinates of a specific character/letter in
a text field or text input?

Thanks!


RE: [flexcoders] Why no event dispatched?

2009-08-31 Thread Wally Kolcz

My Events:

package com.isavepets.rm.events
{
import flash.events.Event;

public class LoginEvent extends Event
{

public static const LOGIN:String = "loginEvent";
public static const LOGOUT:String = "logoutEvent";
public static const FAILED:String = "loginAttemptFailedEvent";

public var username:String;
public var password:String;

public function LoginEvent(type:String, bubbles:Boolean=true, 
cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

}
}

My Listener on the LoginPanel component View:

public function attemptLogin(username:String, password:String):void {
this.addEventListener(LoginEvent.FAILED, loginFailed);
var login:LoginEvent = new LoginEvent(LoginEvent.LOGIN);
login.username = username;
login.password = password;
dispatchEvent(login);
}


From: "Tracy Spratt" 
Sent: Monday, August 31, 2009 10:37 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Why no event dispatched? 

Your event is not set to bubble, so you
listener must be: myLoginManagerInstance.addEventListener();  Is it?   Tracy 
Spratt,  Lariat Services, development services
available 

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Wally Kolcz
Sent: Monday, August 31, 2009
12:09 PM
To:flexcoders@yahoogroups.com
Subject: [flexcoders] Why no event
dispatched?  

Can anyone tell me what I am missing from this Class
that not dispatch the LoginEvent.FAILED?

package com.isavepets.rm.business

{

import com.isavepets.rm.events.LoginEvent;

import flash.events.EventDispatcher;

import flash.events.IEventDispatcher;

import mx.collections.ArrayCollection;

public class LoginManager extends EventDispatcher

{

public var username:String;

public var role:String;

public var rescueID:int;

public function LoginManager(target:IEventDispatcher=null)

{

super(target);

}

public function manageLogin(e:ArrayCollection):Boolean
{

if (e.length !=0){

DataModel.getInstance().username = e.getItemAt(0).username;

DataModel.getInstance().role = e.getItemAt(0).role;

DataModel.getInstance().rescueID = e.getItemAt(0).rescueID;

return true;

}else{

this.dispatchEvent(new LoginEvent(LoginEvent.FAILED));

/*
Alert.show("Incorrect Username and/or Password, Please Try Again",
"Login Failed"); */

return false;

}

}

}

}





RE: [flexcoders] mx:tree hand cursor on disclosure icons (the arrows next to folders) possible?

2009-08-31 Thread Alex Harui
useHandCursor=true in a custom TreeItemRenderer?

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of fotis.chatzinikos
Sent: Monday, August 31, 2009 1:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx:tree hand cursor on disclosure icons (the arrows next 
to folders) possible?



Is there a way to set the hand cursor on the disclosure icons? (The little 
arrows next to the folders in the tree)

Thanks,
Fotis



RE: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps

2009-08-31 Thread Alex Harui
Most common scenario:  you switched to using a bold font, but didn't embed the 
bold font, just the normal font.

Second:  The font didn't get embedded.  Use -keep-generated-actionscript or 
-link-report to see if the font is really there

Third:  If fonts are in modules, make sure they are loaded and didn't get 
unloaded

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of djhatrick
Sent: Monday, August 31, 2009 9:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps



All of a sudden this happened again, to my modules, all my fonts are missing? I 
don't know how to restore my previous changes and see what simple change could 
have caused this. Other than replacing about 5 hours work and trying to re-add 
each change one at a time.

On a scale of 1-10 for annoying problems this off the chart. I am not doing 
anything unusual here. I just made a few changes to some properties and 
collections and now I don't see any fonts.

Any suggestions here?

Thanks,
Patrick

--- In flexcoders@yahoogroups.com, Alex 
Harui  wrote:
>
> Not sure I understood the problem, but the first thing to know about 
> sub-modules is that by default they load into sibling applicationdomains. 
> This is due to the way applicationdomains work. You can look at the diagrams 
> in the modules presentation on my blog to help visualize it.
>
> The main Flex app almost always has ModuleManager in it to support CSS and 
> Resource Modules. When you load a module, the main app's appDom is the parent 
> and the module gets loaded as a child of that appdom. That's what we want, 
> right? But the problem is that when that module tries to load a sub-module, 
> it is going to use the main apps' ModuleManager and thus the sub-module loads 
> as a child of the main app's appdom and not the module's appdom and then 
> sub-module can't see the module's classes. I'm guessing that's your problem.
>
> The solution is to explicitly set the applicationDomain parameter when 
> loading the sub-module. But even that can be tricky because when you say "new 
> ApplicationDomain(ApplicationDomain.currentDomain)" if that code is in a 
> class loaded in the main app's appdom, currentDomain is the main app's 
> appdom. So be sure the code that calls load is in the module and nowhere else.
>
> Maybe that'll help.
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of djhatrick
> Sent: Friday, August 07, 2009 10:13 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Modules and fonts vanishing is giving me the cramps
>
>
>
> Alex (or/and others)
>
> Here's my issue, I have a module that loads another module, a sub module. I 
> am trying to access the loaded module, the problem is that first, if I add it 
> to my shared code file, doesn't it compiled into the shell? or just a 
> reference
>
> I can access methods on my module through it's public properties, but I have 
> to assign it as wildcard, "*"? Which works 90 percent of the time, but once 
> in a while the module's or it's properties come back as undefined. So, I 
> tried the shared code solution again, but then my fonts mysteriously vanish 
> out of my app.
>
> Help, I am gonna go smack my head with a hammer a few times, Thanks,
> Patrick
>



RE: [flexcoders] BrowserManager crossdomain issues

2009-08-31 Thread Alex Harui
Which browser?  Might be an issue with HistoryFrame.html on IE?

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of david.keutgens
Sent: Monday, August 31, 2009 5:05 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] BrowserManager crossdomain issues



Hi All,

I'm trying to host the html-template files provided by Flex Builder (including 
all necessary JavaScript) on one domain ("www.mydomain.com") and the embedded 
SWF on another ("swf.mydomain.com").

Now, even though I call Security.allowDomain("*.mydomain.com") in my Flex app 
and allowScriptAccess="always" in the embedding html, FlashPlayer complains 
about a SecurityViolation in flashlog.txt. It actually happens as soon as I hit 
the browser's back button.

Firebug reports: "uncaught exception: Error calling method on NPObject! [plugin
exception: Error in Actionscript. Use a try/catch block to find
error.]."
The exception gets thrown in the setTitle function in history.js.

Crossdomain files don't seem to be the issue, they're set up and working fine 
for other content.

I cannot really find any reference of others who tried this before, does anyone 
know if it is actually possible at all to host the history related JavaScript 
in a different domain than the SWF?



[flexcoders] Text Effect: One Letter at a Time

2009-08-31 Thread Baz
Is it possible to apply an effect on a single letter in a textinput field?
For example, when a letter gets typed (*change* effect), that letter expands
and fades out. So if someone types a word, each letter of that word
independently and sequentially expands and fades out as they are typed.

Cheers.


RE: [flexcoders] Popup Help Bubble?

2009-08-31 Thread Tracy Spratt
Tooltip?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of dfalling
Sent: Monday, August 31, 2009 12:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Popup Help Bubble?

 

  

I could have sworn I saw a flex component to do this, but I can't find it.
Is there a good component/method of showing multiple help popups all over
the screen? I want a way to annotate numerous controls and buttons at the
same time, to point out new features in an application.





RE: [flexcoders] Why no event dispatched?

2009-08-31 Thread Tracy Spratt
Your event is not set to bubble, so you listener must be:
myLoginManagerInstance.addEventListener();  Is it?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Monday, August 31, 2009 12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Why no event dispatched?

 

  

Can anyone tell me what I am missing from this Class that not dispatch the
LoginEvent.FAILED?

package com.isavepets.rm.business
{
import com.isavepets.rm.events.LoginEvent;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import mx.collections.ArrayCollection;

public class LoginManager extends EventDispatcher
{

public var username:String;
public var role:String;
public var rescueID:int;

public function LoginManager(target:IEventDispatcher=null)
{
super(target);
}

public function manageLogin(e:ArrayCollection):Boolean {
if (e.length !=0){
DataModel.getInstance().username = e.getItemAt(0).username;
DataModel.getInstance().role = e.getItemAt(0).role;
DataModel.getInstance().rescueID = e.getItemAt(0).rescueID;
return true;
}else{
this.dispatchEvent(new LoginEvent(LoginEvent.FAILED));
/* Alert.show("Incorrect Username and/or Password, Please
Try Again", "Login Failed"); */
return false;
}
}

}
}







RE: [flexcoders] Largest DataGrid

2009-08-31 Thread Tracy Spratt
Not a simple question.

 

The issue with performance and datagrid is rendering. Poorly optimized item
renderers are the primary problem.  A large number of accesses of XML nodes
has also been shown to be problematic.

 

Understand that what matters is what is visible on screen.  Beyond that,
there will be no significant difference in performance for large data sets.

 

Data service latency and user experience are additional issues to consider.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Sunday, August 30, 2009 10:45 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Largest DataGrid

 

  

What's the largest DataGrid you have populated with data?  And speed and/or
memory issues with really large ones?

 

Thanks

  Scott





[flexcoders] Re: Modules and fonts vanishing is giving me the cramps

2009-08-31 Thread djhatrick
All of a sudden this happened again, to my modules, all my fonts are missing?  
I don't know how to restore my previous changes and see what simple change 
could have caused this.  Other than replacing about 5 hours work and trying to 
re-add each change one at a time.

On a scale of 1-10 for annoying problems this off the chart.  I am not doing 
anything unusual here. I just made a few changes to some properties and 
collections and now I don't see any fonts.

Any suggestions here?

Thanks,
Patrick


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Not sure I understood the problem, but the first thing to know about 
> sub-modules is that by default they load into sibling applicationdomains.  
> This is due to the way applicationdomains work.  You can look at the diagrams 
> in the modules presentation on my blog to help visualize it.
> 
> The main Flex app almost always has ModuleManager in it to support CSS and 
> Resource Modules.  When you load a module, the main app's appDom is the 
> parent and the module gets loaded as a child of that appdom.  That's what we 
> want, right?  But the problem is that when that module tries to load a 
> sub-module, it is going to use the main apps' ModuleManager and thus the 
> sub-module loads as a child of the main app's appdom and not the module's 
> appdom and then sub-module can't see the module's classes.  I'm guessing 
> that's your problem.
> 
> The solution is to explicitly set the applicationDomain parameter when 
> loading the sub-module.  But even that can be tricky because when you say 
> "new ApplicationDomain(ApplicationDomain.currentDomain)" if that code is in a 
> class loaded in the main app's appdom, currentDomain is the main app's 
> appdom.   So be sure the code that calls load is in the module and nowhere 
> else.
> 
> Maybe that'll help.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of djhatrick
> Sent: Friday, August 07, 2009 10:13 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Modules and fonts vanishing is giving me the cramps
> 
> 
> 
> Alex (or/and others)
> 
> Here's my issue, I have a module that loads another module, a sub module. I 
> am trying to access the loaded module, the problem is that first, if I add it 
> to my shared code file, doesn't it compiled into the shell? or just a 
> reference
> 
> I can access methods on my module through it's public properties, but I have 
> to assign it as wildcard, "*"? Which works 90 percent of the time, but once 
> in a while the module's or it's properties come back as undefined. So, I 
> tried the shared code solution again, but then my fonts mysteriously vanish 
> out of my app.
> 
> Help, I am gonna go smack my head with a hammer a few times, Thanks,
> Patrick
>




Re: [flexcoders] Store files on the customer PC

2009-08-31 Thread Beau Scott
Here's the help page for this:
http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_7.html

You're on your own for server side, as it's gonna vary depending on your
server technologies. Here's kind of the "how-to" for PHP:
http://us3.php.net/manual/en/features.file-upload.php

Beau


On Mon, Aug 31, 2009 at 10:37 AM, christophe_jacquelin <
christophe_jacque...@yahoo.fr> wrote:

>
>
> Hello,
>
> There is a solution to upload files from the customer PC to the server with
> Flex.
>
> Did there is the equivalent to put files from the server to the customer PC
> ?
>
> Thank you,
> Christopher,
>
>  
>



-- 
Beau D. Scott
Software Engineer


Re: [flexcoders] Manage a multi lingual application

2009-08-31 Thread Beau Scott
Depends on your approach, really. If you're looking to release mutiple
distributions, each specific to a language (which really is about the only
feasible option when dealing with multi-directional language support), you
should start here:
http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_2.html

Beau



On Mon, Aug 31, 2009 at 10:35 AM, christophe_jacquelin <
christophe_jacque...@yahoo.fr> wrote:

>
>
> Hello,
>
> What is the best system to manage with Flex a multi-lingual application ?
>
> Do you have source examples ?
>
> Thank you,
> Christopher,
>
>  
>



-- 
Beau D. Scott
Software Engineer


[flexcoders] Popup Help Bubble?

2009-08-31 Thread dfalling
I could have sworn I saw a flex component to do this, but I can't find it.  Is 
there a good component/method of showing multiple help popups all over the 
screen?  I want a way to annotate numerous controls and buttons at the same 
time, to point out new features in an application.



[flexcoders] Store files on the customer PC

2009-08-31 Thread christophe_jacquelin
Hello, 

There is a solution to upload files from the customer PC to the server with 
Flex.

Did there is the equivalent to put files from the server to the customer PC ? 

Thank you,
Christopher, 




[flexcoders] Manage a multi lingual application

2009-08-31 Thread christophe_jacquelin
Hello, 

What is the best system to manage with Flex a multi-lingual application ?

Do you have source examples ?

Thank you,
Christopher, 




[flexcoders] Why no event dispatched?

2009-08-31 Thread Wally Kolcz
Can anyone tell me what I am missing from this Class that not dispatch the 
LoginEvent.FAILED?

package com.isavepets.rm.business
{
import com.isavepets.rm.events.LoginEvent;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import mx.collections.ArrayCollection;

public class LoginManager extends EventDispatcher
{

public var username:String;
public var role:String;
public var rescueID:int;

public function LoginManager(target:IEventDispatcher=null)
{
super(target);
}

public function manageLogin(e:ArrayCollection):Boolean {
if (e.length !=0){
DataModel.getInstance().username = e.getItemAt(0).username;
DataModel.getInstance().role = e.getItemAt(0).role;
DataModel.getInstance().rescueID = e.getItemAt(0).rescueID;
return true;
}else{
this.dispatchEvent(new LoginEvent(LoginEvent.FAILED));
/* Alert.show("Incorrect Username and/or Password, Please Try 
Again", "Login Failed"); */
return false;
}
}

}
}




[flexcoders] Re: Simple chart data tip question

2009-08-31 Thread EddieBerman
You can add a callback function on your chart to return any text you'd
like.
Look into the "dataTipFunction" here:

http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayin\
gdata_08.html


other examples:
http://www.codersrevolution.com/index.cfm/2008/10/14/Flex-Charting-Forma\
t-Your-Data-Tips-The-Same-As-Your-Axes

http://blog.kevinhoyt.org/?p=67 

google for more
-Eddie B.


--- In flexcoders@yahoogroups.com, |Mirko  wrote:
>
>
> Hi,
>
> If i have a graph with let's say month names on x-axis and some
numeric
> values on y-axis, when over specific chart item tooltip displays both
month
> name and numeric value. How can i achive that tooltip displays only
let's
> say numeric value (y-axis value) and not also month name (x-axis
value)?
>
> Thanks in advance,
> Best regards
> --
> View this message in context:
http://www.nabble.com/Simple-chart-data-tip-question-tp25212571p25212571\
.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>



Re: [flexcoders] Different Views | Same DataProvider

2009-08-31 Thread Beau Scott
The sorting is stored on the ListCollectionView dataProvider of each list
control. If you set the list controls to share the same ListCollectionView,
the sorting will be common. If you set the dataprovider to each control to
be a non-ListCollectionView object (an array for example, instead of an
ArrayCollection), the sorting will be unique between the two as different
ArrayCollection objects will be created to wrap the same source array, but
data will not be duplicated. There are some caveats: The ListCollectionView
also handles update events, so if you change the data in one list control,
it won't be shown in the other until you call other.dataProvider.refresh(),
and this can be a heavy operation as it has to reindex, sort and seek.
Here's an example:

=

http://www.adobe.com/2006/mxml";
layout="horizontal" xmlns:local="*">


























=


Note that you can sort the datagrids independent of eachother. If you click
"add to right grid", a new line item will be added to the right grid only.
It has been added to the regionData Array, as well, but becase Array is not
an event dispatcher, the left grid is not automatically refreshed. If you
click the refresh button, the dataProvider for left is refreshed and the new
lines show up.


Hope this helps,

Beau




On Mon, Aug 31, 2009 at 8:54 AM, ilikeflex  wrote:

>
>
> Hi
>
> I have array collection as a data provider. I have two different views.
> User can do sorting in different views.
>
> But i want that the one view is not affected by another.I know i can keep
> two different copies of dataprovider for different views.
>
> Is there any other way. Actually my dataprovider has more than 25,000
> records.
>
> Need your suggestions.
>
> Thanks
> ilikeflex
>
>  
>



-- 
Beau D. Scott
Software Engineer


[flexcoders] Different Views | Same DataProvider

2009-08-31 Thread ilikeflex
Hi

I have array collection as a data provider. I have two different views.
User can do sorting in different views.

But i want that the one view is not affected by another.I know i can keep two 
different copies of dataprovider for different views.

Is there any other way. Actually my dataprovider has more than 25,000 records.

Need your suggestions.

Thanks
ilikeflex





Re: [flexcoders] How to host my own flex application using LCDS or BlazeDS?

2009-08-31 Thread Wally Kolcz
I am going to go on a limb and say there is no hosted solutions for Blaze or 
LCDS. Reason being is that it would be too hard to manage everyone's entries in 
the services, messaging, etc XML documents.

I went out and got my own virtual private host with vpsland.com. Just cost me 
$34 per month.


From: Fotis Chatzinikos 
Sent: Sunday, August 30, 2009 10:14 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to host my own flex application using LCDS or  
BlazeDS? 

search for java (usually tomcat / jboss) hosting plans.

Another option (more expensive) is to get your own server

On Sun, Aug 30, 2009 at 6:09 PM, snehasish_bn  wrote:

How to host my own flex application using LCDS or BlazeDS in the internet?

Any websites that host flex appications??? Please help!

Thanks. 

-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com, 





[flexcoders] BrowserManager crossdomain issues

2009-08-31 Thread david.keutgens
Hi All,

I'm trying to host the html-template files provided by Flex Builder (including 
all necessary JavaScript) on one domain ("www.mydomain.com") and the embedded 
SWF on another ("swf.mydomain.com").

Now, even though I call Security.allowDomain("*.mydomain.com") in my Flex app 
and allowScriptAccess="always" in the embedding html, FlashPlayer complains 
about a SecurityViolation in flashlog.txt. It actually happens as soon as I hit 
the browser's back button. 

Firebug reports: "uncaught exception: Error calling method on NPObject! [plugin
exception: Error in Actionscript. Use a try/catch block to find
error.]."
The exception gets thrown in the setTitle function in history.js.

Crossdomain files don't seem to be the issue, they're set up and working fine 
for other content.

I cannot really find any reference of others who tried this before, does anyone 
know if it is actually possible at all to host the history related JavaScript 
in a different domain than the SWF?





RE: [flexcoders] How to know that an application has "createdCompleted" ?

2009-08-31 Thread Scott
I would either add it into the component's creationcomplete (not the
main components creationcomplete) or create a custom event to fire...

 

sj

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of elextraana
Sent: Monday, August 31, 2009 6:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to know that an application has
"createdCompleted" ?

 

  

Hi there,

I built a little component that needs the application to be fully
completed before it starts working itself. I.e: I need to listen to the
application creationComplete event.
Now, that works if the user adds my component in the first
page...However when it is added in a state for example that is supposed
to get active later on in the application, application creationComplete
has obviously long been fired

I am sure there is a simple answer to my question, I just could not find
any flag on the application object that would tell me that it is done in
its lifecycle flow.
Thnx.




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


[flexcoders] How to know that an application has "createdCompleted" ?

2009-08-31 Thread elextraana
Hi there,

I built a little component that needs the application to be fully completed 
before it starts working itself. I.e: I need to listen to the application 
creationComplete event.
Now, that works if the user adds my component in the first page...However when 
it is added in a state for example that is supposed to get active later on in 
the application, application creationComplete has obviously long been fired

I am sure there is a simple answer to my question, I just could not find any 
flag on the application object that would tell me that it is done in its 
lifecycle flow.
Thnx.



[flexcoders] mx:tree hand cursor on disclosure icons (the arrows next to folders) possible?

2009-08-31 Thread fotis.chatzinikos
Is there a way to set the hand cursor on the disclosure icons? (The little 
arrows next to the folders in the tree)

Thanks,
Fotis



RE: [flexcoders] Deeplinking and Flex

2009-08-31 Thread Alex Harui
Most examples use the creationComplete event to start listening for 
BROWSER_URL_CHANGE

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of smyrin
Sent: Saturday, August 29, 2009 4:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Deeplinking and Flex



Hi. I'm both new to flex and this group. I primarily use felx for web site 
design. Anyways, I had a question for anyone to help me with. I am trying to 
get deeplinking to work so that someone can bookmark the a web site at a 
specific state. I am having trouble understanding when/how the browser fragment 
is read at loadtime. Is the BROWSER_URL_CHANGE event always called after the 
application completes loading?