RE: [flexcoders] [Bindable] object not updating on changes

2007-04-02 Thread Geoffrey Williams
Use mx.utils.ObjectProxy. The way you have it, only setting the value of
entryValueData fill fire an event.

 

[Bindable]

public var entryValueData : ObjectProxy = new ObjectProxy ({redValue:0,
greenValue:4, blueValue:0});

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of klar1ty
Sent: Monday, April 02, 2007 10:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] [Bindable] object not updating on changes

 

I think I might be misunderstanding the use of bound objects in Flex.

I have a bound object as follows:

[Bindable] public var entryValueData:Object
={redValue:0,greenValue:4,blueValue:0};

I have a function that updates one of the values as follows:

public function updateValue(type:String, amount:Number):void{
entryValueData[type + 'Value'] += amount; 
Alert.show( 'type ' + type + ' amount ' + amount + '
' + entryValueData[type + 'Value']);

}

Finally, I have a control bar with a spot for each value. The text of
each field references the bound value from the entryValueData object
as follows:

mx:ControlBar x=10 y=48 width=750 height=30
mx:Text text=Running/
mx:Text width=30 id=displayRunningValue textAlign=right
text={ entryValueData.redValue} /
mx:VRule height=10/
mx:Text text=Walking/
mx:Text width=30 id=displayWalkingValue textAlign=right
text={ entryValueData.greenValue} /
mx:VRule height=10/
mx:Text text=Weight/
mx:Text width=30 id=displayWeightValue textAlign=right
text={ entryValueData.blueValue} /
/mx:ControlBar

When I execute the code, I get an alert showing the correct and
incremented current value, the UI does not update to reflect the
current value. I obviously misunderstand how binding works. Would
someone please set me straight and explain how to have the text update
when the underlying value changes?

Obviously, I could update the text myself, as a solution, but I feel
like my misunderstanding of binding is more important.

Thank you for your help...

Dan Wilson

 



RE: [flexcoders] How do I read Response after FileReference uploads a file?

2007-03-30 Thread Geoffrey Williams
fileReference.addEventListener (DataEvent.UPLOAD_COMPLETE_DATA,
eventHandler);

 

The DataEvent dispatched will have a data property with the data you are
looking for.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thegators_2002
Sent: Friday, March 30, 2007 11:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I read Response after FileReference uploads a
file?

 

I am trying to use FileReference to upload a file from the user side
to a web page and read the response(xml) that the server returns. I
can't figure out how to get the response, however. It doesn't seem to
be included in the FileReference object.

Is there a way to read the response coming back after a file upload,
or is this halted by design?

 



RE: [flexcoders] How do I read Response after FileReference uploads a file?

2007-03-30 Thread Geoffrey Williams
Just to note, this functionality was only recently added to FP9 and was not
available in previous versions of the player.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Merrill, Jason
Sent: Friday, March 30, 2007 11:43 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How do I read Response after FileReference uploads
a file?

 

Stupid Outlook hotkeys. What I meant to say was:

 

In Flash 8 AS2 it was just:

 

listener_obj.onComplete = function(file:FileReference):Void { }

 

Where file was the complete file object on the result which had all the info
you needed.  Should be something similar in AS3.

 

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 

 

 

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thegators_2002
Sent: Friday, March 30, 2007 11:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I read Response after FileReference uploads a
file?

I am trying to use FileReference to upload a file from the user side
to a web page and read the response(xml) that the server returns. I
can't figure out how to get the response, however. It doesn't seem to
be included in the FileReference object.

Is there a way to read the response coming back after a file upload,
or is this halted by design?

 



RE: [flexcoders] Re: Is anybody else getting duplicate messages?

2007-03-29 Thread Geoffrey Williams
Maybe, but this is a Yahoo hiccup.

 

[sorry this is OT and is probably not helping the situation]

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Maury Sword
Sent: Wednesday, March 28, 2007 8:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Is anybody else getting duplicate messages?

 

I believe people are posting messages multiple times. There can be 
quite a delay between the time a message is posted and it finally 
appears here on the list. I know I did this at first. Do messages 
from new members have to be approved by a moderator before they are 
posted ? After I made several valid posts this delay was much less.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Geoffrey Williams [EMAIL PROTECTED] 
wrote:

 Yup, yup. This doesn't seem to be the only yahoo group affected 
either.

 



RE: [flexcoders] Is anybody else getting duplicate messages?

2007-03-28 Thread Geoffrey Williams
Yup, yup. This doesn't seem to be the only yahoo group affected either.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul DeCoursey
Sent: Wednesday, March 28, 2007 4:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Is anybody else getting duplicate messages?

 

I've been getting 2 sometimes 3 copies of many messages. It's quite
annoying and this is on top of an already high volume list.

 



[flexcoders] Re: E4X - Copy attributes

2007-03-19 Thread Geoffrey Williams
You want to use brackets not braces and use the name () method.

for each (var a : XML in [EMAIL PROTECTED]) {
[EMAIL PROTECTED] ()] = a;
}

--- In flexcoders@yahoogroups.com, pgp.coppens 
[EMAIL PROTECTED] wrote:

 Hello,
 
 I would like to copy a number of attributes from one element to a 
second
 element, but I can't find a way to achieve it
 
 To set the scene, something like
 
 var x1:XML = x1 a1='a1' a2='a2'/;
 var x2:XML=x2/;
 
 for each (var a:XML in [EMAIL PROTECTED]) {
[EMAIL PROTECTED] = a;
 }
 Obviously the code above does not work, and in the situation I would
 need it, the input elements and attributes are not known at compile
 time.
 
 Does anyone know if it is possible in a generic way to copy 
attributes
 from a first element to a second using E4X and how to do it?
 
 Thanks!
 
 Peter



[flexcoders] Re: E4X descendent operator return type?

2007-03-19 Thread Geoffrey Williams
It returns an empty XMLList.

//var result : XML = XML (e.result);
//var result : XML = responsefault//response;

var result : XML = responseuser//response;

if (result.user.length ()) trace(Yippee!);
if (result.fault.length ()) trace(Boo!);

trace (result.user.length ());
trace (result.fault.length ());

--- In flexcoders@yahoogroups.com, tddclare [EMAIL PROTECTED] wrote:

 I'm trying a simple test, and either it's monday or my brain is
 broken... maybe both...
 
 I'm writing a login component, and fire off a HTTP service that
 returns XML as E4X.  The response XML is a response tag with 
either
 a user tag or a fault tag inside of it.
 
 All I want to do is test if there is a user or fault in the 
response!
 
 I'm trying this:
 private function handle(e:ResultEvent):void {
if (e.result..user) {
   trace(Yippee!)
}
if (e.result..fault) {
   trace(Boo!)
}
 }
 
 The event is firing, but I always get Yippee even when I point at 
a
 file that has NO user tag.
 
 I've replaced the conditional with everything I can think of:
 e.result..user != null
 e.result..user != 
 
 but it seems to fire no matter what.
 
 If the E4X parser does NOT find the descendant, what does it 
return? 
 Is this documented anywhere in the (not so good) Flex/AS3 
documentation?
 
 Thanks!
 
 -- TC





[flexcoders] Re: void as node name in a XML...reserved keyword!!!???

2007-01-30 Thread Geoffrey Williams
trace (test.object[void].(@property == 'equation').string);
trace (test.object.elements (void).(@property == 'equation').string);

--- In flexcoders@yahoogroups.com, lruinelli [EMAIL PROTECTED] wrote:

 ciao!
 
 
 the expression:
  test.object.void.(@property=='equation').string
 should has the following result:
  y=ax+b
 
 unfortunately void, the name of the nodes, is a reserved Keyword
 in flex and the application is not compiled!
 how can I found a workaround without change the XML?
 
 
 thanks Lorenzo





[flexcoders] Re: Annoying problem - urgent!!!

2007-01-18 Thread Geoffrey Williams
Did you try a Project  Clean...?

--- In flexcoders@yahoogroups.com, Lieven Cardoen 
[EMAIL PROTECTED] wrote:

 I have a really annoying problem. If I run or debug my flex 
application,
 it keeps on giving me a version of yesterday. Flex won't compile a 
new
 swf...
 
  
 
 Lieven Cardoen
 
  
 
 Lieven Cardoen
 Application developer
 
 indiegroup
 interactive digital experience
 engelse wandeling 2 k18 
 b8500 kortrijk





[flexcoders] Re: doLater in Flex2? is it gone?

2006-11-01 Thread Geoffrey Williams
callLater ()

http://livedocs.macromedia.com/flex/2/docs/1438.html

--- In flexcoders@yahoogroups.com, Mark Piller [EMAIL PROTECTED] wrote:

 Does anyone know what happened with doLater() in Flex2? I cannot seem
 to find any references to the function in the language reference
 (http://livedocs.macromedia.com/flex/2/langref/index.html). Is there 
a
 recommended alternative?
 
 Thanks,
 Mark






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

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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] Re: Error 1009 in Flex 2

2006-09-08 Thread Geoffrey Williams
'event.result as Array' is returning null because event.result is 
not an Array. Is it an ArrayCollection or XML/XMLList perhaps?

