Re: [flexcoders] dmv with flex4 and flexbuilder3 causes direction style problem

2009-06-18 Thread thomas parquier
Hi Pete,

Thank you, the application compiles fine now.
But there seems to be a problem with httpservice url property, which seems
to work only with a '/path/to/file' format ( != 'path/to/file, which used to
work with flex3 ).

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/6/17 Pete Siviter petesivi...@googlemail.com




 Hi there,
 I think you'd need to take the datavisualization.swc from flashbuilder
 4.0.0 sdk (presumably installed under your drive_c in wine) and use it in
 your sdk folder under flexbulder linux.

 I spent quite a bit of time looking at the same problem and re-compiled 
 datavisualization
 after editing the source.  This stopped the compiler errors with direction
 but caused problems further down the line (though I was working in gumbo
 which I think isn't compatible with datavisualzations from earlier
 versions).

 I fixed the problem once I copied the correct datavisualization.swc from
 the 4.0.0 folder.

 There's a whole bunch of files you need to copy, but you can google it if
 you've never done it before.

 HTH,
 Pete


 On 16 Jun 2009, at 20:32, thomas parquier wrote:



 Hello,

 I've just moved a charting app to flex4 but a problem with a Gridlines
 style (direction) prevents from compiling.
 As said on Adobe forum, flashbuilder seems to not raise error and compile
 fine, but I'm using linux and flashbuilder works episodically (with wine).

 TIA,
 thomas
 ---
 http://www.web-attitude.fr/
 msn : thomas.parqu...@web-attitude.fr
 softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
 téléphone portable : +33601 822 056



  



Re: [flexcoders] dmv with flex4 and flexbuilder3 causes direction style problem

2009-06-18 Thread Pete Siviter

Hi Thomas,

Glad it worked.  I am afraid I don't really use httpservice as I am  
using amfphp for my server communications (which seems to work out the  
box in flex 4), but my only suggestions are to try other relative  
paths like ./path/to/file to see if that works?  Or use a function to  
find the absolute path of the default location to return to the client  
(php script would do it I think). Just random ideas...


Of course, it should be compatible, so maybe file a bug?

Regards,
Pete


On 18 Jun 2009, at 08:43, thomas parquier wrote:




Hi Pete,

Thank you, the application compiles fine now.
But there seems to be a problem with httpservice url property, which  
seems to work only with a '/path/to/file' format ( != 'path/to/file,  
which used to work with flex3 ).


thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net
téléphone portable : +33601 822 056



2009/6/17 Pete Siviter petesivi...@googlemail.com




Hi there,

I think you'd need to take the datavisualization.swc from  
flashbuilder 4.0.0 sdk (presumably installed under your drive_c in  
wine) and use it in your sdk folder under flexbulder linux.


I spent quite a bit of time looking at the same problem and re- 
compiled datavisualization after editing the source.  This stopped  
the compiler errors with direction but caused problems further down  
the line (though I was working in gumbo which I think isn't  
compatible with datavisualzations from earlier versions).


I fixed the problem once I copied the correct datavisualization.swc  
from the 4.0.0 folder.


There's a whole bunch of files you need to copy, but you can google  
it if you've never done it before.


HTH,
Pete


On 16 Jun 2009, at 20:32, thomas parquier wrote:




Hello,

I've just moved a charting app to flex4 but a problem with a  
Gridlines style (direction) prevents from compiling.
As said on Adobe forum, flashbuilder seems to not raise error and  
compile fine, but I'm using linux and flashbuilder works  
episodically (with wine).


TIA,
thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net
téléphone portable : +33601 822 056











[flexcoders] gumbo itemrenderer 100% size

2009-06-18 Thread Herculano Campos
hi,

i have a resizable datagroup (vertical layout) and i want to have a 
itemrenderer with a rectangle that fits the with of the datagroup.
i have tried itemrenderer width=100% or left=0 right=0 but does not work when 
it is resized by the states.
am i doing something wrong here or is it a gumbo bug?




s:List id=meetingsList skinClass=ui.components.MeetingsList right=0 
left=0 top=0 bottom=40
s:ArrayCollection
fx:Object hour=xxx date=xxx info=asdkjha 
sdlkajsd lakjds status=xxx/
/s:ArrayCollection
/s:List



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

s:states
s:State name=normal/
s:State name=disabled/
/s:states

fx:Metadata[HostComponent(spark.components.List)]/fx:Metadata

s:DataGroup itemRenderer=ui.components.MeetingsListRenderer 
left=0 right=16 top=0 bottom=0
clipAndEnableScrolling=true id=dataGroup 
s:layout
s:VerticalLayout gap=10 /
/s:layout
/s:DataGroup

s:VScrollBar right=0 top=0 bottom=0
skinClass=ui.components.VScrollBar
fixedThumbSize=false id=vscrollbar
viewport={dataGroup}/

/s:Skin



?xml version=1.0 encoding=utf-8?
s:ItemRenderer 
xmlns:fx=http://ns.adobe.com/mxml/2009; 
xmlns:s=library://ns.adobe.com/flex/spark 
xmlns:mx=library://ns.adobe.com/flex/halo
width=100%

fx:Script
![CDATA[
import events.MeetingsEvent;
import spark.skins.default.ButtonSkin;

override public function set data( value:Object ):void
{
super.data = value;

if (value) 
{
closedRect.visible = false;
closedRect.includeInLayout = false;
availableRect.visible = false;
availableRect.includeInLayout = false;
alertRect.visible = false;
alertRect.includeInLayout = false;

switch (data.status)
{
case alert:
alertRect.visible = 
true;

alertRect.includeInLayout = true;
break;

case closed:
closedRect.visible = 
true;

closedRect.includeInLayout = true;
break;

case available:
availableRect.visible = 
true;

availableRect.includeInLayout = true;
break;  

}
}
}   
]]
/fx:Script

s:transitions
s:Transition toState=selected autoReverse=true
s:Parallel
s:Fade target={expandGroup} duration=300 /
s:Resize target={this} duration=300 /
/s:Parallel
/s:Transition
s:Transition toState=normal autoReverse=true
s:Parallel
s:Fade target={expandGroup} duration=300 /
s:Resize target={this} duration=300 /
/s:Parallel
/s:Transition
/s:transitions

s:states
s:State name=normal/
s:State name=hovered/
s:State name=selected/
/s:states

s:Group height=60 left=0 right=0 top=0
s:Rect id=closedRect left=0 right=0 top=0 bottom=0
s:fill
s:LinearGradient x=0 scaleX=60 
rotation=90
  

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Amy
--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 No response huh?  Ok, you're welcome valdhor (Steve).  One thing to
 point out is that all flex controls, containers and components extend
 UIComponent. 

AdvancedDataGridItemRenderer doesn't.  I suspect there are others as well.



[flexcoders] Differences between the Mac and Win compilers

2009-06-18 Thread xelf...@rocketmail.com
Can anyone delineate the differences between the Mac and Win Flex compilers?





[flexcoders] Newb Cairngen question...

