[flexcoders] State Changing Error

2006-11-06 Thread Graham Weldon
Hi all,

I've encountered this before, but I cannot for the life of me recall
what the cause and fix is:
I have the following states (represented with respect to heirachy:

- base state
-  -  -  home
-  -  -  login (start)


The change from login to home occurs correctly, once verification
of the login details has taken place. This is done with a
'currentState=home ' after checking the login details.

When I click the logout button whose click attribute is
'currentState=home ' I get the following error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child
of the caller.
   at flash.display::DisplayObjectContainer/removeChild()
   at mx.core::Container/removeChild()
   at mx.states::AddChild/remove()
   at mx.core::UIComponent/::removeState()
   at mx.core::UIComponent/::commitCurrentState()
   at mx.core::UIComponent/setCurrentState()
   at mx.core::UIComponent/set currentState()
   at main/___Button2_click()



Any help appreciated.

Regards,
Graham Weldon
Software Engineer






--
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: State Changing Error

2006-11-06 Thread Graham Weldon
This is a small bump. Has anyone encountered this or does anyone have
any thoughts on a cause or fix?

Cheers,
Graham Weldon
Software Engineer

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

 Hi all,
 
 I've encountered this before, but I cannot for the life of me recall
 what the cause and fix is:
 I have the following states (represented with respect to heirachy:
 
 - base state
 -  -  -  home
 -  -  -  login (start)
 
 
 The change from login to home occurs correctly, once verification
 of the login details has taken place. This is done with a
 'currentState=home ' after checking the login details.
 
 When I click the logout button whose click attribute is
 'currentState=home ' I get the following error:
 
 ArgumentError: Error #2025: The supplied DisplayObject must be a child
 of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at mx.core::Container/removeChild()
at mx.states::AddChild/remove()
at mx.core::UIComponent/::removeState()
at mx.core::UIComponent/::commitCurrentState()
at mx.core::UIComponent/setCurrentState()
at mx.core::UIComponent/set currentState()
at main/___Button2_click()
 
 
 
 Any help appreciated.
 
 Regards,
 Graham Weldon
 Software Engineer






--
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: State Changing Error

2006-11-06 Thread Graham Weldon
Hi Dustin.

Sure enough I had a docked ApplicationControlBar on the home state.
This was been undocked, and moved to the top at 100%, and teh state
changes are now happening without any issues.

Thanks for your help on this one. Very much appreciated.

Regards,
Graham Weldon
Software Engineer


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

 Can you give the code to the states and the transitions (if you are
 using a transition)?   When I have seen this it was because I was trying
 to remove a child that was not actually created or the relation setting
 was incorrect.  I'll be able to give you better feedback after I have
 seen the code.  Also, one thing that comes to mind right off the bat is
 the applicationControlBar.  Do you have an applicationControlBar?  I
 have seen issues when trying to do a removeChild on the
 applicationControlBar (it's because when it's docked, it's added at a
 much lower level than other components, so it's not really a child of
 the application).  
 
  
 
 Dustin Mercer
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Graham Weldon
 Sent: Monday, November 06, 2006 2:37 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: State Changing Error
 
  
 
 This is a small bump. Has anyone encountered this or does anyone have
 any thoughts on a cause or fix?
 
 Cheers,
 Graham Weldon
 Software Engineer
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Graham Weldon graham@ wrote:
 
  Hi all,
  
  I've encountered this before, but I cannot for the life of me recall
  what the cause and fix is:
  I have the following states (represented with respect to heirachy:
  
  - base state
  - - - home
  - - - login (start)
  
  
  The change from login to home occurs correctly, once verification
  of the login details has taken place. This is done with a
  'currentState=home ' after checking the login details.
  
  When I click the logout button whose click attribute is
  'currentState=home ' I get the following error:
  
  ArgumentError: Error #2025: The supplied DisplayObject must be a child
  of the caller.
  at flash.display::DisplayObjectContainer/removeChild()
  at mx.core::Container/removeChild()
  at mx.states::AddChild/remove()
  at mx.core::UIComponent/::removeState()
  at mx.core::UIComponent/::commitCurrentState()
  at mx.core::UIComponent/setCurrentState()
  at mx.core::UIComponent/set currentState()
  at main/___Button2_click()
  
  
  
  Any help appreciated.
  
  Regards,
  Graham Weldon
  Software Engineer
 






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



Re: [flexcoders] two direction binding and cairngorm

2006-06-09 Thread Graham Weldon







Question one:
I would approach this a little differently Rather than attempting to
create a double-binding mechanism. Take advantage of the ModelLocator,
and rework the target of the data update from the datagrid. The
ItemEditor or after edit event should update the ModelLocator directly,
rather than attempting to update the bound data item in the datagrid,
this should automatically push the updated value back into the
datagrid, giving the impression that it was updated directly in the
datagrid.

ModelLocator
- Send out Data to bound locations
- Receive updated data

Data Display Item
- Bind to ModelLocator
- Update ModelLocator with new data


Regarding Question two:
A command could quite easily perform the item selection after the data
update had been retrieved and correctly assigned to the ModelLocator

Hope this helps you some.
Graham Weldon

Larry Liang wrote:

  
  
As far as I know, in flex 2b3, if you use {} for data binding. it's a 
one way binding: source = {destination}.
  
However, if you need the binding to work in two ways, do you do 
another one but switch the source and destination? The reason I ask 
this question is that in cairngorm, you can bind the dataprovider of 
a datagrid to an arraycollection object inside ModelLocator. if you 
make the datagrid editable, then when users make changes inside the 
datagrid, you want the arraycollection object in modellocator to be 
updated. but the databinding only works in one way. 
  
In this case, if you bind the arrayobject inside modellocator to 
datagrid provider, it makes the modellocator has to be aware of where 
the view is. 
  
I'm not sure what's the best way to solve this. please help me.
  
Another question of cairgorm, if i assign a remoting result (an 
array) to the arraycollection object inside modellocator, the data 
will be shown in the corresponding datagrid in my view. By default, 
there is no row selected inside datagrid. if I want the first row to 
be selected after the data is assigned to the datagrid, what's the 
best way to achieve this? Should this be done by command class? 
something like:
  
ModelLocator.getInstance().arrcollection = result;
myView.datagrid.selectedIndex = 1;
  
In this case, the command class needs to know where the view is. I don
't consider it as a good design. But do I have to use a view helper 
in this case?
  
Thanks,
  
Larry 
  
  
  




__._,_.___





--
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] getURL GONNNNNNNNNE

2006-06-06 Thread Graham Weldon







Read This article by Peter Ent:
http://weblogs.macromedia.com/pent/archives/2005/12/day_1_the_port.cfm


getURL
If you didn't know it, getURL is
history in Flex 2. The Flex 2 documentation tells you why. All I had to
do was change over to navigateToURL and include an import
statement to find it. Oh, and use the URLRequest on the URL string. But
that was all.

Cheers,
Graham Weldon


Harris Reynolds wrote:

  
  The global getURL function appears to have been yanked from the
Flex 2 
Beta 3 release. Is that correct? What is the current state of the 
art for opening up or redirecting to a new URL? (i.e. what is the new 
API to do the same thing?)
  
thanks,
  
~harris
  
  
  




__._,_.___





--
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] Datagrid itemEditor different per row

2006-06-04 Thread Graham Weldon



Hi all,

Just wondering if anyone has managed to create a unique or different 
itemEditor in a Datagrid based on the row its in?
More specifically, I would like to choose the itemEditor based on some 
of the model XML:

 element name=Hello id=12 editor=richText/

In this sample, the itemEditor would show a button edit that would 
launch a rich text editor, but the next row might be a simple text input.
Any suggestions would be helpful.

Regards,
Graham Weldon







--
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] Tree control doubleClick=onDoubleClick()

2006-06-04 Thread Graham Weldon






Hi all,

Just having issues with the doubleClick event on the Tree control.
I have a tree that is collapsed, with the root note visible. I have the
following:

mx:Tree
 labelField="@identity"
 iconFunction="getIconForNode"
 dataProvider="{ModelLocator.getInstance().treeData}"
 showRoot="false"
 change="onTreeItemSelect()"
 doubleClick="onDoubleClick()"
 xmlns:mx="http://www.adobe.com/2006/mxml"
...
...
/mx:Tree


the onDoubleClick() method:


private function
onDoubleClick() : void
{
 trace('ApplicationEnvironmentTree.onDoubleClick:');
}


I'm not seeing the trace in the output file. Other traces are working
correctly. Additionally, the change="onTreeItemSelect()" event works
correctly. Any thoughts on this? Is DoubleClick implemented correctly
or is this another event thats not handled correctly in the beta player?

Regards,
Graham Weldon







--
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] Datagrid itemEditor different per row

2006-06-04 Thread Graham Weldon



Hi John,

Do you have a sample showing your various states?

Graham.

