RemoteObject Problem

2005-03-03 Thread Mehdi, Agha



Hi 
all,

When I 
try to run a method on a RemoteObject, I seethis error in the 
debugger

EventType: "Status"MovieUrl: "http://localhost:8600/samples/greg/index.mxml.swf"Source: 
"Client"Time: 1109808432601Date (object #1)."Wed Mar 2 16:07:12 
GMT-0800 2005"Status (object #2).code: 
"NetConnection.Call.Prohibited".description: "".details: 
"".level: "error"

Any 
ideas please.

Thanks

-- 
Agha

- Agha 
Mehdi web developer Littler Mendelson 
P.C. work: 415-288-6362 cell: 415-609-5741 - 



This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com




AW: [flexcoders] Cairngorm or ARP

2005-03-03 Thread Sven Claar
Hi Aral,

please can you send me this preview and the Flex samples application too?

Thanks,
Sven

-Ursprüngliche Nachricht-
Von: Aral Balkan [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 2. März 2005 22:38
An: flexcoders@yahoogroups.com
Betreff: Re: [flexcoders] Cairngorm or ARP


Hi Leo,

The best way to find out is probably to use both of them and see which  
works better for you! :) You will find that they are very similar in some  
respects and quite different in others.

I've sent you over a preview of the upcoming ARP release and its Flex  
sample application offlist. I'd be interested in hearing your feedback --  
please feel free to send it directly to me or to the ARP mailing list (you  
can sign up from http://ariaware.com/mailman/listinfo/arp_ariaware.com).

All the best,
Aral
-- 
Aral Balkan
Managing Director, Ariaware
http://ariaware.com


On Wed, 2 Mar 2005 10:44:01 -0500, Leo [EMAIL PROTECTED] wrote:


 Hi ellite coders

 In a past thread someone posted a message with a link to the ARP
 platform for Flex.

 I'd like to know if somebody has worked with this platform and if so,
 what are the advantages and/or disadvantages.

 My question is because i only knew Cairngorm framework and i think
 it's great, but always is better to know other technoligies

 regards




 
Yahoo! Groups Links



 







RE: [flexcoders] RemoteObject Problem

2005-03-03 Thread Steiner, Jeff



Agha,

Check that you have allowed access to the RO from within 
your flex-config.xml file.

Jeff



From: Mehdi, Agha [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 4:15 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] RemoteObject 
Problem

Hi 
all,

When I 
try to run a method on a RemoteObject, I seethis error in the 
debugger

EventType: "Status"MovieUrl: "http://localhost:8600/samples/greg/index.mxml.swf"Source: 
"Client"Time: 1109808432601Date (object #1)."Wed Mar 2 16:07:12 
GMT-0800 2005"Status (object #2).code: 
"NetConnection.Call.Prohibited".description: "".details: 
"".level: "error"

Any 
ideas please.

Thanks

-- 
Agha

- Agha 
Mehdi web developer Littler Mendelson 
P.C. work: 415-288-6362 cell: 415-609-5741 - 

This email may contain confidential and privileged material for the 
sole use of the intended recipient(s). Any review, use, distribution or 
disclosure by others is strictly prohibited. If you are not the intended 
recipient (or authorized to receive for the recipient), please contact the 
sender by reply email and delete all copies of this message.To reply to 
our email administrator directly, send an email 
to[EMAIL PROTECTED]Littler Mendelson, 
P.C.http://www.littler.com


Create mx:Model statically vs Binding

2005-03-03 Thread Tracy Spratt
Title: Create mx:Model statically vs Binding






There are a few other threads about this, and I have never been comfortable with mx:Model so I decided to try to figure it out, but have been unsuccessful. In the small sample app below, I have three datagrids. One uses XML directly, one uses a mx:Model populated statically, and one uses a Model populated by binding the XML.

The direct XML and static model work but I must be missing something basic in the bound model: the DataGrid remains desperately empty. Does anyone see the problem?

TIA,

Tracy

?xmlversion=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml

  initialize=initApp()

mx:Script![CDATA[

 private var gXMLDoc:XMLNode;

 private var gaXMLData:Array;

 private function initApp():Void

 {

  var sXML:String = 

   elements +

element Key='Key' Name='Name' Dir='Dir' lang='lang' nloc='nloc'  + 

  

RE: [flexcoders] datagrid does not display http data

2005-03-03 Thread Chris Reynolds








Not sure how fussy Flex is about validXML
but your fault and result attributes are in single quotes. Also the HTTPService
tag looks unclosed.











From: jivankohinoor
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005
4:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] datagrid
does not display http data






I try to fill a DataGrid from live XML data over
http, but the grid
desperately stays empty.
The code is :

mx:HTTPService id=catalogContents
contentType=application/xml
method=GET protocol=http
resultFormat=xml 
url=""
href="http://localhost:8080/protocore/getCatalogContents">http://localhost:8080/protocore/getCatalogContents
fault='alert(event.fault.faultstring,,mx.controls.Alert.OK)'
result='alert(Catalog
OK,,mx.controls.Alert.OK)'

mx:DataGrid id=catalogGrid
height=100% width=100%
dataProvider={catalogContents.result.element}


Returned XML is like :
?xml version=1.0
encoding=utf-8?
elements
element Key=Key
Name=Name Dir=Dir lang=lang
nloc=nloc
npar=npar
UNKNOWN1=UNKNOWN1 UNKNOWN2=UNKNOWN2
Status=Status
Anom=Anom label=label0
/
element Key=BAT00
Name=COA034 Dir=A1/PRG lang=Cobol
nloc=944 npar=649
UNKNOWN1=58 UNKNOWN2= Status=CORRECT
Anom=OK label=label1 /
element ...
/elements

I know that the Server part is OK, as I am able to
display raw XML
code in the following TextArea:
mx:TextArea
text={catalogContents.result}/

I tried the same, with XML compiled statically,
and it works :

mx:Model id=catalogContentsModel
ource=D:\\src\\Flex\\Phoenix-proto\\cataloContents.xml
/

mx:DataGrid id=catalogGrid
dataProvider={catalogContentsModel.result.element}

Help would be greatly needed, I tried many
different combinations of
returned XML without success (like returning
mx:Array/mx:Object
tags, specifying the object attributes as XML
attributes or as XML
elements, nothing work)

Am I *really* an idiot as I seem to be the only
one with this problem.













RE: [flexcoders] Re: Advanced Printing Question

2005-03-03 Thread Tracy Spratt








Mark, Id love to see a simple
working example of this.



Luckily, my printing needs at the moment
are modest, but an interim solution, while MM improves native printing, would
be a delight.



Tracy











From: Mark Hitchcock
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005
8:06 PM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders] Re:
Advanced Printing Question





I have alsohad a
number of problems with support for printing in Flex so I started to look
outside of Flex for a solution. There are probably a number 3rd party
tools that you could try however as I am more comfortable with Java and Flex is
running in a Java app server anyway, I have implemented a solution that works
very well for what I am trying to achieve with iText. iText is a free
Java PDF library and can be found here http://www.lowagie.com/iText/
this has also been ported to .NET if anyone is interested in that.



The way I have
integrated this with Flex is via a Servlet and then using the getURL methodin
Flex. This dynamically creates a pdf every time the servlet is
called. I am able to add headers, footers, images, tables etc, and the
list goes on.



I'm not sure if
this will meet everyone's needs or how support for printing in Flex will
improve with future releases of Flex, however this meets and exceeds the
printing needs of what I need to do. If anyone is interested in a working
example, just let me know and I will post a simpleexample I have
working. If anyone from MM has looked into this or has any comments on
using iText that would be great also.





Regards

Mark Hitchcock















From:Manish
Jethani [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 2 March 2005
12:42 AM
To: [EMAIL PROTECTED]
Subject: Re: [flexcoders] Re:
Advanced Printing Question

AC wrote:

 The idea is: If I can programmatically build
a complex nested control
 (eg Lables inside HBox, which are in turn
inside VBox which can have a
 variety of different sibling controls) and
then send it to the print
 to SUCCESSFULLY print, I would save a lot of
work and maintenance
 issues in the long run.

You can create it at runtime.

 var myPrintableView =
PopUpManager.createPopUp(this, VBox, false);
 myPrintableView.visible = false;

 var hbox =
myPrintableView.createChild(HBox, , {});
 var label1 = hbox.createChild(Label,
, {text: Address:});

... and so on. Then you send
'myPrintableView' to printing.

Manish












ViewStack change using separate mxml file

2005-03-03 Thread kredding.geo

I created a simple mxml applicationthat contains a viewStack. The 
stack defaults to the first canvas. This canvas contains a button 
that when pushed, changes the stack to the second canvas. 

I can get this to work, but what I really want is to put the first 
canvas into a second mxml file. The problem that happens is now when 
the button is pushed it, the action script doesn't understand the id 
of the viewStack. The action script is running on the second mxml 
file while the viewStack is in the first mxml file. 

The code is:
function loginButtonPressed() {
headerStack.selectedChild = secondCanvas;
}

Flex cannot find headerStack. Is there any way to pass this value 
back and forth between the two mxml files?

Thank you so much,
Kim







RE: [flexcoders] ViewStack change using separate mxml file

2005-03-03 Thread Gordon Smith
Try

parentDocument.headerStack.selectedChild = secondCanvas;

- Gordon

-Original Message-
From: kredding.geo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 5:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack change using separate mxml file




I created a simple mxml applicationthat contains a viewStack. The 
stack defaults to the first canvas. This canvas contains a button 
that when pushed, changes the stack to the second canvas. 

I can get this to work, but what I really want is to put the first 
canvas into a second mxml file. The problem that happens is now when 
the button is pushed it, the action script doesn't understand the id 
of the viewStack. The action script is running on the second mxml 
file while the viewStack is in the first mxml file. 

The code is:
function loginButtonPressed() {
headerStack.selectedChild = secondCanvas;
}

Flex cannot find headerStack. Is there any way to pass this value 
back and forth between the two mxml files?

Thank you so much,
Kim






Yahoo! Groups Links










Re: Integrating with Python

2005-03-03 Thread dunwerkin
Thanks Manish. Running it as an HTTPService or as a CGI would seem to
be the easiest, and I'll give it a try. I had been thinking in terms
of RemoteObject and hence my uncertainty on how to proceed, but
HTTPService sure looks easier to implement from what I'm starting
with.


 From: Manish Jethani [EMAIL PROTECTED]
 Subject: Re: Integrating with Python
 
 dunwerkin wrote:
  Can anyone point me towards an example integrating Flex with Python? I
  have existing Python classes, etc that I hope to reuse so that I can
  feed in a data structure coming from a Flex front end and get back a
  new data structure to send to Flex for visualization. I'm not sure if
  I need to dive into learning how Jython works, or if there is a
  simpler way I'm missing. If the Jython route is recommended, any
  links would be great.
 
 You could set up your Python modules as services:
 
 1. Web service on Tomcat?
 2. Simple CGI script that returns data in XML format. This can be
 accessed from Flex using HTTPService.
 
 You could also try wrapping your Python module into Java using Jython,
 and then access it using RemoteObject from Flex. I'd go for the service
 way (HTTPService to keep it simple).
 
 Flex can also send data to your Python module via the CGI script in XML
 format (using HTTP POST?) or as URL parameters (HTTP GET).
 
 Manish




Re: ViewStack change using separate mxml file

2005-03-03 Thread kredding.geo

Perfect. Thank you.


--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
 Try
 
 parentDocument.headerStack.selectedChild = secondCanvas;
 
 - Gordon
 
 -Original Message-
 From: kredding.geo [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 02, 2005 5:13 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] ViewStack change using separate mxml file
 
 
 
 
 I created a simple mxml applicationthat contains a viewStack. The 
 stack defaults to the first canvas. This canvas contains a button 
 that when pushed, changes the stack to the second canvas. 
 
 I can get this to work, but what I really want is to put the first 
 canvas into a second mxml file. The problem that happens is now 
when 
 the button is pushed it, the action script doesn't understand the 
id 
 of the viewStack. The action script is running on the second mxml 
 file while the viewStack is in the first mxml file. 
 
 The code is:
 function loginButtonPressed() {
 headerStack.selectedChild = secondCanvas;
 }
 
 Flex cannot find headerStack. Is there any way to pass this value 
 back and forth between the two mxml files?
 
 Thank you so much,
 Kim
 
 
 
 
 
 
 Yahoo! Groups Links







RE: [flexcoders] RemoteObject Problem

2005-03-03 Thread Mehdi, Agha
Title: Message



Ok, this is something I didn't understand. I have my flex 
running on http://localhost:8600. when I use 
remoteObject with endpoint of http://localhost:8400/flashservices/gateway, which is a CF 
server, itruns fine with no problems. This time, I tried using 
remoteObject with endpoint http://[dev]/flashservices/gateway, 
it didn't work.

Do I need to modify my flex-config.xml file to allow access 
to call this RemoteObject, which is pointing to a separate 
box?


From: Peter Farland 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 5:33 
PMTo: 'flexcoders@yahoogroups.com'Subject: RE: 
[flexcoders] RemoteObject Problem

How 
are you loading your SWF and what endpoint are you setting on your 
RemoteObject?

Note 
that underneath RemoteObject is a call to NetConnection. Flash Player 7 
introduced some stricter sandbox security rules that stipulate that you can not 
make connections to external resources unless either the host matches that as 
was used to load the SWF, or whether the remote location has a cross-domain.xml 
policy file allowing it to be contacted by other clients.

Note 
that 127.0.0.1 is not the same host name as localhost (i.e. it does not resolve 
host names to IPs to check if they refer to the same 
entity).




-Original Message-From: Mehdi, Agha 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 7:15 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] 
RemoteObject Problem
Hi 
all,

When I 
try to run a method on a RemoteObject, I seethis error in the 
debugger

EventType: "Status"MovieUrl: "http://localhost:8600/samples/greg/index.mxml.swf"Source: 
"Client"Time: 1109808432601Date (object #1)."Wed Mar 2 16:07:12 
GMT-0800 2005"Status (object #2).code: 
"NetConnection.Call.Prohibited".description: "".details: 
"".level: "error"

Any 
ideas please.

Thanks

-- 
Agha

- Agha 
Mehdi web developer Littler Mendelson 
P.C. work: 415-288-6362 cell: 415-609-5741 - 

This email may contain confidential and privileged material for the 
sole use of the intended recipient(s). Any review, use, distribution or 
disclosure by others is strictly prohibited. If you are not the intended 
recipient (or authorized to receive for the recipient), please contact the 
sender by reply email and delete all copies of this message.To reply to 
our email administrator directly, send an email 
to[EMAIL PROTECTED]Littler Mendelson, 
P.C.http://www.littler.com


This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com




Re: ViewStack change using separate mxml file

2005-03-03 Thread kredding.geo

Now I have a parent document with 2 children mxml docs using 
viewStack. I would like to take the value of a textInput from one 
child and place that value into a text control of the second child. 
Is this possible?

Thank you

--- In flexcoders@yahoogroups.com, kredding.geo [EMAIL PROTECTED] 
wrote:
 
 Perfect. Thank you.
 
 
 --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
  Try
  
  parentDocument.headerStack.selectedChild = secondCanvas;
  
  - Gordon
  
  -Original Message-
  From: kredding.geo [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, March 02, 2005 5:13 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] ViewStack change using separate mxml file
  
  
  
  
  I created a simple mxml applicationthat contains a viewStack. 
The 
  stack defaults to the first canvas. This canvas contains a 
button 
  that when pushed, changes the stack to the second canvas. 
  
  I can get this to work, but what I really want is to put the 
first 
  canvas into a second mxml file. The problem that happens is now 
 when 
  the button is pushed it, the action script doesn't understand the 
 id 
  of the viewStack. The action script is running on the second 
mxml 
  file while the viewStack is in the first mxml file. 
  
  The code is:
  function loginButtonPressed() {
  headerStack.selectedChild = secondCanvas;
  }
  
  Flex cannot find headerStack. Is there any way to pass this 
value 
  back and forth between the two mxml files?
  
  Thank you so much,
  Kim
  
  
  
  
  
  
  Yahoo! Groups Links







RE: [flexcoders] Re: Advanced Printing Question

2005-03-03 Thread Mark Hitchcock
Hi Tracy,

Not a problem. Yes, my printing needs are quite modest aswell and like I
said in the original email, this solution exceeds my printing needs at the
moment, but offeres the flexibility I need.

Please find attached a simple mxml file as well as a java file which will
need to be compiled.

Add the servlet and servlet mapping to the web.xml file as below:

servlet
servlet-nameSimplePdf/servlet-name
servlet-classsamples.SimplePdf/servlet-class
/servlet

servlet-mapping
servlet-nameSimplePdf/servlet-name
url-pattern/servlet/simplePdf.pdf/url-pattern
/servlet-mapping

You will also need to download the latest iText jar (itext-1.2.jar) and add
this to the lib directory along with servlet.jar

I hope this helps with your printing needs, so enjoy and have fun with the
iText library.

Regards
Mark

_ 

From: Tracy Spratt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 3 March 2005 9:25 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Advanced Printing Question



Mark, I'd love to see a simple working example of this.



Luckily, my printing needs at the moment are modest, but an interim
solution, while MM improves native printing, would be a delight.



Tracy



_ 

From: Mark Hitchcock [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 8:06 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Advanced Printing Question



I have also had a number of problems with support for printing in Flex so I
started to look outside of Flex for a solution. There are probably a number
3rd party tools that you could try however as I am more comfortable with
Java and Flex is running in a Java app server anyway, I have implemented a
solution that works very well for what I am trying to achieve with iText.
iText is a free Java PDF library and can be found here
http://www.lowagie.com/iText/ this has also been ported to .NET if anyone
is interested in that.



The way I have integrated this with Flex is via a Servlet and then using the
getURL method in Flex. This dynamically creates a pdf every time the
servlet is called. I am able to add headers, footers, images, tables etc,
and the list goes on.



I'm not sure if this will meet everyone's needs or how support for printing
in Flex will improve with future releases of Flex, however this meets and
exceeds the printing needs of what I need to do. If anyone is interested in
a working example, just let me know and I will post a simple example I have
working. If anyone from MM has looked into this or has any comments on
using iText that would be great also.





Regards

Mark Hitchcock





_ 

From: Manish Jethani [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 2 March 2005 12:42 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Advanced Printing Question

AC wrote:

 The idea is: If I can programmatically build a complex nested control
 (eg Lables inside HBox, which are in turn inside VBox which can have a
 variety of different sibling controls) and then send it to the print
 to SUCCESSFULLY print, I would save a lot of work and maintenance
 issues in the long run.

You can create it at runtime.

var myPrintableView = PopUpManager.createPopUp(this, VBox, false);
myPrintableView.visible = false;

var hbox = myPrintableView.createChild(HBox, , {});
var label1 = hbox.createChild(Label, , {text: Address:});

... and so on. Then you send 'myPrintableView' to printing.

Manish







Yahoo! Groups Sponsor   

ADVERTISEMENT

http://us.ard.yahoo.com/SIG=129c45eho/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705007207:HM/EXP=1109898507/A=2593423/R=0/SIG=11el9gslf/*http://www.
netflix.com/Default?mqso=60190075 click here   

http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2593423/rand=874200691 

_ 

Yahoo! Groups Links


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


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


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



--=_NextPart_001_002D_01C51FDE.A3429E20
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML xmlns=3Dhttp://www.w3.org/TR/REC-html40; xmlns:v =3D=20
urn:schemas-microsoft-com:vml xmlns:o =3D=20
urn:schemas-microsoft-com:office:office xmlns:w =3D=20
urn:schemas-microsoft-com:office:wordHEAD
META http-equiv=3DContent-Type content=3Dtext/html; charset=3Dus-ascii
META content=3DMSHTML 6.00.2900.2523 name=3DGENERATOR!--[if !mso]
STYLEv\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
/STYLE
![endif]--
STYLE@font-face {
font-family: Wingdings;
}
@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 

Re: [flexcoders] Cairngorm + Flash

2005-03-03 Thread Robin Hilliard
Hi Agha,

We've used Cairngorm to this point, but we had a good talk with Aral at MXDU comparing the two frameworks and what I've said about ARP is based on this discussion. Try the list Aral posted today in another Flexcoders thread. I need to try out some ARP ideas in a project to sort out my thinking about the two frameworks - but as Steven said ARP provides more guidance around what to do in Flash with the views, as it is originally a Flash framework. Probably the only issue I had with the demo Flex app Aral showed me was the deep purity of the mxml code - as a pragmatic (slothfull? :-) Flex programmer I am rather fond of using a bit more actionscript in my mxml, but then I understand where Aral is coming from - and in Flash I would never put code in my fla. I would be happy to recommend either framework to a client.

Cheers,
Robin
http://www.rocketboots.com.au

On 03/03/2005, at 1:29 PM, Mehdi, Agha wrote:

Not that I have a whole lot to complain about Flash mainly because I just rolled out a fairly complicated Enterprise New Business Intake app for my Company in Flash Professional, which integrates with existing internal DMS, Financial, CRM, Workflow and Intranet Portal systems but if I had the choice at that time I would've done it in Flex. Having said that, I'd still like to use Flash for small, not complicated mini apps where Flex is not the option for any reasons (just like Robin said). Ever since I got this taste of Cairngorm with Flex, I find it hard to convince myself to go with Flash without a framework as elegant as Cairngorm. That was my main reason to see if it was possible to use it with Flash.
 
I have installed ARP but didn't really get a chance to look into it. May be what I need is to develop something with it to see how good it serves me. No matter how tempted I am, I won't ask any questions about ARP implementation here. Robin, if you use ARP, will you be able to guide me to some of the stuff, which is a good knowledge base for ARP?
 
Thanks
 
-- Agha

Re: [flexcoders] Sample Project

2005-03-03 Thread Jeff Steiner
Vandan,

Flex, in and of itself, does not truly have the ability to add, edit or
delete data from a db. What you can do is call a webservice that performs
those actions.

Check out some of the samples in the Flex Explorer on Macromedia's web site
for some good specifics as to what flex can do.

You will find some really good working samples on www.cflex.net and on my
site, http://www.flexauthority.com.

Give them a look and give it a shot!

Jeff
http://www.flexauthority.com

- Original Message - 
From: vandan [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, March 02, 2005 9:10 PM
Subject: [flexcoders] Sample Project




 Hi everyone
 i am new to this group.
 I have just started working on Flex.
 If anyone could help me out by giving me a small sample projet which
 has add, edit, delete of data from a database like MSSQL, it would
 be of great help.

 Thanks
 Regards
 Vandan C. Desai
 Software Engineer
 Stylus Systems Pvt. Ltd.






 Yahoo! Groups Links












RE: [flexcoders] Re: ViewStack change using separate mxml file

2005-03-03 Thread Gordon Smith
Certainly. From any script in a Flex application, you can access data from
any component and store it anywhere. You can use relative or absolute
access, as in any hierarchy.

From a script of the parent document, you can access properties of
descendant components by dotting down relative to the parent, using the
ids of the descendants:

someChild1.someTextInput.text = someChild2.someTextInput.text;

This is analogous to a relative path:

cd a\b

In a script of the first child you would do

parentDocument.someChild2.someTextInput.text = someTextInput.text;

because these expressions are evaluated with 'this' being someChild1.

This is analogous to a relative path which goes up a level:

cd ..\a\b

When you write a Script in a component, think of that component as like
the current directory. You can go down or up the hierarchy of nested
components from there.

Note that I said nested components, not nested containers. Flex does NOT
make you dot down through every container inside a component. That would
make your scripts break every time introduced another container to affect
the layout.

By absolute access I mean dotting down from the top of the hierarchy,
which is the Application object. In any script you could do

Application.application.someParent.someChild1.someTextInput.text =
Application.application.someParent.someChild2.someTextInput.text;

This is analogous to

cd c:\a\b

I will save explaining the difference between writing

Application.application

and just

application

for another day. (Hint: They can be different when you have an app which
loads another app.)

- Gordon


-Original Message-
From: kredding.geo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 6:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ViewStack change using separate mxml file




Now I have a parent document with 2 children mxml docs using 
viewStack. I would like to take the value of a textInput from one 
child and place that value into a text control of the second child. 
Is this possible?

Thank you

--- In flexcoders@yahoogroups.com, kredding.geo [EMAIL PROTECTED] 
wrote:
 
 Perfect. Thank you.
 
 
 --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
  Try
  
  parentDocument.headerStack.selectedChild = secondCanvas;
  
  - Gordon
  
  -Original Message-
  From: kredding.geo [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 02, 2005 5:13 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] ViewStack change using separate mxml file
  
  
  
  
  I created a simple mxml applicationthat contains a viewStack.
The 
  stack defaults to the first canvas. This canvas contains a
button 
  that when pushed, changes the stack to the second canvas.
  
  I can get this to work, but what I really want is to put the
first 
  canvas into a second mxml file. The problem that happens is now
 when
  the button is pushed it, the action script doesn't understand the
 id
  of the viewStack. The action script is running on the second
mxml 
  file while the viewStack is in the first mxml file.
  
  The code is:
  function loginButtonPressed() {
  headerStack.selectedChild = secondCanvas;
  }
  
  Flex cannot find headerStack. Is there any way to pass this
value 
  back and forth between the two mxml files?
  
  Thank you so much,
  Kim
  
  
  
  
  
  
  Yahoo! Groups Links






Yahoo! Groups Links










Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Steven Webster




code - as a pragmatic (slothfull? :-) 
Flex programmer I am rather fond of using a bit more actionscript in my mxml, 
but then I understand where Aral is coming from - and in Flash I would never 
put code in my fla. I would be happy to recommend either framework to a 
client.
Not having seen Aral's recommendations, I can't comment 
specifically, but I'd also like to pick up the idea of
"no code in MXML" as a "besttheory" rather than 
a"best practice".

Separation of content and code is the key driving 
principle, imho, as to why when we were building RIA with
Flash, that it was essential not to scatter ActionScript 
code around the actual Flash movie itself. So ... we
would advocate that code wasnotscattered around 
the timeline, that there was a single layer in the timeline,
with a singleframe, wherea single file 
"includes.as" was included in the application, and the bare minimum 
of
initialisationcode (perhaps creation of your 
controller) was placed on that first frame.

Thereafter, we advocated using the Cairngorm framework, 
extracting all business logic in classes, and keeping
these classes in external ActionScript files. Despite 
the limitations of the Flash IDE as an RIA development
environment, this allowed us to achieve best-practices of 
keeping our content (the FLA) as separate as possible
from the code, in turn promoting reuse, promoting 
maintainability, encouraging that code could be versioned
and kept under source control, etc.

Inevitably, some code might find it's way into a component 
in the Flash Symbol library; but if this ever were
the case, then it would be code that BELONGED on that 
component, and was typicallyresponsible in some
way for the view logic associated with that component - so 
some degree of encapsulation was achieved. But
code in the FLA rather than in external ActionScript 2.0 
was a bad code smell.

Let's now move to Flex.

Let me first state the obvious; I would not advocate 
placing business logic (or lots of it) within 
mx:Script
blocks in Flex, if it can be extracted into an external 
ActionScript 2.0 class. I would *never* use the 
Include functionality in Flex to pull in blocks ofscript, 
and where possible, I would always encourage that
external classes, imports, and object creation is 
used.

However, let's remind ourselves why we might want to not 
have code in our MXML -- not in theory, but
in practice.

Not mix content and code

This is the key one; if we have business logic in our MXML, 
we should be refactoring this into external
AS2.0 classes (and unit-testing it). If 
you have screeds of business logic in a big mx:Script 
block,
then you should be pulling this into external classes - you 
are beginning to mix your content and
your code.

Maintainability and Scalability

If we have AS2.0 code in our MXML, does it make our code 
harder to maintain ? Not necessarily -- if
the code is directly related to that MXML file, itmay be 
the case that encapsulation would encourage
the code to belong as a method on the MXML file. An 
example ? Perhaps we have a click handler,
that is going to respond to a button press in our MXML 
component; perhaps on pressing a button, 
we want to set a status bar message, and then broadcast an 
event for the controller ... it makes 
sense to have:

 public function billPaymentButtonClick() : 
Void
 {
 ViewLocator.getInstance().getView( "statusView" 
).setStatusMessage( "Paying Bill..." );
 EventBroadcaster.getInstance().broadcastEvent( 
EventList.BILL_PAYMENT_REQUEST );
 }

and then in our same MXML file:

 mx:Button id="payBillButton" label="Pay 
Bill" click="billPaymentButtonClick()" /

In this instance, I do not see what is to be gained by 
being purist, and extracting the
billPaymentButtonClick() method out of the MXML and into an 
external AS2.0 file, JUST to 
be able to say it's an external 
file. This is a convoluted example, that I don't want to 
pick
apart (there are nicer ways of doing it) but it serves a 
point I think.

Because MXML are text files, we can still keep these files 
under source control, and we
can merge them if more than one person works on them. 
More importantly, for maintainability,
I would argue that it's easier for developers to maintain 
this source, where the methods
that are unique and specific to the MXML file, areheld 
within the MXML file - especially when
they are concerned with view logic, or with dispatching 
events so that they can be used
as discrete components without coupling them to anything 
else in the architecture. 

We're not risking the scalability, maintainability, 
performance, clarity or elegance of our
code by mixing MXML and ActionScript 2.0 
here.

On clarity; often in the Flex Book, we would placemore 
code than we would be comfortable
with in a production project, in the body of the MXML file 
... but we did warn about this in
the introduction to the book. Why ? Because we found 
that when trying to explain a 
concept, the clarity of having the code in the MXML file 

RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Dirk Eismann
After all, a MXML gets compiled into a AS 2.0 class. Most MXML files are 
instances of the View (classic View in MVC that is) - so to me it's logic 
andvalid to have functionality inside that file that handles and delegates user 
interactions.

Dirk.

-Original Message-
From: Steven Webster [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 9:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML


code - as a pragmatic (slothfull? :-) Flex programmer I am rather fond of using 
a bit more actionscript in my mxml, but then I understand where Aral is coming 
from - and in Flash I would never put code in my fla. I would be happy to 
recommend either framework to a client.
 
Not having seen Aral's recommendations, I can't comment specifically, but I'd 
also like to pick up the idea of
no code in MXML as a best theory rather than a best practice.

Separation of content and code is the key driving principle, imho, as to why 
when we were building RIA with
Flash, that it was essential not to scatter ActionScript code around the actual 
Flash movie itself. So ... we
would advocate that code was not scattered around the timeline, that there was 
a single layer in the timeline,
with a single frame, where a single file includes.as was included in the 
application, and the bare minimum of
initialisation code (perhaps creation of your controller) was placed on that 
first frame. 

Thereafter, we advocated using the Cairngorm framework, extracting all business 
logic in classes, and keeping
these classes in external ActionScript files. Despite the limitations of the 
Flash IDE as an RIA development
environment, this allowed us to achieve best-practices of keeping our content 
(the FLA) as separate as possible
from the code, in turn promoting reuse, promoting maintainability, encouraging 
that code could be versioned
and kept under source control, etc.

Inevitably, some code might find it's way into a component in the Flash Symbol 
library; but if this ever were
the case, then it would be code that BELONGED on that component, and was 
typically responsible in some
way for the view logic associated with that component - so some degree of 
encapsulation was achieved. But
code in the FLA rather than in external ActionScript 2.0 was a bad code smell.

Let's now move to Flex.

Let me first state the obvious; I would not advocate placing business logic(or 
lots of it) within mx:Script
blocks in Flex, if it can be extracted into an external ActionScript 2.0 class. 
I would *never* use the 
Include functionality in Flex to pull in blocks of script, and where possible, 
I would always encourage that
external classes, imports, and object creation is used.

However, let's remind ourselves why we might want to not have code in our MXML 
-- not in theory, but
in practice.

Not mix content and code

This is the key one; if we have business logic in our MXML, we should be 
refactoring this into external
AS2.0 classes (and unit-testing it). If you have screeds of business logic in a 
big mx:Script block,
then you should be pulling this into external classes - you are beginning to 
mix your content and
your code.

Maintainability and Scalability

If we have AS2.0 code in our MXML, does it make our code harder to maintain? 
Not necessarily -- if
the code is directly related to that MXML file, it may be the case that 
encapsulation would encourage
the code to belong as a method on the MXML file. An example ? Perhaps we have a 
click handler,
that is going to respond to a button press in our MXML component; perhaps on 
pressing a button, 
we want to set a status bar message, and then broadcast an event for the 
controller ... it makes 
sense to have:

public function billPaymentButtonClick() : Void
{
ViewLocator.getInstance().getView( statusView ).setStatusMessage(Paying 
Bill... );
EventBroadcaster.getInstance().broadcastEvent( EventList.BILL_PAYMENT_REQUEST );
}

and then in our same MXML file:

mx:Button id=payBillButton label=Pay Bill click=billPaymentButtonClick() 
/

In this instance, I do not see what is to be gained by being purist, and 
extracting the
billPaymentButtonClick() method out of the MXML and into an external AS2.0 
file, JUST to 
be able to say it's an external file. This is a convoluted example, that Idon't 
want to pick
apart (there are nicer ways of doing it) but it serves a point I think.

Because MXML are text files, we can still keep these files under source 
control, and we
can merge them if more than one person works on them. More importantly, for 
maintainability,
I would argue that it's easier for developers to maintain this source, where 
the methods
that are unique and specific to the MXML file, are held within the MXML file - 
especially when
they are concerned with view logic, or with dispatching events so that theycan 
be used
as discrete components without coupling them to anything else in the 
architecture.  

We're not risking the scalability, 

Re: AW: [flexcoders] Cairngorm or ARP

2005-03-03 Thread Aral Balkan
Hi guys,
I've sent you both the files offlist. In the interests of not flooding 
this list, can I please ask anyone else who might be interested to email 
me directly -- thanks! :)

All the best,
Aral
On Thu, 03 Mar 2005 02:32:18 +0200, Willem Engelbrecht 
[EMAIL PROTECTED] wrote:

To repeat the previous post
Hi Aral,
please can you send me this preview and the Flex samples
application too?
Thanks,
Willem

On Thu, 3 Mar 2005 01:27:27 +0100
Sven Claar [EMAIL PROTECTED] wrote:
Hi Aral,
please can you send me this preview and the Flex samples
application too?
Thanks,
Sven snip



RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Erik Westra
Personaly I don't like putting code into mxml's too, for me they are
just the visual part of the application. I also don't like the idea of
having a class somewhere far away from my form wich is called on a (for
example) submit button event and then accesses the formfields to check
their values.

What I do is naming the mxml (class) file like this:
classNameVisual.mxml and subclass that file with an .as file called
className.as. This way I can instantiate the form as className and have
a local reference to the formfields inside my .as file. There I do
actions that apply to the form only and use events to communicate with
the rest of the application.

This approach results in two files vor each view (form, mxml, whaever).
The only consern of the .as file is the mxml file. And they are easy to
find.

Greetz Erik


-Original Message-
From: Aral Balkan [mailto:[EMAIL PROTECTED] 
Sent: donderdag 3 maart 2005 11:10
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML


Hi Steven,

 I'd also like to pick up the idea of
 no code in MXML as a best theory rather than a best practice.

Since we have been able to successfully apply this to Flex applications,
I would have to disagree with this assessment.

 when we were building RIA with
 Flash, that it was essential not to scatter ActionScript code around 
 the actual Flash movie itself. So ... we would advocate that code was

 not scattered around the timeline, that there was a single layer in 
 the timeline, with a single frame, where a single file includes.as 
 was included in the application,

This is definitely one, valid way of doing things -- however the
#include method of loading code into Flash projects is the old-school
way we were forced to use in the days of AS1. With AS2 and the ability
to link classes to movie clips, this method is no longer necessary. It
makes sense to keep all code in external classes and link them to your
movie clips (forms) when necessary. The code Application form, then,
becomes a natural entry point into your application. Natural in the
Flash-way of doing things.

Does this method of working translate to Flex? Of course -- Flex *is*
Flash :) The most striking difference between Flash and Flex (apart form
Flex actually having *useful* components that work) is the way you
layout your forms: Using MXML instead of an FLA. The fact that Flex is a
server product is irrelevant (and completely unnecessary -- it *should*
ideally be a client-side tool that outputs SWFs.) In Flex, instead of
linking your form classes to an ArpForm or an mx.screens.Form, you link
them to mx.containers.Form or mx.core.Application. Migrating an
application from Flash to Flex thus becomes simply modifying your forms
to handle any component API differences between Flash and Flex and
reconstructing your form layouts using MXML (the reverse is also true
for migrating a Flex application to Flash.)

Any code you have in your FLAs or MXMLs just makes you less flexible and
for what? A potential few seconds saved when you are initially writing
the code. It has been my experience that actually writing code takes the
least amount of time in a project -- debugging, maintaining and scaling
an application all take far more time and that's what we must try to
reduce.  
It all comes down to one thing: I like simplicity. The less rules there
are the less I have to think. If I know that there's no code in my MXML
or FLAs, I don't waste one second of my time searching through them. I
know where everything is the moment I look at a new ARP project, even if
I've never seen that particular project before. For me, this is more
important than saving a few seconds during initial development by adding
code to my FLA or MXMLs.

 Inevitably, some code might find it's way into a component in the 
 Flash Symbol library; but if this ever were the case, then it would be

 code that BELONGED on that component, and was typically responsible in

 some way for the view logic associated with that component - so some 
 degree of encapsulation was achieved. But code in the FLA rather than 
 in external ActionScript 2.0 was a bad code smell.

This was inevitable with the V1 components but not so with the V2
architecture.

 Let's now move to Flex.
 Let me first state the obvious; I would not advocate placing business 
 logic (or lots of it) within mx:Script blocks in Flex, if it can be 
 extracted into an external ActionScript 2.0 class. I would *never* 
 use the Include functionality in Flex to pull in blocks of script, and

 where possible, I would always encourage that external classes, 
 imports, and object creation is used.

Agreed.

 Maintainability and Scalability
 If we have AS2.0 code in our MXML, does it make our code harder to 
 maintain ? Not necessarily -- if the code is directly related to that

 MXML file, it may be the case that encapsulation would encourage the 
 code to belong as a method on the MXML file.

This is the main point 

New to Flex and having difficulties with validation

2005-03-03 Thread Jeroen De Vos
Title: New to Flex and having difficulties with validation






Hello everyone,


I'm new to Flex (started on Monday) and I'm having a lot of difficulties with validation.

Here's the situation:

I have a model in which I load data from an external XML

mx:Model id=edgesmodel source=edges.xml/


Then I use a repeater to put the information on screen:

mx:Form

 mx:Repeater id=edgesrepeater dataProvider={edgesmodel.edge} recycleChildren=true   

  mx:FormItem label={edgesrepeater.currentItem.label} :  required=true

   mx:TextInput id=edgeinput width=75 text={edgesrepeater.currentItem.value} /

  /mx:FormItem

 /mx:Repeater

/mx:Form


The user can change the edge value in the textinput field, so I wrote a function which updates the information in themodel (this works fine).

And finally I would like to do validation on the value field of the edgesmodel before I execute the program.

Could someone point out how I can do thisvalidation?


Thanks a lot!

Jeroen.






Jeroen De Vos

Gemeentelijk Havenbedrijf Antwerpen

C/ICT - AMARIS







RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Valy Sivec

Hello,


I tried to use the NumberFormatter but without any luck... I checked the MM documentation but no luck either... 

There is a sample here

http://livedocs.macromedia.com/flex/15/asdocs_en/mx/formatters/NumberFormatter.html

but when I enter 0.00023 the formatted output is : 2.3e-8. and I would like to see what I entered instead, 0.00023 it's very frustrating

Valy






Dimitrios Gianninas [EMAIL PROTECTED] wrote:


Did you try using the NumberFormatter class for display purposes in your DataGrid?

Or perhaps you need to create a CellRenderer to display the values correctly in the DataGrid

Jimmy Gianninas
Software Developer - Optimal Payments Inc.



From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 10:24 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Number Format issue. I need help.
I spent some time without figuring out a way to formata number in double precision.I have a grid and below it a total field that shouldsum the grid colums. When I enter in the grid columnsvalues as 0.0008, 0.0001 the result fielddisplays 9e-8, which is correct but I would like todisplay it as 0.0009 instead Any suggestions?Thanks,Valy--- Valy Sivec [EMAIL PROTECTED] wrote: Hello,  I have some some number formatted form elements that I need to sum up. In order to do that, I use parseFloat to extract the number out of the formatted string input. When the number has more than 5 decimals, let's say "0.008", the get back the trailing exponents: 8e-7.  Is there a way to get back the number without the trailing exponents (0.008)?  
TIA, Val.  __  Celebrate Yahoo!'s 10th Birthday!  Yahoo! Netrospective: 100 Moments of the Web  http://birthday.yahoo.com/netrospective/__ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com 

RE: [flexcoders] Click on button problem

2005-03-03 Thread Abdul Qabiz
Hi,

It seems to be a limitation, however I will verify and file the issues..

Since both buttons are at same place, when you click one button and don't
move mouse and other button appears at the same place...Other button doesn't
get into over state or doesn't get the focus. So you have to do either of
following:

- move mouse out of the button area and move mouse back on button then
click.
- Or do double clicking First click gives the focus to button and second
click executes the click handler..

This is more of Flash Player level issue...

But as a workaround, you can try adding trackAsMenu=true in Button tag, as
shown below. You can find more information about trackAsMenu in Flash docs,
see the url mentioned later in this mail.


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:ViewStack id=mainVSK height=300 width=450
mx:Canvas id=optionsCVS width=100% height=100%
backgroundColor=#EAEAEA borderStyle=solid
mx:Button label=Show Price Data x=320 y=270 
click=mainVSK.selectedChild=priceDataCVS trackAsMenu=true/
/mx:Canvas
mx:Canvas id=priceDataCVS width=100% height=100%
backgroundColor=#EAEAEA borderStyle=solid
mx:Button label=Show Options x=320 y=270 
click=mainVSK.selectedChild=optionsCVS trackAsMenu=true /
/mx:Canvas
/mx:ViewStack
/mx:Application


trackAsMenu docs:
http://livedocs.macromedia.com/flash/mx2004/main_7_2/1562.html



-abdul







-Original Message-
From: greenfishinwater [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 7:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Click on button problem



I have a viewstack which contains two canvases, the same size which overlay
each other. Each canvas has a different button which displays the other
canvas, and each button has the same x and y position.

What I have noticed is that sometimes, when I click on one button, to
display the other canvas, then I don't physically move the mouse, and click
on the other button which is now displayed, it doesn't show the original
canvas, sometimes I have to click twice. But if I move the mouse between
each click, then the first click always shows the other canvas.

This is an example that illustrates this problem.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:ViewStack id=mainVSK height=300 width=450
mx:Canvas id=optionsCVS width=100% height=100%
backgroundColor=#EAEAEA borderStyle=solid
mx:Button label=Show Price Data x=320 y=270 
click=mainVSK.selectedChild=priceDataCVS /
/mx:Canvas
mx:Canvas id=priceDataCVS width=100% height=100%
backgroundColor=#EAEAEA borderStyle=solid
mx:Button label=Show Options x=320 y=270 
click=mainVSK.selectedChild=optionsCVS /
/mx:Canvas
/mx:ViewStack
/mx:Application

Andrew






Yahoo! Groups Links










RE: [flexcoders] form validation

2005-03-03 Thread Stephen Gilson



As an experiment, I created a RadioButtonGroup validator as 
a custom validator to determine is a user neglected to select a RadioButton in a 
RadioButtonGroup:

class RBValidator extends mx.validators.Validator 
{public function RBValidator () { 
super(); } public function 
doValidation(value) : Void { if (value == undefined) 
{ validationError("noSelection", "no RadioButton 
Selected");  } } 
}


Then 
used it in a form with a data model. If the user neglects to select a 
RadioButton, it pops up an Alert box when they click the 
Button:

?xml version="1.0" 
encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns:local="*" 

mx:Model 
id="formInfo" 
SelectedGender{Gender.selectedData}/SelectedGender/mx:Modellocal:RBValidator 
field="formInfo.SelectedGender" listener="this" /

 mx:Form 

 
mx:FormItem label="Select Gender: " 
 
mx:RadioButtonGroup 
id="Gender"/ 
mx:RadioButton id="radio1" label="Male" data="" groupName="Gender" 
/ 
 
mx:RadioButton id="radio2" label="Female" data="" 
groupName="Gender"/

 
mx:Button label="Check validity" 
click="mx.validators.Validator.isValid(this, 'formInfo.SelectedGender');" 
/ 
/mx:FormItem
 
/mx:Form

/mx:Application
Stephen



From: Dimitrios Gianninas 
[mailto:[EMAIL PROTECTED] Sent: Friday, 
February 25, 2005 5:21 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] form 
validation

Hi Robert,

For part 1, you will have to 
create your own PhoneNumberValidator class that only validates the value if 
there is one. I had to do the same thing for some other 
validator.

For part 2, I use the 
StringValidator for validating ComboBoxes, it should be enough,never done 
it with radio buttons however.

Jimmy 
Gianninas
Software Developer - 
Optimal Payments 
Inc.



From: Robert Brueckmann 
[mailto:[EMAIL PROTECTED] Sent: Thursday, February 
24, 2005 11:10 AMTo: flexcoders@yahoogroups.comSubject: 
[flexcoders] form validation



Im having a heck of a 
time understanding how form validation works. I have a formit contains 
text fields, drop down lists, and radio buttons. Its a basic user 
information formfirst name, last name, address 1, address 2, etc. I also 
have 3 fields: phone, fax, and mobile, but I only have the phone field as being 
required (visually, anyways, utilizing the required attribute set to true of the 
mx:FormItem component, but set to false for fax and mobile). I also have 
phone, fax and mobile being monitored by the mx:PhoneNumberValidator components. 
But the problem is the form wont submit if the user hasnt entered a fax 
or mobile, even though theyre not required but because I have validators on 
them. Is there any way to ONLY validate them if the user has entered a 
value in their fields and not enforce them as being required even though I dont 
have them flagged as being required?

Also, how do I validate 
whether a user has selected an option from a drop-down or a radio button 
group? I am successfully setting their values to the data model I have set 
up but do I use a StringValidator on those values to ensure something has been 
checked or is there a better way to do that? I looked at the examples in 
Stephen and Alistairs book but some things arent valid in Flex 1.5 anymore and 
other things just confuse the heck out of me or dont apply to the type of form 
Im trying to build and validate.

Any help on any of 
these things would be most amazingly appreciated.

Thanks!

Rob




This message contains information fromMerlin Securities, LLC, 
or from one of its affiliates, that may be confidential and privileged. If you 
are not an intended recipient, please refrain from any disclosure, copying, 
distribution or use of this information and note that such actions are 
prohibited. If you have received this transmission in error, please notify the 
sender immediately by telephone or by replying to this 
transmission.

Merlin Securities, LLC is a registered broker-dealer. Services 
offered throughMerlin Securities, LLC are not insured by the FDIC or any 
other Federal Government Agency, are not deposits of or guaranteed 
byMerlin Securities, LLCand may lose value. Nothing in this 
communication shall constitute a solicitation or recommendation to buy or sell a 
particular security.


RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Robert Brueckmann







Can I ask how you manage an MXML without
any ActionScript at all? How in a file that has components with clickor
change listeners would you not have any supporting ActionScript codeI
mean just about every single one of my MXML files has initialize or
creationComplete listeners in the parent container tag with dozens of other
components that are dependent on dataproviders changing and user interactions
like clicking or dragging and dropping and I cant begin to imagine how I
could extract every bit of ActionScript from my MXML files into individual
ActionScript classesmaybe Im not grasping the Cairgorm design
architecture fullyI thought I had a pretty good grasp on it but to hear
that youre writing MXML files with no ActionScript in them whatsoever
kind of baffles mecan you give me an example?



Thanks for bearing with me! ;)





Robert L. Brueckmann

Web Developer

Merlin Securities,LLC


RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Erik Westra



What i do is extending the mxmlclass with an AS 
class. Then instead of using the mxml i use the AS subclass. If the class is 
empty, things just work like they did before. But inside the AS class u have the 
usual callBacks (createChildren, init, etc) and a 
constructor.

Via code u can add listeners to the UI components and 
manage everything from within the AS class.

Greetz Erik




From: Robert Brueckmann 
[mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 
2005 15:14To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Theory and Practice: Mixing AS2.0 in MXML



Can I ask how you 
manage an MXML without any ActionScript at all? How in a file that has 
components with click or change listeners would you not have any supporting 
ActionScript codeI mean just about every single one of my MXML fileshas 
initialize or creationComplete listeners in the parent container tag with dozens 
of other components that are dependent on dataproviders changing and user 
interactions like clicking or dragging and dropping and I cant beginto imagine 
how I could extract every bit of ActionScript from my MXML files into individual 
ActionScript classesmaybe Im not grasping the Cairgorm designarchitecture 
fullyI thought I had a pretty good grasp on it but to hear that youre writing 
MXML files with no ActionScript in them whatsoever kind of baffles mecan you 
give me an example?

Thanks for bearing with 
me! ;)


RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Valy Sivec


Your example works fine as long as “totalAmt” is a number, formatting will work as expected.
My problem has a different context, though:
I have 2 text inputs, both of them are being formatted using the regular NumberFormatted. I’m trying to get the numbers out of the 2 text boxes, add them up and format the result. The form is a regular data entry screen; I’m retrieving the text input as textInput.text which gives me back the formatted number. So in order to get back a number I use parseFloat(formattedString). 
If the number is 0.4 (more than 5 decimals), I get back 4e-5, in scientific notation. I’d like to be able to get back 0.4 and to format it properly.

Thanks.

Robert Brueckmann [EMAIL PROTECTED] wrote:










Valy…in your MXML file, create a NumberFormatter component like this (setting the precision to what you need):

mx:NumberFormatter id="numberformatter" precision="8" useThousandsSeparator="true" useNegativeSign="true"/

And then on the field that displays your total…if it’s a label or something, do this:

mx:Label id=”total” text=”{numberformatter.format(totaAmt)}” /

Or something to that affect…


Robert L. Brueckmann
Web Developer
Merlin Securities, LLC
595 Madison Avenue
New York, NY 10022
p: 212.822.4821f: 212.822.4820




From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 10:24 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Number Format issue. I need help.

I spent some time without figuring out a way to formata number in double precision.I have a grid and below it a total field that shouldsum the grid colums. When I enter in the grid columnsvalues as 0.0008, 0.0001 the result fielddisplays 9e-8, which is correct but I would like todisplay it as 0.0009 instead Any suggestions?Thanks,Valy--- Valy Sivec
[EMAIL PROTECTED] wrote: Hello,  I have some some number formatted form elements that I need to sum up. In order to do that, I use parseFloat to extract the number out of the formatted string input. When the number has more than 5 decimals, let's say "0.008", the get back the trailing exponents: 8e-7.  Is there a way to get back the number without the trailing exponents (0.008)?   TIA, Val.  __  Celebrate Yahoo!'s 10th Birthday!  Yahoo! Netrospe!
ctive:
100 Moments of the Web  http://birthday.yahoo.com/netrospective/__ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/




This message contains information fromMerlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered throughMerlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed byMerlin Securities, LLCand may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.
Celebrate Yahoo!'s 10th Birthday!  
Yahoo! Netrospective: 100 Moments of the Web 

RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Abdul Qabiz
Show it as string, I mean internally calculate as number then convert number
to string and show in the textfield

I wrote a quick  dirty routine, that might help you.There might be a
better way to do, this is what I have done using string operations...




code

function getDecimalString(n:Number):String
{

var s:String = n.toString();

if(n.toString().indexOf(e-)!=-1) {
var arr = n.toString().split(e-);
var v1 = Number(arr[0]);
var v2 = Number(arr[1]);
s = 0.;
var i = 0;
while(i++v2) s+=0;
var s1 = v1.toString();

s+= s1.length1 ? s1.split(.).join() : s1;
}

return s;

}

/code




An example:


DecimalToString.mxml

?xml version=1.0 encoding=iso-8859-1?
mx:Application width=800 height=600
xmlns:mx=http://www.macromedia.com/2003/mxml;

mx:Script
![CDATA[



function getDecimalString(n:Number):String
{

var s:String = n.toString();

if(n.toString().indexOf(e-)!=-1) {
var arr = n.toString().split(e-);
var v1 = Number(arr[0]);
var v2 = Number(arr[1]);
s = 0.;
var i = 0;
while(i++v2) s+=0;
var s1 = v1.toString();

s+= s1.length1 ? s1.split(.).join() : s1;
}

return s;

}

function setOutput()
{
out_ti.text = getDecimalString(parseFloat(in_ti.text));
}




]]
/mx:Script
mx:Style

Label {

font-size:14;
color:white;
}

/mx:Style
mx:VBox horizontalAlign=left
mx:HBox
mx:Label text=Input:/
mx:TextInput id=in_ti text=0.00999344032
width=300 /
mx:Button id=convert_btn label=Convert
click=setOutput();/
/mx:HBox


mx:HBox
mx:Label text=Output:/
mx:TextInput id=out_ti text=/
/mx:HBox
/mx:VBox
/mx:Application


-abdul



-Original Message-
From: Valy Sivec [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 8:54 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Number Format issue. I need help.


I spent some time without figuring out a way to format a number in double
precision.

I have a grid and below it a total field that should sum the grid colums.
When I enter in the grid columns values as 0.0008, 0.0001 the result
field displays 9e-8, which is correct but I would like to display it as
0.0009 instead Any suggestions?

Thanks,
Valy


--- Valy Sivec [EMAIL PROTECTED] wrote:

 Hello,
 
 I have some some number formatted form elements that I need to sum up. 
 In order to do that, I use parseFloat to extract the number out of the 
 formatted string input. When the number has more than 5 decimals, 
 let's say 0.008, the get back the trailing
 exponents:
 8e-7.
 
 Is there a way to get back the number without the trailing exponents 
 (0.008)?
 
 
 TIA,
 Val.
 
 
 
 
 
 
 __
 Celebrate Yahoo!'s 10th Birthday! 
 Yahoo! Netrospective: 100 Moments of the Web 
 http://birthday.yahoo.com/netrospective/
 





__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/



Yahoo! Groups Links










newbie

2005-03-03 Thread Doodi, Hari - BLS CTR
Hi members,

I am new to Flex coding. I did learn a lot from coenraets web site
and also from richinternetapps.com. I do really appreciate them for letting
others to see their code and learn from it. 

I do have couple of issues to resolve. I did try search on Livedocs and
other websites for solutions but didn't find any.

1)  Can any one programmed hotkeys(keyboard shotcuts) in flex ? for
example, instead of using mouse to click on tab of TabNavigator container
users can use keyboard shortcuts say Ctrl+T or Alt+T something like this.
There will be a problem using Alt as accesskey because Alt key has been used
for windows hotkeys. Please help.

2)  My user requires that they should be able to zoom a scanned image
and then move/drag that image. I did accomplished zooming part but unable to
drag the image. Here is the mxml file for your ref.

manageSchedule_3.mxml 
Thanks in advance.

Thanks!
Hari



binRfuAMOkVrx.bin
Description: Binary data


charting examples

2005-03-03 Thread cnewroth55

does anyone have any good examples of how to get data to and from a
chart if RO's or CFC's? All the ones I have seen are static xml...
thanks,
Craig Newroth







Printing issue

2005-03-03 Thread ibibas

Hi,

I have to print data from a datagrid with several columns(12). Defining a
print job, I intend to modify the default page orientation, to print in
horizontal orientation, but it doesn´t work. Any thought?. Thanks in
advance.

My code:

var pj : PrintJob = new PrintJob();

//orientation
pj.orientation = landscape;

...

pj.send();

Remark that the orientation assigment is done previous to send data to the
printer.


Isaac Bibás







Error message with data binding

2005-03-03 Thread Tom Fitzpatrick
I've created a databinding in a component that works OK, but gives me a 
warning.

I have an xml file called sales.xml storing a value this way:
plan
description id=DIRECT
element
nameDescription/name
valueThis is some descriptive text./value
/element
/description
other nodes here
/plan
in the main application file I create a model from this and pass it as a 
dataObject to a .mxml component called Description:

mx:Model id=dp1 source=sales.xml/
Description id=sDesc dataObject={dp1.description.element}/
In the component, I define the dataObject var in a script block and execute 
the databinding:

mx:Text text={dataObject.value} width=100% height=100%/
This all works fine, except that I get a warning, pointing to the 
databinding line: changes in unknown property, value, will not be detected.

Is there a way to avoid this warning, or a more efficient way to do this?
- Tom





RE: [flexcoders] tool tips for a linkbar

2005-03-03 Thread Matt Horn
Yes, this does work. Here's an example:

?xml version=1.0?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:VBox
!-- Create a LinkBar container to navigate the ViewStack container. --
mx:LinkBar dataProvider=myViewStack borderStyle=solid /

!-- Define the ViewStack and the three child containers. --
mx:ViewStack id=myViewStack borderStyle=solid width=100%
height=150
mx:Canvas id=search label=Search toolTip=Use this screen to
search
mx:Label text=Search Screen /
/mx:Canvas
mx:Canvas id=custInfo label=Customer Info toolTip=Use this screen
to get customer info
mx:Label text=Customer Info /
/mx:Canvas
mx:Canvas id=accountInfo label=Account Info toolTip=Use this
screen to get account info
mx:Label text=Account Info /
/mx:Canvas
/mx:ViewStack
/mx:VBox
/mx:Application 


HTH,

Matt Horn



From: Matt Chotin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 02, 2005 1:47 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] tool tips for a linkbar



I think if you specify the toolTip on the child (so elements of the
ViewStack) those will be propagated to the Links themselves.



Matt





From: Robert Brueckmann
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 01, 2005 12:30 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] tool tips for a linkbar



Maybe another stupid question but I can't seem to anything in the
APIs or LiveDocs about how to have individual tool tips for a number of
links I have in a linkbar component. Right now as it stands, there seems to
be only the ability to have an overall tooltip for everything in a linkbar
component.



Any ideas? Thanks!







Can't find entry point for Cairngorm

2005-03-03 Thread dduuggllaa

I'm up to speed on Tomcat now and attempting to install Cairngorm. As
the docs are rather thin, I'm assuming Cairngorm is an application
skeleton with an entry point. The file INSTALL.txt mentions an
Index.mxml file that does not appear to be included in the cairngorm
zip file. Can someone from iteration::two place shed some light here?
Thanks.

Cheers,
Douglass Turner
email: douglass_dot_turner_at_gmail_dot_com







RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Erik Westra



That was my initial approach too, but eventualy it was 
easier to track bugs and 'mis-references' since i extended the component i was 
accessing. Now i get an error when i try to reference a textfield that isnt 
there. Another thing that is a pro for this kind of approach, is that the mxml 
file doesnt have to know wich method to call in the helper 
class.

Greetz Erik



From: Dimitrios Gianninas 
[mailto:[EMAIL PROTECTED] Sent: donderdag3 
maart 2005 16:22To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Theory and Practice: Mixing AS2.0 in MXML

I tend to put such code in the 
corresponding ViewHelper class, so every view (MXML file) has a corresponding 
ViewHelper class. See sample below:

Inboxes.mxml
mx:Box
 ...
 vw:InboxesViewHelper id="inboxesHelper" 
view="{this}"/
 ...

 mx:List id="inboxList" width="165" height="100%" 
labelField="name" 
vScrollPolicy="auto" 
change="inboxesHelper.doLoadInbox(inboxList.selectedItem.id)" 
/

 ...
/mx:Box

Jimmy 
Gianninas
Software Developer - 
Optimal Payments 
Inc.



RE: [flexcoders] fscommand and flex

2005-03-03 Thread Erik Westra
Why don't u try to use getURL?

U can use it like this: 
getURL(javascript:functionName('arg1', 'arg2'));

Internally fscommand is converted to something like:

getURL(fscommand:functionName...), I don't know exactly, but there was
a thread about it on flexcoders a month or so ago.

Greetz Erik


-Original Message-
From: jeff tapper [mailto:[EMAIL PROTECTED] 
Sent: donderdag 3 maart 2005 16:21
To: flexcoders@yahoogroups.com
Subject: [flexcoders] fscommand and flex



Hey folks, im trying to call fscommand from flex, but without much luck,
i was wondering if anyone can help me.


Heres a simple POC of what im trying:

Test.jsp
%@ taglib uri=FlexTagLib prefix=mm %
html
head
script language=javascript
function myMovie_doFSCommand(arg1,arg2){
alert(fscommand called);
alert(arg1 + arg1);
alert(arg2 + arg2);
}
/script
/head
body
mm:mxml source=TestApp.mxml id=myMovie name=myMovie/
/body
/html

TestApp.mxml

mx:Application width=200 height=200 
xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Button label=MXML Button click=doClick()/
mx:Script
function doClick(){
fscommand(arg1,arg2);
}
/mx:Script
/mx:Applicaiton

Needless to say, the javascript alerts are never showing. i suspect 
im missing something basic, but even back in my heydays of flash, i 
rarely if ever used fscommand.

can someone point me in the right direction?

thanks.

jeff






 
Yahoo! Groups Links



 







RE: [flexcoders] Can't find entry point for Cairngorm

2005-03-03 Thread Steven Webster



Douglas, As the docs are rather thin,There 
are 685 pages of docs here:http://www.amazon.com/exec/obidos/tg/detail/-/0321255666/qid=1109863774/sr=8-1/ref=pd_bbs_1/104-6646893-5762341?v=glances=booksn=507846:-) 
I'm assuming Cairngorm is an application skeleton with an entry point. 
The file INSTALL.txt mentions an Index.mxml file that does not 
appear to be included in the cairngorm zip file. Can someone from 
iteration::two place shed some light here?In Chapter 20 of the book, 
also available as a free PDF 
download here,you will see how an application using the same design 
patterns (largely)as Cairngorm, is constructed, from requirements all the 
way through todelivery.Can I suggest that you work through that 
application, until you arehappy that you understand it ?In 
seriousness, don't persevere with Cairngorm or any other 
applicationframework for that matter, until you're happy you've got a good 
grasp ofhow to build prototype applications with the technology, that 
don'trequire an application infrastructure like Cairngorm.Good 
luck,Steven 


RE: [flexcoders] fscommand and flex

2005-03-03 Thread Matt Horn
I think if you're using IE, you have to create a VBScript passthrough
because fscommand will only call a VBScript function. Your original code
worked for me in Firefox but not in IE. (Plus, you might have to watch the
caps of myMovie_DoFSCommand -- the D is capitalized).

Try adding the myMovie_FSCommand passthrough in the jsp page:

%@ taglib uri=FlexTagLib prefix=mm %
html
head

script language=VBScript
Sub myMovie_FSCommand(a1, a2)
call myMovie_DoFSCommand(a1, a2) // Pass the fscommand through.
end sub
/script

script language=javascript
function myMovie_DoFSCommand(arg1,arg2){
alert(fscommand called);
alert(arg1 + arg1);
alert(arg2 + arg2);
}
/script
/head
body
mm:mxml source=TestApp.mxml id=myMovie name=myMovie/
/body
/html




From: jeff tapper [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 10:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] fscommand and flex



Hey folks, im trying to call fscommand from flex, but without much 
luck, i was wondering if anyone can help me.


Heres a simple POC of what im trying:

Test.jsp
%@ taglib uri=FlexTagLib prefix=mm %
html
head
script language=javascript
function myMovie_doFSCommand(arg1,arg2){
alert(fscommand called);
alert(arg1 + arg1);
alert(arg2 + arg2);
}
/script
/head
body
mm:mxml source=TestApp.mxml id=myMovie name=myMovie/
/body
/html

TestApp.mxml

mx:Application width=200 height=200 
xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Button label=MXML Button click=doClick()/
mx:Script
function doClick(){
fscommand(arg1,arg2);
}
/mx:Script
/mx:Applicaiton

Needless to say, the javascript alerts are never showing. i suspect

im missing something basic, but even back in my heydays of flash, i 
rarely if ever used fscommand.

can someone point me in the right direction?

thanks.

jeff






Yahoo! Groups Sponsor   
ADVERTISEMENT
click here
http://us.ard.yahoo.com/SIG=129djis01/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705007207:HM/EXP=1109949697/A=2593423/R=0/SIG=11el9gslf/*http://www.
netflix.com/Default?mqso=60190075 

http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2593423/rand=617438762 



Yahoo! Groups Links


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

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

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








RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Valy Sivec

Abdul,
thanks for your example it was very helpfull I added an extra text box and wanted to do some sum between the 2 boxes... very basic stuff...
function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 
}

Well when I add 0.999344032 with 12345678901234.01 the result is: 12345678901235 ( no decimals )
or 
0.999344032 
+ 111.01 = 111.999 ( only the first 3... ) I would like to see all the decimals...

Can you help me? Am I missing something? Below you can find the modified code.
Thanks,
Valy
code
?xml version="1.0" encoding="utf-8"?
mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml"
mx:Script
![CDATA[
function getDecimalString(n:Number):String
{

var s:String = n.toString();

if(n.toString().indexOf("e-")!=-1 ) {
var arr = n.toString().split("e-");
var v1 = Number(arr[0]);
var v2 = Number(arr[1]);
s = "0.";
var i = 0;
while(i++v2) s+="0";
var s1 = v1.toString();

s+= s1.length1 ? s1.split(".").join("") : s1;
} 
return s;

}

function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 
}
]]
/mx:Script

mx:Style 
Label { 
font-size:14;
color:white;
} 
/mx:Style

mx:VBox horizontalAlign="left"
mx:HBox
mx:Label text="Input:"/
mx:TextInput id="in_ti" text="0.00999344032" width="300" / 
mx:TextInput id="in_ti2" width="300" /
mx:Button id="convert_btn" label="Convert" click="setOutput();"/
/mx:HBox

mx:HBox
mx:Label text="Output:"/
mx:TextInput id="out_ti" text="" width="300"/
/mx:HBox
/mx:VBox
mx:NumberFormatter id="numberformatter" precision="20" useThousandsSeparator="true" useNegativeSign="true"/
/mx:Application

Abdul Qabiz [EMAIL PROTECTED] wrote:
Show it as string, I mean internally calculate as number then convert numberto string and show in the textfieldI wrote a quick  dirty routine, that might help you.There might be abetter way to do, this is what I have done using string operations...codefunction getDecimalString(n:Number):String{  var s:String = n.toString();  if(n.toString().indexOf("e-")!=-1) {  var arr = n.toString().split("e-");  var v1 = Number(arr[0]);  var v2 = Number(arr[1]);
 s = "0.";  var i = 0;  while(i++v2) s+="0";  var s1 = v1.toString();s+= s1.length1 ? s1.split(".").join("") : s1; } return s; }/codeAn example:DecimalToString.mxml?xml version="1.0" encoding="iso-8859-1"?mx:Application width="800" height="600"xmlns:mx="http://www.macromedia.com/2003/mxml" mx:Script
![CDATA[  function getDecimalString(n:Number):String {var s:String = n.toString();if(n.toString().indexOf("e-")!=-1) {   var arr = n.toString().split("e-");   var v1 = Number(arr[0]);   var v2 =
Number(arr[1]);   s = "0.";   var i = 0;   while(i++v2) s+="0";   var s1 = v1.toString();  s+= s1.length1 ? s1.split(".").join("") : s1;  }   r!
eturn
s;   }  function setOutput() { out_ti.text = getDecimalString(parseFloat(in_ti.text)); } ]] /mx:Script mx:Style  Label {  font-size:14;
color:white; }  /mx:Style mx:VBox horizontalAlign="left" mx:HBox mx:Label text="Input:"/ mx:TextInput id="in_ti" text="0.00999344032"width="300" / mx:Button id="convert_btn" label="Convert"click="setOutput();"/ /mx:HBox  
mx:HBox mx:Label text="Output:"/ mx:TextInput id="out_ti" text=""/ /mx:HBox /mx:VBox/mx:Application-abdul-Original Message-From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 8:54 AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Number Format issue. I need help.I spent some time without figuring out a way to format a number in doubleprecision.I have a grid and below it a total field that should sum the grid colums.When I enter in the grid columns values as 0.0008, 0.0001 the resultfield displays 9e-8, which is correct but I would like to display it as0.0009 instead Any
suggestions?Thanks,Valy--- Valy Sivec [EMAIL PROTECTED] wrote: Hello,  I have some some number formatted form elements that I need to sum up.  In order to do that, I use parseFloat to extract the number out of the  formatted string input. When the number has more than 5 decimals,  let's say "0.008", the get back the trailing exponents: 8e-7.  Is there a way to get back the number without the trailing exponents  (0.008)?   TIA, Val.  __ Celebrate Yahoo!'s 10th Birthday!  Yahoo! Netrospective: 100 Moments of the Web  http://birthday.yahoo.com/netrospective/__ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web 

Re: Can't find entry point for Cairngorm

2005-03-03 Thread dduuggllaa

Steven,

Actually, I have and very enjoy your excellent Flex book. Very
helpful.
What I mean is that it is unclear how you intend users of Cairngorm to
take it out for a spin. Do I now stair at the included code for a
while until I discover an entry point to hook into with a .mxml file I
code up? Has that task been left as an exercise for the student ;-) or
what? 

Cheers,
Douglass Turner







RE: [flexcoders] Creating components with style support

2005-03-03 Thread Matt Horn
Eric, the chapter on programmatic skinning has examples that should get you
started. Did you try this?

http://livedocs.macromedia.com/flex/15/flex_docs_en/2198.htm

There's also a section in that chapter on making skinning properties
styleable.

HTH,

Matt Horn 



From: Erik Westra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 9:00 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Creating components with style support



I have dived in the different documents available on creating V2
components. But i couldnt find one that handles the fact that your
custom component needs to be skinnable and styleable, does any1 know
of
such a document?

Greetz Erik


Yahoo! Groups Sponsor   
ADVERTISEMENT
click here
http://us.ard.yahoo.com/SIG=129k1tuc8/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705007207:HM/EXP=1109944826/A=2593423/R=0/SIG=11el9gslf/*http://www.
netflix.com/Default?mqso=60190075 

http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2593423/rand=633842889 



Yahoo! Groups Links


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

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

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








RE: [flexcoders] Re: Can't find entry point for Cairngorm

2005-03-03 Thread Steven Webster

 What I mean is that it is unclear how you intend users of 
 Cairngorm to take it out for a spin. Do I now stair at the 
 included code for a while until I discover an entry point to 
 hook into with a .mxml file I code up? Has that task been 
 left as an exercise for the student ;-) or what? 

Page 534.

You need to create an application, your application needs
to create a front controller, you need to register a command
with the front controller, and you need something (a button ?)
that broadcasts the event tied to that command.

There is also a sample application ships with the Cairngorm
ZIP file, in the samples directory - there you will find
Index.mxml that shows you what your MXML entry point should
look like, a com/ directory with all your actionscript code,
and a java/ directory with all your server side code.

Spend some time understanding how that 2 MXML file sample
application has been built, and how it interacts with the
files in the com.iterationtwo.cairngorm.* directory
structure.

In summary, the following code in Index.mxml:

cairngorm:controller
{ com.iterationtwo.demo.control.DemoControl }
/cairngorm:controller

Creates a controller. Login.mxml has this code:

mx:Button label=Login click=doLogin() /

It also (shriek) has some ActionScript 2.0 implementing that method:

public function doLogin()
{
EventBroadcaster.getInstance().broadcastEvent( login );
}

If you then view the source for com/iterationtwo/demo/control/DemoControl.as
you'll see how the login event is tied to the LoginCommand.as file.

You should be able to work the rest out from there.

Good luck,

Steven





RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Abdul Qabiz



Hi Valy,

Thats how Flash Player rounds off the numbers 
automatically, if you have a number like this:

var s2 = 12345678901234.95; //it would show as 
12345678901234.9

and

var s2 = 12345678901234.96; //it would show as 
12345678901235


Not sure, how to solve thisSomeone who has done it 
earlier, might want to comment...

-abdul






From: Valy Sivec [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 9:18 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Number Format 
issue. I need help.


Abdul,
thanks for your example it was very helpfull I added an extra text box 
and wanted to do some sum between the 2 boxes... very basic 
stuff...
function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 
}

Well when I add 0.999344032 with 12345678901234.01 the result 
is: 12345678901235 ( no decimals )
or 
0.999344032 
+ 111.01 = 111.999 ( only the first 3... ) I 
would like to see all the decimals...

Can you help me? Am I missing something? Below you can find the modified 
code.
Thanks,
Valy
code
?xml version="1.0" encoding="utf-8"?
mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml"
mx:Script
![CDATA[
function getDecimalString(n:Number):String
{

var s:String = n.toString();

if(n.toString().indexOf("e-")!=-1 ) {
var arr = n.toString().split("e-");
var v1 = Number(arr[0]);
var v2 = Number(arr[1]);
s = "0.";
var i = 0;
while(i++v2) s+="0";
var s1 = v1.toString();

s+= s1.length1 ? s1.split(".").join("") : s1;
} 
return s;

}

function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 
}
]]
/mx:Script

mx:Style 
Label { 
font-size:14;
color:white;
} 
/mx:Style

mx:VBox horizontalAlign="left"
mx:HBox
mx:Label text="Input:"/
mx:TextInput id="in_ti" text="0.00999344032" 
width="300" / 
mx:TextInput id="in_ti2" width="300" /
mx:Button id="convert_btn" label="Convert" click="setOutput();"/
/mx:HBox

mx:HBox
mx:Label text="Output:"/
mx:TextInput id="out_ti" text="" width="300"/
/mx:HBox
/mx:VBox
mx:NumberFormatter id="numberformatter" precision="20" 
useThousandsSeparator="true" useNegativeSign="true"/
/mx:Application

Abdul Qabiz 
[EMAIL PROTECTED] wrote: 
Show 
it as string, I mean internally calculate as number then convert numberto 
string and show in the textfieldI wrote a quick  dirty 
routine, that might help you.There might be abetter way to do, this is 
what I have done using string 
operations...codefunction 
getDecimalString(n:Number):String{ 
 var s:String = 
n.toString(); 
 if(n.toString().indexOf("e-")!=-1) 
{  var arr = 
n.toString().split("e-"); 
 var v1 = 
Number(arr[0]); 
 var v2 = 
Number(arr[1]); 
 s = "0."; 
 var i = 0; 
 while(i++v2) 
s+="0";  var 
s1 = v1.toString(); 
  
 s+= s1.length1 ? s1.split(".").join("") : 
s1; } 
return s; 
}/codeAn 
example:DecimalToString.mxml?xml version="1.0" 
encoding="iso-8859-1"?mx:Application width="800" 
height="600"xmlns:mx="http://www.macromedia.com/2003/mxml" 
mx:Script 
![CDATA[ 
 function 
getDecimalString(n:Number):String 
{  
  
var s:String = n.toString(); 
  
 if(n.toString().indexOf("e-")!=-1) 
{  
 var arr = 
n.toString().split("e-"); 
  var v1 = 
Number(arr[0]); 
  var v2 = 
Number(arr[1]); 
  s = 
"0."; 
  var i = 
0; 
  while(i++v2) 
s+="0"; 
  var s1 = 
v1.toString(); 
  
  
 s+= s1.length1 ? s1.split(".").join("") : 
s1; 
 } 
  
return s; 
  
} 
 function 
setOutput() 
{ 
out_ti.text = 
getDecimalString(parseFloat(in_ti.text)); 
} 
]] /mx:Script 
mx:Style 
 Label 
{ 
 
font-size:14; 
color:white; 
}  
/mx:Style mx:VBox 
horizontalAlign="left" 
mx:HBox 
mx:Label 
text="Input:"/ 
mx:TextInput id="in_ti" 
text="0.00999344032"width="300" 
/ 
mx:Button id="convert_btn" 
label="Convert"click="setOutput();"/ 
/mx:HBox 
 
 
mx:HBox 
mx:Label 
text="Output:"/ 
mx:TextInput id="out_ti" 
text=""/ 
/mx:HBox 
/mx:VBox/mx:Application-abdul-Original 
Message-From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: 
Thursday, March 03, 2005 8:54 AMTo: flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] Number Format issue. I need help.I spent some 
time without figuring out a way to format a number in 
doubleprecision.I have a grid and below it a total field that 
should sum the grid colums.When I enter in the grid columns values as 
0.0008, 0.0001 the resultfield displays 9e-8, which is correct but 
I would like to display it as0.0009 instead Any 
suggestions?Thanks,Valy--- Valy Sivec 
[EMAIL PROTECTED] wrote: Hello,  I 
have some some number formatted 

UPLOAD

2005-03-03 Thread daniele | mentegrafica
As I read,
Flex doesn't support files upload to the server,
even using a Central App

I think this is another weak point.

Is there any solution out there to solve the problem ?

Thanks,

dott. daniele galiffa
multimedia designer  developer
Macromedia Flash MX Developer Certified
[EMAIL PROTECTED]




Autocomplete text filed

2005-03-03 Thread David Solis
Hi list,

For my current project I need an autocomplete text field similar to
google's suggestion.
If anybody has an idea about how to implement this please drop a line.

TIA

Regards

D.




RE: [flexcoders] Autocomplete text filed

2005-03-03 Thread Steven Webster

 For my current project I need an autocomplete text field 
 similar to google's suggestion.
 If anybody has an idea about how to implement this please drop a line.

http://www.richinternetapps.com/archives/79.html

Hope this helps,

Steven

--
Steven Webster
Technical Director
iteration::two

This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.

Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.





RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Valy Sivec
Hi Abdul,

I'm working for a financial application and this behaviour in my opinion is unaccceptable...I'm hesitant to believethat our QA eng, not mentioning theclients willaccept this

Can't believe that such a basic thing cause me so much trouble...is thereanybody in on this forum that used math operations with large number in double precision and avoided this issue?

Any help, suggestions would be greatly appreciated.

Thanks,
Valy

Abdul Qabiz [EMAIL PROTECTED] wrote:


Hi Valy,

Thats how Flash Player rounds off the numbers automatically, if you have a number like this:

var s2 = 12345678901234.95; //it would show as 12345678901234.9

and

var s2 = 12345678901234.96; //it would show as 12345678901235


Not sure, how to solve thisSomeone who has done it earlier, might want to comment...

-abdul






From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:18 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Number Format issue. I need help.


Abdul,
thanks for your example it was very helpfull I added an extra text box and wanted to do some sum between the 2 boxes... very basic stuff...
function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 
}

Well when I add 0.999344032 with 12345678901234.01 the result is: 12345678901235 ( no decimals )
or 
0.999344032 
+ 111.01 = 111.999 ( only the first 3... ) I would like to see all the decimals...

Can you help me? Am I missing something? Below you can find the modified code.
Thanks,
Valy
code
?xml version="1.0" encoding="utf-8"?
mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml"
mx:Script
![CDATA[
function getDecimalString(n:Number):String
{

var s:String = n.toString();

if(n.toString().indexOf("e-")!=-1 ) {
var arr = n.toString().split("e-");
var v1 = Number(arr[0]);
var v2 = Number(arr[1]);
s = "0.";
var i = 0;
while(i++v2) s+="0";
var s1 = v1.toString();

s+= s1.length1 ? s1.split(".").join("") : s1;
} 
return s;

}

function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 
}
]]
/mx:Script

mx:Style 
Label { 
font-size:14;
color:white;
} 
/mx:Style

mx:VBox horizontalAlign="left"
mx:HBox
mx:Label text="Input:"/
mx:TextInput id="in_ti" text="0.00999344032" width="300" / 
mx:TextInput id="in_ti2" width="300" /
mx:Button id="convert_btn" label="Convert" click="setOutput();"/
/mx:HBox

mx:HBox
mx:Label text="Output:"/
mx:TextInput id="out_ti" text="" width="300"/
/mx:HBox
/mx:VBox
mx:NumberFormatter id="numberformatter" precision="20" useThousandsSeparator="true" useNegativeSign="true"/
/mx:Application

Abdul Qabiz [EMAIL PROTECTED] wrote: 
Show it as string, I mean internally calculate as number then convert numberto string and show in the textfieldI wrote a quick  dirty routine, that might help you.There might be abetter way to do, this is what I have done using string operations...codefunction getDecimalString(n:Number):String{  var s:String = n.toString();  if(n.toString().indexOf("e-")!=-1) {  var arr = n.toString().split("e-");  var v1 = Number(arr[0]);  var v2 = Number(arr[1]);
 s = "0.";  var i = 0;  while(i++v2) s+="0";  var s1 = v1.toString();s+= s1.length1 ? s1.split(".").join("") : s1; } return s; }/codeAn example:DecimalToString.mxml?xml version="1.0" encoding="iso-8859-1"?mx:Application width="800" height="600"xmlns:mx="http://www.macromedia.com/2003/mxml" mx:Script
![CDATA[  function getDecimalString(n:Number):String {var s:String = n.toString();if(n.toString().indexOf("e-")!=-1) {   var arr = n.toString().split("e-");   var v1 = Number(arr[0]);   var v2 =
Number(arr[1]);   s = "0.";   var i = 0;   while(i++v2) s+="0";   var s1 = v1.toString();  s+= s1.length1 ? s1.split(".").join("") : s1;  }   r!
eturn
s;   }  function setOutput() { out_ti.text = getDecimalString(parseFloat(in_ti.text)); } ]] /mx:Script mx:Style  Label {  font-size:14;
color:white; }  /mx:Style mx:VBox horizontalAlign="left" mx:HBox mx:Label text="Input:"/ mx:TextInput id="in_ti" text="0.00999344032"width="300" / mx:Button id="convert_btn" label="Convert"click="setOutput();"/ /mx:HBox  
mx:HBox mx:Label text="Output:"/ mx:TextInput id="out_ti" text=""/ /mx:HBox /mx:VBox/mx:Application-abdul-Original Message-From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 8:54 AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Number Format issue. I need help.I spent some time without figuring out a way to format a number in 

RE: [flexcoders] newbie

2005-03-03 Thread Abdul Qabiz
Hi,

1) Yeah, you can trap the keyboard events using ActionScript. You can use
keyDown event with Key object to find about pressed keys.. See example
code later in the mail.

2) you can use the combination of mouseDown, mouseMove  mouseUp event to
make dragging happen. Look at Manish's Google map example, see how he is
dragging...