2009-06-18 Thread xelf...@rocketmail.com
I followed the three or four simple steps outlined in the instructions here:
http://www.ericfeminella.com/blog/cairngen/

And I get...

Buildfile: C:\inetpub\wwwroot\\cairngenTest\Cairngen 2.1\build.xml

BUILD FAILED
C:\inetpub\wwwroot\cairngenTest\Cairngen 2.1\build.xml:373: Unable to load a 
script engine manager (org.apache.bsf.BSFManager or 
javax.script.ScriptEngineManager)

Anyone familiar?



[flexcoders] Changing the background of items in a TileList

2009-06-18 Thread Max Pimm
I need to customize the background of by items in a TileList.

I've been looking through the code of tile list and i can't find a way to 
override the defaut rectangle that the component draws for all tiles without 
overriding updateDisplayList which would involve rewriting quite a bit of the 
code in the component.

Is there an easier way?

Thanks

Max



[flexcoders] Re: multiple filters on XMLListCollection how?

2009-06-18 Thread valdhor
Each of the items passed to the filter function should be objects from
your data provider. You should be able to use one filter function for
both criteria...

private function applyColourAndSizeFilter(item:Object):Boolean
{
 if(item.colour == All colours  item.size == 12)
 {
 return true;
 }
 return false;
}


--- In flexcoders@yahoogroups.com, munene_uk munene.anth...@...
wrote:

 does anyone have any examples of how i can create multiple filters for
use in two comboboxes for one datagrid? seems my implementation only
filters on one but not both e.g if i select items that are size 12 i
cant further select size 12 items that are black... AS3 code below

 private function filterColourData():void
 {

  xmlData2.filterFunction = applyColourFilter;
  xmlData2.refresh()
  Alert.show(xmlData2.length.toString());

 }
   public function applyColourFilter(item:Object):Boolean
   {

if(colourFilter.selectedItem == All colours)
{
 return true

}

else
{
return item.colour == colourFilter.selectedItem;

}






   }


private function filterSizeData():void
 {

  xmlData2.filterFunction = applySizeFilter;
  xmlData2.refresh()
  Alert.show(xmlData2.length.toString());

 }
   public function applySizeFilter(item:Object):Boolean
   {


if(sizeFilter.selectedItem == All sizes)
{
 return true
}
else
{
return item.sizes == sizeFilter.selectedItem;

}




   }





[flexcoders] Rotating axis labels

2009-06-18 Thread inevative
Hey guys

I am trying to rotate the lables on a chart and the examples i have looked at 
seem to work but not for line charts which is what i am using.

Can anyone tell me if it is actually possible?

Also if it is possible to have the horizontalAxis display indicator lables at 
certain intervals as the charts have a few points and i want to space them out 
a bit.



[flexcoders] Display Server Time

2009-06-18 Thread yogesh patel
I want to display server time on front end.i am creating Date object through 
string returning from server side and i have used timer with 1 second interval 
and updating the clock ,but it shows some seconds delay after some time because 
timer goes slow down .How to avoid this delay of seconds? 



  Cricket on your mind? Visit the ultimate cricket website. Enter 
http://cricket.yahoo.com

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread valdhor
Actually, I am still reading through Peter Ent's dissertation on the subject.

From what I have learned, what I am doing is not wrong per se. It works and 
works very well for the smaller data sets that I use (Hundreds of rows, rather 
than thousands). Also, doing it the way I do is a lot more readable. I don't 
see it as a bad habit - just one way of many to get something done.

I think that if I had a performance issue I would go back and tweak item 
renderers (And other components) to be more efficient.

From a new users perspective, if I had seen your item renderer when I first 
started using Flex, I would have been totally intimidated and probably tried 
very hard never to need an item renderer.


--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 No response huh?  Ok, you're welcome valdhor (Steve).  One thing to
 point out is that all flex controls, containers and components extend
 UIComponent.  Therefore, they all use the createChildren(),
 commitProperties(), measure(), layoutChrome() and updateDisplayList() 
 methods.  This applies to itemRenderers as well.  The Flex engineers did
 a great job developing the component life-cycle, and each of these
 functions has a specific purpose.  So really it's fine, if some other
 practice, that circumvents the intended use of these methods, works for
 you.  However, it's propbably not fair to spread bad habits like this to
 others; that are just learning.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Ok, here's how I would do it; with efficiency and best-practice in
 mind:
 
 
 http://www.timothyhoff.com/projects/AgeItemRendererSample/AgeItemRendere\
 \
  rSample.html
 
 http://www.timothyhoff.com/projects/AgeItemRendererSample/AgeItemRender\
 \
  erSample.html
  ( right click to view source )
 
  Two main differences Steve:
 
  First, use createChildren to add the children, instead of in set data.
  I suspect that what's happening with the way you are doing it is that
  each time the data is changed (which, because the itemRenderers are
  recycled, happens on every scroll), the instance of the child is
  attempted to be added to the display list. I can't see the code in
  flash.display.DisplayObjectContainer, but I suspect that the code is
  checking to see if the instance exists already and/or re-parenting it.
  Either way, this is an un-necessary step. You only need to add the
  child once and then use the data to control it's state.
 
  Second, for efficiency, try to avoid using containers in
 itemRenderers.
  A good practice is to extend UIComponent and do the layout manually.
  It's a little more work, but you get some good performance benefits.
 
  I encourage you to read this series
  http://www.adobe.com/devnet/flex/articles/itemrenderers_pt5.html and
  also look at the source code for the Flex controls. They all follow
 the
  same component life-cycle pattern.
 
  Angelo, look at this sample for how to use an itemEditor.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   I thought that was the idea.
  
   In the example, I wanted a new NumericStepper for each data item
  (Actually two new NumericSteppers). If createChildren only runs once,
  how would you get the required output? In other words, can you post
 your
  version of the example using createChildren ?
  
  
  
   --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
   
   
Yes, createChildren will only execute once; while set data will
  execute
many times. Perhaps it's not a problem if the same child gets
 added
  to
the display list everytime that the data is set. But usually, you
  only
need to add them once.
   
-TH
   
--- In flexcoders@yahoogroups.com, valdhor valdhorlists@
 wrote:

 I use addChild in the set data function only because I always
  have.

 I have built hundreds of renderers this way and none of them
 have
given me a problem. If there's a good reason why I shouldn't do it
  this
way, I'm all ears.


 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  I'm with you Steve; about using AS for an itemRenderer. I do
  wonder
why
  you would use addChild in the set data function though; rather
  than
in
  createChildren . For mxml, this should work Angelo:
 
  mx:itemRenderer
  mx:Component
  mx:HBox horizontalGap=5 horizontalAlign=center
  width=100% horizontalScrollPolicy=off
verticalScrollPolicy=off
  mx:NumericStepper id=nsOutwardAgeYear value={ data.Age
  } minimum=0 maximum=200 stepSize=1 width=50
  textAlign=center/
  mx:NumericStepper id=nsOutwardAgeMonths value={
  data.Months } minimum=0 maximum=200 stepSize=1
 width=50
  textAlign=center/
  /mx:HBox
  /mx:Component
  /mx:itemRenderer
 
  For the HBox, notice the use of horizontalGap, instead of a
  spacer
