[flexcoders] Re: flexlib enhancedButtonSkin causes blank Design mode

2009-08-19 Thread Mic
Fixed this by repeatedly toggling F4 - Show Surrounding Containers - screen 
eventually draws layout. Not sure why but glad it does  :-)

--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 Using this skin stops design mode from showing layout, which I need as this 
 layout is extremely complicated. Interested to know why this happens and if 
 there is a solution. TIA,
 
 Mic.





[flexcoders] How to force construction when creationPolicy=all' does not work?

2009-08-19 Thread Mic
ViewStack.vsMainDash
  VBox.vbDrctrDash 
  VBox.vbParmsAndDrills
  ViewStack.vsDashDrills
 VBox.CustLevel
 VBox.UDAC

is the hierarchy. Run code 

vsMainDash.selectedChild = vbParmsAndDrills;
vsDashDrills.selectedChild = vbCustLevel; ** null reference error

Debug at line that errors does show vsDashDrills = null, whereas vsMainDash = 
ViewStack. I have tried splattering creationPolicy=all' everywhere - of course 
if I do this too high up I start getting null reference errors there.

(If I OK the error the app does continue with everything displayed correctly so 
Flex does create what it should.)

If creationPolicy=all' does not work, how do I force the ViewStack 
vsDashDrills into existence? TIA,

Mic.





[flexcoders] flexlib enhancedButtonSkin causes blank Design mode

2009-08-18 Thread Mic
Using this skin stops design mode from showing layout, which I need as this 
layout is extremely complicated. Interested to know why this happens and if 
there is a solution. TIA,

Mic.



[flexcoders] communicating between SharePoint and Flex?

2009-08-12 Thread Mic
Specifically I need to take the logged in user info from the UserControl web 
part and get it into the Flex app which is sitting in a PageViewer webpart. 
Generally I want to learn as much as I can about SP to Flex communication 
because I think there is a tremendous opportunity for Flex developers to embed 
Flex apps into SharePoint pages ... Flex works :-).

Any pointers towards how to communicate between SP and Flex would be much 
appreciated. Google has not come up with any real examples yet. TIA,

Regards,

Mic.



[flexcoders] Re: tree not expanding with expandItem()

2009-07-10 Thread Mic
Thanks Tracy!

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 When you assign a dataProvider programmatically, you need to wait for the
 control to update before attempting to interact with the visual elements,
 like node expanding.
 
  
 
 Use callLater to delay the expand code.
 
  
 
 I have an example on www.cflex.net http://www.cflex.net/  if you need it.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mic
 Sent: Wednesday, July 08, 2009 12:53 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] tree not expanding with expandItem()
 
  
 
 
 
 
 
 
 collSearchHierarchy = new XMLListCollection(procXML);
 treeSrchHrchy.expandItem(collSearchHierarchy.getItemAt(0), true);
 
 Tree is staying collapsed and not expanding. Interesting that stepping
 through above, treeSrchHrchy.openItems is null before the .expandItem() and
 does show the top node in the openItems array after setting expandItem().
 Which would suggest that expandItem is working but the display is not
 displaying it? Adding a 
 
 treeSrchHrchy.invalidateDisplayList(); does not help. TIA,
 
 Mic.





[flexcoders] Stop tree to tree drag and drop from adding node?

2009-07-10 Thread Mic
Cannot find a preDrop() type method. It seems like the dropped leaf/node is 
added by the time I get into the target tree dragDrop handler. Based on 
comparing XML attributes in source and target nodes I need to stop a drop :-) 
At the moment I am having to go through the target tree looking for the dropped 
node and delete it - a pain. Can I stop it being added in the first place. As 
always, TIA,

Mic.



[flexcoders] tree not expanding with expandItem()

2009-07-07 Thread Mic
collSearchHierarchy = new XMLListCollection(procXML);
treeSrchHrchy.expandItem(collSearchHierarchy.getItemAt(0), true);

Tree is staying collapsed and not expanding. Interesting that stepping through 
above, treeSrchHrchy.openItems is null before the .expandItem() and does show 
the top node in the openItems array after setting expandItem(). Which would 
suggest that expandItem is working but the display is not displaying it? Adding 
a 

treeSrchHrchy.invalidateDisplayList(); does not help. TIA,

Mic.



[flexcoders] Re: item renderer in ComboBox not consistent

2009-07-02 Thread Mic
Thanks valdhor - great solution! I had got this far but was using a textInput 
and its background color, and even though I had

editable=false;
enabled=false;

the cursor would go into the row. Not good. Question: I had to modify to

g.beginFill(0xE8E8E3, 0.5);

otherwise the line highlight would not show through and could not tell what 
line was highlighted. It surprised me that a renderer was capable of doing this.

Thanks again,

Mic.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Try the following as a starting point...
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  mx:ComboBox itemRenderer=MyLabel
  mx:dataProvider
   mx:String*United States/mx:String
   mx:StringAustralia/mx:String
   mx:StringEngland/mx:String
   mx:String*Ireland/mx:String
   mx:String*Scotland/mx:String
   mx:StringWales/mx:String
  /mx:dataProvider
  /mx:ComboBox
 /mx:Application
 
 MyLabel.as:
 package
 {
  import flash.display.Graphics;
  import mx.controls.Label;
 
  public class MyLabel extends Label
  {
  public function MyLabel()
  {
  super();
  }
 
  override public function set data(value:Object):void
  {
  if(value != null)
  {
  super.data = value;
  text = value as String;
  }
  }
 
  override protected function
 updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
  {
  super.updateDisplayList(unscaledWidth, unscaledHeight);
  var g:Graphics = graphics;
  g.clear();
  if(text.substr(0,1) == *)
  {
  g.beginFill(0xE8E8E3);
  }
  else
  {
  g.beginFill(0xFF);
  }
  g.drawRect(-2, -2, unscaledWidth + 4, unscaledHeight + 4);
  g.endFill();
  }
  }
 }
 
 
 
 
 --- In flexcoders@yahoogroups.com, Mic chigwell23@ wrote:
 
  I thought this might work --- fine until I start scrolling when it
 gets totally out of wack. The trace does fire occasionally while
 scrolling but not consistently. Appreciate some hints. TIA,
 
  Mic.
 
  ?xml version=1.0 encoding=utf-8?
  mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 horizontalScrollPolicy=off
   mx:Script
![CDATA[
  private function labelComplete():void{
trace(Here);
if(label1.text.substr(0,1) == *){
   this.setStyle(backgroundColor, 0xe8e8e3);
  }else{
   this.setStyle(backgroundColor, 0xFF);
  }
  }
]]
   /mx:Script
  mx:Label id=label1 text={data.cmplx_nm}   
 creationComplete=labelComplete()  /
  /mx:VBox
 





[flexcoders] Re: item renderer in ComboBox not consistent

2009-07-01 Thread Mic
Hi Jeff, what this does is set the background color of the renderer's VBox and 
therefore the line shading to gray if the label text begins with an asterisk 
 we want to highlight these paricular rows in the list. I know what you are 
saying about creationComplete() only running once, but I was thinking the 
renderer would have to redo itself on a scroll because the viewable area had 
changed.

--- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote:

 
  It looks like you are trying to change the background color of the 
 label so that you have alternating colors, is that correct? 
  This won't work due to render recycling.  Renderers are re-used.  There 
 is not a single renderer for every item in your dataProvider.  
 CreationComplete complete only runs once. 
 
  You might try code like this on the dataChange event.  Or using 
 updateComplete. 
 
  Or google it and discover the alternatingItemColors style: 
 http://blog.flexexamples.com/2007/08/17/alternating-row-colors-in-a-flex-list-control/
 
 Mic wrote:
  I thought this might work --- fine until I start scrolling when it gets 
  totally out of wack. The trace does fire occasionally while scrolling but 
  not consistently. Appreciate some hints. TIA,
 
  Mic.
 
  ?xml version=1.0 encoding=utf-8?
  mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; 
  horizontalScrollPolicy=off
  mx:Script
  ![CDATA[
  private function labelComplete():void{
  trace(Here);
  if(label1.text.substr(0,1) == *){
  this.setStyle(backgroundColor, 0xe8e8e3);
  }else{
  this.setStyle(backgroundColor, 0xFF);
  }   
  }   
  ]]
  /mx:Script
  mx:Label id=label1 text={data.cmplx_nm}
  creationComplete=labelComplete()  /
  /mx:VBox
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location: 
  https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 
 

 
 -- 
 Jeffry Houser, Technical Entrepreneur
 Adobe Community Expert: http://tinyurl.com/684b5h
 http://www.twitter.com/reboog711  | Phone: 203-379-0773
 --
 Easy to use Interface Components for Flex Developers
 http://www.flextras.com?c=104
 --
 http://www.theflexshow.com
 http://www.jeffryhouser.com
 --
 Part of the DotComIt Brain Trust





[flexcoders] item renderer in ComboBox not consistent

2009-06-30 Thread Mic
I thought this might work --- fine until I start scrolling when it gets totally 
out of wack. The trace does fire occasionally while scrolling but not 
consistently. Appreciate some hints. TIA,

Mic.

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalScrollPolicy=off
mx:Script
![CDATA[
private function labelComplete():void{
trace(Here);
if(label1.text.substr(0,1) == *){
this.setStyle(backgroundColor, 0xe8e8e3);
}else{
this.setStyle(backgroundColor, 0xFF);
}   
}   
]]
/mx:Script
mx:Label id=label1 text={data.cmplx_nm}
creationComplete=labelComplete()  /
/mx:VBox



[flexcoders] Re: Flex error when AdvancedDataGrid made too small.

2009-06-19 Thread Mic
Cool - I will try this  I had tried the visible=false but I left it in 
the Layout. After further investigation I narrowed this down to the fact that I 
am using the advanced datagrid footer extensions that are available - Alex's I 
think with a couple of tweeks - and the error is in 
AdvancedDataGridBaseEx.as/protected function drawColumnBackground where var 
lastRow:Object = rowInfo[listItems.length - 1]; resolves to null and causes 
problems downstream when calculating height  includeInLayout = false will 
be a lot easier than resolving the above ... fingers crossed.

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Instead of setting height and width of a component to 0, try setting visible 
 property to false and includeInLayout property to false.
 
 
 --- In flexcoders@yahoogroups.com, Mic chigwell23@ wrote:
 
  In an application where 8 panels exist on the screen with each panel 
  containing a chart or an advanced datagrid (corporate dashboard), any 
  portlet can be zoomed to fill the whole screen, and I was doing this by 
  setting height and width of the other 5 to 0. Trying to debug the error I 
  was getting, I discovered that if you make an AdvancedDataGrid less than 
  about 40 (cannot remember exact cutoff) Flex gives an error of:
  
  TypeError: Error #1009: Cannot access a property or method of a null object 
  reference.
  at 
  mx.controls::AdvancedDataGridBaseEx/drawColumnBackground()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\controls\AdvancedDataGridBaseEx.as:3503]
   etc.
  
  It looks like it is too small to draw - Alice would tell it that it took 
  the wrong pill :-)
  
  Is there a way around this? TIA,
  
  Mic
 