http://manish.revise.org/archives/2005/02/12/no-more-xml-from-google-maps/





##ShortCutKeyExample.mxml###

?xml version=1.0?
!-- Simple example to demonstrate the TabNavigator layout --
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; width=100%
height=100% backgroundColor=#FF initialize=onAppInit();
mx:Script
![CDATA[
var shortcutManager;

function onAppInit()
{
shortcutManager = new Object();
shortcutManager.owner = this;
shortcutManager.onKeyDown = mx.utils.Delegate.create(this,
handleKeyEvent);
Key.addListener(shortcutManager);

}

function handleKeyEvent(event)
{


var bCTRLDown = Key.isDown(17); //17 is keycode of CTRL key


if(bCTRLDown) {
if(Key.getCode() == 84) {
tb.selectedIndex = 1;
}else if(Key.getCode() == 69) {
tb.selectedIndex = 0;
}
} 
}





]]
/mx:Script

mx:Panel title=Tab Navigator Panel width=100% height=100%

mx:TabNavigator id=tb borderStyle=solid width=100%
height=100%

mx:Canvas label=Canvas 1 (CTRL + E) width=100%
height=100% backgroundColor=#CC
mx:Label text=Add components here fontSize=20
fontStyle=italic
fontWeight=bold fontFamily=Times New Roman/