as
  well. Just cleans it up a bit.
 
  

Re: [flexcoders] Changing the background of items in a TileList

2009-06-18 Thread thomas parquier
I think you should *only* have to override the drawTileBackground
function...

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/6/18 Max Pimm m...@alwayssunny.com



 I need to customize the background of by items in a TileList.

 I've been looking through the code of tile list and i can't find a way to
 override the defaut rectangle that the component draws for all tiles without
 overriding updateDisplayList which would involve rewriting quite a bit of
 the code in the component.

 Is there an easier way?

 Thanks

 Max

  



Re: [flexcoders] Rotating axis labels

2009-06-18 Thread thomas parquier
fonts have to be embedded to get labels rotated.

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/6/18 inevative inevat...@yahoo.com



 Hey guys

 I am trying to rotate the lables on a chart and the examples i have looked
 at seem to work but not for line charts which is what i am using.

 Can anyone tell me if it is actually possible?

 Also if it is possible to have the horizontalAxis display indicator lables
 at certain intervals as the charts have a few points and i want to space
 them out a bit.

  



[flexcoders] Fooling the runtime over type

2009-06-18 Thread Gregor Kiddie
I've seen a similar question asked on flex coders before, but it was
about 2006 so things may have moved on since then!

I'm trying to fool the runtime into thinking one object is of a
different type. The object is of type ObjectProxy so it can handle all
the calls to the object it is proxying, and I'm trying to use the Proxy
in place of the object it is proxying... Clear as mud?

 

Basically...

 

var obj : ObjectProxy = new ObjectProxy( new MyObject() );

var newObj : * = obj;

 

works because the newObj variable is untyped. This isn't acceptable for
a whole host of reasons (the loudest one appears to be that code hinting
stops working at that point).

 

var obj : ObjectProxy = new ObjectProxy( new MyObject() );

var newObj : MyObject = obj;

 

throws a Type Coercion error as it cannot convert the Proxy to the
strong type.

 

Is there any way of fooling the runtime into thinking the type of the
ObjectProxy is actually that of MyObject?

Am I actually going mad, and trying to do something foolhardy and
impossible?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk

 



[flexcoders] one to one chat

2009-06-18 Thread dev.achiever
how to achiving one to one chat in flex by using rtmp server 



RE: [flexcoders] Display Server Time

2009-06-18 Thread Keith Reinfeld
 

displayTime = startTime_Server + (currentTime_Client - startTime_Client);

 

Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
http://keithreinfeld.home.comcast.net/ 
 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of yogesh patel
Sent: Thursday, June 18, 2009 7:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Display Server Time

 







I want to display server time on front end.i am creating Date object through
string returning from server side and i have used timer with 1 second
interval and updating the clock ,but it shows some seconds delay after some
time because timer goes slow down .How to avoid this delay of seconds? 





  _  


Cricket on your mind? Visit the ultimate cricket website. Enter
http://in.rd.yahoo.com/tagline_cricket_1/*http:/cricket.yahoo.com  now!





[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff

Very well, you go with that.

-TH

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

 Actually, I am still reading through Peter Ent's dissertation on the
subject.

 From what I have learned, what I am doing is not wrong per se. It
works and works very well for the smaller data sets that I use (Hundreds
of rows, rather than thousands). Also, doing it the way I do is a lot
more readable. I don't see it as a bad habit - just one way of many to
get something done.

 I think that if I had a performance issue I would go back and tweak
item renderers (And other components) to be more efficient.

 From a new users perspective, if I had seen your item renderer when I
first started using Flex, I would have been totally intimidated and
probably tried very hard never to need an item renderer.


 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  No response huh? Ok, you're welcome valdhor (Steve). One thing to
  point out is that all flex controls, containers and components
extend
  UIComponent. Therefore, they all use the createChildren(),
  commitProperties(), measure(), layoutChrome() and
updateDisplayList()
  methods. This applies to itemRenderers as well. The Flex engineers
did
  a great job developing the component life-cycle, and each of these
  functions has a specific purpose. So really it's fine, if some other
  practice, that circumvents the intended use of these methods, works
for
  you. However, it's propbably not fair to spread bad habits like this
to
  others; that are just learning.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Ok, here's how I would do it; with efficiency and best-practice in
  mind:
  
  
 
http://www.timothyhoff.com/projects/AgeItemRendererSample/AgeItemRendere\
\
  \
   rSample.html
  
 
http://www.timothyhoff.com/projects/AgeItemRendererSample/AgeItemRender\
\
  \
   erSample.html
   ( right click to view source )
  
   Two main differences Steve:
  
   First, use createChildren to add the children, instead of in set
data.
   I suspect that what's happening with the way you are doing it is
that
   each time the data is changed (which, because the itemRenderers
are
   recycled, happens on every scroll), the instance of the child is
   attempted to be added to the display list. I can't see the code in
   flash.display.DisplayObjectContainer, but I suspect that the code
is
   checking to see if the instance exists already and/or re-parenting
it.
   Either way, this is an un-necessary step. You only need to add the
   child once and then use the data to control it's state.
  
   Second, for efficiency, try to avoid using containers in
  itemRenderers.
   A good practice is to extend UIComponent and do the layout
manually.
   It's a little more work, but you get some good performance
benefits.
  
   I encourage you to read this series
   http://www.adobe.com/devnet/flex/articles/itemrenderers_pt5.html
and
   also look at the source code for the Flex controls. They all
follow
  the
   same component life-cycle pattern.
  
   Angelo, look at this sample for how to use an itemEditor.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
   
I thought that was the idea.
   
In the example, I wanted a new NumericStepper for each data item
   (Actually two new NumericSteppers). If createChildren only runs
once,
   how would you get the required output? In other words, can you
post
  your
   version of the example using createChildren ?
   
   
   
--- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:


 Yes, createChildren will only execute once; while set data
will
   execute
 many times. Perhaps it's not a problem if the same child gets
  added
   to
 the display list everytime that the data is set. But usually,
you
   only
 need to add them once.

 -TH

 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@
  wrote:
 
  I use addChild in the set data function only because I
always
   have.
 
  I have built hundreds of renderers this way and none of them
  have
 given me a problem. If there's a good reason why I shouldn't
do it
   this
 way, I'm all ears.
 
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@
wrote:
  
  
   I'm with you Steve; about using AS for an itemRenderer. I
do
   wonder
 why
   you would use addChild in the set data function though;
rather
   than
 in
   createChildren . For mxml, this should work Angelo:
  
   mx:itemRenderer
   mx:Component
   mx:HBox horizontalGap=5 horizontalAlign=center
   width=100% horizontalScrollPolicy=off
 verticalScrollPolicy=off
   mx:NumericStepper id=nsOutwardAgeYear value={ data.Age
   } minimum=0 maximum=200 stepSize=1 width=50
   textAlign=center/
   mx:NumericStepper id=nsOutwardAgeMonths value={
   data.Months } minimum=0 maximum=200 stepSize=1
  width=50
   

Re: [flexcoders] Newb Cairngen question...

2009-06-18 Thread Tom Chiverton
On Thursday 18 Jun 2009, xelf...@rocketmail.com wrote:
 Anyone familiar?

Looks like an Ant problem, rather than Cairngen.

-- 
Helping to centrally foster synergistic dynamic cross-media collaborative 
m-commerce as part of the IT team of the year, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

Re: [flexcoders] Differences between the Mac and Win compilers

2009-06-18 Thread Tom Chiverton
On Thursday 18 Jun 2009, xelf...@rocketmail.com wrote:
 Can anyone delineate the differences between the Mac and Win Flex
 compilers?

None, it's all Java.

-- 
Helping to evangelistically empower sticky open-source initiatives as part of 
the IT team of the year, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

[flexcoders] Livecycle CommunicationsException: Communications link failure

2009-06-18 Thread Ward Loockx
Hello,

 I'm having a problem with my connections to the mysql server that are 
timing out(and get the communicationsException). We use 
autoreconnect=true when creating the connections, the problem is that 
whole application is crashing at this point because the connection has 
been lost. The Dao's just create one connection at startup for all 
clients (that should stay open). Does somebody has experience with this 
problem or any advice how to keep the connections open?

Here is the stacktrace

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications 
link failure
Last packet sent to the server was 19 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at 
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912)
at 
com.dnxlive.cammer.remoting.CammerService.getShortcuts(CammerService.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
at 
flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
at 
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
at 
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
at 
flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
at 
flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
at 
flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
at 
flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
at 
flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
at 
flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
at 
flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at 
com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at 
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
at 
com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2452)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2906)
... 36 more