[flexcoders] Flex error when AdvancedDataGrid made too small.

2009-06-18 Thread Mic
In an application where 8 panels exist on the screen with each panel containing 
a chart or an advanced datagrid (corporate dashboard), any portlet can be 
zoomed to fill the whole screen, and I was doing this by setting height and 
width of the other 5 to 0. Trying to debug the error I was getting, I 
discovered that if you make an AdvancedDataGrid less than about 40 (cannot 
remember exact cutoff) Flex gives an error of:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
at 
mx.controls::AdvancedDataGridBaseEx/drawColumnBackground()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\controls\AdvancedDataGridBaseEx.as:3503]
 etc.

It looks like it is too small to draw - Alice would tell it that it took the 
wrong pill :-)

Is there a way around this? TIA,

Mic




[flexcoders] Disabling grid does not disable column check box?

2009-06-09 Thread Mic
In a very conventional corporate app with View, Insert, Edit, Delete
modes, certain datagrids must be view only in Edit mode. It really
surprises me that on a datagrid, with editable=false, enabled=false,
selectable=false, the checkboxes in a grid column can still be clicked.
I am creating the checkboxes with:

mx:DataGridColumn id=dgcRmv headerText=Remove width=100
mx:itemRenderer
   mx:Component
  mx:CheckBox
 selected={data.rmvDir == 'true'} paddingLeft=10
 labelPlacement=right
 change=outerDocument.cbRmvDirHandler(event)/
  /mx:Component
/mx:itemRenderer
/mx:DataGridColumn

With everything turned off on the grid, the cb can be checked and the
handler runs. Appreciate a solution to this. TIA,

Mic.






[flexcoders] Re: Disabling grid does not disable column check box?

2009-06-09 Thread Mic
Just found I can stop it dead with an enabled=false on the cb itself:

mx:CheckBox
 selected={data.rmvDir == 'true'} paddingLeft=10 enabled=false

but I cannot get to the checkbox with actionscript because Flex will not
let me give the checkbox an id to reference it with ...

mx:CheckBox id=cbRmv = id attribute is not allowed on the root tag of
a component ...

if the solution is me having to individually disable the 11 checkbox
columns on the 3 grids, how can I reference them? I suppose I could bind
i.e. enabled = {mode=='VIEW'} but curious on the AS reference,

  TIA,

Mic.



--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 In a very conventional corporate app with View, Insert, Edit, Delete
 modes, certain datagrids must be view only in Edit mode. It really
 surprises me that on a datagrid, with editable=false, enabled=false,
 selectable=false, the checkboxes in a grid column can still be
clicked.
 I am creating the checkboxes with:

 mx:DataGridColumn id=dgcRmv headerText=Remove width=100
 mx:itemRenderer
mx:Component
   mx:CheckBox
  selected={data.rmvDir == 'true'} paddingLeft=10
  labelPlacement=right
  change=outerDocument.cbRmvDirHandler(event)/
   /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn

 With everything turned off on the grid, the cb can be checked and the
 handler runs. Appreciate a solution to this. TIA,

 Mic.





[flexcoders] Re: Gumbo - new namespaces - mx:Script error

2009-05-23 Thread Mic
Thanks all - fx:Script does the trick

--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 Assuming that the latest namespace changes point to this standard:
 
 ?xml version=1.0 encoding=utf-8?
 s:Application name=GumboApp
 xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/halo
 
 mx:Script
![CDATA[
//ActionScript statements
]]
  /mx:Script
 
 Why does mx:Script give a
 
 Could not resolve mx:Script to a component implementation?
 
  What does work in the way of code completion does pop up mx:Script, and 
 Gumbo Lang Refs still lists mx:Script. TIA,
 
 Mic.





[flexcoders] What happened to filter.animationProperties[ ] in latest Gumbo sdk?

2009-05-23 Thread Mic
In process of updating pixelBender and filter code to latest SDK ...

animFltr1.animationProperties  = [new AnimationProperty(amount, 1), new 
AnimationProperty(colorR, 1,0xFF)]

used to be the syntax.  In latest sdk the mxml is like this:

mx:AnimateProperty property=color fromValue=0 toValue=0xFF/
mx:AnimateProperty property=distance fromValue=0 toValue=10/

but what is the ActionScript now animationProperties[ ] seems to have 
disappeared? TIA,

Mic.





[flexcoders] Re: What happened to filter.animationProperties[ ] in latest Gumbo sdk?

2009-05-23 Thread Mic
Just noticed that the mxml example I used mx:AnimateProperty has fromValue 
and toValue hardcoded so would not work with custom PixelBender filters.

--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 In process of updating pixelBender and filter code to latest SDK ...
 
 animFltr1.animationProperties  = [new AnimationProperty(amount, 1), new 
 AnimationProperty(colorR, 1,0xFF)]
 
 used to be the syntax.  In latest sdk the mxml is like this:
 
 mx:AnimateProperty property=color fromValue=0 toValue=0xFF/
 mx:AnimateProperty property=distance fromValue=0 toValue=10/
 
 but what is the ActionScript now animationProperties[ ] seems to have 
 disappeared? TIA,
 
 Mic.





[flexcoders] Gumbo - new namespaces - mx:Script error

2009-05-22 Thread Mic
Assuming that the latest namespace changes point to this standard:

?xml version=1.0 encoding=utf-8?
s:Application name=GumboApp
xmlns:fx=http://ns.adobe.com/mxml/2009;
xmlns:s=library://ns.adobe.com/flex/spark
xmlns:mx=library://ns.adobe.com/flex/halo

mx:Script
   ![CDATA[
   //ActionScript statements
   ]]
 /mx:Script

Why does mx:Script give a

Could not resolve mx:Script to a component implementation?

 What does work in the way of code completion does pop up mx:Script, and 
Gumbo Lang Refs still lists mx:Script. TIA,

Mic.




[flexcoders] extract function name from Function instance?

2009-05-14 Thread Mic
private var sqlCall:Function;
sqlCall = sql_sel_hier_sls;

private function sqlSwitch():void{
   var identifyFunction:String = [extract funct name from sqlCall];   
   sqlCall();

}

private function sql_sel_hier_sls():void{

}

How do I extract the function name from the Function instance for 
debugging/tracing? TIA,

Mic.



[flexcoders] Re: Tracy's search tree solution question ...

2009-05-13 Thread Mic
Thanks Tracy, as always much appreciated.

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 Perhaps you should set the selectedItems array instead.
 
 treeSlsHrchy.selectedItems.push( xmllistDescendants[i]);
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mic
 Sent: Monday, May 11, 2009 10:17 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Tracy's search tree solution question ...
 
  
 
 
 
 
 
 
 http://www.cflex. http://www.cflex.net/showFileDetails.cfm?ObjectID=554
 net/showFileDetails.cfm?ObjectID=554
 
 I got the example to work perfectly, but in my code where the xml is more
 complex, it only selects/highlights the last match. allowMultipleSelection =
 true but when I step through I can see that the array tree.selectedItems
 only holds the last
 
 treeSlsHrchy.selectedItem = xmllistDescendants[i];
 
 which overwrites the previous entry i.e. the array is always a single row.
 In the example debug I can see the selectedItem array build up line by line
 as the loop loops. So I went back to the example and altered the xml from
 
 element eid=graham/
 element eid=weldon
 
 to
 
 element eid=graham id=6/
 element eid=weldon id=7
 
 and the example now only highlights/selects the last match i.e. the
 selectedItems array refuses to hold more than a single row. Why does the
 extra xml do this? Inquiring minds etc :-) TIA,
 
 Mic.





[flexcoders] Re: Tracy's search tree solution question ...

2009-05-13 Thread Mic
treeSlsHrchy.selectedItems.push( xmllistDescendants[i]); puts nothing in the 
selectedItems array i.e. nodes are opened but nothing selected. Modified the 
original example with this and it behaves the same. So the extra xml I added

element eid=graham id=6/ replacing

element eid=graham/ is doing something I do not understand. Would it be OK 
to post the code here? TIA,

Mic.



--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 Thanks Tracy, as always much appreciated.
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  Perhaps you should set the selectedItems array instead.
  
  treeSlsHrchy.selectedItems.push( xmllistDescendants[i]);
  
   
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of Mic
  Sent: Monday, May 11, 2009 10:17 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Tracy's search tree solution question ...
  
   
  
  
  
  
  
  
  http://www.cflex. http://www.cflex.net/showFileDetails.cfm?ObjectID=554
  net/showFileDetails.cfm?ObjectID=554
  
  I got the example to work perfectly, but in my code where the xml is more
  complex, it only selects/highlights the last match. allowMultipleSelection =
  true but when I step through I can see that the array tree.selectedItems
  only holds the last
  
  treeSlsHrchy.selectedItem = xmllistDescendants[i];
  
  which overwrites the previous entry i.e. the array is always a single row.
  In the example debug I can see the selectedItem array build up line by line
  as the loop loops. So I went back to the example and altered the xml from
  
  element eid=graham/
  element eid=weldon
  
  to
  
  element eid=graham id=6/
  element eid=weldon id=7
  
  and the example now only highlights/selects the last match i.e. the
  selectedItems array refuses to hold more than a single row. Why does the
  extra xml do this? Inquiring minds etc :-) TIA,
  
  Mic.
 





[flexcoders] Tracy's search tree solution question ...

2009-05-11 Thread Mic
http://www.cflex.net/showFileDetails.cfm?ObjectID=554

I got the example to work perfectly, but in my code where the xml is more 
complex, it only selects/highlights the last match. allowMultipleSelection = 
true but when I step through I can see that the array tree.selectedItems only 
holds the last

treeSlsHrchy.selectedItem = xmllistDescendants[i];

which overwrites the previous entry i.e. the array is always a single row. In 
the example debug I can see the selectedItem array build up line by line as the 
loop loops. So I went back to the example and altered the xml from

element eid=graham/
element eid=weldon

to

element eid=graham id=6/
element eid=weldon id=7

and the example now only highlights/selects the last match i.e. the 
selectedItems array refuses to hold more than a single row. Why does the extra 
xml do this? Inquiring minds etc :-) TIA,

Mic.



[flexcoders] drag drop tree to tree onto node, not between nodes

2009-05-10 Thread Mic
Will Flex recognize a drop onto a node? The visual position bar when moving the 
drop up and down the destination tree displays between nodes. When we first add 
a mgr to the HR tree, that mgr is a leaf. Want to trap a drop directly onto the 
mgr so can turn him/her into a branch and add people reporting to him/her. 
Cannot drop beneath as that would be a legal peer. TIA,

Mic.



[flexcoders] Re: drag drop tree to tree onto node, not between nodes

2009-05-10 Thread Mic
Thanks Tracy - for the moment I am having to put a Peer/Child radio button 
group so I know what the user wants to do. Next question :-)

New mgr is a leaf, rb set to child, rep dropped below mgr ... need to change 
mgr to branch with new rep as leaf. Does one manipulate the xml to do this and 
then invalidate something so the tree reconfigures itself, or does one 
manipulate the tree gui? Thanks,