/mx:Canvas

mx:Canvas label=Canvas 2 (CTRL + T) width=100%
height=100% backgroundColor=#99CCFF
mx:Label text=Add components here fontSize=20
fontStyle=italic
fontWeight=bold fontFamily=Times New Roman/
/mx:Canvas

/mx:TabNavigator

/mx:Panel

/mx:Application


-abdul




-Original Message-
From: Doodi, Hari - BLS CTR [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 8:29 PM
To: 'flexcoders@yahoogroups.com'
Subject: [flexcoders] newbie

Hi members,

I am new to Flex coding. I did learn a lot from coenraets web site
and also from richinternetapps.com. I do really appreciate them for letting
others to see their code and learn from it. 

I do have couple of issues to resolve. I did try search on Livedocs and
other websites for solutions but didn't find any.

1)  Can any one programmed hotkeys(keyboard shotcuts) in flex ? for
example, instead of using mouse to click on tab of TabNavigator container
users can use keyboard shortcuts say Ctrl+T or Alt+T something like this.
There will be a problem using Alt as accesskey because Alt key has been used
for windows hotkeys. Please help.

2)  My user requires that they should be able to zoom a scanned image
and then move/drag that image. I did accomplished zooming part but unable to
drag the image. Here is the mxml file for your ref.