--- In flexcoders@yahoogroups.com, Greg Morphis [EMAIL PROTECTED] 
wrote:

 I'm playing around with a remote object and in the handleResult
 function Flex is giving me this 1009 error when I try to refer to 
the
 variable I assigned to the event.result.
 If I do Alert.show(event.result[0].QUESTION.toString()); then I get
 the right result.
 However if I assign event.result to a variable, I get the error..
 myData = event.result as Array;
 Alert.show(myData.length.toString());
 bombs with the error
 TypeError: Error #1009: Cannot access a property or method of a 
null
 object reference.
 
 Here's my code..
 [Bindable]
 public var myData:Array = new Array();
 
 public function handleResult( event : ResultEvent ) : 
void{
 myData = event.result as Array;
 Alert.show(myData.length.toString());
 //Alert.show(event.result[0].QUESTION.toString());
 }
 
 So what's Flex whining about? myData is declared, it's assigned.. 
it
 should work?
 
 Thanks!








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




[flexcoders] Re: ListCollectionView.contains( )

2006-08-24 Thread Geoffrey Williams
- Returns whether the view contains the specified object. Unlike the 
IViewCursor.findxxx methods, this search is succesful only if it 
finds an item that exactly matches the parameter.

trace ({label:keyword} == {label:keyword}); // false

You can sort the collection, create a view cursor and use findAny.

http://livedocs.macromedia.com/flex/2/langref/mx/collections/ListColl
ectionView.html#createCursor()
http://livedocs.macromedia.com/flex/2/langref/mx/collections/IViewCur
sor.html

Or just loop through it yourself.

You could also convert the data into an array and use the some/every 
methods on it; kinda the same as looping through all of em.

--- In flexcoders@yahoogroups.com, Webdevotion [EMAIL PROTECTED] 
wrote:

 Hello,
 
 Can someone explain me the use of ListCollectionView.contains( ) ?
 
 I can't get it to work.
 
 var keyword:String = txtSearch.text;
 if( !keywords.contains( {label:keyword} ))
 {
   keywords.addItem( {label:keyword} );
 }
 
 
 tnx !







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




[flexcoders] Re: ASDoc ignores Bindable properties?

2006-08-18 Thread Geoffrey Williams
I came up against this a little earlier today. Make sure your 
comments are right before the method.

Wrong:

/**
 * Property
 */
[Bindable]
public var property : Object;

Right:

[Bindable]
/**
 * Property
 */
public var property : Object;

I think that should do it.


--- In flexcoders@yahoogroups.com, james_dhap [EMAIL PROTECTED] wrote:

 Hey All,
 I am seeing odd behaviour using the [Bindable] metadata tag in my 
AS
 classes.  When ever my public properties have the [Bindable] tag 
ASDoc
 ignores them and does not generate comments.  I first saw this with
 some of my ValueObjects that use the metadata at the root of the
 class, but even when I moved it to just one propety that property
 disappears from the docs.
 
 At the moment its not a huge issue because its not really 
affecting my
 documentation, but it will very shortly.  Any tips?  Possible
 workaround ideas?  Is this intended?
 
 James








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




[flexcoders] Re: ASDoc now available on Labs

2006-08-14 Thread Geoffrey Williams
Any Idea what would fire off the following:

Error: The definition is in circular inheritance.

I can get it going by specifying individual classes but when I use -
doc-sources I get an output of a few of those errors.

--- In flexcoders@yahoogroups.com, Brian Deitte [EMAIL PROTECTED] wrote:

 And I'll be trying to awaken myself from my hibernation on 
flexcoders,
 so if you have any questions about it, fire away.  -Brian






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





[flexcoders] Re: loading xml with AS3

2006-08-12 Thread Geoffrey Williams
URLLoader, HTTPService c

http://livedocs.macromedia.com/flex/2/docs/1920.html

--- In flexcoders@yahoogroups.com, aaron smith 
[EMAIL PROTECTED] wrote:

 I'm having troubles figuring out where the functionality to load xml 
went.
 What classes do i use to load xml?
 
 thanks







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




[flexcoders] Re: getURL()

2006-08-03 Thread Geoffrey Williams
Well, seeing as you're not posting the variables, you can try 
ExternalInterface.

var url : String = http://adobe.com;;

var vars : URLVariables = new URLVariables ();
vars.userID = userID;
vars.userName = userName;
vars.sessionID = sessionID;

url += ? + String (vars);

var target : String = test;
var options : String 
= height=100,width=150,toolbar=no,scrollbars=1,resizable=yes;

ExternalInterface.call (window.open, url, target, options);