Mic.


--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 I hope someone has a solution for this, I do not.  The tree drop feedback
 lines will show above or below a child node, and will get longer to indicate
 a drop point at the level above those, but I have found no way to drop a
 first child node onto an empty node.
 
  
 
 Now, I have not researched this in the last year, so maybe someone will have
 a fix.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mic
 Sent: Sunday, May 10, 2009 2:08 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] drag drop tree to tree onto node, not between nodes
 
  
 
 
 
 
 
 
 Will Flex recognize a drop onto a node? The visual position bar when moving
 the drop up and down the destination tree displays between nodes. When we
 first add a mgr to the HR tree, that mgr is a leaf. Want to trap a drop
 directly onto the mgr so can turn him/her into a branch and add people
 reporting to him/her. Cannot drop beneath as that would be a legal peer.
 TIA,
 
 Mic.





[flexcoders] Re: drag drop tree to tree onto node, not between nodes

2009-05-10 Thread Mic
Think I answered this myself - isBranch looks like it will turn the leaf into 
branch, which is exactly what I need to do.

--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 Thanks Tracy - for the moment I am having to put a Peer/Child radio button 
 group so I know what the user wants to do. Next question :-)
 
 New mgr is a leaf, rb set to child, rep dropped below mgr ... need to change 
 mgr to branch with new rep as leaf. Does one manipulate the xml to do this 
 and then invalidate something so the tree reconfigures itself, or does one 
 manipulate the tree gui? Thanks,
 
 Mic.
 
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  I hope someone has a solution for this, I do not.  The tree drop feedback
  lines will show above or below a child node, and will get longer to indicate
  a drop point at the level above those, but I have found no way to drop a
  first child node onto an empty node.
  
   
  
  Now, I have not researched this in the last year, so maybe someone will have
  a fix.
  
   
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of Mic
  Sent: Sunday, May 10, 2009 2:08 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] drag drop tree to tree onto node, not between nodes
  
   
  
  
  
  
  
  
  Will Flex recognize a drop onto a node? The visual position bar when moving
  the drop up and down the destination tree displays between nodes. When we
  first add a mgr to the HR tree, that mgr is a leaf. Want to trap a drop
  directly onto the mgr so can turn him/her into a branch and add people
  reporting to him/her. Cannot drop beneath as that would be a legal peer.
  TIA,
  
  Mic.
 





[flexcoders] session pooling with Flex/SQLServer w/o ColdFusion?

2009-05-09 Thread Mic
All of our business logic is within stored procedures so we do not need 
ColdFusion logic. We bought one of the Flex webservices (FlexSQL) to get 
started, but this is single-threaded. Is it possible to create a pool of 
webservices? Not sure how how one would bundle them as they would have no 
knowledge of each other. Any ideas greatly appreciated.

Mic.





[flexcoders] Re: Setting dateField.SelectedDate when component is disabled?

2009-04-24 Thread Mic
If I leave the dateField objects enabled:

mx:DateField id=dtCmplxStartDate  enabled=true /

then from the function:

dtCmplxStartDate.selectedDate = tempStrtDt;

the gui shows the date in the textInput part of the dateField component. All I 
have to change is

mx:DateField id=dtCmplxStartDate  enabled=false/

and

dtCmplxStartDate.selectedDate = tempStrtDt;

does not show date in gui.

Mic.









--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 What happens?  How are you sure the dates are not being set?  What happens
 if you do this after setting a date:
 
 Trace(dtCmplxStartDate.toDateString(0);
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mic
 Sent: Thursday, April 23, 2009 10:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Setting dateField.SelectedDate when component is
 disabled?
 
  
 
 
 
 
 
 
 In a modal View state the dateFields are disabled but I need to populate
 them for the current record. I can stick my proc values in when they are
 enabled, but not when disabled. I tried
 
 dtCmplxStartDate.enabled = true;
 dtCmplxStartDate.selectedDate = tempStrtDt; 
 dtCmplxStartDate.enabled = false;
 dtCmplxEndDate.enabled = true;
 dtCmplxEndDate.selectedDate = tempEndDt; 
 dtCmplxEndDate.enabled = false;
 
 but no go. TIA,
 
 Mic.





[flexcoders] Re: Setting dateField.SelectedDate when component is disabled?

2009-04-24 Thread Mic
trace(dtCmplxStartDate.toDateString(0)); will not compile :-)
The way I am accessing/manipulating the DateField date is through 
.selectedDate. 

trace(dtCmplxStartDate.selectedDate); does give a valid date e.g. Tue Jul 14 
00:00:00 GMT-0600 2009 whether or not the DateField is enabled - which would 
make it a situation where Flex is suppressing the view. I have just added a 
test button that disables the DateField component 

- it removes the displayed date from view! So it is Flex. Interesting - this 
component was built to always be editable then. Any solutions other than 
subclassing to a custom component and changing its behaviour? TIA,

Mic.


--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 What did the trace show?
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mic
 Sent: Friday, April 24, 2009 2:41 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Setting dateField.SelectedDate when component is
 disabled?
 
  
 
 
 
 
 
 
 If I leave the dateField objects enabled:
 
 mx:DateField id=dtCmplxStartDate enabled=true /
 
 then from the function:
 
 dtCmplxStartDate.selectedDate = tempStrtDt;
 
 the gui shows the date in the textInput part of the dateField component. All
 I have to change is
 
 mx:DateField id=dtCmplxStartDate enabled=false/
 
 and
 
 dtCmplxStartDate.selectedDate = tempStrtDt;
 
 does not show date in gui.
 
 Mic.
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Tracy Spratt tracy@ wrote:
 
  What happens? How are you sure the dates are not being set? What happens
  if you do this after setting a date:
  
  Trace(dtCmplxStartDate.toDateString(0);
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
 On
  Behalf Of Mic
  Sent: Thursday, April 23, 2009 10:47 PM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] Setting dateField.SelectedDate when component is
  disabled?
  
  
  
  
  
  
  
  
  In a modal View state the dateFields are disabled but I need to populate
  them for the current record. I can stick my proc values in when they are
  enabled, but not when disabled. I tried
  
  dtCmplxStartDate.enabled = true;
  dtCmplxStartDate.selectedDate = tempStrtDt; 
  dtCmplxStartDate.enabled = false;
  dtCmplxEndDate.enabled = true;
  dtCmplxEndDate.selectedDate = tempEndDt; 
  dtCmplxEndDate.enabled = false;
  
  but no go. TIA,
  
  Mic.
 





[flexcoders] Setting dateField.SelectedDate when component is disabled?

2009-04-23 Thread Mic
In a modal View state the dateFields are disabled but I need to populate them 
for the current record. I can stick my proc values in when they are enabled, 
but not when disabled. I tried

dtCmplxStartDate.enabled = true;
dtCmplxStartDate.selectedDate = tempStrtDt; 
dtCmplxStartDate.enabled = false;
dtCmplxEndDate.enabled = true;
dtCmplxEndDate.selectedDate = tempEndDt;
dtCmplxEndDate.enabled = false;

but no go. TIA,

Mic.





[flexcoders] Re: How to put a well-formatted SQL statement in a string?

2009-04-13 Thread Mic
Hi Tracy,

I bought the $19 FlexCubed FlexSQL, which uses a SWC and a server-side asp 
which I place in wwwroot/website. Talked to them and they do not support procs 
 deadline means having to embed while look for proc solution. They pass the 
e.g. select statement to their SWC as a string, and my select statements are 
basically the proc contents so pretty long - nightmare without the indents and 
lines normally associated with sql formatting :-)

I grabbed the FlexSQLAdmin google code open source - I cannot get it passed the 
SharePoint security - been talking to him but he is not Sharepoint aware.

The more I look at SharePoint and asp.net etc the more I appreciate my attempt 
to write this app in Flex and embed into SharePoint page :-) I think probably 
MS is positioning Silverlight to code RIAs inside SharePoint?

Mic

--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 User the \n sequence to insert newlines in a string.
 
  
 
 How are you communicating with SQLServer?  You should be aware that using
 native http has security consequences.  So does allowing dynamic sql.  You
 would do better to use a server side process to integrate with the database.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mic
 Sent: Monday, April 13, 2009 12:12 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to put a well-formatted SQL statement in a string?
 
  
 
 
 
 
 
 
 I have to embed my SQL within Flex until I can work out how to call a
 SQLServer proc from within Flex (any pointers here would be much
 appreciated), and am writing functions:
 
 private function sel_mrkt_pln_yrs(p_string:String = null):String{
 var sqlString:String = select distinct issue_yr, cast(issue_yr as Int) as
 ID from MKT_PLN where (case when  + p_string +  is not null then case when
 mkt_pln_typ =  + p_string +  then 1 end else 1 end) = 1 order by 1 desc;;
 
 
 return sqlString; 
 }
 
 I would like to format the SQL so I can read it:
 
 select distinct
 issue_yr,
 cast(issue_yr as Int) as ID
 from
 MKT_PLN
 where
 (case when @p_mkt_pln_typ is not null then
 case when mkt_pln_typ = @p_mkt_pln_typ then
 1
 end
 else
 1
 end) = 1
 order by
 1 desc;
 
 but var sqlString:String = ... will not take the separate lines etc. How are
 people doing this? TIA,
 
 Mic.





[flexcoders] Re: How to put a well-formatted SQL statement in a string?

2009-04-13 Thread Mic
Thanks - on my way there right now,

Mic.

--- In flexcoders@yahoogroups.com, smitade smit...@... wrote:

 Calling mssql procs through flex can be done using pyamf. Here's some code 
 using pyamf: http://freevryheid.x10hosting.com/drupal/?q=node/15
 
 
 
 --- In flexcoders@yahoogroups.com, Mic chigwell23@ wrote:
 
  I have to embed my SQL within Flex until I can work out how to call a 
  SQLServer proc from within Flex (any pointers here would be much 
  appreciated), and am writing functions:
  
  private function sel_mrkt_pln_yrs(p_string:String = null):String{
 var sqlString:String = select distinct issue_yr, cast(issue_yr as Int) 
  as ID from MKT_PLN where (case when  + p_string +  is not null then case 
  when mkt_pln_typ =  + p_string +  then 1 end else 1 end) = 1 order by 1 
  desc;; 
  
  return sqlString; 
  }
  
  I would like to format the SQL so I can read it:
  
  select distinct
  issue_yr,
  cast(issue_yr as Int) as ID
  from
  MKT_PLN
  where
  (case when @p_mkt_pln_typ is not null then
  case when mkt_pln_typ = @p_mkt_pln_typ then
  1
  end
  else
  1
  end) = 1
  order by
  1 desc;
  
  but var sqlString:String = ... will not take the separate lines etc. How 
  are people doing this? TIA,
  
  Mic.
 





[flexcoders] How to put a well-formatted SQL statement in a string?

2009-04-12 Thread Mic
I have to embed my SQL within Flex until I can work out how to call a SQLServer 
proc from within Flex (any pointers here would be much appreciated), and am 
writing functions:

private function sel_mrkt_pln_yrs(p_string:String = null):String{
   var sqlString:String = select distinct issue_yr, cast(issue_yr as Int) as 
ID from MKT_PLN where (case when  + p_string +  is not null then case when 
mkt_pln_typ =  + p_string +  then 1 end else 1 end) = 1 order by 1 desc;;
 

return sqlString; 
}

I would like to format the SQL so I can read it:

select distinct
issue_yr,
cast(issue_yr as Int) as ID
from
MKT_PLN
where
(case when @p_mkt_pln_typ is not null then
case when mkt_pln_typ = @p_mkt_pln_typ then
1
end
else
1
end) = 1
order by
1 desc;

but var sqlString:String = ... will not take the separate lines etc. How are 
people doing this? TIA,

Mic.






[flexcoders] Turn Tabbar so tabs are pointing down

2009-04-09 Thread Mic
Cannot find a way to turn the tabbar 180 so the tabs point down - need to place 
it at the bottom of a pane. Thinking I am overlooking an obvious attribute. TIA,

Mic.



[flexcoders] Flex, SharePoint and SQLServer

2009-04-04 Thread Mic
Just got introduced to the wonderful world of SharePoint recently, and am 
contemplating coding the client's BI application in Flex and then embedding 
into SharePoint. Are people doing this? All the data must come from 
SQLServer2005. Done some googling and understand that I could

1. Load data into SharePoint lists and then send to Flex
2. Talk to 2005 directly from Flex.

Is this correct and which is the better approach?

Are there any examples of this kind of architecture? I did not really find much 
after a couple of hours of googling. 

I have looked at ASP.NET and VisualStudio etc and just feel I could do a better 
job with Flex. Don't want to infer Flex is superior, but I do know that I can 
write the app they need in Flex. Is this a sensible approach? Thanks in advance 
for any pointers,

Mic.





[flexcoders] Re: Parent State.setProp on child breaks after certain depth

2009-02-23 Thread Mic
Just found creationPolicy :-)



--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 This code is the TourDeFlex State example expanded. There is a
 ViewStack1 with 2 panes, the second pane has ViewStack2 on it with 2
 panes. Added to the Register state 
 
  !-- Set properties of ViewStack1 to Pane 2 --
 mx:SetProperty target={viewstack1} 
 name=selectedIndex value=1/
  
   !-- Set properties of ViewStack2 to Pane 2 --
 mx:SetProperty target={viewstack2} 
 name=selectedIndex value=1/
 
 wants to change to ViewStack1:pane2 where ViewStack2 exists, and then
 ViewStack2:pane2. ViewStack has a createCompleteHandler with message.
 The Need To Register? button makes the State change.
 
 The Property selectedIndex not found on StateTest and there is no
 default value error is thrown because apparently Flex has has not
 instantiated ViewStack2 at the moment the parent State change wants to
 manipulate a property of this child - the creationComplete message
 appears _after_ the state change is attempted.
 
 This means that State changes cannot be used to configure gui
 components that are on different event bubbling chains - which I was
 experimenting with. Curious to know if there is a way to make this
 work? Going to try the excellent suggestion of using a set method
 bound to the model locator variable that the commands manipulate, but
 wondered about the above. Not sure how code turns out when pasted in.
 Thanks,  Mic
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical verticalAlign=middle
 horizontalAlign=center
 backgroundGradientColors=[0x00,0x323232]
 viewSourceURL=srcview/index.html
 
 !-- The Application class states property defines the view
states.--
 mx:states
 mx:State name=Register
 !-- Add a TextInput control to the form. --   
 mx:AddChild relativeTo={loginForm} 
 position=lastChild
 mx:FormItem id=confirm label=Confirm:
 mx:TextInput/
 /mx:FormItem
 /mx:AddChild
 
 !-- Set properties on the Panel container and Button
 control.--
 mx:SetProperty target={loginPanel} 
 name=title value=Register/
 mx:SetProperty target={loginButton} 
 name=label value=Register/
 
  !-- Set properties of ViewStack1 to Pane 2 --
 mx:SetProperty target={viewstack1} 
 name=selectedIndex value=1/
  
   !-- Set properties of ViewStack2 to Pane 2 --
 mx:SetProperty target={viewstack2} 
 name=selectedIndex value=1/
  
 !-- Remove the existing LinkButton control.--
 mx:RemoveChild target={registerLink}/
 
 !-- Add a new LinkButton control to change view state 
 back to the login form.--  
 mx:AddChild relativeTo={spacer1} position=before
 mx:LinkButton label=Return to Login 
 click=currentState=''/
 /mx:AddChild
 /mx:State
 /mx:states
 
   mx:Script
   ![CDATA[
   import mx.controls.Alert;
   private function onCreationComplete():void{
   mx.controls.Alert.show(CreationComplete from 
 ViewStack2);
   }
   ]]
   /mx:Script
  
  
 mx:Panel id=loginPanel 
 title=Login color=0xff borderAlpha=0.15
 horizontalScrollPolicy=off verticalScrollPolicy=off
 width=50% height=50%
   mx:VBox width=100% height=100% borderStyle=solid
 borderThickness=2 borderColor=#F6E808 backgroundColor=#B7B1B1
   
 
  mx:VBox width=100% height=100% borderStyle=solid
 borderThickness=2 borderColor=#F70606
 mx:ViewStack id=viewstack1
   width=100% height=100%
 mx:Canvas id=canvas1_1
   label=View 1 width=100% height=100%
 borderStyle=solid borderThickness=2 borderColor=#2509F9
 mx:Text y=0 text=ViewStack1:Panel1
 width=100% height=50%/
 /mx:Canvas
   mx:VBox id=vbox1_2
 mx:Text y=0 text=ViewStack1:Panel2
 width=100% height=10%/
   mx:ViewStack id=viewstack2
 creationComplete=onCreationComplete()
   width=100% height=100% 
 borderStyle=solid
 borderThickness=3 borderColor=#C50BFA
   mx:Canvas
  mx:Text y=0 text=ViewStack2:Panel1
 width=100% height=50%/   
   /mx:Canvas

[flexcoders] Re: event passing when source/destination are on different parent bubbling chains?

2009-02-22 Thread Mic
Very interesting! At the moment I have bound that modelLocator var to
State changes within the components, but am finding that this only
goes so deep as the children below a certain depth do not exist when
their parent does a State setProperty on them. Gonna try the set
method now ... thanks very much,

Mic.



--- In flexcoders@yahoogroups.com, jer_ela g...@... wrote:

 You need a loggedIn property somewhere in your model.  It is initially
 set to false and when the user successfully logs in your controller
 code sets it to true.
 
 Any views that need to react to the log in have that property bound to
 a set method which fires off whatever code is appropriate when the
 value changes.
 
 
 --- In flexcoders@yahoogroups.com, Mic chigwell23@ wrote:
 
  Hi Ryan, we are running Cairngorm with UM extensions. Theoretically I
  need to dispatch a UM event with callback where that callback is to a
  component other than the dispatching component. And because source and
  destination are so far apart conventional bubbling is not an option.
  Scenario: Because site visitors can be visitors or clients, the login
  component is just one child of several of a parent component. When a
  site visitor attempts to log on, Cairngorm/UM handles event
  propagation and handling, including saving server results in
  modelLocator VO etc. But if the login is successful, other components
  need to react - their functions must be called. One such component is
  a child of a child that is a peer of the login component. Even if I
  could grab a reference to the destination component function, and send
  it with the UM event from the source component, this feels like ugly
  hardcoding. Waving a magic wand I would be able to dispatch an event
  from anywhere and listen for it anywhere, without the limitation of
  only being able to bubble up the parent chain. This seems totally
  logical to me as obviously it is illogical to have to design one's gui
  architecture based on who needs to talk to who. Thanks for
listening :-)
  
  Mic. 
  
  --- In flexcoders@yahoogroups.com, Ryan Graham Ryan.Graham@ wrote:
  
   
In an app that has many parent and child components, how does one
communicate across bubbling chains? I need to go up from a
buried
child component source to its parent, across to another of the
parent's children, and down that chain to a child destination. Can
this be done in Flex, or do I create my own event subscription
component where anybody from anywhere can subscribe with a
self.reference?
   

   
   Sounds like you're describing the controller's function in MVC
   architecture. Usually an event is triggered by some sort of user
   interaction in hopes of changing the state of the application in
some
   way.  If you store the state in some sort of centralized model
   somewhere, the controller can react to user events, update the
model's
   state properties accordingly, and let any part of the view that is
 bound
   to the model update itself on property change. Is that the setup
 you are
   running right now? Are you passing data with this event that other
   components need?
   

   
   HTH,
   
   Ryan
   
   
   
   This message is private and confidential. If you have received it in
  error, please notify the sender and remove it from your system.
  
 





[flexcoders] Parent State.setProp on child breaks after certain depth

2009-02-22 Thread Mic
This code is the TourDeFlex State example expanded. There is a
ViewStack1 with 2 panes, the second pane has ViewStack2 on it with 2
panes. Added to the Register state 

 !-- Set properties of ViewStack1 to Pane 2 --
mx:SetProperty target={viewstack1} 
name=selectedIndex value=1/
 
  !-- Set properties of ViewStack2 to Pane 2 --
mx:SetProperty target={viewstack2} 
name=selectedIndex value=1/

wants to change to ViewStack1:pane2 where ViewStack2 exists, and then
ViewStack2:pane2. ViewStack has a createCompleteHandler with message.
The Need To Register? button makes the State change.

The Property selectedIndex not found on StateTest and there is no
default value error is thrown because apparently Flex has has not
instantiated ViewStack2 at the moment the parent State change wants to
manipulate a property of this child - the creationComplete message
appears _after_ the state change is attempted.

This means that State changes cannot be used to configure gui
components that are on different event bubbling chains - which I was
experimenting with. Curious to know if there is a way to make this
work? Going to try the excellent suggestion of using a set method
bound to the model locator variable that the commands manipulate, but
wondered about the above. Not sure how code turns out when pasted in.
Thanks,  Mic

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical verticalAlign=middle
horizontalAlign=center
backgroundGradientColors=[0x00,0x323232]
viewSourceURL=srcview/index.html

!-- The Application class states property defines the view states.--
mx:states
mx:State name=Register
!-- Add a TextInput control to the form. --   
mx:AddChild relativeTo={loginForm} 
position=lastChild
mx:FormItem id=confirm label=Confirm:
mx:TextInput/
/mx:FormItem
/mx:AddChild

!-- Set properties on the Panel container and Button
control.--
mx:SetProperty target={loginPanel} 
name=title value=Register/
mx:SetProperty target={loginButton} 
name=label value=Register/

 !-- Set properties of ViewStack1 to Pane 2 --
mx:SetProperty target={viewstack1} 
name=selectedIndex value=1/
 
  !-- Set properties of ViewStack2 to Pane 2 --
mx:SetProperty target={viewstack2} 
name=selectedIndex value=1/
 