John Grden wrote:

 Yes, xray does that with it's property inspector (datagrid) - based on 
 the property type (string, boolean, _currentframe etc) it brings up a 
 specific state that has specific tools for editing.

 I created a getData method, that receives the event object from the 
 clickHandler:

 private static function getData(event:Object):Object
 {
 lastDataGridRow = event.rowIndex;
 var row:Number = event.rowIndex - 1;
 var data:Object = app.propertyInspector.dataProvider;
 
 var obj:Object = {};
 obj.prop = data[row].property;
 obj.value = data[row].value;
 obj.path = data[row].path;
 obj.type = data[row].type;
 obj.objectType = data[row].objectType;
 
 return obj;
 }

 after having that data, you can use s switch statement to decide on 
 the state you want to call

 app.currentState = stateName;

 hth,

 JG

 On 6/4/06, *jeremy lu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 wrote:


 there can be multiple view states inside the itemEditro/Renderer,
 so why not use a if else clause inside data() then switch to
 difference states ?

 psudo code:

 override public function data( o ){
 if(o.editor == richText){
 currentState = richTextEditor;
 else{
 currentState = defaultButton;
 }
 }



 On 6/5/06, *Graham Weldon*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 Hi all,

 Just wondering if anyone has managed to create a unique or different
 itemEditor in a Datagrid based on the row its in?
 More specifically, I would like to choose the itemEditor based on some
 of the model XML:

 element name=Hello id=12 editor=richText/

 In this sample, the itemEditor would show a button edit that would
 launch a rich text editor, but the next row might be a simple text
 input.
 Any suggestions would be helpful.

 Regards,
 Graham Weldon



  Yahoo! Groups Sponsor



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

 http://groups.yahoo.com/group/flexcoders/
 http://groups.yahoo.com/group/flexcoders/

 mailto:[EMAIL PROTECTED]








 --
 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
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ
  Computer software development
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw
  Software design and development
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ

 Macromedia flex
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw
  Software development best practice
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/ .


 




 -- 
 John Grden - Blitz

 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer

[flexcoders] Weather Application update

2006-05-30 Thread Graham Weldon



Just a note to all users that made use of the Weather application I'd 
created.
It has been updated to Flex 2.0 Beta 3 as of today, and has also ave a 
visual and performance overhaul.

It can be launched from this page:
http://graham.weldon.ath.cx/?page=projectsid=weather

Regards,
Graham Weldon.






--
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: Cairngorm best practice with Tree data [f2b3]

2006-05-24 Thread Graham Weldon



Hi Tim,

I can refresh the XMLListCollection with a TreeDataCommand. This 
contacts the server and requests a full tree XML, which is then 
converted to a new XMLListCollection. If I use this method, the tree 
collapses to its initial state, which is undesirable.

addChildAt() is the method I have been trying to use. This requires that 
I recurse through the XML tree, looking for an element id matching the 
parentId from the addition command. This is somewhat cumbersome, and I 
have as yet not created a working solution for this.

Still poking away at it, and taking suggestions.

Regards,
Graham Weldon


Tim Hoff wrote:

 I would think that if you don't want to replicate the server-side
 logic, you could just refresh the XMLListCollection data (new call)
 after the insertion has occured. The binding would update the
 view. If you are using the view to allow an insertion point, you
 would have to use addChildAt().

 -TH

 --- In flexcoders@yahoogroups.com, Graham Weldon [EMAIL PROTECTED]
 wrote:
 
  Hi all,
 
  I'm messing with Cairngorm 2.0 beta, and Flex 2.0 beta 3. I've got
 a
  mx:Tree / that contains a structured set of data. This data can
 be
  subjected to an insert at any point. I have correctly setup the
 events,
  commands and delegate to deal with the insertion, and I process
 the
  logical insertion on the server side of this application without
 issues.
  The trouble I am having now is the graphical insertion of the new
 item
  into the existing model.
 
  Currently the data is XML based. The Tree is directly data bound
 to an
  XMLListCollection object.
 
  One thought I had was to model the entire tree as ValueObjects, so
 that
  I could traverse the tree and 'addChild()' where necessary, but
 this
  would be a complete replication of my Server-Side java code on the
  client side, just for insertion. Additionally, I am not sure how i
 would
  use a complex set of chained Value Objects as a data source for a
 Tree
  GUI component.
 
  Any information about this would be really helpful. I appreciate
 any advice.
 
  I can display the tree correctly, I can use information from the
  selected item to perform operations etc. I am interested in
 inserting a
  new item at a specified location. For example, a request to insert
 an
  item will result in XML data describing the insert:
 
  Regards,
  Graham Weldon.
 
 
 
  
  XML Tree INSERTION data Sample
  
 
  command action="" success=true
  addTreeItem parent=123
  element label=NEWitem id=/
  /addTreeItem
  addTreeItem parent=380
  element label=deepItem id=12/
  /addTreeItem
  /command
 
  
 
 
  
  XML Tree Data Sample
  
 
  tree
  element label=one id=123/
  element label=two id=122/
  element label=eight id=897
  element label=hello id=113/
  element label=world id=198
  element label=thing id=380/
  /element
  /element
  /tree
 
  
 
 
  
  ModelLocator
  
  ... snip ...
 
  public var myTreeData : XMLListCollection = new XMLListCollection
 ();
 
  ... snip ...
  
 
 
  
  Application.mxml
  
  ... snip ...
 
  myComponents:TreeComponent
  dataProvider={ModelLocator.myTreeData}/
 
  ... snip ...
  
 







 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups

[flexcoders] XMLListCollection search [f2b3]

2006-05-24 Thread Graham Weldon



Hi all,

I'm wondering if anyone has had any experience or has some samples for 
searching an XMLListCollection for a particular item?
I have a nested structure of element's, each having an id attribute. 
I would like to be able to do something like:

var myXmlListCollection : XMLListCollection = new XMLListCollection( ... 
some data source ... );
var item : *** = findItem(myXmlListCollection, 'MyUniqueId');
trace (item.toString());

I am unsure of the class type of variable item in this example. I want 
to be able to add in an element using item as the parent. So the data 
type used needs to allow this type of operation. The next step will be 
to add a child to this found item.

Any thoughts?

Regards,
Graham Weldon






--
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] XMLListCollection search [f2b3]

2006-05-24 Thread Graham Weldon





In addition to the post below, I can operate on this XML document with 
the XMLList type in place of the XMLListCollection type. I cannot see 
any difference for the implementation I have presently.

Regards,
Graham Weldon


Graham Weldon wrote:

 Hi all,

 I'm wondering if anyone has had any experience or has some samples for
 searching an XMLListCollection for a particular item?
 I have a nested structure of element's, each having an id attribute.
 I would like to be able to do something like:

 var myXmlListCollection : XMLListCollection = new XMLListCollection( ...
 some data source ... );
 var item : *** = findItem(myXmlListCollection, 'MyUniqueId');
 trace (item.toString());

 I am unsure of the class type of variable item in this example. I want
 to be able to add in an element using item as the parent. So the data
 type used needs to allow this type of operation. The next step will be
 to add a child to this found item.

 Any thoughts?

 Regards,
 Graham Weldon


 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  












Re: [flexcoders] XMLListCollection search [f2b3]

2006-05-24 Thread Graham Weldon




Hi Bryan,

Thanks for that link. Unfortunately I don't read Korean too well (at all).
Do you know if there is an English translation for this discussion, or 
do you have some code samples that are commented in English?

Regards,
Graham Weldon
\


