Re: [flexcoders] Is it the right way of using dispatchEvent?

2005-10-19 Thread Ramu p



Hi Abdul,Thanks a lot for giving breif description on dispatchEvent.
One more doubt in this, we declared event before imprting specific classes.Why is it so? I tried doing it in class, but not successfull.What is the reason?
And at the same time, creating a pure UIComponent in Flasg is a bit different from that in FLex??Dont we use addEventListener in flex?
Thanks a lot to one and all.
Regards,Ram
On 10/19/05, Abdul Qabiz [EMAIL PROTECTED] wrote:

Look at the following code to figure out what you need to do:-


?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=
http://www.macromedia.com/2003/mxml xmlns=* mx:Script ![CDATA[ function fun(){
 mx.controls.Alert.show(Event dispatched!) } ]]/mx:Scriptcircle xmlns:circle=* cirPress=fun()
/ 
/mx:Application


// ActionScript Document
[Event(cirPress)]import mx.core.UIComponentclass circle extends UIComponent
{[Embed(source=cir_sym.swf,symbol=cir_sym)] var cir_sym:String;var obj:Objectfunction circle()
{}function init():Void{super.init();}function draw():Void{ super.draw();}function createChildren():Void{
obj = attachMovie(cir_sym,cir_sym,1);}function onPress():Void{dispatchEvent({type:cirPress})}
}



From: flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of Ramu pSent: Tuesday, October 18, 2005 4:32 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Is it the right way of using dispatchEvent?

Hi Flex coders,

Thanks a lot to all group people for solving my problem on Issue on Accordion reference.

I am stuck up with one more problem.

Here is the problem,

I have a simple mxml file which uses a component(circle.as) , extends UIComponent.
OnPress of this circle I want to invoke a method that user has provided.
i.e, I included circle component in my xmxl in the following way.

circle xmlns:circle=* cirPress=fun/

So here circle is an as component which has cirPress event which has to invoke fun method in mxml file.

Here is the code of mxml file:
//**

?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=
http://www.macromedia.com/2003/mxml xmlns=* mx:Script ![CDATA[ function fun(){ mx.controls.Alert.show(Event dispatched!) }
 ]]/mx:Scriptcircle xmlns:circle=* cirPress=fun/ 
/mx:Application
//**
Here is component (circle.as)
//**
// ActionScript Documentimport mx.core.UIComponentimport mx.utils.Delegateimport mx.events.*class circle extends UIComponent{public var dispatchEvent:Function[Embed(source=cir_sym.swf,symbol=cir_sym)] 
var cir_sym:String;var obj:Objectvar cirPressfunction circle(){}function init():Void{super.init();EventDispatcher.initialize(this);}function draw():Void{ 
super.draw();}function createChildren():Void{obj = attachMovie(cir_sym,cir_sym,1);addEventListener(cirPressed,Delegate.create(this,tempFun))} 
function tempFun(){eval(_root.+cirPress).call()}function onPress():Void{dispatchEvent({type:cirPressed})
}} 
//**

Here the above works well!!!
But problem is I shouldnt use _root. to invoke the method! (coz method my be in a class/somewhere. 
So everytime method may not be in root)


And please suggest me, is it the right way of using dispatchEvent()?
I really appreciate one's help on how to use dispatchEvent in appropriate way.

Thanks in advance!

Regards,
Ramu

--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 



YAHOO! GROUPS LINKS 

Visit your group flexcoders on the web. 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 










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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] hi, i am new to flex, can any one help me how so go with it ?

2005-10-18 Thread Ramu p



Hi Abdul,

Yeap!!!
I posted a quiery last week, I got really a very good answers which helped me quickly.
Thanks for this fast and useful gruops!

Today Im gonna post one more quiery :)


by the way are you from Blore?
Regards,
Ramu
On 10/18/05, Abdul Qabiz [EMAIL PROTECTED] wrote:

Hi Ramu,

Nice to know you are working on Flex.