--- In flexcoders@yahoogroups.com, moni_singhal [EMAIL PROTECTED] 
wrote:

 I am trying to convert my existing flex1.5 code to flex20 .
 As getURL is replaced by navigateToURL so if in flex 1.5 the code 
 was like this: getURL(javascript:window.open('
   + UPLOAD_PAGE_URL
   + ?userID= + userID
   + userName= + userName
   + sessionID= + sessionID 
   + ,menubar=no,location=no,resizable=yes');void(0);,
   _self,
   POST);
 
 As now i want to use navigateToURL(),so if i am passing the 
 urlRequest object to navigateToURL as my first argument and i want 
 to use javascript to modify the properties of my urlRequest object 
 then i am not able to do so.
 my existing code in flex20 seems like this: 

 var urlReq:URLRequest=new URLRequest(E:/flex/monika/a.html);
 navigateToURL(urlReq,'var x=javascript:window.open
 
(,test,height=100,width=150,toolbar=no,scrollbars=1,resizable=ye
 s);x');
 
 So from this code am not able to resize my html page or control 
any 
 other properties of the html page.I dont know how to modify the 
 properties of that URLRequest(html page here).
 
 If anyone knows ,plz help me out.
 
 Thanks,
 Monika








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





[flexcoders] Re: problem using httpservice to fetch xml

2006-08-01 Thread Geoffrey Williams
srv.lastResult.list.employee is already an ArrayCollection.

Try: employees = ArrayCollection (srv.lastResult.list.employee);

--- In flexcoders@yahoogroups.com, pateyog [EMAIL PROTECTED] wrote:

 I am facing a problem with a code which used to work with flex beta
 2.0 but has stopped working when I moved to the release version. I 
get
 the following error while executing the below given code:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 mx.collections::[EMAIL PROTECTED] to Array.






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





[flexcoders] Re: deleting a node with e4x

2006-07-14 Thread Geoffrey Williams
Use the delete operator.

delete report.part[1].subpart[0].subsection[0];

--- In flexcoders@yahoogroups.com, Jeff Tapper [EMAIL PROTECTED] wrote:

 does anyone know the syntax to remove a particular node from an xml 
object 
 using e4x?
 
 Working with a structure like this, I want to be able to remove one 
 node.  Is the only approach to get a handle on the subpart node and 
set its 
 children without the first subsection?  I'm thinking there must be 
an 
 easier way...
 
 thoughts?





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





[flexcoders] Re: File Upload

2006-07-14 Thread Geoffrey Williams
mx:Button label=Upload... click=new FileReferenceList ().browse 
(); /

--- In flexcoders@yahoogroups.com, Ethan Miller [EMAIL PROTECTED] wrote:

 I'm trying to quickly demonstrate the ability to upload a file. 
Just  
 need a button with a click action that invokes a file browser in 
the  
 user's OS.
 
 Tried this:
 
 mx:Button label=Upload  click=FileReferenceList.browse()/
 
 Per the docs, which gets a compiler error of undefined 
method  
 with static type  class... 
 
 Any sample code for this kicking around?
 
 thanks!  ethan








 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/
 





[flexcoders] Re: Pass value Using getURL() in MXML 2

2006-07-13 Thread Geoffrey Williams
getURL is gone in AS3.

navigateToURL (new URLRequest (QueryStringSample.mxml));

--- In flexcoders@yahoogroups.com, k_abdul_jabbar 
[EMAIL PROTECTED] wrote:

 I have pasted a piece of code to pass value using query string,I am
 sure there wouldn't be any problem with code.But I get error calling
 getURL() method.
 
 The error I am getting on compilation is,
 
 Call to a possibly undefined method getURL.
 
 4: {
 5: getURL(QueryStringSample.mxml);
 6: }





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





[flexcoders] Re: FileReference and mimetypes

2006-07-11 Thread Geoffrey Williams
Changing the content type is not supported in uploads. This is 
documented in the URLRequest class.

--- In flexcoders@yahoogroups.com, pmarstonuoa [EMAIL PROTECTED] 
wrote:

 Hi Jeff,
 
 I'm having the same problem.  According to the Flex2 documentation 
the
 content type defaults to application/octet-stream, but you can 
set
 the contentType of the request:
 
 var request:URLRequest = new URLRequest(myURL);
 request.contentType = image/jpeg;
 myFileReference.upload(request);





 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/
 




[flexcoders] Re: Addressing buried children in XML with default namespace- an easier way?

2006-07-10 Thread Geoffrey Williams
Here's a couple:

// namespace constant

public namespace default_ns = http://fmr.com/BackOffice/PseSearch;;

// init test

public function init () : void {
var xml : XML = 
PseSearchResponse 
xmlns=http://fmr.com/BackOffice/PseSearch;
SearchPlan

MaxExceededFlagfalse/MaxExceededFlag
Plans
Client

EnterpriseId9/EnterpriseId
ClientNameCool 
Client/ClientName

RelationshipMgrNmGARY BUSEY/RelationshipMgrNm

BusinessSegCORE/BusinessSeg
Plans
Plan

PlanNumber5/PlanNumber

PlanNameSAVINGS PLAN/PlanName
/Plan
/Plans
/Client
/Plans
/SearchPlan
/PseSearchResponse;   

// use namespace prefix

var ns : Namespace = xml.namespace ();

trace (xml.ns::SearchPlan.ns::Plans);

// use namespace constant

use namespace default_ns;

trace (xml.SearchPlan.Plans);
}

--- In flexcoders@yahoogroups.com, ben.clinkinbeard 
[EMAIL PROTECTED] wrote:

 The struggle against XML with a default namespace continues...  
 Currently, the only way I am able to get to the first Plans node 
is by
 using QName objects to traverse one level at a time, like this:
 
 var ns:Namespace = new Namespace(myDefaultNamespaceString);
 var q:QName = new QName(ns.uri, SearchPlan);
 var q2:QName = new QName(ns.uri, Plans);
 searchResults = XML(list).child(q).child(q2);
 
 This is not ideal and would obviously not be practical for deeply
 buried nodes. There's got to be a better way but I can't seem to 
find
 it. Can anyone help?
 
 Thanks,
 Ben








 Yahoo! Groups Sponsor ~-- 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/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/
 




[flexcoders] Re: Javadoc like comments for AS3

2006-06-24 Thread Geoffrey Williams
While there is no doc generating tool available at the moment, you 
can auto insert a template comment of sorts.

Source  Add ASDoc Comment. Ctrl+Shift+D

--- In flexcoders@yahoogroups.com, hank williams [EMAIL PROTECTED] 
wrote:

 I am wondering what the MM strategy is for commenting AS3. I would 
really
 love to be able to add javadoc comments, and compile some kind of 
code
 documentation. It seems as though the editor, on some level, 
understands the
 idea of javadoc because if on a blank line you type /* the stuff 
below turns
 green. It knows its a comment. But if you type /** (the signal 
for this is
 javadoc) it turns blue.
 
 But it doesnt auto create the parameter signatures and I dont see 
any other
 reference to documentation in flex. Of course it is very possible 
I have
 missed something, so I am just curious if anyone else has any 
insight.
 
 Hank








 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/
 





[flexcoders] Re: e4x filtering question

2006-06-21 Thread Geoffrey Williams
Here you go:

var employees:XML =
employees
employee name=joe mark
department id=id1/
address city=miami state=florida/
/employee
employee name=joe mark
address city=san francisco state=california/
/employee
employee name=mary dooley
department id=id1/
address city=los angeles state=california/
/employee
/employees;
trace (employees.employee.(child (department)[EMAIL PROTECTED] == id1));

--- In flexcoders@yahoogroups.com, coder_flex [EMAIL PROTECTED] 
wrote:

 I have an xml document of the form
 employees
   employee name=joe mark
 department id=id1/
 address city=miami state=florida/
   /employee
   employee name=joe mark
 address city=san francisco state=california/
   /employee
   employee name=mary dooley
 department id=id1/
 address city=los angeles state=california/
   /employee
 
 /employees
 
 Note here that the second employee record doesnt have department
 element at all. This is just a sample and my original xml is a web
 service response with some of the child elements missing for some
 elements. I want to filter the parent element on the child elements
 which may or may not be present using an e4x expression. The e4x
 expression of the form:
 
 employeesByDept:XMLList = employees.employee.([EMAIL PROTECTED] 
== id1);
 
 fails saying department element not found. If the department 
element
 is found for all the employees the above statement goes through. 
 
 Whats the work-around for this? I thought its fairly common to have
 child elements/attributes missing within elements and e4x should 
just
 ignore those.
 
 Thanks in advance for the response.







 Yahoo! Groups Sponsor ~-- 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/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/
 




[flexcoders] Re: Using HTTPService in a function

2006-06-17 Thread Geoffrey Williams
Are you importing the class?

import mx.rpc.events.ResultEvent;

--- In flexcoders@yahoogroups.com, NZEYIMANA Emery Fabrice 
[EMAIL PROTECTED] wrote:

 Thanks Martine, 
 I have read from the manuals and tried to do the following: 
 
 private function SampleFunction():void
 {
  var http:HTTPService;
  
  http = new HTTPService();
  http.url = http://www.domain.com/my_xml.php;;
  http.method=POST;
  http.useProxy = false;
  http.showBusyCursor = true;
  http.resultFormat = text;
 
 
  http.addEventListener( result, xmlReceived );
  http.send();
 }
 
 
 private function xmlReceived(event:ResultEvent):void
 {
 var myXML:String;
 myXML = event.toString();
 
 // Do something with the XML
 }
 
 
 The application cannot compile because it says that the 
ResultEvent Type cannot be found.
 I even tried to private function xmlReceived
(event:mx.rpc.events.ResultEvent):void but it doesn't solve the 
problem. 
 The error message I receive is Type was not found or was not a 
compile-time constant: ResultEvent.






 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/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/
 





[flexcoders] Re: DTD Schema for Flex 2

2006-06-15 Thread Geoffrey Williams
It is valid XML. There are 'limits' to what you can do with the 
schema when compared to how dynamic Flex can be.

Hi, there are no plans at the moment to provide an xsd for Flex 2.  
It's something we can consider for a future release or maybe the 
community will write one that they find useful.  We've found that 
the MXML language ended up not really lending itself to a schema 
because schema can't handle many of the things that are valid in 
MXML (like providing a property as either a child tag or an 
attribute). - Matt Chotin 

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 15 June 2006 14:05, Daniel Tuppeny wrote:
  If it's not, it certainly shouldn't have XML in its name, or an 
xml
  decleration at the top!!
 
 *Exactly* what I thought.
 The XML at the top means - this is validly formed XML.
 
 -- 
 Tom Chiverton





 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/
 





[flexcoders] Re: Using E4X with attributes in XML tags

2006-06-08 Thread Geoffrey Williams
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* 
creationComplete=init ()
mx:Script
![CDATA[
public function init ():void {
var xml_object:XML = Item 
xmlns=some.namespace.com
 ItemID11579339/ItemID
 SiteUS/Site
 TitleHalo 2 (Xbox)/Title
 CurrencyUSD/Currency 
 SiteHostedPicture
 
GalleryTypehttp://somesite.com/somepicture.jpg /GalleryType
 /SiteHostedPicture
 PaymentMethodsPayPal/PaymentMethods
 /Item;

// Get Default XML Namespace 
var item_ns:Namespace = xml_object.namespace ();

// Reference nodes using namespace prefix
trace (String (xml_object..item_ns::Title));
}
]]
/mx:Script
/mx:Application

--- In flexcoders@yahoogroups.com, Sonja Duijvesteijn 
[EMAIL PROTECTED] wrote:

 some_label.text=xml_object.ItemID.Title.toString();
 You want the Title from the ItemID not from the xml object.
 
 some_label.text=xml_object.(@xmlns==...).ItemID;
 I'm not sure why it thinks that @xmlns doesn't exists but it 
should be == as
 it's not an assignment.
 
 Kind regards,
 Sonja Duijvesteijn
 
 
 2006/6/7, Charles [EMAIL PROTECTED]:
 
Hi everyone,
 
 
 
  This is a follow-up question from my last post 
  http://groups.yahoo.com/group/flexcoders/message/38691?
threaded=1var=1 .
  I've managed to use an XML object instead of an XMLDocument 
object, so that
  I can utilize E4X to parse the XML.  BUT, my new problem is that 
for some
  xml results that are returned, the tags have attributes, and now 
the calls
  to access the child nodes don't work anymore.  For instance...
 
 
 
  var xml_object = Item xmlns=some.namespace.com  // Item tag 
now has
  attribute xmlns=...
   ItemID11579339/ItemID
   SiteUS/Site
   TitleHalo 2 (Xbox)/Title
   CurrencyUSD/Currency
   SiteHostedPicture
   
GalleryTypehttp://somesite.com/somepicture.jpg
  /GalleryType
   /SiteHostedPicture
   PaymentMethodsPayPal/PaymentMethods
   /Item
 
 
 
  So, calls that used to work to access child nodes, such as
  some_label.text=xml_object.Title, which would return the items 
title, used
  to work but now they just display nothing...?  I've tried using 
the @
  attribute operator in calls such as
  some_label.text=xml_object.(@xmlns=...).ItemID, but still 
nothing (I
  actually get an error for that last call - undefined 
property 'xmlns').  So
  now I'm stuck until I can figure out how to access those child 
nodes with
  the attribute on there, or to somehow parse the XMl and remove 
the attribute
  before I try to access the child nodes.
 
 
 
  Thanks in advance
 
 
 
 
 
  Charles
 
   
 








 Yahoo! Groups Sponsor ~-- 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/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/
 





[flexcoders] Re: why states doesn't change in flex2 beta3?

2006-05-25 Thread Geoffrey Williams



Use relativeTo instead of target:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
layout=absolute
 creationComplete=initData()
 mx:Script
 ![CDATA[

 private var welcomeScreen:denemeci;
 private function initData():void{
 currentState='first';
 }

 ]]
 /mx:Script
 mx:states
 mx:State name=first
 mx:AddChild relativeTo={targetBox}
 mx:Label text=hello world /
 /mx:AddChild
 /mx:State
 mx:State name=second
 mx:AddChild relativeTo={targetBox}
 mx:Label text=byebye world /
 /mx:AddChild
 /mx:State
 /mx:states
 mx:HBox width=100%
 mx:VBox id=targetBox height=100 width=100/
 mx:Button click=currentState='first' /
 mx:Button click=currentState='second' /
 /mx:HBox
/mx:Application

--- In flexcoders@yahoogroups.com, oktay nba [EMAIL PROTECTED] wrote:

 hi everyone;
 i can't change states. i write a simple code, but i can't work it 
too. is it
 a bug of flex or flash player?
 here is the code:(in flex 2 beta2 it is done well but in beta 3 it 
sucks)
 ---
--
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
 layout=absolute
 creationComplete=initData()
 mx:Script
 ![CDATA[
 
 private var welcomeScreen:denemeci;
 private function initData():void{
 currentState='first';
 }
 
 ]]
 /mx:Script
 mx:states
 mx:State name=first
 mx:AddChild target={targetBox}
 mx:Label text=hello world /
 /mx:AddChild
 /mx:State
 mx:State name=second
 mx:AddChild target={targetBox}
 mx:Label text=byebye world /
 /mx:AddChild
 /mx:State
 /mx:states
 mx:HBox width=100%
 mx:VBox id=targetBox height=100 width=100/
 mx:Button click=currentState='first' /
 mx:Button click=currentState='second' /
 /mx:HBox
 /mx:Application
 
 ---
 
 Oktay Caglar











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



  












[flexcoders] Re: why states doesn't change in flex2 beta3?

2006-05-25 Thread Geoffrey Williams



Just a syntax change from B2 to B3. 'target' is still a valid 
attribute, but it is used for something else.

--- In flexcoders@yahoogroups.com, oktay nba [EMAIL PROTECTED] wrote:

 thnx Geoffrey, it ran. but still i dont get it why target didn't 
answer
 
 oktay caglar
 
 
 
 On 5/25/06, Geoffrey Williams [EMAIL PROTECTED] wrote:
 
  Use relativeTo instead of target:
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
xmlns=*
  layout=absolute
  creationComplete=initData()
  mx:Script
  ![CDATA[
 
  private var welcomeScreen:denemeci;
  private function initData():void{
  currentState='first';
  }
 
  ]]
  /mx:Script
  mx:states
  mx:State name=first
  mx:AddChild relativeTo={targetBox}
  mx:Label text=hello world /
  /mx:AddChild
  /mx:State
  mx:State name=second
  mx:AddChild relativeTo={targetBox}
  mx:Label text=byebye world /
  /mx:AddChild
  /mx:State
  /mx:states
  mx:HBox width=100%
  mx:VBox id=targetBox height=100 width=100/
  mx:Button click=currentState='first' /
  mx:Button click=currentState='second' /
  /mx:HBox
  /mx:Application
 
  --- In flexcoders@yahoogroups.com, oktay nba iamthelf@ wrote:
  
   hi everyone;
   i can't change states. i write a simple code, but i can't work 
it
  too. is it
   a bug of flex or flash player?
   here is the code:(in flex 2 beta2 it is done well but in beta 
3 it
  sucks)









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



  











[flexcoders] Re: FB2 :: Flex Library Project :: Fastest way to rebuild an SWC

2006-05-25 Thread Geoffrey Williams



Are the projects linked to each other? 

Properties  Project References

And you're using 'Build Automatically'?

Those two might make the issue go away automagically. Otherwise try 
doing a Clean on all projects.

--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 Hi,
 
 I have a Flex Libray Project that includes my main component 
classpath.
 
 What is the quickest way to ReBuild a Library Project? I am 
stumped on this
 becasue there is no mxml file and Build is disabled in the menu.
 
 So it's like, I change the source of a component that exists in 
the library,
 this component is used in another project, how do I update the SWC
(rebuild
 it)?
 
 Adobe docs don't 'actually' say how to do this. I know if you mess 
with
 settings, add another component it will rebuild but, there has to 
be a quick
 and dirty way to do it.
 
 Peace, Mike
 
 -- 
 What goes up, does come down.











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



  












[flexcoders] Re: e4x XML Class: How to update a text node?

2006-05-25 Thread Geoffrey Williams



var xml:XML = rootnodetext1/nodenodetext2/node/root;
xml.node[0] = textOne;
xml.node[1] = textTwo;
trace (xml);

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] 
wrote:

 I can read, add and delete text nodes, but how can I update/modify 
one?
 
 Should I use replace()? I think I can make that work and it seems
 logical.
 
 Or delete and add?
 
 Or is there another way?
 
 Tracy












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



  












[flexcoders] Re: menu control in flex 2.0 beta 3

2006-05-24 Thread Geoffrey Williams



Remove the braces.

change=mainViewStackHelper.getSearchResultView(event)

--- In flexcoders@yahoogroups.com, deepu_verma [EMAIL PROTECTED] 
wrote:

 Following is my code and I am trying to capture the change event.
 But it seems that the change event does not trigger for menu bar
 controls only.
 mx:MenuBar labelField=@label showRoot=false width=100%
 change={mainViewStackHelper.getSearchResultView(event)} 
 mx:dataProvider
   mx:XMLList xmlns=
   menuitem label=Menu1
 menuitem label=Files data="">
 menuitem label=Web Pages data="">
 /menuitem
   /mx:XMLList
 /mx:dataProvider
 /mx:MenuBar
 
 --
 Deepak Verma












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



  











[flexcoders] Re: is delete really the best/only way to remove a node in e4x?

2006-05-24 Thread Geoffrey Williams



While it is documented here:

http://livedocs.macromedia.com/labs/1/flex20beta3/langref/operators.h
tml#delete_(XML)

There should be some sort of reference to it in the XML/XMLList 
docs. The syntax is compliant with the spec.

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] 
wrote:

 If this is the final API, I can deal with it, it is just 
inconsistent
 and undocumented, and a bit of a shock when the rest of the api is 
so
 clean and logical.
 
 I admit I have not read the e4x specification.
 
 Tracy












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



  











[flexcoders] Re: How to use e4x

2006-05-22 Thread Geoffrey Williams



The xml returned defines it's own namespace:

private function onInit ():void{
   var loader:URLLoader = new URLLoader();
   var request:URLRequest = new URLRequest
(http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml);
   loader.addEventListener(Event.COMPLETE, 
onComplete);
   loader.load(request); 
  }
   
  private function onComplete (event:Event):void {
  var loader:URLLoader = URLLoader(event.target);
  var externalXML:XML = XML (loader.data);
  var xml_ns:Namespace = externalXML.namespace ();
  var cubes:XMLList = 
externalXML.xml_ns::Cube.xml_ns::Cube.xml_ns::Cube;
  for each (var currency:XML in cubes) {
  trace ([EMAIL PROTECTED]);
  }
  }

--- In flexcoders@yahoogroups.com, Jesús Iglesias [EMAIL PROTECTED] wrote:

 Hi, 
 This is my code on F2b3. I load the Euro foreign exchange 
reference
 rates from http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml.
 It seems like all is fine but nothing happens. XML is well 
received,
 Alert.show(externalXML.toXMLString()) shows the xml, but then the
 processing seems to fail whithout no error.
 Does anybody know way? 
 
 private function onInit():void{
 var loader:URLLoader = new URLLoader();
 var request:URLRequest = new
 URLRequest(http://www.ecb.int/stats/eurofxref/eurofxref-
daily.xml);
 loader.addEventListener(Event.COMPLETE, onComplete);
 loader.load(request); 
 }
 
 private function onComplete(event:Event):void {
 var loader:URLLoader = URLLoader(event.target);
 externalXML = new XML(loader.data);
 for each (var currency:XML in externalXML.Cube.Cube.Cube) {
 Alert.show([EMAIL PROTECTED]);
 }
 }
 
 thanks.









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



  












[flexcoders] Re: Flex 2 Beta 3

2006-05-15 Thread Geoffrey Williams



HTTPService.lastResult

See here for changes:

http://labs.adobe.com/wiki/index.php/Flex:Beta_2_to_Beta_3_Changes

--- In flexcoders@yahoogroups.com, mepaninaresh 
[EMAIL PROTECTED] wrote:

 I tried to upgrade my application from Flex 2 Beta 2. I have a few 
of 
 these errors :-
 
 Access of possibly undefined property result through a reference 
with 
 static type mx.rpc.http.mxml:HTTPService.
 
 Any ideas?












--
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] WebService Flex 2.0

2006-05-08 Thread Geoffrey Williams



WebService calls are asynchronous...

[NotTested]:

mx:Script
![CDATA[
 public function GetHelloWorld():void 
 {
 CustomerServices.HelloWorldws.addEventListener(result,
HelloWorldwsResult);
 CustomerServices.HelloWorldws.send ();
 }
 public function HelloWorldwsResult(event:ResultEvent):void 
 {
 CustomerServices.HelloWorldws.removeEventListener(result,
HelloWorldwsResult); 
 temp = CustomerServices.HelloWorld.result;
 mx.controls.Alert.show(temp);
 }
]]
/mx:Script

mx:WebService 
wsdl=http://localhost/Flex2T_WebServiceTest/Service1.asmx?wsdl 
id=CustomerServices 
fault=mx.controls.Alert.show(event.fault.faultstring)

/mx:WebService
 
mx:Button click=this.GetHelloWorld(); label=Push Me/  


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of vestcomprogrammer
Sent: Monday, May 08, 2006 2:54 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] WebService Flex 2.0

I have the follwing code and I have to click on the button twice to 
get the value that the web services send back. Is there a way to 
fix this problem?



mx:Script
![CDATA[
 public function GetHelloWorld():void 
 {
 CustomerServices.HelloWorld.send();   
 temp = CustomerServices.HelloWorld.result;
 mx.controls.Alert.show(temp);
 }
]]
/mx:Script

mx:WebService 
wsdl=http://localhost/Flex2T_WebServiceTest/Service1.asmx?wsdl 
id=CustomerServices 
fault=mx.controls.Alert.show(event.fault.faultstring)

/mx:WebService
 
mx:Button click=this.GetHelloWorld(); label=Push Me/  







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



 













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








  
  
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] Re: Flex 2 beta 3 available

2006-05-08 Thread Geoffrey Williams



http://labs.adobe.com/wiki/index.php/Flex:Beta_2_to_Beta_3_Changes

import flash.utils.Timer

--- In flexcoders@yahoogroups.com, JB [EMAIL PROTECTED] wrote:

 Hi,
 I just downloaded the new flash player 9(mac version), but I get 
this error:
 VerifyError: Error #1014: Class flash.util::Timer could not be 
found.
 at mx.managers::SystemManager/initialize()
 at mx.managers::SystemManager/::initHandler()
 
 Does anyone know why this is?
 These area swfs builded with beta 2.
 It seems like none of my swfs work anymore:(
 This is on the mac.
 Thanks so much,
 John
 
 
 
 
 
 João Fernandes [EMAIL PROTECTED] wrote: Flex 2 beta 3 
available 
 Just to say that Flex 2 Beta 3 is already available on labs !
 
 João Fernandes 
 
 
 --
 Flexcoders Mailing List
 FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com 










--
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] programatically assigning an ArrayCollection as the DataProvider bug...

2006-04-12 Thread Geoffrey Williams
The return type of selectedItem is Object, so he's casting to the correct
type.

For the time being I believe your ResourceVO has to be made dynamic or
implement the IUID interface.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ted Patrick
Sent: Wednesday, April 12, 2006 2:48 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] programatically assigning an ArrayCollection as
the DataProvider bug...

JB,

Why are you casting dg.selectedItem when it is already is a ResourceVO? The
selectedItem value is the item passed into the addItem method.

ArrayCollection has events to support updating a view (DataGrid, List,
ComboBox). This can be accessed through the component itself or via the
dataProvider property.

Try this:

         private function init():void{
       
            var obj1:ResourceVO = new ResourceVO();    
            obj1.value = foo-0;
            obj1.key = bar-0;
            dg.addItem( obj1 );
            
            var obj2:ResourceVO = new ResourceVO();    
            obj2.value = foo-1;
            obj2.key = bar-1;
            dg.addItem(obj2);
            
            var obj3:ResourceVO = new ResourceVO();    
            obj3.value = foo-2;
            obj3.key = bar-2;
            dg.addItem(obj3); 
        }


When dataProvider is set, the passed object is wrapped by an ArrayCollection
depending on what is passed. If an Array is passed, this becomes the
'source' property of the ArrayCollection. You may be seeing a side effect of
an ArrayCollection being passed into an ArrayCollection via the dataProvider
set operation. By default, the dataGrid already has a ArrayCollection and
using addItem on the DataGrid (dg) will make things simpler internally. I
also do not think that the dataObj variable needs to be [bindable] here
and might be a source of an error.

ArrayCollection is a funky class as it extends Proxy via ListCollectionView.
Proxy allows the entire DataProvider API to be a façade allowing control
over iteration via the Proxy.nextName, Proxy.nextNameIndex, and
Proxy.nextValue at a low level.

My gut feel is that the code can be simpler and accomplish identical
results.

Cheers,

Cynergy Systems, Inc.
Theodore Patrick
Sr. Consultant
[EMAIL PROTECTED]
tel: 1.866.CYNERGY
http://www.cynergysystems.com




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of box110a
Sent: Wednesday, April 12, 2006 2:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] programatically assigning an ArrayCollection as the
DataProvider bug...

I didn't see this in the known issues. but I'll attempt to explain whats
going on:

Here is my Code (i'll explain the bug at the end):
DGTest.mxml
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=*
layout=absolute creationComplete=init();
    pageTitle=DataGrid Test
mx:Script
    ![CDATA[
        import mx.utils.ArrayUtil;
        import com.crap.vo.ResourceVO;
        import mx.collections.ArrayCollection;
    
        [Bindable]
        public var dataObj:ArrayCollection;
        [Bindable]
        public var objTemp:ResourceVO = new ResourceVO();    

        private function init():void{
            dataObj = new ArrayCollection();
            
            var obj1:ResourceVO = new ResourceVO();    
            obj1.value = foo-0;
            obj1.key = bar-0;
            dataObj.addItem(obj1);
            
            var obj2:ResourceVO = new ResourceVO();    
            obj2.value = foo-1;
            obj2.key = bar-1;
            dataObj.addItem(obj2);
            
            var obj3:ResourceVO = new ResourceVO();    
            obj3.value = foo-2;
            obj3.key = bar-2;
            dataObj.addItem(obj3);
            
            dg.dataProvider = dataObj;
        }
        
        private function selectRow():void{
            objTemp = ResourceVO(dg.selectedItem);

        }
        
    ]]
/mx:Script
    mx:HBox width=90% height=90% horizontalCenter=0
verticalCenter=0
        mx:Panel layout=absolute height=50% width=50%
            mx:VBox width=443 height=90% horizontalCenter=1
verticalCenter=-1
                mx:DataGrid id=dg width=100% height=100%
                    change=selectRow();
                    editable=true
                    
                    mx:columns
                        mx:DataGridColumn headerText=Key
dataField=key/
                        mx:DataGridColumn headerText=Value
dataField=value/
                    /mx:columns
                /mx:DataGrid
            /mx:VBox
        /mx:Panel
        mx:Panel width=50% height=50% layout=absolute
            mx:Form x=10 y=10 height=156 width=445
                mx:FormItem label=Key:
                    mx:TextInput id=txtKey data={objTemp.key}/
                /mx:FormItem
                mx:FormItem label=Value:
                    mx:TextInput id=txtValue data={objTemp.value}/
       

RE: [flexcoders] remove child from xml

2006-03-17 Thread Geoffrey Williams










delete x.p[0];











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sonja Duijvesteijn
Sent: Friday, March 17, 2006 5:18
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] remove child
from xml





I've been looking through the flex 2 actionscript and
mxml reference trying to find a way to remove a child from the xml.

var x:XML = 
 body
 pParagraph 1/p 
 pParagraph 2/p
 /body

I know I can add children at any specific location, but I would also like to be able to remove the second child for example. Is there any way to do this? 
Perhaps I've been overlooking some other source of documentation where this is explained. Any hints as where to look would be much appreciated.

Kind regards,
Sonja Duijvesteijn












--
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] remove child from xml

2006-03-17 Thread Geoffrey Williams










Oh, you said the second one



delete x.p[1];

delete x.children ()[1];



http://livedocs.macromedia.com/labs/1/flex/langref/operators.html#delete_(XML)











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Geoffrey Williams
Sent: Friday, March 17, 2006 11:47
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] remove
child from xml





delete x.p[0];















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sonja Duijvesteijn
Sent: Friday, March 17, 2006 5:18
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] remove child
from xml





I've been looking through the flex 2 actionscript and
mxml reference trying to find a way to remove a child from the xml.

var x:XML = 

 body

 pParagraph 1/p 

 pParagraph 2/p

 /body



I know I can add children at any specific location, but I would also like to be able to remove the second child for example. Is there any way to do this? 

Perhaps I've been overlooking some other source of documentation where this is explained. Any hints as where to look would be much appreciated.



Kind regards,

Sonja Duijvesteijn















--
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] Repeater and Web Services (Flex 2b1)

2006-03-08 Thread Geoffrey Williams
Try:

tabsDataProvider = new ArrayCollection(event.result);
tabsDataProvider.dispatchEvent (new CollectionEvent ());

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Sawyer
Sent: Wednesday, March 08, 2006 7:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Repeater and Web Services (Flex 2b1)

I'm having a problem trying to get a set of tabs generated from a web
service.  Full code for my component is pasted at the end of the message.

The problem is down to getting the results from the web service and
getting the tabs to rebuild from that list.

If I do:

tabsDataProvider = new ArrayCollection(event.result);

then the tabs aren't rebuilt, presumably because the Repeater doesn't
notice the list has changed.

If I add individual objects to the tabsDataProvider, which is an
ArrayCollection, using a for loop (see code later) then the event does
fire as expected and I get a runtime error:

TypeError: Error #1009: null has no properties.
at mx.core::Repeater/mx.core:Repeater::getIndexForFirstChild()
at mx.core::Repeater/mx.core:Repeater::recreate()
at mx.core::Repeater/mx.core:Repeater::execute()
at mx.core::Repeater/mx.core:Repeater::collectionChangedHandler()
at flash.events::EventDispatcher/dispatchEvent()
at mx.collections::ListCollectionView/dispatchEvent()
at
mx.collections::ListCollectionView/mx.collections:ListCollectionView::addIte
msToView()
at
mx.collections::ListCollectionView/mx.collections:ListCollectionView::listCh
angeHandler()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.collections::ArrayList/mx.collections:ArrayList::internalDispatchEvent()
at mx.collections::ArrayList/addItemAt()
at mx.collections::ListCollectionView/addItemAt()
at mx.collections::ListCollectionView/addItem()
at
components::DashBoardTabList/components:DashBoardTabList::populateCategoryLi
st()
at MethodInfo-2275()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractService/dispatchEvent()
at
mx.rpc::AbstractOperation/http://www.macromedia.com/2005/flex/mx/internal::d
ispatchRpcEvent()
at
mx.rpc::AbstractInvoker/http://www.macromedia.com/2005/flex/mx/internal::res
ultHandler()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::Producer/acknowledge()
at
C:\dev\enterprise_beta1\frameworks\libs\framework.swc(mx/validators/Validato
r)$132::DirectHTTPMessageResponder/completeHandler()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()

Can someone give me a pointer in the right direction?

ta,

Tim.

Full component code:

?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.macromedia.com/2005/mxml;
xmlns:comp=components.* initialize=callWebServiceForCategoryList()
  mx:Script
![CDATA[
 
import services.category.FetchCategoryList;
import services.category.FetchCategoryListCallParameter;
import mx.rpc.AbstractService;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable] public var tabsDataProvider : ArrayCollection = null;
  
private function callWebServiceForCategoryList():void
{
  var lService : AbstractService = FetchCategoryList.getService();
  var lCallParam : FetchCategoryListCallParameter = new
FetchCategoryListCallParameter();
  lCallParam.SecurityToken = Blah;
  var lCall : Object = lService.FetchCategoryList(lCallParam);
  lCall.resultHandler = this.populateCategoryList;
}

private function populateCategoryList(event : ResultEvent) : void
{
  tabsDataProvider = new ArrayCollection();
  var lResults : ArrayCollection = new ArrayCollection(event.result);
  var lIndex:int;
  for (lIndex = 0; lIndex  lResults.length; lIndex++)
  {
tabsDataProvider.addItem(lResults.getItemAt(lIndex));
  }
} 
]]
  /mx:Script


mx:TabNavigator width=100% height=100% 
mx:Canvas label=Home width=100% height=100%
comp:FrontPage/
/mx:Canvas
mx:Repeater id=myCategories
dataProvider={tabsDataProvider}
startingIndex=0
  mx:Canvas label={myCategories.currentItem.Description}
width=100% height=100% 
comp:DashBoardPage/
/mx:Canvas
/mx:Repeater

mx:Canvas label=Control Panel width=100% height=100%

comp:AdminFrontPage/
/mx:Canvas
/mx:TabNavigator
/mx:HBox







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



 









--
Flexcoders Mailing List
FAQ: 

RE: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Geoffrey Williams










day and month are constant pointers where
as year and date are variable values?











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sönke Rohde
Sent: Friday, March 03, 2006 9:11
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS3 Date
month starting at 0?





but why is month
startingat 0 and day at 1?

seems very strange to me.











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Johannes Nel
Sent: Friday, March 03, 2006 3:04
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3 Date
month starting at 0?

this is expected behaviour i think



On 3/3/06, Sönke Rohde [EMAIL PROTECTED] wrote:


Hi,
Using the AS3-Date-Class the first time I recognized that the month is
starting at 0 means 0 is January. Is this the expected behaviour?

Example:
var d:Date = new Date(2006,03,22); 
trace(date  + d); // date Sat Apr 22 00:00:00 GMT+0200 2006

And another date I tried has a different GMT:
var d:Date = new Date(2006,10,18);
trace(date  + d); // date Sat Nov 18 00:00:00 GMT+0100 2006 

Is this a known issue/bug or am I doing something wrong?

Cheers,
Sönke



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










-- 
j:pn 
http://www.lennel.org








--
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] Adobe Labs Colin Moock's AS3 Viewer Example Compile Error

2006-02-28 Thread Geoffrey Williams
I havn't used it, but you need to remove Type from all of the event types
(the constants are now located in the event class and not in a separate
class). i.e. EventType  Event; ProgressEventType  ProgressEvent;
MouseEventType  MouseEvent; c

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sufibaba
Sent: Tuesday, February 28, 2006 1:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Adobe Labs Colin Moock's AS3 Viewer Example Compile
Error

Hi All,

Has anyone managed to get Colin Moock's Viewer Example running in
Flex2 Beta.

I am getting errors in the ImageViewer.as and DragManager.as

For some reason, all the lines that have addEventListener are giving a
compile error.

Access of undefined property 'EventType'
Access of undefined property 'ProgressEventType'
Access of undefined property 'EventType'
Access of undefined property 'IOErrorEventType'

Access of undefined property 'MouseEventType'

Thanks for any help





--
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] strange undefined property error

2006-02-27 Thread Geoffrey Williams
'a' hasn't been created when you try to assign a value to 'text':

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=*
layout=absolute creationComplete=init ()
mx:Script
![CDATA[
internal var test:String = foo;

internal function init () {
a.text = test;
}
]]
/mx:Script
mx:TextArea x=45 y=50 width=662 height=477 id=a/
/mx:Application

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, February 27, 2006 4:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] strange undefined property error

Below is the complete code. I've done a few test 'applications' with flex
2.0 in the last few weeks. When I decided to dig deeper into xml and flex
however everything went weird. The following code gives an undefined
property error on both 'a' and 'test'. I might be overlooking something
obvious here, but as far as I can see the code is correct. What could
cause this?

Kind regards,
Sonja Duijvesteijn



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=*
layout=absolute
mx:Script
![CDATA[
var test:String = foo;
a.text = test;
]]
/mx:Script
mx:TextArea x=45 y=50 width=662 height=477 id=a/
/mx:Application




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



 








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

* 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] Flex 2 builder: is there a way to turn warnings off

2006-02-15 Thread Geoffrey Williams










One of these may be what youre
looking for:



http://livedocs.macromedia.com/flex/20beta1/docs/0260.html



http://livedocs.macromedia.com/flex/20beta1/docs/1443.html











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Johannes Nel
Sent: Wednesday, February 15, 2006
9:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2
builder: is there a way to turn warnings off





or at least say what should generate a warning (like
FDT)

-- 
j:pn










--
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] Flex2: debugging mxml

2006-02-15 Thread Geoffrey Williams










http://livedocs.macromedia.com/flex/20beta1/docs/0402.html



You can output the generated as by adding keep
to the compiler arguments. But you cant add breakpoints to debug em
AFAICT



http://livedocs.macromedia.com/flex/20beta1/docs/0388.html











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Johannes Nel
Sent: Wednesday, February 15, 2006
9:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2:
debugging mxml





hi all

tell me to rtfm, but i could not find any information on this. is it possible
to place a breakpoint in an mxml page, and if not (now ala flex 1.5 since i
don't know if flex 2 config has a setting to create .as files) can i put a
breakpoint in the generated as file somehow?

thanks
j

-- 
j:pn 










--
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: Job: Flash Developer/Programmer

2006-02-14 Thread Geoffrey Williams
I agree.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bhaq1972
Sent: Tuesday, February 14, 2006 5:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Job: Flash Developer/Programmer

Ali
My preference would be to have a single mailing list. Keep 
everything in one place. read what interests you and ignore what 
doesnt.

regards
bod


--- In flexcoders@yahoogroups.com, Alistair McLeod [EMAIL PROTECTED] 
wrote:

 Hi,
 
 This post shouldn't have gotten through as its nothing to do with 
Flex -
 apoligies for that. We do think that allowing companies (not 
agencies)
 to advertise the fact that they have open *Flex* positions is a 
good
 thing for the Flex community. However, the number of postings is
 increasing (and will do moreso in the future) on what is already a 
busy
 list.
 
 So, I was wondering whether we should have a flexjobs mailing list,
 where people who are looking for Flex work can subscribe to, and 
we can
 direct employers to - would that be better than the jobs being 
posted to
 flexcoders, or would people rather they still came here?
 
 Cheers,
 
 Ali





--
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] SharedObject.getLocal() Flex2 beta1

2006-02-13 Thread Geoffrey Williams










Copy and pasted that code and it works for
me. Try a project clean and make sure the project has all of the library swcs. frameworks
and playerglobal are the main ones I think.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Teoti Graphix
Sent: Monday, February 13, 2006
8:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
SharedObject.getLocal() Flex2 beta1





Hello, has anyone had this problem in the beta?

Taken from their help...

?xml version=1.0?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml
creationComplete=initApp()
 mx:Script
 
  ![CDATA[
 
   import
flash.net.SharedObject;
   
   
   public var
mySO:SharedObject;
   [Bindable]
   public var
welcomeMessage:String;
  
   public function
initApp():void 
   {
 
 mySO =
SharedObject.getLocal(mydata);
 
 
 
 if (mySO.data.visitDate==null) {
 
 welcomeMessage
= Hello first-timer!
 
 } else {
 

welcomeMessage = Welcome back. You last visited on  +
getVisitDate();
 
 }
   }
  
   private function
getVisitDate():Date 
   {
  
return mySO.data.visitDate;
   }
  
   private function
storeDate():void 
   {
 
 mySO.data.visitDate = new Date();
 
 mySO.flush();
   }
  ]]
  /mx:Script
 mx:Label id=label1
text={welcomeMessage}/
 mx:Button label=Log Out
click=storeDate()/
/mx:Application

I can't even run this becasue I am getting..

with LINE == mySO =
SharedObject.getLocal(mydata);

Call to a possibly undefined method 'getLocal' through a reference with
static type 'Class'

I am stumped, first I thought it was they had no import, added the flash.net still gives me this error?!

Peace, Mike










--
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] Flex2: Hierarchical DP with typed objects. Class must be dynamic?

2006-02-12 Thread Geoffrey Williams
You might want to look into using the ITreeDataDescriptor

http://www.google.com/search?q=ITreeDataDescriptor

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aldo Bucchi
Sent: Sunday, February 12, 2006 1:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2: Hierarchical DP with typed objects. Class must
be dynamic?

Hi all,

I was feeding a tree with a structure of objects ( instances of a
custom class, PersonVO ) which had a children array.
The tree kept spitting out runtime errors until I modified my class to
make it dynamic ( i figured that at some part of the process the tree
classes were trying to stick some state variables to the nodes...
open/closed flags or similar ).

It works now.

Is this a bug or an acknowledged restriction?

Best,
Aldo



--
: Aldo Bucchi :
mobile (56) 8 429 8300 








--
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] Type annotation is not a compile-time constant

2006-02-10 Thread Geoffrey Williams
'Void' is now 'void'; lowercase.

function addToCart () : void { /* */ }

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sam5654295
Sent: Friday, February 10, 2006 10:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Type annotation is not a compile-time constant

I am working in Flex Builder 2, trying to work through some tutorials
that are in AC 2.  I can't seem to find the problem with this AC 2
code that prevents it from compiling in AC 3.  Any suggestions?

mx:Script
![CDATA[
 function addToCart():Void
{

cart.addItem(coffeeCombo.selectedItem.label,coffeeCombo.selectedItem.data);
}
]]
/mx:Script






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



 









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

* 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] AS3 class constructors can't be private? Abstract classes?