Bryan Choi wrote:

 Hi, Graham Weldon.

 I am a Korean.

 I explained it on my community.

 You can see from the url ( http://cafe.naver.com/flexcomponent/665 )

 Actually, I was helped flexcoders members.

 So I'll show you and many Korean.

 I don't know how many it'll help you to know it.

 Thank you,
 Bryan.


 - Original Message -
 From: Graham Weldon [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, May 25, 2006 9:05 AM
 Subject: [flexcoders] XMLListCollection search [f2b3]


  Hi all,
 
  I'm wondering if anyone has had any experience or has some samples for
  searching an XMLListCollection for a particular item?
  I have a nested structure of element's, each having an id 
 attribute.
  I would like to be able to do something like:
 
  var myXmlListCollection : XMLListCollection = new XMLListCollection( 
 ...
  some data source ... );
  var item : *** = findItem(myXmlListCollection, 'MyUniqueId');
  trace (item.toString());
 
  I am unsure of the class type of variable item in this example. I 
 want
  to be able to add in an element using item as the parent. So the data
  type used needs to allow this type of operation. The next step will be
  to add a child to this found item.
 
  Any thoughts?
 
  Regards,
  Graham Weldon
 
 
 
  --
  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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











Re: [flexcoders] Re: XMLListCollection search [f2b3]

2006-05-24 Thread Graham Weldon






Hi Tim,

A good suggestion. Unfortunately my collection is not sorted, and a
sort would cause some issues with the display of the Tree that uses my
collection as a dataProvider.

Bryan,
Your code example is good, but I feel that it will only work for 2
levels of nodes.
My XML structure has no limit to the number of levels of nodes. Thus
its an n-level tree.


I have however attempted the following approach with success! Please
feel free to use this code sample:


=
= XML Example
=
element id="hello"
 element id="world"
 element id="123"/
  element id="graham"/
 element id="weldon"
 element id="office"
 element id="thing"/
 element id="boat"/
 element id="chair"/
 /element
 element id="person"/
 /element
 /element
/element
=



=
= FUNCTION: insertItem(_parentId, _child)
=
public function insertItem(_parentId
: String, _child : XMLList) : Boolean
{
 var parentElement : XMLList =
this.findItem(_parentId);
 //  Exit if we didnt find the parent
 if (parentElement == null)
 return false;

 //  Add the child element to the
parent's children collection
 parentElement.* += _child;
 return true;
}

=



=
= FUNCTION: findItem(_id, _xml)
=
public function
findItem (_id : String, _xml : XMLList) : XMLList
{
 //  Check if the supplied element is
the one we're looking for
 if ([EMAIL PROTECTED] == _id)
 return _xml;

 var children : XMLList =
_xml.element;
 var result : XMLList = null;

 for each (var x : XML in children)
 {
  //  Recurse, looking at children.
 result = this.findItem(_id,
new XMLList(x));
  //  Return the result if its not
null, ending the recursion
 if (result != null)
  return result;
 }

 return null;
}
=




Regards,
Graham Weldon 



Tim Hoff wrote:
Hi Graham,
  
I'm not sure if it works, but have you tried this approach?
  
var myTreeData:ICollectionView = new XMLListCollection();
var myCursor:IViewCursor = myArrayCollection.createCursor();
  
myCursor.findFirst([EMAIL PROTECTED]:"9998"}); 
// maybe just Id?. According to the docs, this only works if the 
collection is sorted.
  
myCursor.insert({label:"thing", id:""});
// might be different syntax for XML
  
-TH
  
--- In flexcoders@yahoogroups.com, "Bryan Choi" [EMAIL PROTECTED]
wrote:

 Hi Graham,
 
 As you can see that my english is not good.
 
 If I can tell you in english well, might be is not now in Korea.
 
 So I told you how many it'll help you...
 
 I am so sorry. 
 
 However, I think that you can understand it, if you know that AS 
3.0 syntax.
 
 Any way, I am sad and wanna talk in english well.
 
 Regards,
 Bryan Choi.
 
 
 - Original Message - 
 From: "Graham Weldon" [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, May 25, 2006 9:59 AM
 Subject: Re: [flexcoders] XMLListCollection search [f2b3]
 
 
  
  Hi Bryan,
  
  Thanks for that link. Unfortunately I don't read Korean too
well 
(at all).
  Do you know if there is an English translation for this 
discussion, or 
  do you have some code samples that are commented in English?
  
  Regards,
  Graham Weldon
  \
  
  
  Bryan Choi wrote:
  
  Hi, Graham Weldon.
 
  I am a Korean.
 
  I explained it on my community.
 
  You can see from the url ( 
  http://cafe.naver.com/flexcomponent/665
)
 
  Actually, I was helped flexcoders members.
 
  So I'll show you and many Korean.
 
  I don't know how many it'll help you to know it.
 
  Thank you,
  Bryan.
 
 
  - Original Message -
  From: "Graham Weldon" [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Thursday, May 25, 2006 9:05 AM
  Subject: [flexcoders] XMLListCollection search [f2b3]
 
 
   Hi all,
  
   I'm wondering if anyone has had any experience or
has some 
samples for
   searching an XMLListCollection for a particular item?
   I have a nested structure of element's, each
having an "id" 
  attribute.
   I would like to be able to do something like:
  
   var myXmlListCollection : XMLListCollection = new 
XMLListCollection( 
  ...
   some data source ... );
   var item : *** = findItem(myXmlListCollection,
'MyUniqueId');
   trace (item.toString());
  
   I am unsure of the class type of variable "item" in
this 
example. I 
  want
   to be able to add in an element using "item" as the
parent. 
So the data
   type used needs to a

Re: [flexcoders] mx.automation

2006-05-22 Thread Graham Weldon



Hi Michael,

http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/automation/IAutomationObject.html
This site lists the details about the IAutomationObject, and also lists 
its known implementing classes:
 ComboBox 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/controls/ComboBox.html, 
Container 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/core/Container.html, 
ListBase 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/controls/listClasses/ListBase.html, 
Loader 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/controls/Loader.html, 
MenuBar 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/controls/MenuBar.html, 
PopUpButton 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/controls/PopUpButton.html, 
Repeater 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/core/Repeater.html, 
UIComponent 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/core/UIComponent.html, 
UITextField 
http://livedocs.macromedia.com/labs/1/flex20beta2/langref//mx/core/UITextField.html

Take a stroll through the Docs and see where various existing classes 
use these Interfaces.


Regards,
Graham Weldon
e. [EMAIL PROTECTED]
w. http://graham.weldon.ath.cx



[EMAIL PROTECTED] wrote:

 IAutomationIdHelper
 IAutomationMouseSimulator
 IAutomationObject
 IAutomationObjectContainer
 IInteractionReplayer

 Anyone know how these are used? Any examples out there?

 ---
 This e-mail message (including attachments, if any) is intended for 
 the use
 of the individual or entity to which it is addressed and may contain
 information that is privileged, proprietary , confidential and exempt from
 disclosure. If you are not the intended recipient, you are notified that
 any dissemination, distribution or copying of this communication is
 strictly prohibited. If you have received this communication in error,
 please notify the sender and erase this e-mail message immediately.
 ---



 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email

Re: [flexcoders] FlexBuilder bug: unwanted, incorrect code completion

2006-05-22 Thread Graham Weldon



Hi Tom,

The option is turned off by going to:
Window  Preferences  Flex  Editors  Actionscript Editor
and turn off the Wrap string automatically option.

Regards,
Graham Weldon
w. http://graham.weldon.ath.cx


Tom Bray wrote:

 Check out his snippet:

 onlineUsersPanel.users = new ArrayCollection(
 [
 {label:'tom'},
 {label:'suzy'}, +
 'megan','troy']);

 Notice how there's a double quote, a plus sign, a new line, and 
 another double quote on the next line. I was in the process of 
 converting each of the strings in the array into anonymous objects and 
 putting them on their own lines so I could add attributes cleanly. 
 Flexbuilder inserts the quotes and plusses for me when I create the 
 line breaks, which is incorrect (and really annoying). I looked 
 around for a way to turn this off in the preferences, but it doesn't 
 appear to be an option.

 -Tom


 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  












Re: [flexcoders] Possible player bug (kills the browser) f2b3 ie 6.0

2006-05-21 Thread Graham Weldon



Hi Dima,

I was able to reproduce this error exactly as you describe.
Good work on identifying this issue. I will pass this forward to the 
Flexcoders owners list also, so we can be sure someone at Adobe picks 
this up.

Good work.

Regards,
Graham Weldon

===
Unhandled exception at 0x3014ea33 in IEXPLORE.EXE: 0xC005: Access 
violation reading location 0x.
===
 EAX 0001 
 ECX  
===
3014EA33 mov eax,dword ptr [ecx]
===


===
?xml version=1.0 encoding=utf-8?
mx:Application
 xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
 backgroundColor=#C6D0DE 
 mx:Script
 ![CDATA[
 
 private function setEdate():void
 {
 var date:Date = new Date(sDate.selectedDate);
 eDate.selectableRange={rangeStart: new Date(2006, 7, 1), 
rangeEnd: new Date(date.getFullYear(), date.getMonth()+3, 
date.getDate()+7)};
 }
 
 ]]
 /mx:Script

 mx:DateField id=sDate change=setEdate()/
 mx:DateField id=eDate/

/mx:Application
===



Dima Ulich wrote:

 In my application I'm using 2 dateFields and I need to
 set selectableRange for one field based on dates
 entred in the other one. In priveous beta everything
 worked fine but in b3 it started to kill my browser.

 So I made another application to test it
 Here it is, try to run the following code in your
 browser. The problem occurs when you first set the
 date in the top field and then change that date to a
 date before.
 ___
 ?xml version=1.0 encoding=utf-8?
 mx:Application
 xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
 backgroundColor=#C6D0DE 
 mx:Script
 ![CDATA[
 
 private function setEdate():void
 {
 var date:Date = new Date(sDate.selectedDate);
 
 eDate.selectableRange={rangeStart: new Date(2006,
 7, 1),
 rangeEnd: new 
 Date(date.getFullYear(),
 date.getMonth()+3, date.getDate()+7)};

 }
 
 ]]
 /mx:Script

 mx:DateField id=sDate change=setEdate()/
 mx:DateField id=eDate/


 /mx:Application
 

 On my computer it kills the browser so the system
 suggests to disable flash player.
 I have tried on different computers with same luck.
 So I guess it'a bug.

 Dima Ulich

 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development

[flexcoders] MenuBar enable and disable items in MXML with dataProvider (f2b3)

2006-05-16 Thread Graham Weldon



Hi all,

I'm tinkering with a menubar and a toolbar. I am attempting to 
centralize the enabling and disabling of functionality based on the 
application's state, and I am using the ModelLocator from the cairngorm 
best practices to achieve this.

At present I have a number of functionality items that appear both on 
the text MenuBar and the icon-based Toolbar. I am able to manage a 
boolean enabled state variable for each action, but would like this 
variable to be used in the definition of a MenuBar.

I have a feeling that the manner in which I create the data for the 
MenuBar might be hindering my data binding efforts on the MenuItems.
Note that in this example, when I use the text values true and 
false, they are enabled and disabled appropriately. However, when 
attempting to use data binding, they all remain enabled despite being 
set to Boolean false.

Here is MyMenuBar.mxml
Any thoughts and ideas are appreciated.

Regards,
Graham Weldon

==
mx:MenuBar
 xmlns:mx=http://www.adobe.com/2006/mxml
 dataProvider={menuXML}
 labelField=@label
 
 mx:Script
 ![CDATA[
 
 import mx.collections.XMLListCollection;
 
 [Bindable]
 private var rawMenuXML : XMLList =
 
 menuItem
 label=File
 enabled=true

 menuItem
 label=New...
 enabled=false/
 menuItem
 label=Open...
 enabled=true/
 menuItem
 label=Close
 enabled=false/
 menuItem
 label=Close All
 enabled=true/
 menuItem
 label=Save
 enabled=false/
 menuItem
 label=Save As...
 enabled={MyModelLocator.getInstance().SAVE_AS}/
 menuItem
 label=Save All
 enabled={MyModelLocator.getInstance().SAVE_ALL}/

 /menuItem
 /
 ;
 
 [Bindable]
 private var menuXML : XMLListCollection = new 
XMLListCollection(rawMenuXML);
 ]]
 /mx:Script
 
/mx:MenuBar
==








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





  




  
  
  YAHOO! GROUPS LINKS



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



  












[flexcoders] Flex Style Explorer in Flex Builder

2006-05-16 Thread Graham Weldon



Hi,

I think it would be a wonderful idea to have the Flex Style Explorer
builtin to the Flex Builder, even just an additional button that
launches the SWF in the external Flash player would be great. For the
moment, I copy the SWF from the site onto my taskbar, and launch from
there.

I feel this would be a great addition to Flex Builder.

Regards,
Graham Weldon









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





  




  
  
  YAHOO! GROUPS LINKS



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



  











[flexcoders] MenuBar using databinding

2006-05-16 Thread Graham Weldon



I've asked this question previously, but in a slightly different
manner, and since its post, I ahve managed to make some progress.

I have created a new MXML component that represents a MenuBar with
some items within that will not change except for their enabled value.
I am building this on top of the Cairngorm framework 2.0 beta, which
means I'm taking advantage of the ModelLocator construct.

I have a collection of ENABLED indicators stored on the ModelLocator,
which will be changed at varying points in the programs execution.
These states need to enable and disable the options in the menu.

Here is a snippet of what I am using, which works great for indicating
the initial required enabled or disabled state, but does not update as
the variables change...

Any thoughts on how to restructure this to allow the options to update
in real time with data binding, rather than being set upon
instantiation and initialisation of the component.

Thanks in advance!

Regards,
Graham Weldon


==

import mx.collections.XMLListCollection;

[Bindable]
private var menuXML : XMLListCollection = new
XMLListCollection(rawMenuXML);
[Bindable]
private var rawMenuXML : XMLList = XMLList(
 'menuItem label=File enabled=' +
 ModelLocator.getInstance().ACTION_ENABLED_FILEMENU + '' +

 'menuItem label=New enabled=' +
 ModelLocator.getInstance().ACTION_ENABLED_FILE_NEW + '/' +
 'meunItem label=Open enabled=' + 
 ModelLocator.getInstance().ACTION_ENABLED_FILE_OPEN + '/' +

 '/menuItem'
 );



mx:MenuBar
 labelField=@label
 xmlns:mx=http://www.adobe.com/2006/mxml
 dataProvider={menuXML}/

==














--
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] MenuBar enable and disable items in MXML with dataProvider (f2b3)

2006-05-16 Thread Graham Weldon



The SAVE_AS public variable is a Boolean type.

Regards,
Graham Weldon




Manish Jethani wrote:

 On 5/16/06, Graham Weldon [EMAIL PROTECTED] wrote:

 snip
  Note that in this example, when I use the text values true and
  false, they are enabled and disabled appropriately. However, when
  attempting to use data binding, they all remain enabled despite being
  set to Boolean false.
 
  Here is MyMenuBar.mxml

 snip
  menuItem
  label=Save
  enabled=false/
  menuItem
  label=Save As...
  
 enabled={MyModelLocator.getInstance().SAVE_AS}/

 What is MyModelLocator.getInstance().SAVE_AS? Is it a Boolean or is it
 a String? If it's a String like false, it'll always evaluate to
 true. Only empty strings are false (so false is true and  is
 false).


 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 








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





  




  
  
  YAHOO! GROUPS LINKS



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



  












Re: [flexcoders] Re: MenuBar using databinding

2006-05-16 Thread Graham Weldon



Hi Tim,

I like your concept, but I don't feel that it will be practical for the 
situation in which I want to use it.

I have this data binding working on a tool bar, which I can define 
completely with MXML... (detailed below).

Note that some of the names have changed since my last post, but you can 
see since I have a complete MXML implementation, using no ActionScript. 
This allows me to insert using the curly-brace notation for data binding 
directly to the ModelLocator. This method works fine, and I have for the 
moment installed a temporary button that toggles the state of some of 
these ACTION_ENABLED variables and have verified that this works 
wonderfully.

Perhaps there is a way to define a MenuBar completely in MXML, to allow 
this data binding option also? I'm not certain since the documentation 
for MenuBars varies depending on where you are reading it.

Regards,
Graham Weldon


mx:Canvas
 xmlns:mx=http://www.adobe.com/2006/mxml
 styleName=myToolbar
 
 !-- = --
 !-- = FILE OPERATIONS --
 mx:LinkButton
 styleName=myToolbarButton
 id=toolbar_fileNew
 toolTip=New
 icon=@Embed('images/icons/ck_6.gif')
 disabledIcon=@Embed('images/icons/ck_6_off.gif')
 width=25
 height=25
 enabled={ModelLocator.getInstance().ACTION_ENABLED__FILE_NEW}
 x=0/

 mx:LinkButton
 styleName=myToolbarButton
 id=toolbar_fileOpen
 toolTip=Open
 icon=@Embed('images/icons/ck_1.gif')
 disabledIcon=@Embed('images/icons/ck_1_off.gif')
 width=25
 height=25
 enabled={ModelLocator.getInstance().ACTION_ENABLED__FILE_OPEN}
 x=25/
 !-- = --

/mx:Canvas






Tim Hoff wrote:

 Yeah, I was afraid of that. You would probably have to dispatch an
 event that is listened for by the view, when you want to
 enable/disable menu options. The listening function would do
 something like this:

 private function enableMenuItems(mb:MenuBar):void
 {
 for (var i:int = 0; i  2; i++)
 {
 mb.getMenuAt(i).enabled =
 ModelLocator.getInstance().enabledMenuArray(i).enabledValue;
 }
 }

 Not true binding, but it might work. This code has errors, but you
 get the idea. Just brainstorming.

 -TH

 --- In flexcoders@yahoogroups.com, Graham Weldon [EMAIL PROTECTED]
 wrote:
 
  Hi Tim,
 
  Curly braces dont work for data binding within ActionScript in the
  manner you suggest:
  * Expecting colon before dot.
  * Syntax Error: rightbrace is unexpected.
  * Expecting rightbrace before semicolon.
 
  Those are the compile errors encountered. Perhaps there is another
 wya
  to use dataBinding from ActionScript? Or alternatively, there may
 be a
  way to completely define this component in MXML, allowsin us to
 use the
  curly-brace notation for databinding?
 
  Regards,
  Graham Weldon
 
 
 
 
  Tim Hoff wrote:
 
   Did you try this: (curly braces for binding)
  
   menuItem label=New enabled=' +
   { ModelLocator.getInstance
 ().ACTION_ENABLED_FILE_NEW }
   + '/
  
   --- In flexcoders@yahoogroups.com, Graham Weldon
   graham.weldon@ wrote:
   
I've asked this question previously, but in a slightly
 different
manner, and since its post, I ahve managed to make some
 progress.
   
I have created a new MXML component that represents a MenuBar
 with
some items within that will not change except for their enabled
   value.
I am building this on top of the Cairngorm framework 2.0 beta,
   which
means I'm taking advantage of the ModelLocator construct.
   
I have a collection of ENABLED indicators stored on the
   ModelLocator,
which will be changed at varying points in the programs
 execution.
These states need to enable and disable the options in the
 menu.
   
Here is a snippet of what I am using, which works great for
   indicating
the initial required enabled or disabled state, but does not
   update as
the variables change...
   
Any thoughts on how to restructure this to allow the options to
   update
in real time with data binding, rather than being set upon
instantiation and initialisation of the component.
   
Thanks in advance!
   
Regards,
Graham Weldon
   
   
==
   
import mx.collections.XMLListCollection;
   
[Bindable]
private var menuXML : XMLListCollection = new
XMLListCollection(rawMenuXML);
[Bindable]
private var rawMenuXML : XMLList = XMLList(
'menuItem label=File enabled=' +
ModelLocator.getInstance().ACTION_ENABLED_FILEMENU
 + '' +
   
'menuItem label=New enabled=' +
ModelLocator.getInstance().ACTION_ENABLED_FILE_NEW
   + '/' +
'meunItem label=Open enabled=' +
ModelLocator.getInstance().ACTION_ENABLED_FILE_OPEN
   + '/' +
   
'/menuItem'
);
   
   
   
mx:MenuBar
labelField=@label
xmlns:mx=http://www.adobe.com/2006/mxml
dataProvider={menuXML

Re: [flexcoders] Re: MenuBar using databinding

2006-05-16 Thread Graham Weldon



Tim,

That would also introduce an error since the XML is a constructed String 
that is passed into an XMLList.
Ie:

var MyXMLString : String = ' .. ' + MyVariables + ' .';
var myXMLList : XMLList = new XMLList(MyXMLString);

I think this means that the value is included correctly, but is not 
capable of producing a data binding effect.

Regards,
Graham Weldon



Tim Hoff wrote:

 One other thought. Instead of using the curly braces in the XML, do
 you think that you could use the special characters like /n7B
 and /n7D?


 --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote:
 
  That's cool Graham. I might use your solution as well, until the
  MenuBar XML items allow databinding.
 
  Later,
  Tim
 
 
  --- In flexcoders@yahoogroups.com, Graham Weldon graham.weldon@
  wrote:
  
   Hi Tim,
  
   I like your concept, but I don't feel that it will be practical
  for the
   situation in which I want to use it.
  
   I have this data binding working on a tool bar, which I can
 define
   completely with MXML... (detailed below).
  
   Note that some of the names have changed since my last post, but
  you can
   see since I have a complete MXML implementation, using no
  ActionScript.
   This allows me to insert using the curly-brace notation for data
  binding
   directly to the ModelLocator. This method works fine, and I have
  for the
   moment installed a temporary button that toggles the state of
 some
  of
   these ACTION_ENABLED variables and have verified that this works
   wonderfully.
  
   Perhaps there is a way to define a MenuBar completely in MXML,
 to
  allow
   this data binding option also? I'm not certain since the
  documentation
   for MenuBars varies depending on where you are reading it.
  
   Regards,
   Graham Weldon
  
   
   mx:Canvas
   xmlns:mx=http://www.adobe.com/2006/mxml
   styleName=myToolbar
   
   !-- = --
   !-- = FILE OPERATIONS --
   mx:LinkButton
   styleName=myToolbarButton
   id=toolbar_fileNew
   toolTip=New
   icon=@Embed('images/icons/ck_6.gif')
   disabledIcon=@Embed('images/icons/ck_6_off.gif')
   width=25
   height=25
   enabled={ModelLocator.getInstance
  ().ACTION_ENABLED__FILE_NEW}
   x=0/
  
   mx:LinkButton
   styleName=myToolbarButton
   id=toolbar_fileOpen
   toolTip=Open
   icon=@Embed('images/icons/ck_1.gif')
   disabledIcon=@Embed('images/icons/ck_1_off.gif')
   width=25
   height=25
   enabled={ModelLocator.getInstance
  ().ACTION_ENABLED__FILE_OPEN}
   x=25/
   !-- = --
  
   /mx:Canvas
  
   
  
  
  
  
   Tim Hoff wrote:
  
Yeah, I was afraid of that. You would probably have to
 dispatch
  an
event that is listened for by the view, when you want to
enable/disable menu options. The listening function would do
something like this:
   
private function enableMenuItems(mb:MenuBar):void
{
for (var i:int = 0; i  2; i++)
{
mb.getMenuAt(i).enabled =
ModelLocator.getInstance().enabledMenuArray(i).enabledValue;
}
}
   
Not true binding, but it might work. This code has errors,
 but
  you
get the idea. Just brainstorming.
   
-TH
   
--- In flexcoders@yahoogroups.com, Graham Weldon
 graham.weldon@
wrote:

 Hi Tim,

 Curly braces dont work for data binding within ActionScript
 in
  the
 manner you suggest:
 * Expecting colon before dot.
 * Syntax Error: rightbrace is unexpected.
 * Expecting rightbrace before semicolon.

 Those are the compile errors encountered. Perhaps there is
  another
wya
 to use dataBinding from ActionScript? Or alternatively,
 there
  may
be a
 way to completely define this component in MXML, allowsin us
 to
use the
 curly-brace notation for databinding?

 Regards,
 Graham Weldon




 Tim Hoff wrote:

  Did you try this: (curly braces for binding)
 
  menuItem label=New enabled=' +
  { ModelLocator.getInstance
().ACTION_ENABLED_FILE_NEW }
  + '/
 
  --- In flexcoders@yahoogroups.com, Graham Weldon
  graham.weldon@ wrote:
  
   I've asked this question previously, but in a slightly
different
   manner, and since its post, I ahve managed to make some
progress.
  
   I have created a new MXML component that represents a
  MenuBar
with
   some items within that will not change except for their
  enabled
  value.
   I am building this on top of the Cairngorm framework 2.0
  beta,
  which
   means I'm taking advantage of the ModelLocator construct.
  
   I have a collection of ENABLED indicators stored on the
  ModelLocator,
   which will be changed at varying points in the programs
execution.
   These states need to enable and disable

Re: [flexcoders] Re: MenuBar using databinding

2006-05-16 Thread Graham Weldon




Hi Tim + group :P,

Interesting idea, I like this one also. It wouldn't be too cumbersome, 
since the XML is naturally small, being a simple menu.
However, what would trigger the rewrite of the rawMenuXML variable?
Trying to keep this in line with the cairngorm best practices and 
framework, I should be able to (and in fact I do) simply access 
variables that exist on the ModelLocator singleton, without 
consideration for how they affect other components. The other components 
via data binding should receive update notifications and thus 
rebuild/refresh themselves.

In this case, I would be forced to call a function on the ModelLocator, 
perhaps:

ModelLocator.getInstance().setActionEnabled_fileNew(true/false);

This method would look similar to this:

public function setActionEnabled_fileNew(_val : Boolean) : void
{
 ACTION_ENABLED___FILE_NEW = _val;
 resetMenuXML();
}

I'm not sure if this will work, but I am pretty sure it doesn't fit in 
with the Cairngorm best practices and framework.

Steven or Alistair, if you're tuning in, what are your thoughts on this 
particular situation?

Regards,
Graham Weldon




Tim Hoff wrote:

 In for a penny, in for a pound. What if you put your XML variables
 in the ModelLocator. When you want to change the menu, update the
 ACTION_ENABLED variables first and then rewrite rawMenuXML?

 [Bindable]
 private var menuXML : XMLListCollection = new
 XMLListCollection(rawMenuXML);
 [Bindable]
 private var rawMenuXML : XMLList = XMLList(
 'menuItem label=File enabled=' +
 ModelLocator.getInstance().ACTION_ENABLED_FILEMENU + '' +

 'menuItem label=New enabled=' +
 ModelLocator.getInstance().ACTION_ENABLED_FILE_NEW
 + '/' +
 'meunItem label=Open enabled=' +
 ModelLocator.getInstance().ACTION_ENABLED_FILE_OPEN
 + '/' +

 '/menuItem'
 );






 --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote:
 
  Well, it was worth a try. :)
 
  --- In flexcoders@yahoogroups.com, Graham Weldon graham.weldon@
  wrote:
  
   Tim,
  
   That would also introduce an error since the XML is a
 constructed
  String
   that is passed into an XMLList.
   Ie:
  
   var MyXMLString : String = ' .. ' + MyVariables + ' .';
   var myXMLList : XMLList = new XMLList(MyXMLString);
  
   I think this means that the value is included correctly, but is
  not
   capable of producing a data binding effect.
  
   Regards,
   Graham Weldon
  
  
  
   Tim Hoff wrote:
  
One other thought. Instead of using the curly braces in the
  XML, do
you think that you could use the special characters like /n7B
and /n7D?
   
   
--- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:

 That's cool Graham. I might use your solution as well,
 until
  the
 MenuBar XML items allow databinding.

 Later,
 Tim


 --- In flexcoders@yahoogroups.com, Graham Weldon
  graham.weldon@
 wrote:
 
  Hi Tim,
 
  I like your concept, but I don't feel that it will be
  practical
 for the
  situation in which I want to use it.
 
  I have this data binding working on a tool bar, which I can
define
  completely with MXML... (detailed below).
 
  Note that some of the names have changed since my last
 post,
  but
 you can
  see since I have a complete MXML implementation, using no
 ActionScript.
  This allows me to insert using the curly-brace notation
 for
  data
 binding
  directly to the ModelLocator. This method works fine, and
 I
  have
 for the
  moment installed a temporary button that toggles the state
 of
some
 of
  these ACTION_ENABLED variables and have verified that this
  works
  wonderfully.
 
  Perhaps there is a way to define a MenuBar completely in
  MXML,
to
 allow
  this data binding option also? I'm not certain since the
 documentation
  for MenuBars varies depending on where you are reading it.
 
  Regards,
  Graham Weldon
 
 
  
  mx:Canvas
  xmlns:mx=http://www.adobe.com/2006/mxml
  styleName=myToolbar
  
  !-- = --
  !-- = FILE OPERATIONS --
  mx:LinkButton
  styleName=myToolbarButton
  id=toolbar_fileNew
  toolTip=New
  icon=@Embed('images/icons/ck_6.gif')
  disabledIcon=@Embed('images/icons/ck_6_off.gif')
  width=25
  height=25
  enabled={ModelLocator.getInstance
 ().ACTION_ENABLED__FILE_NEW}
  x=0/
 
  mx:LinkButton
  styleName=myToolbarButton
  id=toolbar_fileOpen
  toolTip=Open
  icon=@Embed('images/icons/ck_1.gif')
  disabledIcon=@Embed('images/icons/ck_1_off.gif')
  width=25
  height=25
  enabled={ModelLocator.getInstance
 ().ACTION_ENABLED__FILE_OPEN}
  x=25/
  !-- = --
 
  /mx:Canvas

Re: [flexcoders] Re: xml framework

2006-05-15 Thread Graham Weldon







The Use of the e4x xml format might be useful, since nodes and
attributed can be referenced by name.
When a HTTPService makes a connection and received a result that
specified to be resultFormat="e4x" you can reference any node in the
xml as if it were an object.

If this isn't what you're after, I would consider building yourself an
InformationObjectFactory. It could exist as a singleton, with the range
of InformatioObject's registered on the class for lookups. When you
receive XML, call:
InformationObjectFactory.instance().getObjectFromXML(myXMLString);
Of course, your getObjectFromXML would need to inspect the XML to
determine the object type to return, and instantiate one of these
objects, populate and return it.

InformationObject refers just to an object that holds instance data,
like a JavaBean.
The Factory should be a singleton, and provider a method to register a
Class type with an associates string: registerClass(Person, "Person");
I hope this helps somewhat.

Regards,
Graham Weldon

Suzy Lawson wrote:
Sorry, for
clarification, I'm very familar with the Cairngorm
framework. This would be *completely* outside of it. This XML
framework would handle solely converting xml to objects and vice
versa. In my mind, the xml framework would be called from the Command
class of caingorm before calling URLLoader
  
--- In flexcoders@yahoogroups.com, "Suzy Lawson" [EMAIL PROTECTED]
wrote:

 I'm building a Flex 2 app that has all incoming/outgoing data as
XML
 (custom structured...not like an RSS for example). The XML requires
 namespaces and will likely have changes in structure. There will be
 multiple incoming XML formats (e.g, Product, Customer, Contact,
 Calendar Entry).
 
 With that said, it seems I need to build a framework to handle
 incoming XML, forward it to the correct handler to transfer the
data
 to it's related typed class, and add the typed class to the view.
The
 framework will also re-create the XML before sending the request.
 Should be easy with E4x.
 
 Seems straight-forward enough but seems odd there doesn't seem to
be
 any documentation or existing frameworks that completely abstract
the
 xml layer from the UI. Being a java developer, I look forward to
 writing it (and posting it publicly)...just want to make sure I'm
not
 re-inventing the wheel. Seems like a common need that no one has
 addressed. 
 
 If people are using the returned XML as your data object in the
view,
 it could be cumbersome to fix in all the views if the structure
changes.

  
  
  
  









--
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] Re: Flex Component Directory

2006-05-11 Thread Graham Weldon






Hi pk_wasp,

Thats not a bad idea at all, I see no real reason why we can't look
into this to see how feasible it is.
I'm adding this to the wiki ( http://graham.weldon.ath.cx/wiki ) as
soon as I finish replying here.

I think that purchased components would need a seperate process, for
the secure payment. I'm uncertain as to whether this step can be
integrated into the "plugin download" style wizard or not.

Thanks for the suggestion, I'm certainly taking into consideration.

Regards,
Graham Weldon



pk_wasp wrote:
Will we be
able to access this component exchange through eclipse?
  
then just drag and drop the components we want to buy/use onto the 
Flex Builder component palette :)
  