Thanks in advance!
Ward Loockx


[flexcoders] Copy ToolTip to Clipboard

2009-06-18 Thread Adrian Williams
Hi all,

 I have a challenging little req't.  We're using tooltips all over 
the place on our app.  I need to be able to setup the tooltips so that 
we can have a copy button or text in the tooltip that our user can 
click to copy the contents of the tooltip to the system clipboard.  This 
needs to be usable on everything from a large ADG with thousands of 
tooltips to the simple stuff.  I thought I had seen a solution for this 
at one point in time but cannot for the life of me find it again.

 Help!?

Thanks,
adrian



Re: [flexcoders] Livecycle CommunicationsException: Communications link failure

2009-06-18 Thread Pedro Sena
I had this problem before.

It's related to mysql(obviously) not to flex, but I'll try to help you.

To do that, please answer some questions:

1) What is your connection timeout?
2) Are your application and database in the same machine?
3) Are you using some kind of connection pool mechanism? If so, what are you
using?
4) Is it ocurring when your execute some specific query or it occurs
anytime?
5) What engine are you using(MyISAM, InnoDB, ...) ?

PS

On Thu, Jun 18, 2009 at 1:04 PM, Ward Loockx w...@loockx.be wrote:



 Hello,

 I'm having a problem with my connections to the mysql server that are
 timing out(and get the communicationsException). We use
 autoreconnect=true when creating the connections, the problem is that
 whole application is crashing at this point because the connection has
 been lost. The Dao's just create one connection at startup for all
 clients (that should stay open). Does somebody has experience with this
 problem or any advice how to keep the connections open?

 Here is the stacktrace

 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
 link failure
 Last packet sent to the server was 19 ms ago.
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
 at

 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at

 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at
 com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
 at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)
 at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
 at

 com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
 at
 com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912)
 at

 com.dnxlive.cammer.remoting.CammerService.getShortcuts(CammerService.java:86)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

 flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
 at

 flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
 at
 flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
 at

 flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
 at

 flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
 at
 flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
 at
 flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
 at

 flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
 at

 flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
 at

 flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
 at
 flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 at

 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(SocketInputStream.java:168)
 at

 com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
 at

 com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
 at

 com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
 at 

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff

Oh heck, I just can't resist.

 From what I have learned, what I am doing is not wrong per se. It
works and works very well for the smaller data sets that I use (Hundreds
of rows, rather than thousands). Also, doing it the way I do is a lot
more readable. I don't see it as a bad habit - just one way of many to
get something done.

For some reason, you are thinking that each item in a data set has an
itemRenderer; they don't  There are only enough itemRenderers
instantiated, to display in the scrollable area of a list; and sometimes
one or two more.  When the list scrolls or the dataProvider changes, the
itemRenderers that have already been instantiated are recycled.  So, it
doesn't matter if there are 100 or 1000 items in the dataProvider.  What
matters is how many objects on the screen need to be rendered.Each
time that an itemRenderer is recycled, it's data is set; but it isn't
re-instantiated.  So performing tasks like addChild are redundant at
that point. Agreed, there's usually more than one way to accomplish a
task in flex and everyone is entitled to their opinion and preferred
practices.  If you want to add children to a component every time that
the data changes, go for it.   To me though, it just doesn't make sense
to try to re-add something that's already there.

 I think that if I had a performance issue I would go back and tweak
item renderers (And other components) to be more efficient.

We're talking milliseconds here, so perception is always relative.  I
imagine that people that have only used dial-up, are accustomed to and
happy with a certain level of performance.  That is, until they
experience broadband for the first time.

 From a new users perspective, if I had seen your item renderer when I
first started using Flex, I would have been totally intimidated and
probably tried very hard never to need an item renderer.

If you look back at the first few posts on this thread, you'll see that
my response was a solution for Angelo's simple in-line mxml
itemRenderer.  You introduced an AS solution.  Agreed, beginners will
find AS itemRenderers intimidating.  Oh well, you have to learn
sometime.

So, I don't want to make this a big deal.  At the end of the day, if it
works for you, that's all that matters.  That doesn't mean though, in a
public forum, that best-practices shouldn't be pointed out.  In the
past, I've had several occasions where I've just been flat-out wrong on
this list; or should I say strong and wrong, because of ego and
stubbornness. :) .  The good thing is that people have nicely pointed
out my errors and I've learned from it; as well as others following
along.  On this specific issue though, I stand by my assertions
completely.

Anyway, nice discussing this with you Steve.  No hard feelings.

-TH

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:


 Very well, you go with that.

 -TH

 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  Actually, I am still reading through Peter Ent's dissertation on the
 subject.
 
  From what I have learned, what I am doing is not wrong per se. It
 works and works very well for the smaller data sets that I use
(Hundreds
 of rows, rather than thousands). Also, doing it the way I do is a lot
 more readable. I don't see it as a bad habit - just one way of many to
 get something done.
 
  I think that if I had a performance issue I would go back and tweak
 item renderers (And other components) to be more efficient.
 
  From a new users perspective, if I had seen your item renderer when
I
 first started using Flex, I would have been totally intimidated and
 probably tried very hard never to need an item renderer.
 
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   No response huh? Ok, you're welcome valdhor (Steve). One thing to
   point out is that all flex controls, containers and components
 extend
   UIComponent. Therefore, they all use the createChildren(),
   commitProperties(), measure(), layoutChrome() and
 updateDisplayList()
   methods. This applies to itemRenderers as well. The Flex engineers
 did
   a great job developing the component life-cycle, and each of these
   functions has a specific purpose. So really it's fine, if some