2006-02-10 Thread Geoffrey Williams










I had seen that before and didnt
like it because you could just use:



var _singleton:MySingleton = new
MySingleton (null);



In any case, for anyone interested, I
ended up doing something similar to the code below:



package whatever {

 public
class SingletonClass {

 public
function SingletonClass () {

 if
(Instantiation.locked) throw new Error (Singleton class cannot be
instantiated using the constructor.);

 }

 private
static var __instance:SingletonClass;

 public
static function get instance ():SingletonClass {

 if
(!__instance) {

 Instantiation.locked
= false;

 __instance
= new SingletonClass ();

 Instantiation.locked
= true;

 }

 return
__instance;

 }

 }

}

class Instantiation {

 public
static var locked:Boolean = true;

}









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Friday, February 10, 2006
12:24 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS3
class constructors can't be private? Abstract classes?





They did, we discussed ad
infinitum, this is what we came up with. Maybe we can improve it later
but this is what were getting for now. Trust us that we spent a
long time discussing internally.



Re the package stuff,
its about the file not the package.



MySingleton.as



package whatever {

 public class
MySingleton {

 public
function MySingleton(singletonEnforcer:MySingletonEnforcer) {  }


private static var instance:MySingleton;

 pubic
function getInstance():MySingleton {


if (instance == null)


instance = new MySingleton(new MySingletonEnforcer());


return instance;

 }




 }

}