manageSchedule_3.mxml
Thanks in advance.

Thanks!
Hari




Yahoo! Groups Links








RE: [flexcoders] newbie

2005-03-03 Thread Michael Herron








Hi,



This is an issue that I have also had to
deal with recently.



I had limited success using code similar
to that which you have outlined below. The major problem is that pressing CTRL
+ the majority of keys causes the browser to intercept these key presses and
perform its own actions. Trying ctrl + almost every key on the keyboard
resulted in only getting about 6 or so CTRL + key combinations being made available
to me. Trying ALT + key was even less successful as the flash player just
seemed to loose focus entirely, with the browser menu then being given focus.



Has anybody else had any success with key
board shortcuts? At first glance, it doesnt seem to be possible to
provide logical keyboard navigation on forms with more than a handful of
controls. Of course, tab navigation is still possible.











From: Abdul Qabiz
[mailto:[EMAIL PROTECTED] 
Sent: 03 March 2005 16:19
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie





Hi,

1) Yeah, you can trap the keyboard events using
ActionScript. You can use
keyDown event with Key object tofind
about pressed keys.. See example
code later in the mail.

2) you can use the combination of mouseDown,
mouseMove  mouseUp event to
make dragging happen. Look at Manish's Google map
example, see how he is
dragging...

http://manish.revise.org/archives/2005/02/12/no-more-xml-from-google-maps/