other
   practice, that circumvents the intended use of these methods,
works
 for
   you. However, it's propbably not fair to spread bad habits like
this
 to
   others; that are just learning.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
   
   
Ok, here's how I would do it; with efficiency and best-practice
in
   mind:
   
   
  

http://www.timothyhoff.com/projects/AgeItemRendererSample/AgeItemRendere\
\
 \
   \
rSample.html
   
  

http://www.timothyhoff.com/projects/AgeItemRendererSample/AgeItemRender\
\
 \
   \
erSample.html
( right click to view source )
   
Two main differences Steve:
   
First, use createChildren to add the children, instead of in set
 data.
I suspect that what's 

Re: [flexcoders] Livecycle CommunicationsException: Communications link failure

2009-06-18 Thread Ward Loockx
Hello Pedro,

Thanks for your reply!

Here are the answers

1) What is your connection timeout?
- connect timeout 5
2) Are your application and database in the same machine?
- No (the DAO's make multiple connections to mysql servers and non of them 
are installed on the localhost)
3) Are you using some kind of connection pool mechanism? If so, what are you
using?
- Don't think so
4) Is it ocurring when your execute some specific query or it occurs
anytime?
- No, it just occurs after 20minutes. (every connection). So I get multiple 
errors in my application
5) What engine are you using(MyISAM, InnoDB, ...) ?
- MyISAM

Thanks,
Ward


On Thursday 18 June 2009 06:28:26 pm Pedro Sena wrote:
 I had this problem before.

 It's related to mysql(obviously) not to flex, but I'll try to help you.

 To do that, please answer some questions:

 1) What is your connection timeout?
 2) Are your application and database in the same machine?
 3) Are you using some kind of connection pool mechanism? If so, what are
 you using?
 4) Is it ocurring when your execute some specific query or it occurs
 anytime?
 5) What engine are you using(MyISAM, InnoDB, ...) ?

 PS

 On Thu, Jun 18, 2009 at 1:04 PM, Ward Loockx w...@loockx.be wrote:
  Hello,
 
  I'm having a problem with my connections to the mysql server that are
  timing out(and get the communicationsException). We use
  autoreconnect=true when creating the connections, the problem is that
  whole application is crashing at this point because the connection has
  been lost. The Dao's just create one connection at startup for all
  clients (that should stay open). Does somebody has experience with this
  problem or any advice how to keep the connections open?
 
  Here is the stacktrace
 
  com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
  link failure
  Last packet sent to the server was 19 ms ago.
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
  Method)
  at
 
  sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc
 cessorImpl.java:39) at
 
  sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst
 ructorAccessorImpl.java:27) at
  java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
  com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
  at
  com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
  at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)
  at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
  at
 
  com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1
 761) at
  com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912
 ) at
 
  com.dnxlive.cammer.remoting.CammerService.getShortcuts(CammerService.java
 :86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
 :39) at
 
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
 mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
  at
 
  flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.
 java:421) at
 
  flex.messaging.services.RemotingService.serviceMessage(RemotingService.ja
 va:183) at
  flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:150
 3) at
 
  flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint
 .java:884) at
 
  flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilt
 er.java:121) at
  flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
  at
  flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
  at
 
  flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter
 .java:67) at
 
  flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilt
 er.java:146) at
 
  flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:2
 78) at
  flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322
 ) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at
 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
 ionFilterChain.java:290) at
 
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
 rChain.java:206) at
 
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve
 .java:233) at
 
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
 .java:191) at
 
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
 128) at
 
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
 102) at
 
  

[flexcoders] ComboBox : HBox as ItemRenderer - textRollOverColor problem

2009-06-18 Thread cwicky99
So I have an itemRenderer which simply displays text and an
image...something like:

mx:HBox
 mx:Image  /
 mx:Label text={data.anme} /
/mx:HBox

My ComboBox is configured in MXML such as:

mx:ComboBox id=foo itemRenderer=MyComboRenderer /

My CSS has:

ComboBox {
 textRollOverColor=0xFF;
}

So what I want is for the items in my ComboBox (foo) to have red
text on the Label when the item is rolled over...but this isn't
happening.  How can I get this to work?  I should mention I prefer to
keep the style stuff out of the code and in a CSS file.





[flexcoders] Accurate way of measuring a datagrid

2009-06-18 Thread djhatrick
My datagrid won't measure correctly, i have variable row height, but it can't 
seem to get it right, I don't want any scroll bars..., is there an easy way to 
override some function so i can get the actual rowheight of each row and 
determine my height correctly

Thanks,Patrick


Wow, i had to rejoing Flexcoders Google Groups are better than yahoogroups, 
sorry yahoogroups,



[flexcoders] Re: ComboBox : HBox as ItemRenderer - textRollOverColor problem

2009-06-18 Thread cwicky99
So my fix is this:

MyComboRenderer
mx:HBox rollOver=onRollOver(); rollOut=onRollOut();

  mx:Script
  ...
 private function onRollOver():void {
 lblGroup.setStyle(color, getStyle(textRollOverColor));
 }

 private function onRollOut():void {
 lblGroup.setStyle(color, getStyle(color));
 }
  ...
  /mx:Script

/mx:HBox

You'll notice I just listen for the rollOver/rollOut events and handle
it there.  It uses the textRollOverColor style that is set on the
ComboBox :)

--- In flexcoders@yahoogroups.com, cwicky99 codecr...@... wrote:

 So I have an itemRenderer which simply displays text and an
 image...something like:

 mx:HBox
  mx:Image  /
  mx:Label text={data.anme} /
 /mx:HBox

 My ComboBox is configured in MXML such as:

 mx:ComboBox id=foo itemRenderer=MyComboRenderer /

 My CSS has:

 ComboBox {
  textRollOverColor=0xFF;
 }

 So what I want is for the items in my ComboBox (foo) to have red
 text on the Label when the item is rolled over...but this isn't
 happening.  How can I get this to work?  I should mention I prefer to
 keep the style stuff out of the code and in a CSS file.




[flexcoders] Creating a new ListEvent - how to specify ItemRenderer?

2009-06-18 Thread flexcoder2008
I have a List that handles a Click event - the ClickEvent takes a ListEvent, 
and inside that handler I have access to the ListEvent's itemRenderer property.

This allows me to align a button next to the row that I have clicked on.

I also want to trigger this click event when the user uses the keyboard up and 
down arrow keys to navigate the list.

Inside my KeyDown handler I want to call my List click handler.

The trick is, how do I specify the itemRenderer for the new ListClick event or 
get access to it?

eg. 

var le:ListEvent = new ListEvent(ListEvent.CLICK,.. .. .., myItemRenderer);





[flexcoders] Re: Creating a new ListEvent - how to specify ItemRenderer?

2009-06-18 Thread Tim Hoff
Look at the itemFocusIn ListEvent.

-TH