--- In flexcoders@yahoogroups.com, Ben Watson
[EMAIL PROTECTED] 
wrote:

 I love the idea of an open source development approach for 
components. Adobe would be happy to help with you that. 
 
 Our plans to support component development are consolidate to 3 
key areas.
 
 1) In Flex 2 we include a developer guide on creating and 
extending components. We are also planning a whitepaper on 
component design theory.
 
 2) We are building a simpler version of a component exchange 
based on the exchanges that already exist on Adobe.com today - our 
plan is to add more features over time to this, as we learn more 
about what the community wants. 
 
 It is not our intent to resell the components but we would 
provide hosting for trial version or free components and link out to 
your sites to purchase, or so that users can find out more, get 
updates, etc...
 
 3) We are planning a component developer summit in June with 
tracks for both visual components and data/sytem level components. 
We will host the developers in San Francisco in person as well as 
online. The summit and the content that we provide there, and on 
the site after that, should help a lot with deeper requirements for 
understanding the framework and our roadmap.
 
 Please let me know if you would be interested in attending
this. 
 
 There are quite a few developers already building and planning
to 
ship components and we are pretty jazzed by some of the early stuff 
we are seeing. If you have thoughts on how you think we should 
approach this or would like to contribute to or participate in our 
efforts, or would like us to help you with what you are planning, 
then please let me know!
 
 Ben
 watson-at-adobe-dot-com
 
 
 Robert Thompson [EMAIL PROTECTED] wrote:Are we