!-- Remove the existing LinkButton control.--
mx:RemoveChild target={registerLink}/

!-- Add a new LinkButton control to change view state 
back to the login form.--  
mx:AddChild relativeTo={spacer1} position=before
mx:LinkButton label=Return to Login 
click=currentState=''/
/mx:AddChild
/mx:State
/mx:states

mx:Script
![CDATA[
import mx.controls.Alert;
private function onCreationComplete():void{
mx.controls.Alert.show(CreationComplete from 
ViewStack2);
}
]]
/mx:Script
 
 
mx:Panel id=loginPanel 
title=Login color=0xff borderAlpha=0.15
horizontalScrollPolicy=off verticalScrollPolicy=off
width=50% height=50%
mx:VBox width=100% height=100% borderStyle=solid
borderThickness=2 borderColor=#F6E808 backgroundColor=#B7B1B1


   mx:VBox width=100% height=100% borderStyle=solid
borderThickness=2 borderColor=#F70606
mx:ViewStack id=viewstack1
width=100% height=100%
mx:Canvas id=canvas1_1
label=View 1 width=100% height=100%
borderStyle=solid borderThickness=2 borderColor=#2509F9
mx:Text y=0 text=ViewStack1:Panel1
width=100% height=50%/
/mx:Canvas
mx:VBox id=vbox1_2
mx:Text y=0 text=ViewStack1:Panel2
width=100% height=10%/
mx:ViewStack id=viewstack2
creationComplete=onCreationComplete()
width=100% height=100% 
borderStyle=solid
borderThickness=3 borderColor=#C50BFA
mx:Canvas
 mx:Text y=0 text=ViewStack2:Panel1
width=100% height=50%/ 
/mx:Canvas
mx:Canvas
  mx:Text y=0 text=ViewStack2:Panel2
width=100% height=50

[flexcoders] event passing when source/destination are on different parent bubbling chains?

2009-02-18 Thread Mic
In an app that has many parent and child components, how does one
communicate across bubbling chains? I need to go up from a buried
child component source to its parent, across to another of the
parent's children, and down that chain to a child destination. Can
this be done in Flex, or do I create my own event subscription
component where anybody from anywhere can subscribe with a
self.reference? TIA,

Mic. 



[flexcoders] Re: event passing when source/destination are on different parent bubbling chains?

2009-02-18 Thread Mic
Hi Ryan, we are running Cairngorm with UM extensions. Theoretically I
need to dispatch a UM event with callback where that callback is to a
component other than the dispatching component. And because source and
destination are so far apart conventional bubbling is not an option.
Scenario: Because site visitors can be visitors or clients, the login
component is just one child of several of a parent component. When a
site visitor attempts to log on, Cairngorm/UM handles event
propagation and handling, including saving server results in
modelLocator VO etc. But if the login is successful, other components
need to react - their functions must be called. One such component is
a child of a child that is a peer of the login component. Even if I
could grab a reference to the destination component function, and send
it with the UM event from the source component, this feels like ugly
hardcoding. Waving a magic wand I would be able to dispatch an event
from anywhere and listen for it anywhere, without the limitation of
only being able to bubble up the parent chain. This seems totally
logical to me as obviously it is illogical to have to design one's gui
architecture based on who needs to talk to who. Thanks for listening :-)

Mic. 

--- In flexcoders@yahoogroups.com, Ryan Graham ryan.gra...@... wrote:

 
  In an app that has many parent and child components, how does one
  communicate across bubbling chains? I need to go up from a buried
  child component source to its parent, across to another of the
  parent's children, and down that chain to a child destination. Can
  this be done in Flex, or do I create my own event subscription
  component where anybody from anywhere can subscribe with a
  self.reference?
 
  
 
 Sounds like you're describing the controller's function in MVC
 architecture. Usually an event is triggered by some sort of user
 interaction in hopes of changing the state of the application in some
 way.  If you store the state in some sort of centralized model
 somewhere, the controller can react to user events, update the model's
 state properties accordingly, and let any part of the view that is bound
 to the model update itself on property change. Is that the setup you are
 running right now? Are you passing data with this event that other
 components need?
 
  
 
 HTH,
 
 Ryan
 
 
 
 This message is private and confidential. If you have received it in
error, please notify the sender and remove it from your system.





[flexcoders] What is equivalent of Cairngorm Command Sequence in Cairngorm UM?

2009-02-17 Thread Mic
Login button dispatchs login event, Command - Delegate - Server -
Command result has user_id - null user_id = callback to view, non-null
user_id loads more data. In this standard Cairngorm app I am using
Command extends SequenceCommand to executeNextCommand(); and dispatch
loadDataEvent. Because we need view callback I am updating to UM. In
reading the UM stuff it looks like

a) Delegate can intercept the response that would normally go the Command

b) Presumably Command result can create the loadDataEvent (UM event)
and dispatch it.

I don't think I want the Delegate to intercept because the returned
user_id must be written to a VO in the ModelLocator also, and I am
presuming that this is always a job for Command (?). So do I just
replace Command result executeNextCommand(); with create and dispatch
next event? I am wondering if there is more to this, because the
consensus appears to be that standard Cairngorm Command Sequence is
ugly and UM is more elegant. TIA,

Mic.



[flexcoders] Re: sprite.startDrag() - Only one sprite is draggable at a time :-(

2009-02-14 Thread Mic
Thanks! Exactly what I need.

--- In flexcoders@yahoogroups.com, sunild99 sunilbd...@... wrote:

 Here are some links I've book marked on drag and drop:
 
 - Adobe help
 http://livedocs.adobe.com/flex/3/html/help.html?
 content=05_Display_Programming_14.html
 
 About half way through this page, they talk about what to do when you 
 need to work around the limitation of startDrag only working on one 
 thing at a time.
 
 - earlier post in this group from Doug McCune about this topic
 http://tech.groups.yahoo.com/group/flexcoders/message/126160
 
 I think they are both similar approaches, but haven't really read them 
 in a while.





[flexcoders] sprite.startDrag() - Only one sprite is draggable at a time :-(

2009-02-13 Thread Mic
Requirements are for a draggable calculator pop-up that looks like a
calculator i.e. the calculator image is the frame/border - irregular
shape - no rectangularPanel/TitleWindow. I created 2 components, the
calculator Image and an inner Panel component with calculator
functionality, titleBar drag and resizing.
   The size of the outer calculator Image is bound to the resize of
the inner Panel e.g.

var watcherSetter:ChangeWatcher = 
BindingUtils.bindSetter(calculatorImageWidth,sPanel,width);

and this works perfectly. So I coded the synchronized drag of the 2
components with a titleBarMoveHandler() on the alpha=0 TitleBar of the
inner Panel:

this.startDrag();
calculatorImage.startDrag();

and then found the fine print - sprite.startDrag() - Only one sprite
is draggable at a time. So somebody gets left behind :-)

Can google no examples of this kind of thing, so any pointers
appreciated. TIA,

Mic.



[flexcoders] anchoring Image to right of Canvas with % value?

2009-02-07 Thread Mic
I am trying to duplicate the html css:

img#door {
position: absolute;
height: 98%;
width: 38%; 
top: 1%; 
right: 18%;
}

but very few of the Flex layout attributes accept a percentage. How do
I anchor the image at 18% from the right side so that when the Canvas
shrinks the image stays in its relative position? image.right takes an
absolute pixel value in Flex. TIA,

Mic.



[flexcoders] simple(?) Flex change color question

2009-02-01 Thread Mic
This one is making my head hurt ... will there be any perceivable
difference in

a) slowly changing an object's color from it's current color e.g.
0xFF to 0xFF

and

b) slowly changing the object's color by morphing the correct
individual r, g and b from 0xFF to 0XFF?

Will it pass through the same shades on the way from current to new?
Reason I wonder is that I am looking at some PixelBlender filters that
change the tint of objects by manipulating the r,g,b components is
this different to just changing the color attribute? TIA,

Mic.



[flexcoders] Flex4 PixelBender .pbj param error message

2009-01-29 Thread Mic
[Better place for this?] Getting a constant ArgumentError: Error
#2004: One of the parameters is invalid message.

[Embed(source=assets/BrightnessThreshold.pbj)]
public var ThresholdShader:Class;
public var brightnessShader:Shader = new Shader();

brightnessShader.byteCode = new ThresholdShader(); //ERROR
brightnessShader.data.threshold.value = [0.75];

in .pbj:

parameter float threshold

minValue: float(0.0);
maxValue: float(1.0);
defaultValue: float(0.5);
;

In following multiple examples, it seemes that the

brightnessShader.byteCode = new ThresholdShader();

syntax is correct - passing a 0.75 param to it gives a 

Argument count mismatch on Flex4Project6_ThresholdShader(). Expected
0, got 1.

message. I get this on any .pbj file I use, thinking it is something
basic. TIA,

Mic.



[flexcoders] Re: Flex4 PixelBender .pbj param error message

2009-01-29 Thread Mic
Solved - found the PixelBender SDK - have to compile the .pbk into a
.pbj not just rename the .pbk to .pbj :-). Flex 4 is getting pretty
interesting!

Mic. 


--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 [Better place for this?] Getting a constant ArgumentError: Error
 #2004: One of the parameters is invalid message.
 
 [Embed(source=assets/BrightnessThreshold.pbj)]
 public var ThresholdShader:Class;
 public var brightnessShader:Shader = new Shader();
 
 brightnessShader.byteCode = new ThresholdShader(); //ERROR
 brightnessShader.data.threshold.value = [0.75];
 
 in .pbj:
 
 parameter float threshold
 
 minValue: float(0.0);
 maxValue: float(1.0);
 defaultValue: float(0.5);
 ;
 
 In following multiple examples, it seemes that the
 
 brightnessShader.byteCode = new ThresholdShader();
 
 syntax is correct - passing a 0.75 param to it gives a 
 
 Argument count mismatch on Flex4Project6_ThresholdShader(). Expected
 0, got 1.
 
 message. I get this on any .pbj file I use, thinking it is something
 basic. TIA,
 
 Mic.





[flexcoders] Gumbo livedocs available as download?

2008-12-21 Thread Mic
Gonna be somewhere without internet connection for a couple of weeks
 can't live without Gumbo ...can I download the Gumbo livedocs
from somewhere ... cannot find anywhere on the online Gumbo livedocs
to do this ... tia

Mic.



[flexcoders] Re: getting refs to items in Group.mxmlContent?