FYI, not everyone in this list from Bangalore. Actually, this list is used by folks all over world.

You can post your flex-releated queries here, but before posting you should check the flexcoders-archive.

-abdul



From: flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of Ramu pSent: Monday, October 17, 2005 6:26 AMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] hi, i am new to flex, can any one help me how so go with it ?


Hi guys,

Nice to know that ur all from Blore.

Even I started using Flex just 2mnths back...
Need ur support!

Thx in advance.

On 10/12/05, Manish Jethani [EMAIL PROTECTED]
 wrote: 
On 10/10/05, Ramu p 
[EMAIL PROTECTED] wrote: Nice to know that u r from Blore, India, where I am also from. I think we need a Flex User Group (TM) in Bangalore.Send an emailAbdul Qabiz (aqabiz at 
macromedia.com) if anyone's interested. Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM~- --Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: 
http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: 
[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:  
http://docs.yahoo.com/info/terms/--Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.com 


YAHOO! GROUPS LINKS 

Visit your group flexcoders on the web.
 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 










--
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Is it the right way of using dispatchEvent?

2005-10-18 Thread Ramu p



Hi Flex coders,

Thanks a lot to all group people for solving my problem on Issue on Accordion reference.

I am stuck up with one more problem.

Here is the problem,

I have a simple mxml file which uses a component(circle.as) , extends UIComponent.
OnPress of this circle I want to invoke a method that user has provided.
i.e, I included circle component in my xmxl in the following way.

circle xmlns:circle=* cirPress=fun/

So here circle is an as component which has cirPress event which has to invoke fun method in mxml file.

Here is the code of mxml file:
//**

?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml xmlns=* 
mx:Script ![CDATA[ function fun(){ mx.controls.Alert.show(Event dispatched!) } ]]/mx:Scriptcircle xmlns:circle=* cirPress=fun/ 

/mx:Application
//**
Here is component (circle.as)
//**
// ActionScript Documentimport mx.core.UIComponentimport mx.utils.Delegateimport mx.events.*class circle extends UIComponent{public var dispatchEvent:Function[Embed(source=cir_sym.swf,symbol=cir_sym)] 
var cir_sym:String;var obj:Objectvar cirPressfunction circle(){}function init():Void{super.init();EventDispatcher.initialize(this);}function draw():Void{ 
super.draw();}function createChildren():Void{obj = attachMovie(cir_sym,cir_sym,1);addEventListener(cirPressed,Delegate.create(this,tempFun))} 
function tempFun(){eval(_root.+cirPress).call()}function onPress():Void{dispatchEvent({type:cirPressed})
}} 
//**

Here the above works well!!!
But problem is I shouldnt use _root. to invoke the method! (coz method my be in a class/somewhere. 
So everytime method may not be in root)


And please suggest me, is it the right way of using dispatchEvent()?
I really appreciate one's help on how to use dispatchEvent in appropriate way.

Thanks in advance!

Regards,
Ramu








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] Re: Unable to refer controls in Accordion !

2005-10-17 Thread Ramu p



Hi Gordon smith and all,
Thanks a lot for helping me out on Accordion problem.

Keep in touch.

Good luck.

On 10/12/05, Gordon Smith [EMAIL PROTECTED] wrote:
I'd like to suggest that it's better to learn how to make deferredinstantiation your friend than to simply turn it off.
The point of deferred instantiation is to not waste time at app startupcreating controls that you don't need yet. If you had a ViewStack with500 views, it probably wouldn't be a good idea to create the controls on
all 500 of them at startup, when only one view is initially visible. Theonly good reason to set creationPolicy=all, and therefore increasestartup time, is to decrease the small navigation delays when you switch
from view to view.If these delays are acceptable, then you should allow the views to dodeferred creation of their controls, as they were designed to do.So how do you set the initial state of controls that undergo deferred
instantiation? You use the appropriate events to set their state AFTERthey have been created. For example, you could use 'initialize' or'creationComplete' events on the the controls themselves. Or you could
use events like 'childrenCreated' or 'childrenCreationComplete' on theview that you navigated to.Once you realize that every control in the app doesn't get created atstartup, it's always possible -- and not difficult -- to design your app
so that you don't push information prematurely into controls that don'texist yet. Instead, it's typical to store information into a datamodel of some kind that is independent of the controls that display
that information. When the controls get created, they pull theinformation in from the data model.- Gordon-Original Message-From: flexcoders@yahoogroups.com
 [mailto:flexcoders@yahoogroups.com] OnBehalf Of bhaq1972Sent: Tuesday, October 11, 2005 6:25 AMTo: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Unable to refer controls in Accordion !you got a deferred instantiion issue.trymx:Accordian creationPolicy=allthe default creationPolicy for an accordian is 'auto'