talking 
about a site that allows component creators to post their 
components, go through and approval process, then be added to a 
catalog, be compensated for purchase; maybe affiliate programs also?
 
 "Kelly @ Dekayd Media Inc." [EMAIL PROTECTED] wrote: I would
use it 
and would be willing to help implement it or host it if
 necessary.
 
 I could definitely contribute to it.
 
 
 Thanks
 
 
 --Kelly
 
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On
 Behalf Of oca_gw
 Sent: Monday, May 01, 2006 1:42 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex Component Directory
 
 I've been working on a web application that is free to subscribe
to
 and use, that would allow people to post and comment on Flex 
Components.
 
 The site is loosely modelled off SourceForge in functionality, and
 will allow the following features:
 
 Create a project
 Add files (mark releases)
 Add news / messages
 Have many developers for one Project/ Component
 Searchable listing
 and more...
 
 There are some basic details on my little blog:
 http://graham.weldon.ath.cx/blog/?p=8
 There will also be a Wiki for this appearing this week.
 
 Is anyone interested in seeing this up? With support and 
suggestions,
 I can put more effort in and get the basic site running sooner, 
rather
 than later.
 
 I know personally I would love a central database of flex
 components that allows people to freely post components for 
download.
 I am interested to see who would use this.
 
 Let me know
 
 Regards,
 Graham Weldon
 
 
 
 
 
 
 --
 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! Messenger with Voice. PC-to-Phone calls for ridiculously