//this is in
MySingleton.as but is outside the package block

class MySingletonEnforcer
{}



And thats it.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Carlos Rovira
Sent: Friday, February 10, 2006
7:47 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3
class constructors can't be private? Abstract classes?





I was supposing that don't have private constructors
was due to the alpha state of the player, but it seems like is something
deliberated. IMHO, I don't agree with this design languaje issue cause patterns
like singletons are widely used and people expect to use in the standard way. I
don't want to argue but would like the guys behind this responsability to think
about it a bit and think about what their users expect to find when deal with
the languaje. Thanks for listening :) 





2006/2/10,
Johannes Nel [EMAIL PROTECTED]:

so even if i create a private class that is only
accecible in that package (and then on package level declare a accesor for it)
the only way i can be certain that class will only be created once is by having
nothing else in that package. this does not seem right. 







On 2/10/06, Matt Chotin  [EMAIL PROTECTED]
wrote:



You have to simulate
private constructors by having the constructor take a class that is inaccessible
to other classes (namely putting that class in the same file as the singleton
outside of the package block). Unfortunately I believe the rule is that
the constructor of the class has to have the same visibility as the class
itself. So public classes need public constructors, internal classes get
internal constructors, etc.



Matt











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Johannes Nel
Sent: Thursday, February 09, 2006
4:51 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] AS3
class constructors can't be private? Abstract classes?