regardsbod (bhaq1972)--- In flexcoders@yahoogroups.com, Ramu p [EMAIL PROTECTED] wrote: Hi Flexcoders,I have a problem with Accordion which has two containers
(Canvases) inside it and that have few controls (Check boxes and buttons). Here the problem is, I am unable to refer any control that isplaced in second canvas.The above happens only for the first time, it doesnt when we
navigated thru the accordion.here is the code. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=
http://www.macromedia.com/2003/mxml mx:Script ![CDATA[ function callFun(){ mx.controls.Alert.show( +check2) } ]] /mx:Script
 mx:Panel height=100% width=100% mx:Accordion height=100% width=100% mx:Canvas height=100% width=100%
 mx:HBox mx:CheckBox id=check1 label=Check Me/ mx:Button id=btn click=callFun() label=Button/ /mx:HBox
 /mx:Canvas mx:Canvas height=100% width=100% mx:CheckBox id=check2 label=Check Me/ /mx:Canvas /mx:Accordion
 /mx:Panel /mx:Application As soon as page is loaded, if I click on button, it givesundefined (!) even though check2 (Check box in canvas2) is available.
 If I just go to second canvas and come back to button click, itgives me the value. Please help me out!!! *Thanx in advance.* Ram.
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links Yahoo! Groups Sponsor ~--
Fair play? Video games influencing politics. Click and talk back!http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM~-
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] hi, i am new to flex, can any one help me how so go with it ?

2005-10-17 Thread Ramu p



Hi guys,

Nice to know that ur all from Blore.

Even I started using Flex just 2mnths back...
Need ur support!

Thx in advance.

On 10/12/05, Manish Jethani [EMAIL PROTECTED] wrote:
On 10/10/05, Ramu p [EMAIL PROTECTED] wrote: Nice to know that u r from Blore, India, where I am also from.
I think we need a Flex User Group (TM) in Bangalore.Send an emailAbdul Qabiz (aqabiz at macromedia.com) if anyone's interested. Yahoo! Groups Sponsor ~--
Fair play? Video games influencing politics. Click and talk back!http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM~-
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] hi, i am new to flex, can any one help me how so go with it ?

2005-10-11 Thread Ramu p



Hi gonchu24.

Nice to know that u r from Blore, India, where I am also from.

Well, to start learning Flex,I guess u Flex server and Builder(Not mendatory)

Start using tags and if u r familiar with AS, you can easily proceed.

For all clarifications,
mail me back.

Ram.
Flex Eng.
Blore,India.
On 10/10/05, gonchu24 [EMAIL PROTECTED] wrote:
hiI am kumar, from bangalore, INDIA. I am a flash user to a standardactionscript usage. now I would like to learn and deploy the power of
flex.please any one help me in this.thanks in advancekumar Yahoo! Groups Sponsor ~--Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM~---
Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/






--
Flexcoders 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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] Accessing the main Application Class

2005-10-11 Thread Ramu p



Hi Marc,

Just parentApplication gives you the reference to the parent.

But in your mxml file , you cant insert tags that I made red in between I guess.
On any of the events u may have to call them.
Pls correct me if any wrongs.

Good luck.

