Re: [Spam] [flexcoders] what is wrong with this code?

2009-10-12 Thread Nick Middleweek
Hi,

Try sticking inside your init function...


private function init():void
{
  var str:String = Area = ;
  var area:Number = Math.PI * Math.pow(3, 2);
  str = str + area.toString();
  Alert.show(str);
}

And you probably need a toString() method after the area because it's a
Number and needs converting if you want to concat it to a String.


Nick


Re: [Spam] [flexcoders] what is wrong with this code?

2009-10-12 Thread valdhor
As I understand it, implicit casting to a string works as expected (See 
http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_Syntax_12.html)
 so the explicit toString() is not actually required. I believe it is a good 
idea to have it as it avoids confusion.

--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 Hi,
 
 Try sticking inside your init function...
 
 
 private function init():void
 {
   var str:String = Area = ;
   var area:Number = Math.PI * Math.pow(3, 2);
   str = str + area.toString();
   Alert.show(str);
 }
 
 And you probably need a toString() method after the area because it's a
 Number and needs converting if you want to concat it to a String.
 
 
 Nick





[flexcoders] what is wrong with this code?

2009-10-10 Thread funandlearning3
public var str:String = Area = ; 
public var area:Number = Math.PI * Math.pow(3, 2); 

str = str + area;

I am getting an error that str and area variable do not exist...



Re: [flexcoders] what is wrong with this code?

2009-10-10 Thread Sam Lai
2009/10/10 funandlearning3 funandlearni...@yahoo.com:
 public var str:String = Area = ;
 public var area:Number = Math.PI * Math.pow(3, 2);

 str = str + area;

 I am getting an error that str and area variable do not exist...

Is the last line located elsewhere in your code? Does the code appear
exactly as you have written it in this email? Because if so, it should
work fine at first glances.


[flexcoders] what is wrong with this code?

2006-07-18 Thread arnold_charming
Hi!

I'm having difficulties to find out what is wrong with this code.
Please help me out.

Kategorije.mxml
---
?xml version=1.0 encoding=utf-8?
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
width=245 height=465 title=Kategorije

mx:XML source=http://localhost/~arnold/bla/izpisKategorij.xml;
id=reqKategorije/

mx:List x=10 id=bla y=10 width=205 height=298
dataProvider={reqKategorije.kategorija} labelField=@label
textAlign=center/
mx:Label x=10 y=316  text={bla.selectedItem.label} width=169/
/mx:Panel
---

izpisKategorij.xml
---
kat
kategorija label=X data=3/
kategorija label=Zi data=1 /
kategorija label=Rlec data=2 /
kategorija label=Sci data=4 /
kategorija label=Pkti data=5 /
/kat
---

The XML is displayed in mx:List tag but I can check which item is
selected. What could be wrong? selectedIndex works fine, but not
selectedItem.






 Yahoo! Groups Sponsor ~-- 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~- 

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

* 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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] what is wrong with this code?

2006-07-18 Thread Jeff Tapper
Try
mx:Label x=10 y=316 text=[EMAIL PROTECTED] width=169/

At 08:29 AM 7/18/2006, arnold_charming wrote:

Hi!

I'm having difficulties to find out what is wrong with this code.
Please help me out.

Kategorije.mxml
---
?xml version=1.0 encoding=utf-8?
mx:Panel 
xmlns:mx=http://www.adobe.com/2006/mxmlhttp://www.adobe.com/2006/mxml; 
layout=absolute
width=245 height=465 title=Kategorije

mx:XML 
source=http://localhost/~arnold/bla/izpisKategorij.xmlhttp://localhost/~arnold/bla/izpisKategorij.xml;
id=reqKategorije/

mx:List x=10 id=bla y=10 width=205 height=298
dataProvider={reqKategorije.kategorija} labelField=@label
textAlign=center/
mx:Label x=10 y=316 text={bla.selectedItem.label} width=169/
/mx:Panel
---

izpisKategorij.xml
---
kat
kategorija label=X data=3/
kategorija label=Zi data=1 /
kategorija label=Rlec data=2 /
kategorija label=Sci data=4 /
kategorija label=Pkti data=5 /
/kat
---

The XML is displayed in mx:List tag but I can check which item is
selected. What could be wrong? selectedIndex works fine, but not
selectedItem.



No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006




 Yahoo! Groups Sponsor ~-- 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
~- 

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

* 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:
http://docs.yahoo.com/info/terms/