abstract classes i am not expecting, private constructers i certainly
hope for



On 2/9/06, Carlos
Rovira [EMAIL PROTECTED]
 wrote:













Hi,

I was trying to migrate some classes from AS2 to AS3 and notice that can't mark
the class constructor as private. Is that correct or there's a workaround? if
not have plans to implement private constructors.

and abstract classes?

Thanks in advance.

-- 
::| Carlos Rovira
::| http://www.carlosrovira.com

















--
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] AS3 class constructors can't be private? Abstract classes?

2006-02-10 Thread Geoffrey Williams










Ya, that would work J











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Friday, February 10, 2006
12:53 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS3
class constructors can't be private? Abstract classes?





Well you could throw an
Error if the parameter passed in was null too











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Geoffrey Williams
Sent: Friday, February 10, 2006
9:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS3
class constructors can't be private? Abstract classes?





I had seen that before
and didnt like it because you could just use:



var
_singleton:MySingleton = new MySingleton (null);



In any case, for anyone
interested, I ended up doing something similar to the code below:



package whatever {


public class SingletonClass {


public function SingletonClass () {


if (Instantiation.locked) throw new Error (Singleton class cannot be
instantiated using the constructor.);


}


private static var __instance:SingletonClass;


public static function get instance ():SingletonClass {


if (!__instance) {


Instantiation.locked = false;


__instance = new SingletonClass ();


Instantiation.locked = true;


}


return __instance;


}


}

}