##ShortCutKeyExample.mxml###

?xml version=1.0?
!-- Simple example to demonstrate the
TabNavigator layout --
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml
width=100%
height=100%
backgroundColor=#FF initialize=onAppInit();
mx:Script
 ![CDATA[
 var shortcutManager;
 
 function onAppInit()
 {

shortcutManager = new Object();

shortcutManager.owner = this;

shortcutManager.>
handleKeyEvent);

Key.addListener(shortcutManager);
 
 }
 
 function handleKeyEvent(event)
 {
 
 
 var
bCTRLDown = Key.isDown(17); //17 is keycode of CTRL key
 
 

if(bCTRLDown) {

if(Key.getCode() == 84) {

tb.selectedIndex = 1;

}else if(Key.getCode() == 69) {

tb.selectedIndex = 0;

}

}

 }
 
 
 
 
 
 ]]
/mx:Script

 mx:Panel title=Tab
Navigator Panel width=100% height=100%


mx:TabNavigator id=tb borderStyle=solid
width=100%
height=100%


mx:Canvas label=Canvas 1 (CTRL + E) width=100%
height=100%
backgroundColor=#CC

mx:Label text=Add components here fontSize=20
fontStyle=italic

fontWeight=bold fontFamily=Times New Roman/


/mx:Canvas


