[flexcoders] e4x with XMLListCollections?

2006-10-03 Thread Clare Todd



I have a hunk of XML that I have 
loaded into an XMLListCollection. It describes a training course 
catalog. I'm trying to write a function to return the title of a course 
when passed the "KeyID" of a specific course instance, and am running into all 
sorts of problems (it ain't working being the worst of them).
Here's the 
XML:
catalogtrainingEvent 
keyID="1" title="Programming 101" eventCost="499.99"trainingEventInstance keyID="1" 
trainingEventID="1" location="Houston" eventDate="02/11/2007" 
instanceCost="499.99" /trainingEventInstance keyID="2" trainingEventID="1" 
location="Houston" eventDate="04/19/2007" instanceCost="499.99" /trainingEventInstance keyID="3" 
trainingEventID="1" location="Las Vegas" eventDate="04/19/2007" 
instanceCost="299.99" //trainingEventtrainingEvent keyID="2" title="Miter Saw 
Safety" eventCost="300.00"trainingEventInstance keyID="4" trainingEventID="2" 
location="Houston" eventDate="12/25/2006" instanceCost="300.00" //trainingEvent/catalog
... it's loaded into an 
XMLListCollection called myCollection using HTTP service with 
resultFormat=e4x
I'm trying to ignore the 
trainingEventID attribute, since it might be going away. I was trying to 
do some e4x magik to find the title like this, where the parameter is the KeyID 
of the trainingEventInstance:
public function getCourseTitle( 
instanceID:Number ):String {return 
myCollection.source.trainingEvent.trainingEventInstance.(@keyID == 
instanceID).parent()[EMAIL PROTECTED];}
so when the function is passed 4, it returns "Miter Saw Safety"
Am I doing something wrong? Can I 
not e4x using the "source" property? Any thoughts? 
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
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___


[flexcoders] drag only CERTAIN items from a list?

2006-09-14 Thread Clare Todd


I have a tree for a training site.

It has Courses who have CourseInstance 
children:

info
course title="Cooking 101"
courseinstance location="Houston" 
date="02/11/1974" /

courseinstance location="Chicago" 
date="12/23/2007" /
/course
...

I want people to be able to drag items off the tree 
and into a List (think of a shopping cart). I ONLY want them to be able to 
drag off the INSTANCES, not the course "container".

I swear I saw something on the web about 
conditional dragging, but can't find it anywhere, and am not too clear how to do 
it with the Tree?

Thanks!

-- TC
__._,_.___





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

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___


[flexcoders] tree labelFunction that an determine what type of node I'm dealing with?

2006-09-13 Thread Clare Todd


I have a tree that has some XML returned from an HTTP 
service as its dataprovider The XML structure is essentially:

things
redthing id="1" name="Todd"/
bluething id="23" happy="yes"/
orangething green="no"/
/things

I'd like my labelFunction to be able to react to the different types of 
things. In english it would do this:
Hey, I have an item!
Is this item a "redthing"? If so, return this as the String from 
labelFunction.
If not, is it a "bluething"? ...

You get the point.

Is there a way (I'm new to XML, e4x, etc.) to get the xml... node... name? 
(not sure if these are the correct terms) or somehow discover what kind of node 
I'm looking at?

Thanks!

-- TC
__._,_.___





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

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___


[flexcoders] comparing substrings case sensitively?

2006-09-08 Thread Clare Todd


I'm trying to look for instances of characters in a String, 
using myString.indexOf()
I was hoping to find there was a case sensitivity 
flag in there, but there isn't so it finds "Todd" in the string "My name is 
todd", which is not what I want in this specific index.
Anyone have an easy way to do this?

Thanks!

-- TC
__._,_.___





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

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___


[flexcoders] Flash Event vs FLexEvent in custom component?

2006-08-10 Thread Clare Todd


I'm writing a custom component (extending UIComponent) and 
want to issue some events.

All of them are simple "I happened" sort of events 
like "loginButtonClicked", "theyMovedTheirMouse", etc -- no additional 
information passed in the event object other than target, type, 
etc.

I have been sending my events (flash.events.Event)like:
dispatchEvent( new Event("gutterChange") )

I noticed FlexEvent (mx.events.FlexEvent)in the help, and read that 
it "represents the event object passed to the event listener for many Flex 
events." from the help.

I doubtI need anything more than flash.events.Event, but I'm 
wonderingif and whenI would want to use FLexEvent?

Thanks!

-- TC

__._,_.___





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



  






__,_._,___