low 
rates. 
 
 --
 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 t

[flexcoders] Cairngorm with HTTPService

2006-05-11 Thread Graham Weldon



Hi,

Just wondering if anyone has some samples of Cairngorm using 
HTTPService, not relying on the Flex Data Services, or Flash remoting.

Regards,
Graham Weldon






--
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] Cairngorm Delegate Question

2006-05-11 Thread Graham Weldon



Hi all,

Cairngorm Question: I'm reading over Steven Webster's six part article, 
and constructing my own application using it as a guideline.

One component that I am not understanding fully is the Delegate usage.
The sample code is using RemoteObject's. Trying to convert this to a 
HTTP service, how does one translate the getProducts methods on the 
ProductDelegate?

public function getProducts() : void
{
 var call = service.getProducts();
 call.resultHandler = Delegate.create(responder, responder.onResult);
 call.faultHandler = Delegate.create(responder, responder.onFault);
}

Questions:
1) What type is the var call supposed to be?
 - I feel that it perhaps should be an Object type, but then I do 
not see where resultHandler and faultHandler are referenced elsewhere, 
so I feel that perhaps call should be defined as a more concrete type?

2) var call = service.getProducts(); This, for a HTTPService, would be 
replaced with service.send(parameterd); Correct?

Any thoughts on this would help a heap, basically I am trying to base an 
application off the 6-part article, and using only HTTPServices as 
connections to the backend.

Regards,
Graham Weldon








--
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] Cairngorm 2 mx.utils.Delegate

2006-05-11 Thread Graham Weldon



Hi all,

In addition to my last question, I'm having trouble finding the 
Delegate class.
Using the code completion tool, mx.util.Delegate doesn't seem to exist. 
Is this part of the Flex Data Services? Or am I missing something?

Thanks in advance.

Regards,
Graham Weldon






--
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: Caringorm with f2b3 issues

2006-05-10 Thread Graham Weldon






Hi Tim,

Thanks for that, the error exists only in my email, as i hand-typed the
code into the email.
The code has the correct spelling cairngorm.

Regards,
Graham Weldon


sufibaba wrote:
Graham,
  
I noticed that cairngorm is mispelled. You've got
org.nevis.caringorm.control.FrontController 
  
Tim
  
  
--- In flexcoders@yahoogroups.com, Graham Weldon
[EMAIL PROTECTED]
wrote:

 Hi All,
 
 Currently i am implementing the caringorm framework into an
application 
 I am building, and I have managed to layout the basics of my front
  
 controller, commands and other events. I have then attempted to
include 
 the controller as described in Steven Websters notes on the
framework (i 
 have included my code below).
 
 It is reporting the following errors:
 
 1 . Definition com.objectconnections.mypackage:ClientController
could 
 not be found.
 2 . Type was not found or was not a compile-time constant:
ClientController.
 
 Any help at all would be appreciated.
 
 Kind Regards,
 Graham Weldon
 
 
 
 /MyProject.mxml
 
 mx:Application
 layout="absolute"
 xmlns:mx="http://www.adobe.com/2006/mxml"
 xmlns:control="com.objectconnections.mypackage.*"
 
 *control:ClientController id="controller"/*
 
 /mx:Application
 
 
 
 
 /com/objectconnections/mypackage/ClientController.as
 
 *package* com.objectconnections.mypackage
 {
 *import* org.nevis.caringorm.control.FrontController;
 
 *public class* ClientController *extends* FrontController
 {
 *public static var* EVENT_OPEN = "open";
 *public static var *EVENT_CLOSE = "close";
 *public static var* EVENT_EXIT = "exit";
 
 *public function* ClientController() : *void*
 {
 this.setupCommands();
 }
 
 *private function* setupCommands() : *void*
 {
 // Nothing here yet, we'll do a bunch of
 // this.addCommand()'s once we get the basics
 // compiling and working.
 }
 }
 }
 

  
  
  
  
  









--
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] mx:Tree control icon setting (f2b3)

2006-05-10 Thread Graham Weldon



Hey everyone,

To be honest, I've not completely read the changes since Beta2, but 
thought I would ask:
Has the ability to individually set icons for tree nodes been made 
available? If not, is it a feature that is planned for inclusion with 
Flex 2.0?
To clarify: Can I set a specific icon per item in the tree, not based on 
whether it is a folder of item, but perhaps based on some data in the 
dataProvider:

mx:Tree
 labelField=theLabel
 iconField=theIcon
 ...
 ...
 mx:XML
 treeItem theLabel=root theIcon=/images/rootIcon.png
 treeItem theLabel=childNode theIcon=/images/001.png/
 treeItem theLabel=another node theIcon=/images/004.png
 treeItem theLabel=thing 
theIcon=/images/thingImages/thing.png/
 treeItem theLabel=thing 
theIcon=/images/thingImages/thing.png/
 treeItem theLabel=thing 
theIcon=/images/thingImages/thing.png/
 treeItem theLabel=thing 
theIcon=/images/thingImages/thing.png/
 treeItem theLabel=thing 
theIcon=/images/thingImages/thing.png/
 treeItem theLabel=thing 
theIcon=/images/thingImages/thing.png/
 /treeItem
 /treeItem
 /mx:XML
 ...
 ...
/mx:Tree

I hope this illustrates the effect I am trying to produce.

Regards,
Graham Weldon








--
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.0 Feature Request - Code view splitter

2006-05-10 Thread Graham Weldon






Thanks for that Sho.

This will do great, until a split-pane feature is available. Thanks for
your help on this.

Regards,
Graham Weldon


Sho Kuwamoto wrote:

  
  
  Hi Graham.
  
  If you follow my steps, you do
get multiple views on the same file which update in real time as you
type. This is the way that Eclipse is designed to work. If you like,
you can also tear off the view and 
  
  As far as I know, Eclipse does not support
split views out of the box, and while we could add it, there would be
significant work involved, which is why we decided to wait untila
later version to tackle this.
  
  Thanks,
  
  -Sho
  
  
  
  
  From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Graham Weldon
  Sent: Tuesday, May 09, 2006 6:16 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Flex 2.0 Feature Request - Code view
splitter
  
  
Thanks for that Sho,
  
Ideally, I would like to to operate as 2 separate views on the same
file.
This would allow me to make changes in working memory, and see the
changes in both panes. I feel that if I attempted your approach, only
one of the panes would represent the current working copy, and hence
would become out of date very quickly as code is edited.
For the moment, I am using dual monitors, with a plain text editor
"EditPlus" to view the second instance of the code, as it prompts me to
refresh when the code has been changed externally to EditPlus.
  
Is the lack of this feature something that is imposed by the Eclipse
base?
Thanks.
  
Regards
Graham Weldon
  
  
  
  
Sho Kuwamoto wrote:
  Hi Graham.

This isn't a perfect solution, but you can open up two separate editor
windows if you like.

1) Right click on the document tab and choose "New Editor"
2) Drag the tab of the newly created editor above (or below) the editor
area. You should get visual feedback that indicates that it will be
docked in a separate area.

Voila! Two views of the same document that can be scrolled separately.

-Sho 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Graham Weldon
Sent: Tuesday, May 09, 2006 5:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2.0 Feature Request - Code view splitter

Hi all,

Not sure where to put this, so I'm posting to the group in the hope
that 
someone will intercept it.

I'm hoping that Flex Builder will eventually come with a code window 
splitter, allowing you to view two parts of the same code file, in 
separate "split" windows. This feature exists on applications like MS 
Word, EditPlus, and a whole range of other applications that have a 
window into the content being edited. This would be really useful 
especially with a large caringorm framework, all your events defined at

the top, and the command initialization at the bottom, its a pain to 
have to scroll up and down constantly to recall the event names.
    
Thanks.

Regards,
Graham Weldon



--
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] XMLSocket communiation (F2b2)

2006-05-10 Thread Graham Weldon



Hi All,

I am trying to communicate with a server that responds to XML document 
requests.

The basic workflow is:

Client Connect
Client Send XML Doc
Server Receive XML Doc
Server Process
Server Send XML Doc2
Client Receive XML doc2
Client Process XML doc2

I cannot seem to find any useful information on the XMLSocket, and how 
to react to data incoming to the client. I can 'send' ok, but I am not 
sure how to receive.

Any thoughts?

Regards,
Graham Weldon









--
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] difficulties accessing tree branches

2006-05-10 Thread Graham Weldon






I use the Change attribute:

mx:Tree
 width="100%" height="100%"
 id="employeeTree"
 dataProvider="{treeHttpSrv.result}"
 change="onClick(employeeTree);"/

I hope this helps somewhat :-)

Regards,
Graham Weldon.



Alin DICU wrote:
Hi,
  
I'm having problemes accessing clicked branches in trees. I tried many 
thing but I keep stumbling on undefined items.
  
Here are pices of my code:
  
- the UI tree component 
---
mx:Tree id="employeeTree" dataProvider="{treeHttpSrv.result}" 
width="100%" nodeOpen="dataController.onTreeClick(employeeTree)" 
height="100%"/
  
--- the httpservice which works 

 mx:HTTPService
 id="treeHttpSrv"
 concurrency="multiple"
 method="GET"
 url=""http://localhost:8084/FlexXMLServer/XMLTreeElementsServlet">http://localhost:8084/FlexXMLServer/XMLTreeElementsServlet"
 showBusyCursor="true"
 fault="alert(event.fault.faultstring);"/
  
- the format of the XML object send by 
the servlet-
  
Albums
 labelAlbums/label
 nomAlbum
 labelBMW/label
 nomPhoto
 labelBMW 325ci 1994/label
 urlPhotohttp://localhost:8080/FlexXMLServer/Photos/BMW/BMW
  
325ci 1994.jpeg/urlPhoto
 /nomPhoto
 /nomAlbum
/Albums
  
--- the DataController function 
---
  
public function onTreeClick(event):Void
{
 trace(event.selectedItem);
}
  
It seems I can't get a proper handler on the tree so I can extract the 
urlPhoto attriburte from the xml.
  
Could someone please redirect me to some working examples or give some
tips?
  
Thank,
  









--
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] Cairngorm Sample Store

2006-05-10 Thread Graham Weldon






The sample ships with Cairngorm v 0.99
http://www.iterationtwo.com/open_source_cairngorm.html

Regards,
Graham Weldon




stefan_schmalhaus wrote:
I'm reading
Steven Webster's six part series on Cairngorm at the
moment. Are the Flex files for the sample store ("Cairngorm Store")
available for download? 
  
  
  
  
  









--
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] Flex 2.0 Feature Request - Code view splitter

2006-05-09 Thread Graham Weldon



Hi all,

Not sure where to put this, so I'm posting to the group in the hope that 
someone will intercept it.

I'm hoping that Flex Builder will eventually come with a code window 
splitter, allowing you to view two parts of the same code file, in 
separate split windows. This feature exists on applications like MS 
Word, EditPlus, and a whole range of other applications that have a 
window into the content being edited. This would be really useful 
especially with a large caringorm framework, all your events defined at 
the top, and the command initialization at the bottom, its a pain to 
have to scroll up and down constantly to recall the event names.

Thanks.

Regards,
Graham Weldon






--
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] Caringorm with f2b3 issues

2006-05-09 Thread Graham Weldon






Hi All,

Currently i am implementing the caringorm framework into an application
I am building, and I have managed to layout the basics of my front
controller, commands and other events. I have then attempted to include
the controller as described in Steven Websters notes on the framework
(i have included my code below).

It is reporting the following errors:

1 . Definition com.objectconnections.mypackage:ClientController could
not be found.
2 . Type was not found or was not a compile-time constant:
ClientController.

Any help at all would be appreciated.

Kind Regards,
Graham Weldon



/MyProject.mxml

mx:Application
 layout="absolute"
 xmlns:mx="http://www.adobe.com/2006/mxml"
 xmlns:control="com.objectconnections.mypackage.*"

 control:ClientController
id="controller"/

/mx:Application




/com/objectconnections/mypackage/ClientController.as

package com.objectconnections.mypackage
{
 import org.nevis.caringorm.control.FrontController;

 public class ClientController extends
FrontController
 {
 public static var EVENT_OPEN
= "open";
  public static var EVENT_CLOSE = "close";
  public static var EVENT_EXIT
= "exit";

  public function ClientController() : void
  {
  this.setupCommands();
  }

 private function setupCommands() : void
  {
  // Nothing here yet, we'll do a bunch
of
   // this.addCommand()'s once we get the basics
// compiling and working.
  }
 }
}



















--
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] Flex Component Directory - wiki online

2006-05-07 Thread Graham Weldon



Hi all,

The wiki as promised is up and online, some basic information is already 
in there.
If anyone has anything to contribute to the project, please let me know, 
and I can create an account.

Bookmark the link, and check back regularly, I will be making updates 
furiously for the next few weeks until we can flesh out a complete spec 
for the project. At that point development will begin. Looking forward 
to making some progress.

Regards,
Graham Weldon






--
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 Component Directory - wiki online

2006-05-07 Thread Graham Weldon







Touche! Sorry about that, in my frenzy, I forgot the link:

http://graham.weldon.ath.cx/wiki

Regards,
Graham Weldon



Michael Schmalle wrote:
what link? ;-)
  
Peace, Mike
  
  On 5/7/06, Graham
Weldon [EMAIL PROTECTED]
wrote:
  
Hi all,

The wiki as promised is up and online, some basic information is
already 
in there.
If anyone has anything to contribute to the project, please let me
know, 
and I can create an account.

Bookmark the link, and check back regularly, I will be making updates 
furiously for the next few weeks until we can flesh out a complete spec

for the project. At that point development will begin. Looking forward 
to making some progress.

Regards,
Graham Weldon



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





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



  










Re: [flexcoders] Measure multiline text

2006-05-06 Thread Graham Weldon






Hi Sergio,

If you are after resizing to the size of the text within the field,
that can be achieved.

I have created a ScriptEditor ActionScript component that is
essentially 2 side-by-side text areas.
The leftmost area contains the line numbers, and the right area
contains the script being edited.

To ensure that the line numbers are updated each time, I have the
following function:


-
public function getNumberOfLines() : int
{
 var lineCount : int = 1;
 var currentChar : String = '';

 for (var i : int = 0; i 
this.scriptArea.length; ++i)
 {
  currentChar =
this.scriptArea.text.charAt(i);
  if (currentChar == '\n' ||
currentChar == '\r')
   ++lineCount;
 }

 return lineCount;
}
-

You could use the result of this function to resize your text area,
based on some pixel multiple of the number of lines used in the text
area.


Regards,
Graham Weldon




sergio_trejo_r wrote:
Is there a
way in Flash to measure the height of multiline text
assuming that the width is fixed. I need a procedure to autosize a
TextArea control where the width of the control is fixed but the
height is resized to fit the contents.
  
I read about the measureText method but it is documented to work only
with single line text.
  
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.



  










Re: [flexcoders] Re: Please Help. Http Service WTH

2006-05-03 Thread Graham Weldon






Hi Faisal,

Personally, due to the security restrictions and sandboxing of the
Flash player, I prefer to use a proxy method for HTTPServices:

---
MXML File
---

mx:Script
 ![CDATA[

  public function sendService()
  {
   var parameters : Object = new Object();
   parameters.url = "">
   /*
   * Alternatively, the URL parameter could be:
   * parameters.url = '' +
textInput.text + '/thing/here/doc.html';
   */
   parameters.myParam_x = textInput2.text;
   parameters.myParam_y = textInput3.text;
   parameters.myParam_z = textInput4.text;

   myService.send(parameters);
  }

  public function processServiceResult(_event : Event) :