mx:Canvas label=Canvas 2 (CTRL + T) width=100%
height=100%
backgroundColor=#99CCFF

mx:Label text=Add components here fontSize=20
fontStyle=italic

fontWeight=bold fontFamily=Times New Roman/

/mx:Canvas


/mx:TabNavigator

 /mx:Panel

/mx:Application


-abdul




-Original Message-
From: Doodi, Hari - BLS CTR [mailto:[EMAIL PROTECTED]

Sent: Thursday, March 03, 2005 8:29 PM
To: 'flexcoders@yahoogroups.com'
Subject: [flexcoders] newbie

Hi members,
 
 I am new to Flex
coding. I did learn a lot from coenraets web site
and also from richinternetapps.com. I do really
appreciate them for letting
others to see their code and learn from it. 

I do have couple of issues to resolve. I didtry
search on Livedocs and
other websites for solutions but didn't findany.

1) Can any one
programmed hotkeys(keyboard shotcuts) in flex ? for
example, instead of using mouse to click on tab of
TabNavigator container
users can use keyboard shortcuts say Ctrl+T or
Alt+T something like this.
There will be a problem using Alt as accesskey
because Alt key has been used
for windows hotkeys. Please help.

2) My user requires
that they should be able to zoom a scanned image
and then move/drag that image. I did accomplished
zooming part but unable to
drag the image. Here is the mxml file for your
ref.