2008-12-17 Thread Mic
I think I need more help on this one :-( I found getElementAt(),
getElementIndex() etc in the GraphicElement-ContentElement class, but
not sure how to relate any of this to the loaded .fxg object:

If I go to

this.contentGroup
__mxmlContent
[0] VGroup (button group)
[1] displayGroup (Group var containing .fxg object for display)
__mxmlContent
[0].fxg Object
__myGroup1
__myGroup2 etc

I still arrive at this mxmlContent array of 1 row containing the .fxg
object with all the groups I want to reference. Any kind of
getElementAt() at this level throws an index error talking about
unknown mxml content. Am I even interrogating the correct instance? TIA,

Mic.



--- In flexcoders@yahoogroups.com, Haykel BEN JEMIA hayke...@...
wrote:

 You should use the content management functions of group to access its
 children: numElements(), getElementAt(index:int),
 getElementIndex(element:Object) etc.
 
 Haykel Ben Jemia
 
 Allmas
 Web  RIA Development
 http://www.allmas-tn.com
 
 
 
 
 On Tue, Dec 16, 2008 at 10:28 PM, Mic chigwel...@... wrote:
 
(OK to ask Gumbo questions?)When an .fxg file is loaded into
  FxApplication and added to a Group, and that Group is then added to
  FxApplication, array mxmlContent[0] contains the .fxg Graphic object,
  whose child Groups can be accessed directly by name:
 
  displayGroup.mxmlContent[0].myGroup1
 
  However I cannot access mxmlContent[0] with getChildAt() etc, nor can
  I work out how to extract out references to mxmlContent[0] into
  another array etc so a list can be displayed where a Group object
  might be selected. Can find no info on mxmlContent :-(
 
  code:
  testFXG.fxg contains group id=myGroup1, group id=myGroup2 etc
 
  private var displayGroup:Group;
  displayGroup = new Group();
  var source: testFXG= new testFXG();
  displayGroup.addItem(source);
  addItem(displayGroup);
 
  breakpoint shows:
 
  displayGroup
  [inherited]
  mxmlContent
  [0]
  myGroup1
  myGroup2
  etc
 
  code:
  private var testGroup:Group;
  testGroup = displayGroup.mxmlContent[0].myGroup1;
 
  - this is a good reference and can be used to change myGroup1.x,
  myGroup1.y etc. However as stated above I cannot get a reference to
  e.g. the 3rd child etc. As always, TIA,
 
  Mic.
 
   
 





[flexcoders] Re: Should I be able to load a .fxg file as XML?

2008-12-16 Thread Mic
Hi Alex - stupid error on my part - works perfectly :-)

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 What error did you get?
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Mic
 Sent: Monday, December 15, 2008 12:31 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Should I be able to load a .fxg file as XML?
 
 
 public var myXML:XML = new XML();
 public var XML_URL:String = ../xml/FlowerPower4.fxg;
 public var myXMLURL:URLRequest = new URLRequest(XML_URL);
 public var myLoader:URLLoader = new URLLoader(myXMLURL);
 
 myLoader.addEventListener(complete, xmlLoaded);
 
 private function xmlLoaded(event:Event):void
 {
 myXML = XML(myLoader.data);
 trace(Data loaded.);
 }
 
 Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
 XML file? TIA,
 
 Mic.





[flexcoders] Fireworks .fxg to Gumbo - all Group ids=undefined problem

2008-12-16 Thread Mic
Exporting Fireworks .fxg creates every Group with an id = undefined.
This will not load into Gumbo because obviously the ids must be
unique. Is this something that Fireworks can automatically fix, or do
I need to write a text parser in Flex that can go out and write unique
ids to all the groups in the .fxg file before it can be used in
FxApplication? As always TIA,

Mic.



[flexcoders] getting refs to items in Group.mxmlContent?

2008-12-16 Thread Mic
(OK to ask Gumbo questions?)When an .fxg file is loaded into 
FxApplication and added to a Group, and that Group is then added to 
FxApplication, array mxmlContent[0] contains the .fxg Graphic object, 
whose child Groups can be accessed directly by name:

displayGroup.mxmlContent[0].myGroup1

However I cannot access mxmlContent[0] with getChildAt() etc, nor can 
I work out how to extract out references to mxmlContent[0] into 
another array etc so a list can be displayed where a Group object 
might be selected. Can find no info on mxmlContent :-(

code:
  testFXG.fxg contains group id=myGroup1, group id=myGroup2 etc

  private var displayGroup:Group;  
  displayGroup = new Group();
  var source: testFXG= new testFXG();
  displayGroup.addItem(source);
  addItem(displayGroup);

breakpoint shows:

displayGroup
  [inherited]
  mxmlContent
[0]
  myGroup1
  myGroup2
  etc

code:
  private var testGroup:Group;
  testGroup = displayGroup.mxmlContent[0].myGroup1;

 - this is a good reference and can be used to change myGroup1.x, 
myGroup1.y etc. However as stated above I cannot get a reference to 
e.g. the 3rd child etc. As always, TIA,

Mic.



[flexcoders] Re: How many classes are there in flex 3 framework?

2008-12-16 Thread Mic
I read somewhere about 900 as compared to Java's over 15,000 :-)


--- In flexcoders@yahoogroups.com, devenhariyani devenhariy...@...
wrote:

 Its kinda a random question, but anyone know approx. how many classes 
 there are in the entire flex framework?
 
 I'm trying to optimizing the size of my SWF filesize and I ran a link-
 report.  I'm not sure exactly how to interpret it, but I did notice 
 that I have external-defs on about 45 different classes.  Which I don't 
 think is very much, but I want to put it into some sort of context by 
 knowing how many total classes there are in the flex framework.
 
 Thanks.
 
 --Deven





[flexcoders] Re: Loading .fxg with Actionscript - got it :-)

2008-12-15 Thread Mic
displayGroup = new Group();
var source2 : comp.FlowerPower2 = new comp.FlowerPower2();
displayGroup.addItem(source2);
addItem(displayGroup);

--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 comp:FlowerPower2 id=image1 / from comp/FlowerPower2.fxg is the
 MXML way of doing things  how is it done in Actionscript?
 
 private var group:Group;
 group = new Group();
 group.addItem(FlowerPower2.fxg must plug in here);
 addChild(group);
 
 TIA,
 
 Mic.





[flexcoders] Should I be able to load a .fxg file as XML?

2008-12-15 Thread Mic
public var myXML:XML = new XML();
public var XML_URL:String = ../xml/FlowerPower4.fxg;
public var myXMLURL:URLRequest = new URLRequest(XML_URL);
public var myLoader:URLLoader = new URLLoader(myXMLURL);


myLoader.addEventListener(complete, xmlLoaded);

private function xmlLoaded(event:Event):void
{
   myXML = XML(myLoader.data);
   trace(Data loaded.);
}

Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
XML file? TIA,

Mic.



[flexcoders] Loading .fxg with Actionscript

2008-12-14 Thread Mic
comp:FlowerPower2 id=image1 / from comp/FlowerPower2.fxg is the
MXML way of doing things  how is it done in Actionscript?

private var group:Group;
group = new Group();
group.addItem(FlowerPower2.fxg must plug in here);
addChild(group);

TIA,

Mic.



[flexcoders] How to use remoteobject.getOperation()?

2008-11-21 Thread Mic
var cfcString:String = getUserInfo;
var temp:AbstractOperation = remoteObject.getOperation(cfcString);

How do I use temp to call remoteObject.getUserInfo?

TIA,

Mic.



[flexcoders] Re: setting tileList.id in this.addChild(tileList) actionscript ...

2008-11-21 Thread Mic
Thanks all - your explanations are awesome!.

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

 If you add an id to a component created at runtime, that id can't be
 used as a reference to 
 it., precisely.  It is just a string property of the component and the
 parent component knows nothing about it.
 
  
 
 An id on an mxml tag works as a reference because the compiler creates
 an instance variable with the name specified in the id property, and
 assigns a reference to the component instance to it.
 
  
 
 If you manually addChild(), you need to do the same.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Amy
 Sent: Friday, November 21, 2008 9:47 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: setting tileList.id in this.addChild(tileList)
 actionscript ...
 
  
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Mic chigwell23@ wrote:
 
  var tileList:TileList = new TileList;
  tileList.dataProvider = thumbArray;
  this.addChild(tileList);
  
  Although dataprovider is set, it is not getting bound, so I think I 
 need
  
  override public function initialize():void
  {
  BindingUtils.bindProperty(id of tileList, dataProvider, 
 this, 
  thumbArray);
  super.initialize(); 
  }
  
  But I cannot find a way of setting the tileList child id to e.g.
  myTileList so I can talk to it. TIA,
 
 (1) An array is always equal to itself, no matter how many changes 
 you make to it, so you can't bind to it unless you broadcast change 
 events for it manually. Use an ArrayCollection instead.
 
 (2) You already have a reference to tileList. If you add an id to a 
 component created at runtim, that id can't be used as a reference to 
 it.
 
 HTH;
 
 Amy





[flexcoders] Re: How to use remoteobject.getOperation()?

2008-11-21 Thread Mic
Darn  - first thing I tried and it never got there  retried it
after your suggestion and now it does :-)

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

 Temp.send()?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Mic
 Sent: Friday, November 21, 2008 6:18 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to use remoteobject.getOperation()?
 
  
 
 var cfcString:String = getUserInfo;
 var temp:AbstractOperation = remoteObject.getOperation(cfcString);
 
 How do I use temp to call remoteObject.getUserInfo?
 
 TIA,
 
 Mic.





[flexcoders] actionscript RemoteObject - channelSet looks like gnarly code?

2008-11-20 Thread Mic
Need to move some mxml components to AS, and was doing fine with the
as RemoteObject until I found it has no endpoint attribute. This is
done with a channelSet object  looked at the generated AS from my
RemoteObject.mxml, and the channelSet stuff looks gnarly. Am I better
off using a mxml RemoteObject in a parent container and then passing
the data to the AS pallette components, or shall I try and work out
how to code an actionscript channelSet object? TIA,

Mic.



[flexcoders] Re: actionscript RemoteObject - channelSet looks like gnarly code?

2008-11-20 Thread Mic
Worked this one out - import mx.rpc.remoting.mxml.RemoteObject - this
class does have an endpoint attribute.

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

 Need to move some mxml components to AS, and was doing fine with the
 as RemoteObject until I found it has no endpoint attribute. This is
 done with a channelSet object  looked at the generated AS from my
 RemoteObject.mxml, and the channelSet stuff looks gnarly. Am I better
 off using a mxml RemoteObject in a parent container and then passing
 the data to the AS pallette components, or shall I try and work out
 how to code an actionscript channelSet object? TIA,
 
 Mic.





[flexcoders] setting tileList.id in this.addChild(tileList) actionscript ...

2008-11-20 Thread Mic
var tileList:TileList = new TileList;
tileList.dataProvider = thumbArray;
this.addChild(tileList);

Although dataprovider is set, it is not getting bound, so I think I need

override public function initialize():void
{
   BindingUtils.bindProperty(id of tileList, dataProvider, this,   
   thumbArray);
super.initialize(); 
}

But I cannot find a way of setting the tileList child id to e.g.
myTileList so I can talk to it. TIA,

Mic.




[flexcoders] basic carousel - force redraw after setChildIndex?

2008-11-17 Thread Mic
needing a basic rotation of 5 figures, I place the 5 images on the
canvas and then start calculating the x,y, scaleX etc. Then I run
through the array referencing the images and reset the childIndex:

private function moveThem():void
  {
  calculateAngles(); // calculate x,y, scaleX

 assistantsArray.sortOn(scaleX); // ascending

  for(var i:uint = 0; i  assistantsArray.length; i++)
  {
  canvas1.setChildIndex(assistantsArray[i], i);
  }

  }

Running moveThem() from a button click, does rotate the figures . But
when I put a loop inside moveThem to run the code e.g. 100 times , I
still get 1 redraw with the resulting positions being equal to 100
moves. So does Flex execute one redraw per code stack? And do I need to
invalidate the DisplayList or something within the moveThem loop? TIA,

Mic.




[flexcoders] change selected tab using variable containing tab label string?

2008-11-02 Thread Mic
myTabBar.selectedIndex =
myTabBar.getChildIndex(myTabBar.getChildByName(e.label)); does not
work because the child name is not the tab label text. How would I do
this? TIA,

Mic.



[flexcoders] Re: change selected tab using variable containing tab label string?

2008-11-02 Thread Mic
Tried that  - I think :-)

 public function createTabList():void {
 for each (var node:XML in _paraSightDataset.tab) {
 var newItem:Object = new Object();
 newItem.tabLabel = [EMAIL PROTECTED]();
 newItem.name = newItem.tabLabel;
 tabArray.addItem(newItem);
 }

 myTabBar.dataProvider = tabArray;

 }

 private function
traceDisplayList(container:DisplayObjectContainer,indentString:String =
):void
 {
 var child:DisplayObject;
 for (var i:uint=0; i  container.numChildren; i++)
 {
 child = container.getChildAt(i);
 trace(indentString, child, child.name);
 if (container.getChildAt(i) is DisplayObjectContainer)
 {
 traceDisplayList(DisplayObjectContainer(child),
indentString + )
 }
 }
 }

traceDisplayList(myTabBar);

parasight0.appPanel.appBox.HBox29.myTabBar.Tab84 Tab84
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84.selectedUpSkin
selectedUpSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84.UITextField85
UITextField85
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab86 Tab86
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab86.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab86.UITextField87
UITextField87
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88 Tab88
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88.overSkin overSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88.UITextField89
UITextField89
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab90 Tab90
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab90.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab90.UITextField91
UITextField91
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab92 Tab92
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab92.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab92.UITextField93
UITextField93

So childName is set internally? Wonder how one would even use
myTabBar.getChildByName()? Maybe I am missing something? TIA,

Mic


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

 Maybe you can add name={label} to the children?

 Ralf.

 On Sun, Nov 2, 2008 at 11:20 AM, Mic [EMAIL PROTECTED] wrote:
  myTabBar.selectedIndex =
  myTabBar.getChildIndex(myTabBar.getChildByName(e.label)); does not
  work because the child name is not the tab label text. How would I
do
  this? TIA,
 
  Mic.
 
 





[flexcoders] Re: change selected tab using variable containing tab label string?

2008-11-02 Thread Mic
Thanks all - since the whole app is pretty much built at runtime from an
xml template, and each gui component knows its identity from its
encapsulated xml node, I wanted to pick up some efficiency by not having
to parse the data providers continually ... but you made me think :-) 
and I am going to save the tab bar and viewstack indexes within the xml
nodes, so e.g. drilling on a chart axis can change a tab by index rather
than by trying to translate the tab label from the xml node.


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

 Use this:


http://flex.joshmcdonald.info/2008/10/selecting-right-value-from-combobo\
x-or.html

 -Josh

 On Mon, Nov 3, 2008 at 4:45 AM, Tracy Spratt [EMAIL PROTECTED] wrote:

   That seems like a complicated and difficult way to do it.
 
 
 
  Why not just loop over tabArray, comparing your value to tabLabel,
and when
  you match, use that loop index to set the selected index.
 
 
 
  Tracy
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Mic
  *Sent:* Sunday, November 02, 2008 12:54 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Re: change selected tab using variable
containing
  tab label string?
 
 
 
  Tried that - I think :-)
 
  public function createTabList():void {
  for each (var node:XML in _paraSightDataset.tab) {
  var newItem:Object = new Object();
  newItem.tabLabel = [EMAIL PROTECTED] node.%40label.toString();
  newItem.name = newItem.tabLabel;
  tabArray.addItem(newItem);
  }
 
  myTabBar.dataProvider = tabArray;
 
  }
 
  private function
 
traceDisplayList(container:DisplayObjectContainer,indentString:String =
  ):void
  {
  var child:DisplayObject;
  for (var i:uint=0; i  container.numChildren; i++)
  {
  child = container.getChildAt(i);
  trace(indentString, child, child.name);
  if (container.getChildAt(i) is DisplayObjectContainer)
  {
  traceDisplayList(DisplayObjectContainer(child),
  indentString +  )
  }
  }
  }
 
  traceDisplayList(myTabBar);
 
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84 Tab84
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84.selectedUpSkin
  selectedUpSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab84.UITextField85
  UITextField85
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab86 Tab86
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab86.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab86.UITextField87
  UITextField87
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88 Tab88
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88.overSkin overSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab88.UITextField89
  UITextField89
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab90 Tab90
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab90.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab90.UITextField91
  UITextField91
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab92 Tab92
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab92.upSkin upSkin
  parasight0.appPanel.appBox.HBox29.myTabBar.Tab92.UITextField93
  UITextField93
 
  So childName is set internally? Wonder how one would even use
  myTabBar.getChildByName()? Maybe I am missing something? TIA,
 
  Mic
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Ralf
  Bokelberg ralf.bokelberg@
  wrote:
  
   Maybe you can add name={label} to the children?
  
   Ralf.
  
   On Sun, Nov 2, 2008 at 11:20 AM, Mic chigwell23@ wrote:
myTabBar.selectedIndex =
myTabBar.getChildIndex(myTabBar.getChildByName(e.label)); does
not
work because the child name is not the tab label text. How would
I
  do
this? TIA,
   
Mic.
   
   
  
 
 
 



 --
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk





[flexcoders] Debugging advice appreciated ....

2008-10-28 Thread Mic
TypeError: Error #1034: Type Coercion failed: cannot convert
mx.graphics::[EMAIL PROTECTED] to mx.graphics.IStroke.
at
mx.charts::AxisRenderer/measure()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1091]
at
mx.core::UIComponent/measureSizes()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5819]
at
mx.core::UIComponent/validateSize()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5765]
at
mx.managers::LayoutManager/validateSize()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:559]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:648]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]

4 instances of same chart as 4 modules load fine  clone the chart
and make a second module (so identical other than module name), and
make this second module one of the four - and above error. Make all 4
the second module, works fine. Can debug right up to
mx.core::UIComponent/measureSizes() but then it says Edit Source Not
Available for mx.charts::AxisRenderer/measure(). Do I need to locate
this source and add to the Edit Source Folder dialog and dive into
mx.charts? And then see what is wrong with [EMAIL PROTECTED] Thanks,

Mic.



[flexcoders] Re: Debugging advice appreciated ....

2008-10-28 Thread Mic
Alex rules KO :-) plus another question  By putting
import mx.charts.chartClasses.IAxisRenderer;
var temp1:AxisRenderer = new AxisRenderer;

in main app, error is gone ... why this particular class I do not
know, as all 4 modules use the same very complex custom chart. If I
understand from the very excellent Module blog, the best practice is
to extract _all_ common classes for my modules into a shared code
module and load that first.

Question: if I do this, do I still have to do the mxmlc -- link-report
and mxmlc -- load-externs stuff?


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

 Shared code problem usually due to modules.  See my blog
presentation on Modules.
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Mic
 Sent: Tuesday, October 28, 2008 4:08 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Debugging advice appreciated 
 
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 mx.graphics::[EMAIL PROTECTED] to mx.graphics.IStroke.
 at

mx.charts::AxisRenderer/measure()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1091]
 at

mx.core::UIComponent/measureSizes()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5819]
 at

mx.core::UIComponent/validateSize()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5765]
 at

mx.managers::LayoutManager/validateSize()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:559]
 at

mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:648]
 at Function/http://adobe.com/AS3/2006/builtin::apply()
 at

mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
 at

mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
 
 4 instances of same chart as 4 modules load fine  clone the chart
 and make a second module (so identical other than module name), and
 make this second module one of the four - and above error. Make all 4
 the second module, works fine. Can debug right up to
 mx.core::UIComponent/measureSizes() but then it says Edit Source Not
 Available for mx.charts::AxisRenderer/measure(). Do I need to locate
 this source and add to the Edit Source Folder dialog and dive into
 mx.charts? And then see what is wrong with [EMAIL PROTECTED] Thanks,
 
 Mic.





[flexcoders] Re: How to get XML data in before self-configuring custom component needs it?