class Instantiation {


public static var locked:Boolean = true;

}













From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Friday, February 10, 2006
12:24 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] AS3
class constructors can't be private? Abstract classes?





They
did, we discussed ad infinitum, this is what we came up with. Maybe we
can improve it later but this is what were getting for now. Trust
us that we spent a long time discussing internally.



Re the
package stuff, its about the file not the package.



MySingleton.as



package
whatever {


public class MySingleton {


public function MySingleton(singletonEnforcer:MySingletonEnforcer) {  }


private static var instance:MySingleton;


pubic function getInstance():MySingleton {


if (instance == null)


instance = new MySingleton(new MySingletonEnforcer());


return instance;


}




 }

}



//this
is in MySingleton.as but is outside the package block

class
MySingletonEnforcer {}



And
thats it.



Matt


















--
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] Date Class switch?

2006-02-02 Thread Geoffrey Williams










Well, the month is zero indexed and today
is 2/2 not 2/1 so that might be what your seeing.











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonathan Miranda
Sent: Thursday, February 02, 2006
11:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Date Class
switch?





Alright, I used this in the Alpha
and it worked fine.but in the Beta its reversed.

public function updateVisit() {

var
mySharedObject:SharedObject = SharedObject.getLocal(REQTWA);

if(mySharedObject.data.lastvisit
!= null) { 

VisitText.text =
Your last visit was  + mySharedObject.data.lastvisit.month +
/ + mySharedObject.data.lastvisit.date + / +
mySharedObject.data.lastvisit.fullYear;

} else {

VisitText.text =
This is your first visit.; 

}

mySharedObject.data.lastvisit
= new Date();

mySharedObject.flush();


}

it comes out 1/2/2006 .and its 2/1/2006

_

Jonathan
Miranda

Flexible
Master of the Web

In the game
of chess, it's important to never let your opponent see your pieces.









--
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] Event inconsistency

2006-01-25 Thread Geoffrey Williams










I had noticed this as well. I believe it
will be normalized on way or another once all is said and done.











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Stacey Mulcahy
Sent: Tuesday, January 24, 2006
1:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Event
inconsistency





Is there a reason, out of
curiosity, that the event implementation is different between lets say:



MouseEventType.MOUSE_DOWN

DragEvent.MOUSE_DOWN





Was there a reason that
the DragEvent doesnt follow the same format as MouseEventType  its
seems oddly inconsistent and just wondering if there was any reasoning behind
besides overlooking it?
















--
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] Named parameters in AS3?