On 10/10/05, Marc Teichtahl [EMAIL PROTECTED] wrote:
AbdulMy code isimport mx.containers.Panelclass XBApplication{public var parent:Object;
function XBApplication(pParent:Object){parent = pParent;}function SetMainPanelText(){main_panel.title=test;}}?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml xmlns=*backgroundColor=#7D8FA8mx:XML id=menu_items source=
menu.xml/XBApplication id=xbApp/xbApp(this);!-- Insert the main panel container !--mx:Panel id=main_panel width=100% height=100% 
xbApp.SetMainPanelText();/mx:Panel/mx:ApplicationMarc TeichtahlXB Networks BVManager, Engineering
Phone:+31 (0)36 546 24 73Mobile: +31 (0)65 582 47 89[EMAIL PROTECTED]http://www.xb.nl
From: flexcoders@yahoogroups.com on behalf of Abdul QabizSent: Mon 10/10/2005 6:16 PMTo: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Accessing the main Application Classmx.core.Application.application is reference to application.How are you trying to access it?-abdul
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Marc TeichtahlSent: Monday, October 10, 2005 9:31 PM
To: flexcoders@yahoogroups.comSubject: [flexcoders] Accessing the main Application ClassDear all,I would like some advise as to the best method for accessing the main Application class from an external AS.
I am trying to achieve a base class that is used by the main application class to supply authentication etc and to at runtime update components and containers in the main Application class. To date, I have had no success.
Marc TeichtahlXB Networks BVDirector, EngineeringPhone:+31 (0)36 546 24 73Mobile: +31 (0)65 582 47 89[EMAIL PROTECTED]
http://www.xb.nl http://www.xb.nl/Op dit e-mailbericht is een disclaimer van toepassing, welke te vinden is op 
http://www.xb.nl/disclaimer.html--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comSPONSORED LINKSWeb site design development 

http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ
 Computer software development 
http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw
 Software design and development 
http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ
Macromedia flex 
http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw
 Software development best practice 