--- In flexcoders@yahoogroups.com, flexcoder2008 djohnso...@... wrote:

 I have a List that handles a Click event - the ClickEvent takes a ListEvent, 
 and inside that handler I have access to the ListEvent's itemRenderer 
 property.
 
 This allows me to align a button next to the row that I have clicked on.
 
 I also want to trigger this click event when the user uses the keyboard up 
 and down arrow keys to navigate the list.
 
 Inside my KeyDown handler I want to call my List click handler.
 
 The trick is, how do I specify the itemRenderer for the new ListClick event 
 or get access to it?
 
 eg. 
 
 var le:ListEvent = new ListEvent(ListEvent.CLICK,.. .. .., myItemRenderer);





Re: [flexcoders] Livecycle CommunicationsException: Communications link failure

2009-06-18 Thread Pedro Sena
1) Try to increase your connection timeout
2) Double check if you are releasing the connections correctly.
3) Use a connection pooling mechanism :) C3P0 is a good one and easy to use

If you are using hibernate, it will be very easy to configure it.

HTH

On Thu, Jun 18, 2009 at 2:11 PM, Ward Loockx w...@loockx.be wrote:



 Hello Pedro,


 Thanks for your reply!


 Here are the answers


 1) What is your connection timeout?
 - connect timeout 5
 2) Are your application and database in the same machine?
 - No (the DAO's make multiple connections to mysql servers and non of them
 are installed on the localhost)
 3) Are you using some kind of connection pool mechanism? If so, what are
 you
 using?
 - Don't think so
 4) Is it ocurring when your execute some specific query or it occurs
 anytime?
 - No, it just occurs after 20minutes. (every connection). So I get
 multiple errors in my application
 5) What engine are you using(MyISAM, InnoDB, ...) ?
 - MyISAM


 Thanks,
 Ward



 On Thursday 18 June 2009 06:28:26 pm Pedro Sena wrote:
  I had this problem before.
 
  It's related to mysql(obviously) not to flex, but I'll try to help you.
 
  To do that, please answer some questions:
 
  1) What is your connection timeout?
  2) Are your application and database in the same machine?
  3) Are you using some kind of connection pool mechanism? If so, what are
  you using?
  4) Is it ocurring when your execute some specific query or it occurs
  anytime?
  5) What engine are you using(MyISAM, InnoDB, ...) ?
 
  PS
 
  On Thu, Jun 18, 2009 at 1:04 PM, Ward Loockx w...@loockx.be wrote:
   Hello,
  
   I'm having a problem with my connections to the mysql server that are
   timing out(and get the communicationsException). We use
   autoreconnect=true when creating the connections, the problem is that
   whole application is crashing at this point because the connection has
   been lost. The Dao's just create one connection at startup for all
   clients (that should stay open). Does somebody has experience with this
   problem or any advice how to keep the connections open?
  
   Here is the stacktrace
  
   com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
   link failure
   Last packet sent to the server was 19 ms ago.
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
   Method)
   at
  
  
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc
  cessorImpl.java:39) at
  
  
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst
  ructorAccessorImpl.java:27) at
   java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
   com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
   at
  
 com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
   at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)
   at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
   at
  
  
 com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1
  761) at
  
 com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912
  ) at
  
  
 com.dnxlive.cammer.remoting.CammerService.getShortcuts(CammerService.java
  :86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
  
  
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
  :39) at
  
  
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
  mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
   at
  
  
 flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.
  java:421) at
  
  
 flex.messaging.services.RemotingService.serviceMessage(RemotingService.ja
  va:183) at
  
 flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:150
  3) at
  
  
 flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint
  .java:884) at
  
  
 flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilt
  er.java:121) at
   flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
   at
  
 flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
   at
  
  
 flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter
  .java:67) at
  
  
 flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilt
  er.java:146) at
  
  
 flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:2
  78) at
  
 flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322
  ) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at
  
  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
  ionFilterChain.java:290) at
  
  
 

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff

Yep, should have said, those that don't implement IDataRenderer,
IListItemRenderer and/or IDropInListItemRenderer manually.  Nice snype.

-TH

--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  No response huh? Ok, you're welcome valdhor (Steve). One thing to
  point out is that all flex controls, containers and components
extend
  UIComponent.

 AdvancedDataGridItemRenderer doesn't. I suspect there are others as
well.






[flexcoders] Re: Creating a new ListEvent - how to specify ItemRenderer?

2009-06-18 Thread Tim Hoff

The list has to editable in order to use that event though.

-TH

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 Look at the itemFocusIn ListEvent.

 -TH

 --- In flexcoders@yahoogroups.com, flexcoder2008 djohnson29@ wrote:
 
  I have a List that handles a Click event - the ClickEvent takes a
ListEvent, and inside that handler I have access to the ListEvent's
itemRenderer property.
 
  This allows me to align a button next to the row that I have clicked
on.
 
  I also want to trigger this click event when the user uses the
keyboard up and down arrow keys to navigate the list.
 
  Inside my KeyDown handler I want to call my List click handler.
 
  The trick is, how do I specify the itemRenderer for the new
ListClick event or get access to it?
 
  eg.
 
  var le:ListEvent = new ListEvent(ListEvent.CLICK,.. .. ..,
myItemRenderer);
 






[flexcoders] Re: Copy ToolTip to Clipboard

2009-06-18 Thread valdhor
Doesn't ring any bells for me.

Just a thought... The tooltip is context sensitive (ie. it depends on where the 
mouse is an any particular moment). How about adding a context menu on that 
item with a Copy Tooltip menu item ?



--- In flexcoders@yahoogroups.com, Adrian Williams adri...@... wrote:

 Hi all,
 
  I have a challenging little req't.  We're using tooltips all over 
 the place on our app.  I need to be able to setup the tooltips so that 
 we can have a copy button or text in the tooltip that our user can 
 click to copy the contents of the tooltip to the system clipboard.  This 
 needs to be usable on everything from a large ADG with thousands of 
 tooltips to the simple stuff.  I thought I had seen a solution for this 
 at one point in time but cannot for the life of me find it again.
 
  Help!?
 
 Thanks,
 adrian





[flexcoders] Adding Repeater elements to different containers

2009-06-18 Thread fumeng5
Hi,

I am creating a number of buttons with a repeater but I don't want them all in 
one container. Basically, I want 3 rows. How do I accomplish this? Every 
Repeater example I see has its elements wrapped in a simple VBox or HBox. 

Thanks for any tips...