2006-01-11 Thread Geoffrey Williams
Did you maybe misread his question? I don't think you can do what he
asked...

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Wednesday, January 11, 2006 5:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Named parameters in AS3?

Yes, it's possible.

- Original Message - 
From: Derek Vadneau [EMAIL PROTECTED]
To: flexcoders flexcoders@yahoogroups.com
Sent: Wednesday, January 11, 2006 5:01 PM
Subject: [flexcoders] Named parameters in AS3?


Does anyone know if it's possible to use named parameters in AS3?

If not, is it a feature that could be put into AS3?

The idea would be to be able to submit parameters like:
myFunction(target=myClip, url=/test.swf, preload=true); 





--
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] Does Flex utilize the keyword: abstract?

2005-12-07 Thread Geoffrey Williams
The keyword is reserved but it's not supported...
 
public function foo():Void { throw new Error (method foo is abstract); }

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Libby
Sent: Wednesday, December 07, 2005 11:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Does Flex utilize the keyword: abstract?

I guess not since I can't find it anywhere, but thought I would ask
you gurus to be sure...

would like to do this:  abstract public function foo():Void; 





 Yahoo! Groups Sponsor ~-- 
AIDS in India: A lurking bomb. Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/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] How to create XML Object from string (AS3: E4X)

2005-11-30 Thread Geoffrey Williams










var _str:String = rootchildtext/child/root;

var _xml:XML = XML (_str);

flash.util.trace (String (_xml.child));











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Ralf Rottmann
Sent: Wednesday, November 30, 2005
6:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to
create XML Object from string (AS3: E4X)





Quick question: I have valid XML in
a :String variable. How can I create an XML Object from it?



This did NOT work:



1.

var tempXml:XML;

tempXml = XML(s);



2.

var tempXml:XML = new XML(s);



Any idea?









--
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] Flex 2:Package/Class problem

2005-11-01 Thread Geoffrey Williams
You can only have one public function / class / prop per .as file. Also, the
.as files name must match that of the function / class / prop.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Greg Johnson
Sent: Tuesday, November 01, 2005 9:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2:Package/Class problem

I am tryinig to create a class with functions that I use repeatedly 
so I can just include them in different components/applications.  As 
far as I can tell I have written it correctly, but when I use an 
include, and they try calling one of the functions, it doesn't work.

Here is the package
package mrstd{
// Imported Libraries
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
import mx.controls.gridclasses.DataGridColumn;
import mx.managers.DragManager;
import mx.events.DragEvent;
import mx.formatters.*
import flash.util.Timer;

// Standard Library Class
public class stdlib {
// Does what it says, used when a function has to be 
called, but you don't actually want to do anything
public function doNothing():Void {} 

// Get Today's Date as a string
public function getToday():String {
var today_date:Date = new Date();
var date_str:String = ((today_date.getMonth()
+1)+/+today_date.getDate()+/+today_date.getFullYear());
return date_str;
}
}

// Mouse Related Functions
public class mouseHandlers {
// Handles drag and drop events.
public function doDragDrop(event:DragEvent):Void {
private var items:Array = 
event.dragSource.dataForFormat(items);
private var dest:Object = event.currentTarget;
private var dropLoc:int = dest.getDropLocation
();
dest.hideDropFeedback(event);
items.reverse();
var l:int = items.length;
for(var i:int = 0; i  l; i++) {
dest.dataProvider.addItemAt(items[i], 
dropLoc);
}
event.preventDefault();
}   

// Variables used for detectDoubleClick function
private var lastClick:int = 0;
private var lastObject:Object = new Object();;
private var lastIndex:int = 0;
private var maxTicks:int = 300;

// Detect if a double click was made and if so, call 
a function
public function detectDoubleClick(event:Object, 
functionToCall:Function, ... args):Void {
var currentClick:int;
var currentObject:Object;
var currentIndex:int;
var clickDif:int;
currentClick = getTimer();
currentObject = event.target;
currentIndex = event.index;
clickDif = currentClick - lastClick;
if( clickDif = maxTicks  currentObject == 
lastObject  currentIndex == lastIndex ) {
lastClick = currentClick;
lastObject = currentObject;
lastIndex = currentIndex;
if (args[0] == null) {
functionToCall();
} else {
functionToCall(args);
}
}
lastClick = currentClick;
lastObject = currentObject;
lastIndex = currentIndex;
}
}

// Standard Formaters
public class formaters {
private var StdMoneyFormat:CurrencyFormatter = new 
CurrencyFormatter();
private var StdDateFormat:DateFormatter = new 
DateFormatter();
StdMoneyFormat.precision=2;
// Formats a dataGrid cell as money
public function formatMoney(dpItem:Object, 
dgColumn:DataGridColumn):String {
return StdMoneyFormat.format(dpItem
[dgColumn.columnName]);
}

// Formats a dataGrid cell as a date
public function formatDate(dpItem:Object, 
dgColumn:DataGridColumn):String {
return StdDateFormat.format(dpItem
[dgColumn.columnName]);
}

// Formats a dataGrid cell as a string that is x 
characters long followed by an elipse
public function shortString(dpItem:Object, 

RE: [flexcoders] Macromedia Labs site

2005-10-17 Thread Geoffrey Williams
The wiki is one of those open source / pre packaged things; just with a
customized UI. Much easier than coming up with something from scratch. 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of charlespaz1
Sent: Monday, October 17, 2005 11:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Macromedia Labs site

Is it just me, or does anyone else find it strange that Macromedia
(home of ColdFusion and Flex) is using php for its wiki? Maybe it is
just because I've been working on creating my own wiki in CF. :)

--- In flexcoders@yahoogroups.com, Jeff Whatcott [EMAIL PROTECTED] wrote:

 Check out this and other known issues here:
 
 http://labs.macromedia.com/wiki/index.php/Flex:known_issues







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



 










 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 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] Packages must not be nested? Flex2

2005-10-17 Thread Geoffrey Williams
You can only have one public class/method available in a package .as file.
Is this supposed to be an .as include? If so, just get rid of 'package {'
and the end brace.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Greg Johnson
Sent: Monday, October 17, 2005 3:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Packages must not be nested? Flex2

It errors on line 1.  Don't understand what it's talking about.

package {
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
import mx.utils.Delegate;
public function alertHandlerResultsGrid(event):Void {
if (event.detail==mx.controls.Alert.OK) {
 investigatorResultsGrid.setStyle
(borderColor,#CC);
 investigatorResultsGrid.setStyle
(borderThickness,1);
}
}
// ...
}





 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 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] Browserless Flex?

2005-08-30 Thread Geoffrey Williams
Yes. Flex generated SWFs can bee installed with your Central app. 

Other than that I'm pretty sure there is some sort of restricted
distribution. You can't just compile the MXMLSWFs and distribute them
wrapped in a projector.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aldo Bucchi
Sent: Tuesday, August 30, 2005 4:47 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Browserless Flex?

... can Flex run on Central??


On 8/30/05, chris.alvarado [EMAIL PROTECTED] wrote:
Hello all,
  
  I am just about to start a very large project and have convinced the
client that Flex is the way to go.
  
  The one thing they would like to be able to do is run the app without a
browser. I was able to do this with the previous version (I built in Flash)
by publishing a .exe that made a loadmovie call to load the initial swf.
  
  Can I accomplish something similar in Flex?
  
  the reason this is such a big deal is because due to security constraints
some of the machines they will need run the app on, they dont have web
browsers installed (if that makes sense).
  
  any ideas? 





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

2005-08-02 Thread Geoffrey Williams
if (myField == undefined) { //... }

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simard, Ghislain
Sent: Tuesday, August 02, 2005 2:47 PM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] NaN

Is there an equivalent for undefined?
 if (isUndefined(myField))???


Ghislain Simard
Analyst Technique web | Web Technical Analyst 
Ressources Naturelles Canada | 580 Booth Ottawa (Ontario)  K1A 0E4
Natural Resources Canada | 580 Booth St Ottawa ON  K1A 0E4
Gouvernement du Canada | Government of Canada
[EMAIL PROTECTED]
613-947-0582 | télécopieur / facsimile 613-996-9416  



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Manish Jethani
Sent: Tuesday, August 02, 2005 2:42 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN


On 8/2/05, Ghislain Simard [EMAIL PROTECTED] wrote:

 The following condition doesn't see the NaN...why ? and how to make
 the condition working?
 
 if (myField == NaN){
  dosomething;
 }

Use this:

 if (isNaN(myField))
   ...

There's some interesting things about NaN.  See this post, for example:
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg05593.html

Manish



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



 





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



 








 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12he2evq1/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123016616/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOOcmpgn=GRPRTP=http://groups.yahoo.com/;In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!/a./font
~- 

--
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] Flex + Central

2005-05-11 Thread Geoffrey Williams
Central does not have the ability to execute programs on the users' machine
without some sort of a hack or third party installation.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of beckpvt
Sent: Wednesday, May 11, 2005 2:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex + Central

Hi people, 

Is there any way to run a program (i.e.: Notepad.exe) into an
application running in Macromedia Central? 

Imagine a TexInput (in a Flex App running in Central) like a kind of
command line. So, you can press a Execute button to run this
program. Is it possible?


Tks a lot,
Beck





 
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/