void
  {
   //
   // This would process the result of the HTTPService call
somehow
   //
  }

 ]]
/mx:Script

mx:HTTPService
 id="myService"
 url=""
 resultFormat="e4x"
 result="processServiceResult(event)"/

!-- URL Field --
mx:TextInput id="textInput"/

!-- Parameter Fields --
mx:TextInput id="textInput2"/
mx:TextInput id="textInput3"/
mx:TextInput id="textInput4"/

!-- Button to activate the service --
mx:Button click="sendService();"/

===



---
PHP File - myProxy.php
---

?
 // Grab the specified URL
 $url = "">

 $start = true;

 for ($_REQUEST as $key = $value)
 {
  // If the parameter name starts with 'myParam'
  if (substr($key, 8) == 'myParam_')
  {
   if ($start)
{
$start = false;
$url .= '?';
}
   else
{
$url .= '';
   }

   // Add the parameter to the URL String
   $url .= $key . '=' . $value;
  }
 }

 // Set the content type
 header('Content-type: text/xml');

 // Open a connection to the specified URL
 $handle = fopen($url, 'r');
 if (!$handle)
  die('errorFailed to open URL/error');

 // Collect the result
 while (!feof($handle))
  $result .= fread($handle, 8192);

 // display the result
 die($result);
?

===


This method is a little longwinded. But the "myProxy.php" is generic
enough to work for any project, and should work for any HTTPService
that you need. This allows you to have a dynamic HTTPService accessing
any resource.

Drop me an email if you have any issues with this sample (The code is
from my head, not a working copy)


Regards,
Graham Weldon






Faisal Abid wrote:
Okay i
see where your going at , so how would i call BuildMyUrl , like 
so i made teh function and then i made trhe service and then i made the
  
textinput , where do i put BuildMyURL(textinput.text) (and is it
normail 
brakets or curly) , im sorry if this is an easy question, im sort of 
really stressed out and stumped.
  
  
Doug Lowder wrote:
 Try binding the entire url property to a variable that you build in
 code:

 var myUrl: String = "";
 function buildMyUrl(s: String) {
 myUrl = "http://something.com/api/someting/"
+
 s + "/somethingelse/something";
 }

 mx:HTTPService url="" ... /


 Then just call "buldMyUrl(textinput.text)" somewhere, such as the
 click handler for a button or just before you call your
 httpservice's send() method.


 --- In flexcoders@yahoogroups.com, Faisal Abid [EMAIL PROTECTED]
wrote:
 
  Okay so for the past 4 hours + 3 hours at night ive been
debugging
 my
  application only to come to the conclusion that in a
httpservice
 url i
  cannot do this
 
  mx:httpservice
  url=""http://something.com/api/someting/">http://something.com/api/someting/
 {textinput.text}/somethingelse/something"
 
  The httpservice is fine , i test it in a broswer by replacijng
  texinput.txt to something and it returns what its ment to ,
but in
 flex
  it gives me an error saying i must defind a url, I mean it is
 defined ,
  i know there is a workaround to  by puttin amp; But
What the hec
 is
  wrong with my url??
 






 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ
  
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw
  
  Software design and develo

Re: [flexcoders] Re: Flex Component Directory

2006-05-02 Thread Graham Weldon






Hi Manish,

Feature 1 will definitely be available.
You will be able to voice you opinion in a few ways:
1) Rating 1-5 or 1-10
2) Forums specific to that component/project
3) Bug tracking
4) Feature requests

As for paid components, quite a number of people have asked me to
provide this functionality.. So its going to become part of the initial
build.
I will have to give some consideration of how to handle payments, or
whether that should be handled directly through PayPal etc.
That will require some more thought!

Keep in touch regarding this, I may need some suggestions in the future.


Regards,
Graham Weldon


Manish Jethani wrote:
On 5/2/06, Graham Weldon
[EMAIL PROTECTED] wrote:
  
 It would be a model of the SourceForge approach of project posting
and
 hosting.
  
Two things would be nice to have:
  
1) A way for users to rate a component and leave comments about it
  
2) The ability to have paid-for (not free of charge) components,
open-source or otherwise
  
Manish









--
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] Has anyone successfully put one TabNavigator inside another? (Flex 2)

2006-05-02 Thread Graham Weldon



Hi rigidcode,

The following code works fine, and is the solution ot your previous post 
about using TabNavigators in ActionScript:

---
package NestedTabs {
 import mx.containers.Canvas;
 import mx.containers.TabNavigator;
 import mx.events.FlexEvent;
 import mx.controls.Label;
 import flash.system.Security;

 public class NestedTabs extends Canvas
 {
 private var tn1 : TabNavigator;
 private var tn2 : TabNavigator;

 private var tn1tab1 : Canvas;
 private var tn1tab2 : Canvas;
 private var tn2tab1 : Canvas;
 private var tn2tab2 : Canvas;
 
 public function NestedTabs() : void
 {
 super();

 // Fire the __onCreationComplete event when the component 
has been created.
 this.addEventListener(FlexEvent.CREATION_COMPLETE, 
__onCreationComplete);
 
 Security.allowDomain(new Array(10.5.0.56));
 }
 
 private function __onCreationComplete(_event : FlexEvent) : void
 {
 var tn1 : TabNavigator = new TabNavigator();
 tn1.percentHeight = 100;
 tn1.percentWidth = 100;
 
 var tn1tab1 : Canvas = new Canvas();
 tn1tab1.label = Welcome;
 tn1.addChild(tn1tab1);
 
 var tn1tab2 : Canvas = new Canvas();
 tn1tab2.label=Hello;
 tn1.addChild(tn1tab2);
 
 var tn2 : TabNavigator = new TabNavigator();
 tn2.percentHeight = 100;
 tn2.percentWidth = 100;
 
 var tn2tab1 : Canvas = new Canvas();
 tn2tab1.label = wefwe;
 tn2.addChild(tn2tab1);
 
 var tn2tab2 : Canvas = new Canvas();
 tn2tab2.label = wefwe333;
 tn2.addChild(tn2tab2);
 
 tn1tab1.addChild(tn2);
 
 this.addChild(tn1);
 this.setVisible(true);
 }
 }
}
---

Regards,
Graham Weldon



rigidcode wrote:
 In Flex 2, has anyone put a TabNavigator onto the Canvas of a tab of
 another TabNavigator (in Actionscript, not mxml)? Without a fatal
 exception being thrown when you change tabs on either TabNavigator? 

 I don't find anyone else with this problem when I search. It seems
 like something a lot of people would run into, if they use more than
 one tabnavigator in the same app..






 --
 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 
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ 
  Computer software development 
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw 
  Software design and development 
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 

 Macromedia flex 
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw 
  Software development best practice 
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw 



 
 YAHOO! GROUPS LINKS

 * Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders on the web.
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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