[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Tim Hoff

Hi Patrick,

private function resizeDataGrid():void
{
  myDataGrid.height = myDataGrid.measureHeightOfItems(0,
myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2;
}

mx:DataGrid id=myDataGrid valueCommit=resizeDataGrid()

-TH

--- In flexcoders@yahoogroups.com, djhatrick djhatr...@... wrote:

 My datagrid won't measure correctly, i have variable row height, but
it can't seem to get it right, I don't want any scroll bars..., is there
an easy way to override some function so i can get the actual rowheight
of each row and determine my height correctly

 Thanks,Patrick


 Wow, i had to rejoing Flexcoders Google Groups are better than
yahoogroups, sorry yahoogroups,





[flexcoders] matrix help

2009-06-18 Thread grimmwerks
Ok I must be having a brain fart here.

Imagine two opposing rectangles; as one scales UP the other scales  
DOWN - ie as one scales up 10% the other scales DOWN 10%.  How's the  
best way of doing that using matrices? I seriously must be missing  
something simple...




[flexcoders] Re: Adding Repeater elements to different containers

2009-06-18 Thread valdhor
Create a custom component with the button in it and then repeat the component.


--- In flexcoders@yahoogroups.com, fumeng5 fume...@... wrote:

 Hi,
 
 I am creating a number of buttons with a repeater but I don't want them all 
 in one container. Basically, I want 3 rows. How do I accomplish this? Every 
 Repeater example I see has its elements wrapped in a simple VBox or HBox. 
 
 Thanks for any tips...





[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff

Actually, its ILayoutManagerClient that supports validateProperties(),
validateSize() and validateDisplayList().  I'll get it right one of
these days. :)

-TH

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:


 Yep, should have said, those that don't implement IDataRenderer,
 IListItemRenderer and/or IDropInListItemRenderer manually. Nice snype.

 -TH

 --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   No response huh? Ok, you're welcome valdhor (Steve). One thing to
   point out is that all flex controls, containers and components
 extend
   UIComponent.
 
  AdvancedDataGridItemRenderer doesn't. I suspect there are others as
 well.
 






[flexcoders] Re: Adding Repeater elements to different containers

2009-06-18 Thread fumeng5
Thank you, that's a very good idea. I also just did it by creating a Repeater 
for each row; and each Repeater has a sliced subset of the main dataProvider 
collection. 

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

 Create a custom component with the button in it and then repeat the component.
 
 
 --- In flexcoders@yahoogroups.com, fumeng5 fumeng5@ wrote:
 
  Hi,
  
  I am creating a number of buttons with a repeater but I don't want them all 
  in one container. Basically, I want 3 rows. How do I accomplish this? Every 
  Repeater example I see has its elements wrapped in a simple VBox or HBox. 
  
  Thanks for any tips...
 





[flexcoders] Remoting Question

2009-06-18 Thread Ben Densmore
I have an app that I'm having some issues accessing a session variable that is 
set in ColdFusion.  I think it's due to my services-config.xml file having the 
flexgateway url set to have the www.  

If I'm at www.mydomain.com I can make the remoting call and have the cfc return 
the session variable to Flex. If I go to just http://mydomain.com then I seem 
to have an issue.

I created a cross domain policy file to allow with the www and without but 
because the session variable is set on the domain without the www and then the 
remoting call is trying to access the cfc with the www the session variables 
are being reset.

I can force the page to always go to www but wanted to see if others have run 
into this and the best way to handle it.

Thanks,
Ben

Re: [flexcoders] matrix help

2009-06-18 Thread grimmwerks
Argh.  Still can't get it - like if I have something coming in from 1  
to 4 (ie 1.1, 1.2, 1.3 etc) - I can make the one image scale UP fine  
but can't figure out how the other image scales down the same  
percentage...


On Jun 18, 2009, at 3:38 PM, grimmwerks wrote:

 Ok I must be having a brain fart here.

 Imagine two opposing rectangles; as one scales UP the other scales
 DOWN - ie as one scales up 10% the other scales DOWN 10%.  How's the
 best way of doing that using matrices? I seriously must be missing
 something simple...




 

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






[flexcoders] Accurate way to measure variable row datagrid

2009-06-18 Thread djhatrick
Is there an accurate way to measure a datagrid's height with variable row 
height?  Can I extend datagrid and extend something to find this property?

By the way, are other people having issues with posts not showing up on 
flexcoders?  What's the delay before something shows up, I forget who moderates 
this list, is it because they all need to be approved?



[flexcoders] Re: multiple filters on XMLListCollection how?

2009-06-18 Thread munene_uk
Thanks for the reply...how would the above example work for criteria that comes 
dynamically through xml data? ive tried this code below on my two combo boxes  
with id's of colourFilter and sizeFilter respectively...

private function filterData():void
{

xmlData2.filterFunction = applyColourAndSizeFilter;
xmlData2.refresh()
Alert.show(xmlData2.length.toString());

}
public function applyColourAndSizeFilter(item:Object):Boolean
{

if(colourFilter.selectedItem == All colours  
sizeFilter.selectedItem ==All sizes )
{
return true;

}

else
{
return item.colour == colourFilter.selectedItem  
item.sizes == sizeFilter.selectedItem;

}





[flexcoders] my SWFLoader wont give me the correct width and height

2009-06-18 Thread Jamie S
I'm using a SWFLoader to load in an image and i have a handler
function for COMPLETE. In this load complete handler, i'm trying to
get the size of the SWFLoader instance by using swfLoader.width,
swfLoader.height but it always gives me 0. if I set a breakpoint, i
can see that the $width and $height protected properties are correct
but no matter what I do I can't get the public width and height
properties to update. i've tried using validateNow(),
invalidateSize(), validateSize() and whatever else I can think of but
the width and hight are still always 0. And I noticed that if i check
the width and height at some later point in the program, the values
are correct.

Does anybody know how to force SWFLoader to update its width and height?

Jamie


RE: [flexcoders] my SWFLoader wont give me the correct width and height

2009-06-18 Thread Gordon Smith
Try checking the values in an updateComplete handler.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Jamie S
Sent: Thursday, June 18, 2009 3:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] my SWFLoader wont give me the correct width and height





I'm using a SWFLoader to load in an image and i have a handler
function for COMPLETE. In this load complete handler, i'm trying to
get the size of the SWFLoader instance by using swfLoader.width,
swfLoader.height but it always gives me 0. if I set a breakpoint, i
can see that the $width and $height protected properties are correct
but no matter what I do I can't get the public width and height
properties to update. i've tried using validateNow(),
invalidateSize(), validateSize() and whatever else I can think of but
the width and hight are still always 0. And I noticed that if i check
the width and height at some later point in the program, the values
are correct.

Does anybody know how to force SWFLoader to update its width and height?

Jamie



[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread djhatrick
Tom:

Thanks for that, but unfortunately that method is inaccurate( Maybe it doesn't 
work for very good for factories... Here's how i am getting my height, i am 
setting a height on my value object after i add my labels in a vertical column, 
then i listen for an event on my collection dataProvider, the last item, which 
I then loop through and calculate the values?  

See my examples:

idSGrid.measureHeightOfItems 612
Measuring each row height 560
idSGrid.measureHeightOfItems 612
Measuring each row height 560


It's off by 72 pixels... that's quite a difference.

Patrick



--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Hi Patrick,
 
 private function resizeDataGrid():void
 {
   myDataGrid.height = myDataGrid.measureHeightOfItems(0,
 myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2;
 }
 
 mx:DataGrid id=myDataGrid valueCommit=resizeDataGrid()
 
 -TH
 
 --- In flexcoders@yahoogroups.com, djhatrick djhatrick@ wrote:
 
  My datagrid won't measure correctly, i have variable row height, but
 it can't seem to get it right, I don't want any scroll bars..., is there
 an easy way to override some function so i can get the actual rowheight
 of each row and determine my height correctly
 
  Thanks,Patrick
 
 
  Wow, i had to rejoing Flexcoders Google Groups are better than
 yahoogroups, sorry yahoogroups,
 





Re: [flexcoders] my SWFLoader wont give me the correct width and height

2009-06-18 Thread Jamie S
That sorta works. It's a way of getting notified when the properties
do finally get updated . But i still have to do if( swfLoader.width
!=0  swfLoader.height != 0 ){ ... }. And since I really only need to
run that piece of code once, I would have to remove the listener after
the code successfully gets executed.

I still don't understand why calling swfLoader.validateNow() does not
work when I try to call it in the 'complete' handler.

Jamie

On Thu, Jun 18, 2009 at 5:29 PM, Gordon Smithgosm...@adobe.com wrote:


 Try checking the values in an updateComplete handler.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Jamie S
 Sent: Thursday, June 18, 2009 3:27 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] my SWFLoader wont give me the correct width and height




 I'm using a SWFLoader to load in an image and i have a handler
 function for COMPLETE. In this load complete handler, i'm trying to
 get the size of the SWFLoader instance by using swfLoader.width,
 swfLoader.height but it always gives me 0. if I set a breakpoint, i
 can see that the $width and $height protected properties are correct
 but no matter what I do I can't get the public width and height
 properties to update. i've tried using validateNow(),
 invalidateSize(), validateSize() and whatever else I can think of but
 the width and hight are still always 0. And I noticed that if i check
 the width and height at some later point in the program, the values
 are correct.

 Does anybody know how to force SWFLoader to update its width and height?

 Jamie

 


[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Tim Hoff

Yeah, maybe not.  Good luck; this is a common challenge that many have
not been successful solving.

-TH

--- In flexcoders@yahoogroups.com, djhatrick djhatr...@... wrote:

 Tom:

 Thanks for that, but unfortunately that method is inaccurate( Maybe it
doesn't work for very good for factories... Here's how i am getting my
height, i am setting a height on my value object after i add my labels
in a vertical column, then i listen for an event on my collection
dataProvider, the last item, which I then loop through and calculate the
values?

 See my examples:

 idSGrid.measureHeightOfItems 612
 Measuring each row height 560
 idSGrid.measureHeightOfItems 612
 Measuring each row height 560


 It's off by 72 pixels... that's quite a difference.

 Patrick



 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Hi Patrick,
 
  private function resizeDataGrid():void
  {
  myDataGrid.height = myDataGrid.measureHeightOfItems(0,
  myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2;
  }
 
  mx:DataGrid id=myDataGrid valueCommit=resizeDataGrid()
 
  -TH
 
  --- In flexcoders@yahoogroups.com, djhatrick djhatrick@ wrote:
  
   My datagrid won't measure correctly, i have variable row height,
but
  it can't seem to get it right, I don't want any scroll bars..., is
there
  an easy way to override some function so i can get the actual
rowheight
  of each row and determine my height correctly
  
   Thanks,Patrick
  
  
   Wow, i had to rejoing Flexcoders Google Groups are better than
  yahoogroups, sorry yahoogroups,
  
 






[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




RE: [flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Alex Harui
Was 560 really the right number?  Or was it closer to 612?  You have to factor 
in viewMetrics as well.  Are you using a custom renderer and have verified it 
measures correctly?

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of djhatrick
Sent: Thursday, June 18, 2009 2:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Accurate way of measuring a datagrid





Tom:

Thanks for that, but unfortunately that method is inaccurate( Maybe it doesn't 
work for very good for factories... Here's how i am getting my height, i am 
setting a height on my value object after i add my labels in a vertical column, 
then i listen for an event on my collection dataProvider, the last item, which 
I then loop through and calculate the values?

See my examples:

idSGrid.measureHeightOfItems 612
Measuring each row height 560
idSGrid.measureHeightOfItems 612
Measuring each row height 560

It's off by 72 pixels... that's quite a difference.

Patrick

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Tim 
Hoff timh...@... wrote:


 Hi Patrick,

 private function resizeDataGrid():void
 {
 myDataGrid.height = myDataGrid.measureHeightOfItems(0,
 myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2;
 }

 mx:DataGrid id=myDataGrid valueCommit=resizeDataGrid()

 -TH

 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 djhatrick djhatrick@ wrote:
 
  My datagrid won't measure correctly, i have variable row height, but
 it can't seem to get it right, I don't want any scroll bars..., is there
 an easy way to override some function so i can get the actual rowheight
 of each row and determine my height correctly
 
  Thanks,Patrick
 
 
  Wow, i had to rejoing Flexcoders Google Groups are better than
 yahoogroups, sorry yahoogroups,
 




RE: [flexcoders] my SWFLoader wont give me the correct width and height

2009-06-18 Thread Alex Harui
I don't think there is a way to force SWFLoader to know its width when it 
dispatches the COMPLETE event.  That event means the bytes are downloaded, but 
they may not be fully consumed yet.  However, it should be available on the 
UPDATE_COMPLETE that follows the COMPLETE event.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Jamie S
Sent: Thursday, June 18, 2009 6:05 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] my SWFLoader wont give me the correct width and height





That sorta works. It's a way of getting notified when the properties
do finally get updated . But i still have to do if( swfLoader.width
!=0  swfLoader.height != 0 ){ ... }. And since I really only need to
run that piece of code once, I would have to remove the listener after
the code successfully gets executed.

I still don't understand why calling swfLoader.validateNow() does not
work when I try to call it in the 'complete' handler.

Jamie

On Thu, Jun 18, 2009 at 5:29 PM, Gordon 
Smithgosm...@adobe.commailto:gosmith%40adobe.com wrote:


 Try checking the values in an updateComplete handler.



 Gordon Smith

 Adobe Flex SDK Team



 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On
 Behalf Of Jamie S
 Sent: Thursday, June 18, 2009 3:27 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] my SWFLoader wont give me the correct width and height




 I'm using a SWFLoader to load in an image and i have a handler
 function for COMPLETE. In this load complete handler, i'm trying to
 get the size of the SWFLoader instance by using swfLoader.width,
 swfLoader.height but it always gives me 0. if I set a breakpoint, i
 can see that the $width and $height protected properties are correct
 but no matter what I do I can't get the public width and height
 properties to update. i've tried using validateNow(),
 invalidateSize(), validateSize() and whatever else I can think of but
 the width and hight are still always 0. And I noticed that if i check
 the width and height at some later point in the program, the values
 are correct.

 Does anybody know how to force SWFLoader to update its width and height?

 Jamie





[flexcoders] PureMVC

2009-06-18 Thread Ashish Verma
Hello All,

 

I am very new for PureMVC architecture. After reading about Model, View and
controller and their progressive actor proxy, mediator and command I am
looking for some big demo application in PureMVC. Please provide me link,
archive or something similar.

 

 

Best,

Ashish