http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw
YAHOO! GROUPS LINKS*Visit your group flexcoders http://groups.yahoo.com/group/flexcoders
  on the web.*To unsubscribe from this group, send an email to:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED]?subject=Unsubscribe*Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/
 .Op dit e-mailbericht is een disclaimer van toepassing, welke te vinden is op http://www.xb.nl/disclaimer.html
 Yahoo! Groups Sponsor ~--Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM~---Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/* To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/







--
Flexcoders Mailing List
FAQ: 

Re: [flexcoders] Reading the displayed value in a DataGrid - How to

2005-10-11 Thread Ramu p



Hi,

U guess there is a mistake in the following line that you used.

 mx:DataGridColumn columnName=myComputedColumnheaderText=All labelFunction=cocanateAll/
The above must be:
 mx:DataGridColumn columnName={myComputedColumn}headerText=All labelFunction=cocanateAll/

Pls correct me if any worngs!

Thanks.
On 10/11/05, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:
Let me reformulate my question. Usually you can use selectedItem.columnName to read the value of a row/column of a datagrid. This seems to
work fine as shown in the Flex Sample Explorer ( example below).But howcan you read the value of a computed column that was added in addition tothe columns returned by the dataprovider? When I trace the selectedItem
or getItemAt, I only get the dataprovider data and nothing else.mx:DataGrid id=dg width=100% height=100% dataProvider={employeeModel.employee}
 mx:columns mx:Array mx:DataGridColumn columnName=name headerText=Name/ mx:DataGridColumn columnName=phone headerText=Phone/
 mx:DataGridColumn columnName=email headerText=Email/!-- How can I read this? -- mx:DataGridColumn columnName=myComputedColumn
headerText=All labelFunction=cocanateAll/!-- No part of the dataprovider, but shows OK -- /mx:Array /mx:columns /mx:DataGrid
 mx:Form mx:FormItem label=Name mx:Label text={dg.selectedItem.name}/ /mx:FormItem
 mx:FormItem label=Email mx:Label text={dg.selectedItem.email}/ /mx:FormItem mx:FormItem label=Phone mx:Label text={
dg.selectedItem.phone}/ /mx:FormItem!-- How can I read this? -- mx:FormItem label= mx:Label text={dg.selectedItem.myComputedColumn
}/ !--This doesn't work-- /mx:FormItem!-- --Thanks, /mx:Form
[EMAIL PROTECTED]To: flexcoders@yahoogroups.comSent by:cc:
flexcoders@yahoogroups.comSubject:[flexcoders] Reading the displayed value in a DataGrid - How to10/10/2005 12:45 PMPlease respond toflexcoders
I am using labelFunction for a column in a datagrid. How can I read thedisplayed value and not the real value directly from the dataGrid?I am also wondering how to get values from the DataGrid in general. I need
to render the DataGrid to a HTML table, I mean, read columns and rows fromthe dataGrid and have a string with the HTML syntax. I could not findanything such as getRow, and then read each column. So I am selecting each
Row and then using the selectedItem property.I know that I could use the function executed in labelFunction toreproduce the displayed value, but I am actually trying to extend theDataGrid class and add a method called getHTMLString for example. This
would require to be agnostic of whether the column has a labelFunction ornot.Any ideas?Thanks.---This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may containinformation that is privileged, proprietary , confidential and exempt fromdisclosure.If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication isstrictly prohibited.If you have received this communication in error,please notify the sender and erase this e-mail message immediately.
-Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
---This e-mail message (including attachments, if any) is intended for the useof the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt fromdisclosure.If you are not the intended recipient, you are notified thatany dissemination, distribution or copying of this communication is
strictly prohibited.If you have received this communication in error,please notify the sender and erase this e-mail message immediately.---
 Yahoo! Groups Sponsor ~--Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM~---Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/* To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/







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





  




  
  
  YAHOO! GROUPS LINKS



  

Re: [flexcoders] Re: getting to the selected Tree node

2005-10-10 Thread Ramu p



Hi David,
The below code solves ur Prblem!!!

mx.controls.Alert.show(Label:+event.target.selectedItem[backingObject].label)
Just try it out!!!
Good luck!

On 10/10/05, David Aden [EMAIL PROTECTED] wrote:
Oh, also tried: evt.target.selectedNode That does have a child backingObject which does have a child data but that's empty. 
d 

On 10/9/05, David Aden [EMAIL PROTECTED] wrote:
 
I have been trying to get access to the item selected in a tree from the change event. I've tried the suggestion from the documentation of: 
 evt.target.selectedItem.label evt.target.selectedItem.data I've also tried to go through the treeDataProvider:  evt.target.treeDataProvider.getProperty
(foo) [[[or getData()]]]with no luck -- it comes back as undefined. I seem to be gettign to the object as I can output:   mx.controls.Alert.show(
evt.target.id );  mx.controls.Alert.show(evt.type );but selectedItem doesn't seem to be available. The tree itself is pretty straightforward: 
  mx:Tree id=securityTopNavSub width=100% height=0backgroundColor=0x3A4147 borderColor=0x3A4147change=
topNavViewHelper.showSecurity( event );   mx:dataProvidermx:Array mx:Object data="" label=Systems /
 mx:Object data="" label=Documents / mx:Object data="" label=Incidents //mx:Array   
   /mx:dataProvider  /mx:TreeI'm geting to the showSecurity() method, but as mentioned above, selectedItem is not avaialble. 
It seems like it must be something ridiculously simple, but I'm missing it. Any suggestions welcome! d-- --David AdenWebworld Technologies
-- --David AdenWebworld Technologies--Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
SPONSORED LINKS 




Web site design development 

Computer software development 

Software design and development 


Macromedia flex 

Software development best practice 


YAHOO! GROUPS LINKS 

Visit your group flexcoders on the web. 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 










--
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] [Flex/Javascript] Javascript function not found when called from Flex

2005-10-10 Thread Ramu p



Hi Manish,

I guess the below works out for U!!!
Try it out!!


Code for Mxml:

?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=http://www.macromedia.com/2003/mxmlmx:Script
![CDATA[import mx.controls.Alertfunction callJS(){Alert.show(Clicked on Btn)var someText = SomeText from FLex;getURL(_javascript_:jsFun('+someText+'));
}]]/mx:Scriptmx:Canvasmx:Button label=click click=callJS()//mx:Canvas/mx:Application

Code for embedding mxml in HTML and call JS

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtdhtmlhead
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1titleFlex n HTML/titlescript language=_javascript_function jsFun(txt){alert(txt)
}/script/headbodyobject classid="" codebase="" href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width=200 height=200 param name=movie value=imageClick.mxml.swf
 param name=quality value=high embed src="" quality=high pluginspage=http://www.macromedia.com/go/getflashplayer
 type=application/x-shockwave-flash width=200 height=200/embed/object/body/html
The first block gives you the structure of Mxml code, a button that calls an AS function which uses to getURL() to call Js function.

The sec block is just html page that has mxml embedded in it and js function (jsFun) that is being referred by AS.
On 10/8/05, Manish Jethani [EMAIL PROTECTED] wrote:
On 10/7/05, djok_fb [EMAIL PROTECTED] wrote: 1-Embed the mxml file in a HTML page:
 html head script type=_javascript_ function launchSpellChecker(someText) { alert(someText); } /script
 /head body[snip] 2- Write a AS function using getURL: function doSpellCheck( textToCheck ) { getURL(_javascript_:launchSpellChecker(' + textToCheck +
 ');void(0);); } 3- Link the function to a button The AS function is called but IE tells me Object not found. I tried with Firefox (w/ _javascript_ debugger) and it tells me:
 launchSpellChecker function not found.I don't see anything obviously wrong.What version of IE are you using? Yahoo! Groups Sponsor ~--
Most low income households are not online. Help bridge the digital divide today!http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM~-
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] startDrag stopDrag?

2005-10-10 Thread Ramu p



Hi,
This may solve ur prob.

[This code is a block of class]
obj here is same as _rect in your class.
I guessyou need not use addEventListener...
This works out!!!


function createChildren():Void{obj = attachMovie(cir_sym,cir_sym,1)}function onMouseDown():Void{obj.startDrag()}function onMouseUp():Void{stopDrag()
}Buzz back!!


On 10/8/05, Mink, Joseph [EMAIL PROTECTED] wrote:
Does anyone know how to get startDrag (...) and stopDrag (...) to workwith UIObjects in Flex?I know that in Flash the usage is typically:
on(press) { startDrag(this,true);}on(release) { stopDrag();}But maybe it could work with our mouseDown and mouseUp events?I amcurrently trying it with this code, but it's not working:
import mx.containers.Canvas;import mx.utils.Delegate;class Rect extends Canvas{ public var radius:Number; private var _rect:Object; /* Constructor.
 */ function Circle () { super (); addEventListener(mouseUp, Delegate.create(this,mouseUp)); addEventListener(mouseDown, 
Delegate.create(this,mouseDown)); } /* Instantiates all child objects. */ function createChildren():Void { trace (Begin Circle.createChildren
().); super.createChildren(); if (_rect == undefined) { _rect = createEmptyObject(square,getNextHighestDepth()); _rect.fillRect(0, 0, radius, radius, 0x00,
100); } trace (End Circle.createChildren().); } function mouseDown (event):Void { trace (Begin Circle.mouseDown
); /*_isMouseDown = true; _lastMouseX = mouseX; _lastMouseY = mouseY;*/ startDrag (this, true); trace (End Circle.mouseDown
); } function mouseUp(event):Void { trace (Begin Circle.mouseUp); //_isMouseDown = false; stopDrag (); trace (End 
Circle.mouseUp); }} Yahoo! Groups Sponsor ~--Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM~---Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/* To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/







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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.