manageSchedule_3.mxml
Thanks in advance.

Thanks!
Hari




Yahoo! Groups Links














RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Matt Chotin








Im reading these posts but haveno
time to respond (nor to any other posts right now), though the discussion is a
good one and I dont have strong opinions either way (taking into account
of course that Im strongly loyal to binding). The only thing Ill
contribute is that Im gonna refer to Eriks technique as view-behind
in deference to the ASP.NET approach called code-behind (eh, I dont know
how the punctuate it). I now expect a nickel every time I see view-behind in a
flexcoders post J



Carry on,

Matt











From: Erik Westra
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005
10:30 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Theory
and Practice: Mixing AS2.0 in MXML





That was my initial approach too, but
eventualy it was easier to track bugs and 'mis-references' since i extendedthe
component i was accessing. Now i get an error when i try to reference a
textfield that isnt there. Another thing that is a pro for this kind of
approach, is that the mxml file doesnt have to know wich method to call in the
helper class.



Greetz Erik











From:Dimitrios
Gianninas [mailto:[EMAIL PROTECTED] 
Sent: donderdag 3 maart 200516:22
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Theory
and Practice: Mixing AS2.0 in MXML

I tend
to put such code in the corresponding ViewHelper class, so every view (MXML
file) has a corresponding ViewHelper class. See sample below:



Inboxes.mxml

mx:Box

 ...

 vw:InboxesViewHelper id=inboxesHelper
view={this}/


...



 mx:List id=inboxList width=165
height=100% labelField=name

vScrollPolicy=auto change=inboxesHelper.doLoadInbox(inboxList.selectedItem.id)
/



 ...

/mx:Box



Jimmy
Gianninas

Software
Developer - Optimal Payments Inc.

















Re: fscommand and flex

2005-03-03 Thread jeff tapper

Erik - 
Thanks, that worked in a much nicer cross-platform way then using 
fscommand.

--- In flexcoders@yahoogroups.com, Erik Westra [EMAIL PROTECTED] wrote:
 Why don't u try to use getURL?
 
 U can use it like this: 
 getURL(javascript:functionName('arg1', 'arg2'));
 
 Internally fscommand is converted to something like:
 
 getURL(fscommand:functionName...), I don't know exactly, but 
there was
 a thread about it on flexcoders a month or so ago.
 
 Greetz Erik
 
 
 -Original Message-
 From: jeff tapper [mailto:[EMAIL PROTECTED] 
 Sent: donderdag 3 maart 2005 16:21
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] fscommand and flex
 
 
 
 Hey folks, im trying to call fscommand from flex, but without much 
luck,
 i was wondering if anyone can help me.
 
 
 Heres a simple POC of what im trying:
 
 Test.jsp
 %@ taglib uri=FlexTagLib prefix=mm %
 html
 head
 script language=javascript
 function myMovie_doFSCommand(arg1,arg2){
 alert(fscommand called);
 alert(arg1 + arg1);
 alert(arg2 + arg2);
 }
 /script
 /head
 body
 mm:mxml source=TestApp.mxml id=myMovie name=myMovie/
 /body
 /html
 
 TestApp.mxml
 
 mx:Application width=200 height=200 
 xmlns:mx=http://www.macromedia.com/2003/mxml;
 mx:Button label=MXML Button click=doClick()/
 mx:Script
 function doClick(){
 fscommand(arg1,arg2);
 }
 /mx:Script
 /mx:Applicaiton
 
 Needless to say, the javascript alerts are never showing. i 
suspect 
 im missing something basic, but even back in my heydays of flash, i 
 rarely if ever used fscommand.
 
 can someone point me in the right direction?
 
 thanks.
 
 jeff
 
 
 
 
 
 
 
 Yahoo! Groups Links







RE: [flexcoders] UPLOAD

2005-03-03 Thread Dimitrios Gianninas



hi,

I wrote a doc on howto do file 
upload with a Flex UI with JSP, the doc is here: http://www.markme.com/mchotin/archives/2004_11.cfm

Basically the Flash player does 
not currently support file upload/download.

If you deploy your Flex UI in 
Central it does have file upload/download capability.

Enjoy!

Jimmy 
Gianninas
Software Developer - 
Optimal Payments 
Inc.



From: daniele | mentegrafica 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 11:52 
AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] 
UPLOAD
I knew workaround for flash...I didn't like their 
compatiblity .Thanks anyway,dott. daniele galiffamultimedia 
designer  developerMacromedia Flash MX Developer 
Certified[EMAIL PROTECTED]- Original Message - From: 
"Tracy Spratt" [EMAIL PROTECTED]To: 
flexcoders@yahoogroups.comSent: Thursday, March 03, 2005 6:07 
PMSubject: RE: [flexcoders] UPLOAD There is an example on 
www.cflex.net, as well. Tracy  -Original 
Message- From: James Ward [mailto:[EMAIL PROTECTED]  Sent: 
Thursday, March 03, 2005 11:33 AM To: flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] UPLOAD   There is a workaround 
somewhere on MM's website, but it only works in IE. :( I 
hear Flash 8 will have this feature, but until then I use a hidden 
iframe at the bottom of the screen which raises up when the user clicks 
an upload button in Flex. This iframe is just a plain html / jsp 
file. It looks similar to the IE information bar. After upload 
the user can click a close button which lower (changes height to 
0).  Hope that helps.  -James  
 On Thu, 2005-03-03 at 17:10 +0100, daniele | mentegrafica 
wrote:  As I read,  Flex doesn't support files upload to 
the server,  even using a Central App   
I think this is another weak point.Is there any 
solution out there to solve the problem ?
Thanks,dott. daniele galiffa  multimedia 
designer  developer  Macromedia Flash MX Developer 
Certified  [EMAIL PROTECTED]
Yahoo! Groups Links   
  
Yahoo! 
Groups Links   
Yahoo! 
Groups Sponsor 
 
ADVERTISEMENT 
  
   
 
Yahoo! Groups Links  a.. To visit your group onthe 
web, go to: http://groups.yahoo.com/group/flexcoders/ 
 b.. To unsubscribe from this group, send an email 
to: 
[EMAIL PROTECTED] 
 c.. Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of Service.   


Re: Can't find entry point for Cairngorm

2005-03-03 Thread dduuggllaa

Cool. Thanks very much Steven.

-Douglass








RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Omar Ramos



I was about to say that. It's besicaly like asp.NET where 
you have the tag bas view on the html and the code in C# or VB in a code-behind 
file. I use jimmy's method using the viewHelper because otherwise you wouldhave 
the mxml file a actionscrip class (code-behind) and the viewHelper also if you 
would use the framework.

Omar 
Ramos
Technology 
Manager
Itacon 
Corporation


From: Matt Chotin 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 12:31 
PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] 
Theory and Practice: Mixing AS2.0 in MXML


Im reading these posts 
but have no time to respond (nor to any other posts right now), though the 
discussion is a good one and I dont have strong opinions either way (taking 
into account of course that Im strongly loyal to binding). Theonly thing 
Ill contribute is that Im gonna refer to Eriks technique as view-behind in 
deference to the ASP.NET approach called code-behind (eh, I dont know how the 
punctuate it). I now expect a nickel every time I see view-behind in a 
flexcoders post J

Carry 
on,
Matt