2008-10-27 Thread Mic
Thanks for the help  I followed the suggestion to
addChild(component) from the XML result = method and this works perfectly.

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

 While it sometimes causes other timing problems, the framework sets the
 properties of a component before rendering the children, and for this
 precise reason.
 
  
 
 Pass the xml into the component from the outside and it will be ready
 for use in rendering.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Amy
 Sent: Thursday, October 23, 2008 9:53 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: How to get XML data in before self-configuring
 custom component needs it?
 
  
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Mic chigwell23@ wrote:
 
  Not a very good description I think :-( A custom component uses XML
  data to build itself. With xml embedded within the AS component
  everything flies:
  
  var layoutXML:XML =
  layouts
  layout name='View1' description='Single View'
  item id='1'
  orientationv/orientation
  panes1/panes
  /item
  /layout etc
  
  Moving the xml to an external document causes a situation where I
  cannot get the xml in before the component needs it! Earliest I 
 think
  is preInitialize, right? Still not there in time. Not sure there is 
 a
  way to pause the AS component construct? Since this actually is 
 static
  data - 17 different view configs - shall I just leave it embedded?
  Curious to know if there is a way to do the external thing?
  
  private function loadXML():void{
  var XML_URL:String = ../xml/layouts.xml;
  var myXMLURL:URLRequest = new URLRequest(XML_URL);
  myLoader = new URLLoader(myXMLURL);
  myLoader.addEventListener(complete, xmlLoaded);
  }
  
  private function xmlLoaded(event:Event):void{
  layoutXML = XML(myLoader.data);
  trace(Data loaded.);
  }
 
 What's the code of the component?





[flexcoders] event bubbling when destination below target?

2008-10-27 Thread Mic
I am using both Cairngorm events and custom  actionscript events but
cannot work out how either will allow a combobox at the outer app
container to communicate with charts within modules within a panel
within a canvas within the app etc. Is it true to say that Cairngorm
events are mainly for grabbing data from servers and populating
global dtos in the modelLocator as the Cairngorm commands are
totally unaware of mxml/actionscript gui components? And is it true to
say that Flex events cannot descend below the target, as bubbling
seems to go no lower than the target? I have the following layout:

Application
   Canvas
 comboBox - changeTimePeriod
  Panel
 HDivideBox
VDivideBox
   Panel
  Module = Chart
 function changeTimePeriod()
   Panel
  Module = Chart
 function changeTimePeriod()
VDivideBox
   Panel
  Module = Chart
 function changeTimePeriod()
   Panel
  Module = Chart
 function changeTimePeriod() 

I talk to the chart modules from the immediate parent using
IModuleInterface. But how do I push the outer comboBox event down,
down, down into the depths? Without hard-coding function calls - 
parent to child, parent to child etc? Thanks in advance,

Mic



[flexcoders] createChildren(): adding 20 identical buttons to panel?

2008-10-22 Thread Mic
public class PanelTest extends Panel{
   private var b1:Button;
   
   override protected function createChildren():void {
  super.createChildren();

  b1 = new Button;
  this.addChild(b1);

In order to add another 19 buttons, must vars b2 to b20 be declared
etc?  This is a very simplistic example of what I need to do (
dynamically add  multiple instances of the same complex component
class to a layout). Because b1 cannot be reused for another
addChild(), how would you add the other buttons? TIA,

Mic.





[flexcoders] Re: createChildren(): adding 20 identical buttons to panel?

2008-10-22 Thread Mic
Thanks for all the help  I was trying to

b1 = new Button;
this.addChild(b1);
this.addChild(b1);
this.addChild(b1); etc which is why it appeared that b1 was all used
up :-)When adding to the displaylist why does  b1 = new Button; have
to be done each time? Why can't b1, which is an instance of the button
class, be duplicated into the list? b1 is just a variable that refers
to the instance, right? Not a unique id. Not sure why this is
different from

mx:Panel
   mx:Button/
   mx:Button/
   mx:Button/
/mx:Panel

TIA, Mic.



[flexcoders] How to get XML data in before self-configuring custom component needs it?

2008-10-22 Thread Mic
Not a very good description I think :-( A custom component uses XML
data to build itself. With xml embedded within the AS component
everything flies:

var layoutXML:XML =
   layouts
  layout name='View1' description='Single View'
 item id='1'
orientationv/orientation
panes1/panes
 /item
  /layout etc

Moving the xml to an external document causes a situation where I
cannot get the xml in before the component needs it! Earliest I think
is preInitialize, right? Still not there in time. Not sure there is a
way to pause the AS component construct? Since this actually is static
data - 17 different view configs - shall I just leave it embedded?
Curious to know if there is a way to do the external thing?

private function loadXML():void{
   var XML_URL:String = ../xml/layouts.xml;
   var myXMLURL:URLRequest = new URLRequest(XML_URL);
   myLoader = new URLLoader(myXMLURL);
   myLoader.addEventListener(complete, xmlLoaded);
}

private function xmlLoaded(event:Event):void{
   layoutXML = XML(myLoader.data);
   trace(Data loaded.);
}

As always much TIA,

Mic.



[flexcoders] Re: passing data with custom event up displaylist chain?

2008-10-21 Thread Mic
Thanks Maciek 




[flexcoders] passing data with custom event up displaylist chain?

2008-10-15 Thread Mic
is it true to say that a custom event can communicate nothing except
an event has been sent, and that in order to send data, an event
subclass with public properties has to be coded? I have a tileList
deep within containers that must communicate its selectedItem to a
higher-level Canvas. I thought I might be able to somehow get the info
into the custom event before it is sent:

mx:Metadata
// [Event(updateStuff, type=flash.events.Event))]
[Event(updateStuff, type=flash.events.MouseEvent)]
/mx:Metadata

mx:TileList id=myTileList click = updateStuff(event)

private function updateStuff(e:Event):void{
   var eventStuff:Event = new Event(updateStuff,true);
   // put e data into eventStuff; - cannot do this :-)
   this.dispatchEvent(eventStuff);  
}

I am presuming that it does not make sense to bubble the tileList
MouseClick up the chain and then have the higher-level Canvas listener
 trap every mouse click and look for a currentTarget of myTileList.
 
TIA, Mic.



[flexcoders] Child Panel can be dragged out of its parent Canvas

2008-10-07 Thread Mic
When adding child Panels to a Canvas with actionscript, the Panel
cannot be dragged out of the Canvas at top or left, but can be
dragged (made to disappear) at right and bottom of Canvas. Not sure
why the child is not constrained within its parent? Not sure whether
this is relevant but there is a Module as a parent:

mx:Module
   var sPanel:SuperPanel;
   target = this.canvas1;
   this.target.addChild(sPanel);

   mx:Canvas canvas1

TIA Mic.



[flexcoders] x,y position of inner container relative to app?

2008-09-26 Thread Mic
I need to constrain a popup to a container embedded deep within
canvases and modules. A popup belongs to SystemManager and its
parent is the main app, so 0,0 sends it to the top left of the
browser. Can a deeply embedded container get its position relative to
the app? I can hard-code popup restraining values of course, but these
would not work if the user resizes the browser. TIA,

Mic.



[flexcoders] path for loading module swf from server - help please ...

2008-09-15 Thread Mic
I have got modules loading fine when my project is on a local drive.
But I am having trouble with the correct module path for a project
that is set up on a ColdFusion server. I have located the module swf
in the TestProject-debug folder, and thought that the following would
work:

mx:ModuleLoader
 
url=http://server1:8500/TestProj-debug/com/modules.TestMod.swf;
 ready=applyModuleSettings(event) error=errorHandler(event)/

Error = URL Not Found. 

Is my syntax off or is this the wrong place to look for the module? As
always, TIA,

Mic.



[flexcoders] Re: path for loading module swf from server - help please ...

2008-09-15 Thread Mic
Worked it out :-)



[flexcoders] Re: FlexLivedocs Module chart example has scroll bars ....

2008-09-05 Thread Mic
Thanks Alex!


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

 ColumnChartModule.mxml
 
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml;
percentWidth=100 percentHeight=100 minHeight=0 minWidth=0 
 mx:Script![CDATA[
 import mx.collections.ArrayCollection;
 [Bindable]
 public var expenses:ArrayCollection = new ArrayCollection([
 {Month:Jan, Profit:2000, Expenses:1500},
 {Month:Feb, Profit:1000, Expenses:200},
 {Month:Mar, Profit:1500, Expenses:500}
 ]);
 ]]/mx:Script
 mx:ColumnChart id=myChart dataProvider={expenses}
width=100% height=100% minWidth=0 minHeight=0
 
 
 MainApp.mxml:
 
 mx:ModuleLoader url=ColumnChartModule.swf width=100%
height=100% minHeight=0 minWidth=0/
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Mic
 Sent: Sunday, August 31, 2008 12:41 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] FlexLivedocs Module chart example has scroll
bars 
 
 
 http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html
 
 Can anyone show me how to fix this simple example so the chart shrinks
 to fit its container like it normally does? TIA,
 
 Mic.





[flexcoders] Now have them contained but with scrollbars ....

2008-08-31 Thread Mic
and all the Google examples of Module and ModuleLoader I have found
show scrollbars and not shrink to fit. The chart is in a VBox:

mx:VBox width=100% height=100%
   mx:LineChart id=chart
   dataProvider={salesArizona}
   height=100% width=100%

and without the Module wrapper shrinks to fit its VBox. What is it
about Module that inhibits this default behaviour, and how does one
get the chart to shrink to the VBox - scrollbars look bad :-(

TIA,

Mic.


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

 I have a canvas with 4 panels inside it. Each panel takes up a quarter
 of the canvas. When I populate the panels with modules that are
 charts, the modules are not constrained within the outer containers -
 the panels, but each chart module fills almost the whole canvas. How
 do I get the modules to stay within their parent containers? TIA,
 
 Mic.
 
 mx:Canvas id=canvas1
mx:Panel label=Test1 width=50% height=50% left=0 top=0
   mx:ModuleLoader url={cht1Strng}/   
/mx:Panel
mx:Panel label=Test2 width=50% height=50% right=0 y=0
   mx:ModuleLoader url={chart2String}/ 
/mx:Panel
mx:Panel label=Test3 width=50% height=50% bottom=0
   mx:ModuleLoader url={chart3String}/ 
/mx:Panel
mx:Panel label=Test4 width=50% height=50% bottom=0
   right=0
   mx:ModuleLoader url={chart4String}/
/mx:Panel
 /mx:Canvas





[flexcoders] FlexLivedocs Module chart example has scroll bars ....

2008-08-31 Thread Mic
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html

Can anyone show me how to fix this simple example so the chart shrinks
to fit its container like it normally does? TIA,

Mic.



[flexcoders] Restraining chart as Module within a Panel

2008-08-30 Thread Mic
I have a canvas with 4 panels inside it. Each panel takes up a quarter
of the canvas. When I populate the panels with modules that are
charts, the modules are not constrained within the outer containers -
the panels, but each chart module fills almost the whole canvas. How
do I get the modules to stay within their parent containers? TIA,

Mic.

mx:Canvas id=canvas1
   mx:Panel label=Test1 width=50% height=50% left=0 top=0
  mx:ModuleLoader url={cht1Strng}/   
   /mx:Panel
   mx:Panel label=Test2 width=50% height=50% right=0 y=0
  mx:ModuleLoader url={chart2String}/   
   /mx:Panel
   mx:Panel label=Test3 width=50% height=50% bottom=0
  mx:ModuleLoader url={chart3String}/   
   /mx:Panel
   mx:Panel label=Test4 width=50% height=50% bottom=0
  right=0
  mx:ModuleLoader url={chart4String}/
   /mx:Panel
/mx:Canvas



[flexcoders] TabBar from xml - missing labels

2008-08-23 Thread Mic
What is the syntax for the labelField please? I get the 4 tabs but no
labels. As always, TIA,

Mic.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
initialize=init() 
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.XMLListCollection;

public  var tabXML:XML =
  tab_bar
   tab label=Tab1/
   tab label=Tab2/
   tab label=Tab3/
   tab label=Tab4/
  /tab_bar;

[Bindable] public var tabArray:ArrayCollection = new 
ArrayCollection;

public function init():void {
createTabList();
}
  
  public function createTabList():void {
  for each (var node:XML in tabXML.tab) {
  var newItem:Object = new Object();
  newItem.tabLabel = [EMAIL PROTECTED];
  tabArray.addItem(newItem);
  trace([EMAIL PROTECTED]);
  }
   
  // myTabBar.labelField = @tabLabel;
  myTabBar.dataProvider = tabArray;

  }
  
 ]]
/mx:Script

 mx:TabBar id=myTabBar labelField = @tabLabel /

/mx:Application 



[flexcoders] Re: TabBar from xml - missing labels

2008-08-23 Thread Mic
Thanks Tim!



[flexcoders] Adding text to lineSegmentRenderer?

2008-08-01 Thread Mic
Thanks for everybody's help. I will pursue the possibility that there
is _accessible_ info in the chart object that the line series can use
to learn about the column series. In the meantime client says just
draw a line segment with the percentage value displayed, so I say no
problem thinking that I can just place a displayed label on each line
series segment  except that there are no labels for a line series
... surprised the heck out of me ... so how do I insert text into a
graphical environment?

override protected function updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void
 {
   g.drawRect(item.x, item.y,(50,5);

Do I add some kind of child text object here? TIA,

Mic ( I need a drink)