From: Erik 
Westra [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 10:30 
AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Theory and 
Practice: Mixing AS2.0 in MXML

That was my initial 
approach too, but eventualy it was easier to track bugs and 'mis-references' 
since i extended the component i was accessing. Now i get an error when i try to 
reference a textfield that isnt there. Another thing that is a pro for thiskind 
of approach, is that the mxml file doesnt have to know wich method to call in 
the helper class.

Greetz 
Erik





From: Dimitrios 
Gianninas [mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 2005 
16:22To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Theory and 
Practice: Mixing AS2.0 in MXML
I tend 
to put such code in the corresponding ViewHelper class, so every view (MXML 
file) has a corresponding ViewHelper class. See sample 
below:

Inboxes.mxml
mx:Box
 ...
 vw:InboxesViewHelper 
id="inboxesHelper" view="{this}"/
 
...

 mx:List 
id="inboxList" width="165" height="100%" 
labelField="name" 
vScrollPolicy="auto" 
change="inboxesHelper.doLoadInbox(inboxList.selectedItem.id)" 
/

 
...
/mx:Box

Jimmy 
Gianninas
Software 
Developer - 
Optimal 
Payments Inc.





Re: [flexcoders] Autocomplete text filed

2005-03-03 Thread Leo
hi

you can store your data in a array and add a text field to a canvas,
when your texfield gains focus (or whatever) you can with absolute
position show a list underneath the textfield with the items in the
array that match your criteria.

I´m not sure if this can be achieved without the canvas because of the
absolute posisioning, but if you dont want to do all this stuff you
only add a editable combobox and add and remove the items that match
te criteria and when the combobox gains focus you can show the list.



On Thu, 3 Mar 2005 10:11:22 -0600, David Solis [EMAIL PROTECTED] wrote:
 Hi list,
  
 For my current project I need an autocomplete text field similar to
 google's suggestion.
 If anybody has an idea about how to implement this please drop a line.
  
 TIA
  
 Regards
  
 D.
  
  
 Yahoo! Groups Sponsor 
  
 ADVERTISEMENT
  
  
 
 Yahoo! Groups Links
  
 To visit your group on the web, go to:
 http://groups.yahoo.com/group/flexcoders/
   
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
   
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


-- 
Leonardo Moreno Guzmán
http://leo.logtar.com




Remote Object architectural question

2005-03-03 Thread wcucsd

Flexcoders,

I have 2 Java classes: bean and service. The service class has a 
save method that takes a bean so it knows what to save. I want to 
use the Flex RemoteObject data service to call the service's save 
method and pass it a bean. When I do that, Flex appears to be 
calling all of the setXXX(arg) methods on the bean, whether I want 
it to or not. Is this how the Remote Object data service was 
designed? If so, is there any way of breaking that and forcing 
(or allowing) Flex to only call certain setXXX(arg) methods on the 
bean?

Thanks,
-Will








RE: [flexcoders] Remote Object architectural question

2005-03-03 Thread Peter Farland
It does so by design (a much requested feature that was added in Flex 1.0),
but in order for you to skip the Java Bean like deserialization, you could
do the following:

1. Don't send type information using the _remoteClass property (I've never
been a fan of this method of object typing)
2. Don't register the AS class using Object.registerClass

Without these two bits of information, it should be treated like a normal
java.util.Map. With this map, you could do your own bean setter logic.



-Original Message-
From: wcucsd [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 3:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remote Object architectural question




Flexcoders,

I have 2 Java classes: bean and service. The service class has a 
save method that takes a bean so it knows what to save. I want to 
use the Flex RemoteObject data service to call the service's save 
method and pass it a bean. When I do that, Flex appears to be 
calling all of the setXXX(arg) methods on the bean, whether I want 
it to or not. Is this how the Remote Object data service was 
designed? If so, is there any way of breaking that and forcing 
(or allowing) Flex to only call certain setXXX(arg) methods on the 
bean?

Thanks,
-Will







Yahoo! Groups Links










MXML - ActionScript : where is the code cached?

2005-03-03 Thread dduuggllaa

Hello,

In an effort to get a better feel for the mapping from MXML to AS2 I'd
like to spend some time staring at the code generated by MXML. Can
someone please tell me where it is cached? Thanks.

-Douglass Turner








RE: [flexcoders] MXML - ActionScript : where is the code cached?

2005-03-03 Thread Matt Horn



You keep the generated ActionScript files by setting the 
following in the flex-config.xml file:

 
keep-generated-astrue/keep-generated-as
The generated files should be in the same directories as 
the mxml files, with the name {filename}-generated.as.

hth,

matt horn



From: dduuggllaa 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 
4:02 PMTo: flexcoders@yahoogroups.comSubject: 
[flexcoders] MXML - ActionScript : where is the code 
cached?
Hello,In an effort to get a better feel for the 
mapping from MXML to AS2 I'dlike to spend some time staring at the code 
generated by MXML. Cansomeone please tell me where it is cached? 
Thanks.-Douglass Turner


Re: MXML - ActionScript : where is the code cached?

2005-03-03 Thread dduuggllaa


Coolness. Thansk Matt.

--- In flexcoders@yahoogroups.com, Matt Horn [EMAIL PROTECTED] wrote:
 You keep the generated ActionScript files by setting the following
in the
 flex-config.xml file:
 
 keep-generated-astrue/keep-generated-as
 
 The generated files should be in the same directories as the mxml files,
 with the name {filename}-generated.as.
 
 hth,
 
 matt horn
 








RE: [flexcoders] Autocomplete text filed

2005-03-03 Thread alf
I'll send it this way:
=== AutoCompleteText.as ===
// Create the local shared object at the top level of the domain so that
// all text fields in all Flash movies in the domain can access it.
TextField.so = SharedObject.getLocal(textfieldAutoComplete, /);
// When the user types into the text field or when they bring focus
// to it (either programmatically, by tab index, or by clicking with
// the mouse) call the custom makeAutoCompleteOptions() method.
TextField.prototype.onChanged = function () {
this.makeAutoCompleteOptions();
};
TextField.prototype.onSetFocus = function () {
this.makeAutoCompleteOptions();
};
TextField.prototype.makeAutoCompleteOptions = function () {
// Create a copy of the array stored in the shared object
// for the text field with the current text field's name.
var history = TextField.so.data[this._name].concat();
// If the text is not empty, find any partial matches in the history array
if (this.text != ) {
for (var i = 0; i  history.length; i++) {
// Removes any elements that don't match from the history array.
if (history[i].indexOf(this.text) != 0) {
history.splice(i, 1);
i--;
}
}
}
// If the history array is undefined or has no elements,
// remove any existing list box, and exit this method.
if (history.length == 0 || history.length == undefined) {
this._parent.autoCompleteHistory.removeMovieClip();
return;
}
// Create a list box and position it just underneath the text field.
this._parent.attachMovie(FListBoxSymbol, autoCompleteHistory, 10);
this._parent.autoCompleteHistory._x = this._x;
this._parent.autoCompleteHistory._y = this._y + this._height;
// Resize the list box to fit the width of the text field.
this._parent.autoCompleteHistory.setSize(this._width, 50);
// If history has fewer than three elements, shorten the list box.
if (history.length  3) {
this._parent.autoCompleteHistory.setRowCount(history.length);
}
// Fill the list box with the elements from history, and
// set the handler to call when any changes occur to the
// list box (via changes to the text field's contents.)
this._parent.autoCompleteHistory.setDataProvider(history);
this._parent.autoCompleteHistory.setChangeHandler(setValue, this);
};
// The setValue() method is the change handler function for the list box.
TextField.prototype.setValue = function (lb) {
// usingArrows indicates whether the method was called due to the user
pressing
// the arrow keys. If she used the arrow keys, exit the function because we
// don't want to close the list box until she has actually selected a value.
if (this.usingArrows) {
this.usingArrows = false;
return;
}
// Set the text field value to the selected value
// from the list box, and then remove the list box.
this.text = lb.getSelectedItem().label;
lb.removeMovieClip();
};
TextField.prototype.onKillFocus = function () {
// Remove the list box when the text field loses focus.
_root.autoCompletHistory.removeMovieClip();
// If the text field contains no text, exit the method.
if (this.text == ) {
return;
}
// Get the array stored in the shared object for the text field. Exit this
// method if the array already contains the text field's text value.
var history = TextField.so.data[this._name];
for (var i = 0; i  history.length; i++) {
if (this.text == history[i]) {
return;
}
}
// If the shared object doesn't already have an
// array for this text field, create one.
if (TextField.so.data[this._name] == undefined) {
TextField.so.data[this._name] = new Array();
}
// Add the text field's text value to the shared object's array.
TextField.so.data[this._name].push(this.text);
};
// Create a key listener to respond whenever keys are pressed.
keyListener = new Object();
keyListener.onKeyDown = function () {
// Get the current focus, and create a reference to the list box.
var focus = eval(Selection.getFocus());
var ach = focus._parent.autoCompleteHistory;
// Get the key code for the key that has been pressed.
var keyCode = Key.getCode();
if (keyCode == 40) {
// If the key is the down arrow, set usingArrows to true and set the
// selected index in the list box to the next value in the list.
focus.usingArrows = true;
var index = (ach.getSelectedIndex() == undefined) ?
0 : ach.getSelectedIndex() + 1;
index = (index == ach.getLength()) ? 0 : index;
ach.setSelectedIndex(index);
// Scroll if the selected index is not visible in the list box.
if (index  ach.getScrollPosition() + 2) {
ach.setScrollPosition(index);
} else if (index  ach.getScrollPosition()) {
ach.setScrollPosition(index);
}
} else if (keyCode == 38) {
// If the key is the up arrow, do a similar thing as when the
// down arrow is pressed, but move the selected index up instead of down.
focus.usingArrows = true;
var index = (ach.getSelectedIndex() == undefined) ?
0 : ach.getSelectedIndex() - 1;
index = (index == -1) ? ach.getLength() - 1 : index;
ach.setSelectedIndex(index);
if (index  ach.getScrollPosition() + 2) {
ach.setScrollPosition(index);
} else if (index  ach.getScrollPosition()) {
ach.setScrollPosition(index);
}

RE: [flexcoders] Number Format issue. I need help.

2005-03-03 Thread Gordon Smith
Title: Message



http://stz-ida.de/html/oss/js_bigdecimal.html.enhas a _javascript_ implementation of BigDecimal. Perhaps 
it could be ported to ActionScript if the licensing is acceptable. But 
Macromedia has no connection to this code and can't offer any 
support.

- Gordon



-Original Message-From: Gordon 
Smith Sent: Thursday, March 03, 2005 9:57 AMTo: 
'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] Number Format 
issue. I need help.

Java 
offers BigInteger and BigDecimal. It might make sense to avoid doing business 
logic on the client and let the server handle the arbitrary-precision decimal 
arithmetic. You could send data back and forth as strings.

- 
Gordon


-Original Message-From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 
9:48 AMTo: 'flexcoders@yahoogroups.com'Subject: RE: 
[flexcoders] Number Format issue. I need help.
Hi, 
Valy.

There is nothing strange going on here. You would 
have exactly the same problem using "double" in 
C++.

A Number in the Flash Player uses the 
double-precision IEEE 754 standard representation for a binary 
floating-point value. (Why? Because this is the representation manipulated 
at the machine-code level in today's microprocessors.) It uses 64 
bits, 52 of which store the binary digits, 11 store the exponent, and 1 
stores the sign. 52 binary digits can store only 15-16 decimal digits. 
(Solving 10^n = 2^52 gives n = 15.65).

Furthermore even a decimal number with only a few significant 
digits, such as 1.3, can't 
be exactly stored as a Number. It might get stored as something like 
1.29 or 1.31because many decimal fractions 
can't be exactly represented by any finite number of binary digits, and vice 
versa.

If your application requires 
arbitrary-precision decimal arithmetic rather than fixed-precision binary 
arithmetic, you will need to find or write a package that does this. Flex 
doesn't offer such a package at this time, but perhaps others on this list 
know of such a package written in ActionScript.

- 
Gordon


-Original Message-From: Valy Sivec 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 
8:25 AMTo: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Number Format issue. I need help.
Hi Abdul,

I'm working for a financial application and this behaviour in my 
opinion is unaccceptable...I'm hesitant to believethat our QA eng, 
not mentioning theclients willaccept this

Can't believe that such a basic thing cause me so much 
trouble...is thereanybody in on this forum that used math 
operations with large number in double precision and avoided this 
issue?

Any help, suggestions would be greatly appreciated.

Thanks,
Valy

Abdul Qabiz [EMAIL PROTECTED] 
wrote:


Hi Valy,

Thats how Flash Player rounds off the numbers 
automatically, if you have a number like this:

var s2 = 12345678901234.95; //it would show as 
12345678901234.9

and

var s2 = 12345678901234.96; //it would show as 
12345678901235


Not sure, how to solve thisSomeone who has done 
it earlier, might want to comment...

-abdul






From: Valy Sivec 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 
9:18 PMTo: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Number Format issue. I need help.


Abdul,
thanks for your example it was very helpfull I added an extra 
text box and wanted to do some sum between the 2 boxes... very basic 
stuff...
function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 

}

Well when I add 0.999344032 with 12345678901234.01 
the result is: 12345678901235 ( no decimals )
or 
0.999344032 
+ 111.01 = 111.999 ( only the first 3... 
) I would like to see all the decimals...

Can you help me? Am I missing something? Below you can find the 
modified code.
Thanks,
Valy
code
?xml version="1.0" encoding="utf-8"?
mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml"
mx:Script
![CDATA[
function getDecimalString(n:Number):String
{

var s:String = n.toString();

if(n.toString().indexOf("e-")!=-1 ) {
var arr = n.toString().split("e-");
var v1 = Number(arr[0]);
var v2 = Number(arr[1]);
s = "0.";
var i = 0;
while(i++v2) s+="0";
var s1 = v1.toString();

s+= s1.length1 ? s1.split(".").join("") : s1;
} 
return s;

}

function setOutput()
{
var value1 : Number = parseFloat(in_ti.text);
var value2 : Number = parseFloat( in_ti2.text ) ; 
var total : Number;

total = value1 + value2;
out_ti.text = getDecimalString(total);

// out_ti.text = numberformatter.format( getDecimalString(total) ); 

}
]]
/mx:Script

mx:Style 
Label { 
font-size:14;
color:white;
} 
/mx:Style

mx:VBox horizontalAlign="left"
mx:HBox
mx:Label text="Input:"/
mx:TextInput id="in_ti" 

RE: [flexcoders] HTML with flex

2005-03-03 Thread Tracy Spratt
Supported Tags:
lt; (, less-than sign)
gt; (, greater-than sign)
amp; (, ampersand)
quot; (, double-quote)
apos; (', apostrophe)

The following HTML tags are supported:
a href=/support/flash/ts/documents/url
b
br
font [color=#xx] [face=Type Face] [size=Type Size]
i
span
li
p [align=left|right|center]
u

-Original Message-
From: Arjun [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 03, 2005 5:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTML with flex



Hello

Need some idea suggestion on how to use html table tag like 
functionality in flash, as far I know table tag cannot be used, 
but I have to read some textual information from the database and 
show icon on one column and html formatted text on the other column.

Secondly can I use html list tag in flex ol liblah/li 
liblah../li /ol ? p and br tag??

Thanks
Arjun
 






 
Yahoo! Groups Links