[flexcoders] Use ChangeWatcher with dynamic Object?

2009-06-03 Thread Tracy Spratt
I want to have a dynamic Object to which I can add properties at will,
making an associative array or hashtable, and Object works fine for this.

 

However, I also want to be able to set up changeWatchers for certain
properties, but my watchers are never getting fired.  I know Object is not
bindable, but should an explicit ChangeWatcher fire when a dynamic property
is  added or changed?

 

 

Tracy Spratt,

Lariat Services, development services available

 



[flexcoders] Springsource dm server

2009-06-03 Thread robin bakkerus
Hi there,

Does anyone has a working example how to setup Flex to work with the 
Springsource dm server.

Thanks in advance



RE: [flexcoders] Text stuck on screen BUG in FP10 or IE7????

2009-06-03 Thread Alex Harui
Doesn't sound familiar.  I'm not sure how you're moving the main sprite and 
whether the text is within the stage or not.  Trace getTImer() on enterFrame to 
see how fast the player is refreshing the screen.

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

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Wednesday, June 03, 2009 3:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Text stuck on screen BUG in FP10 or IE7





So I have an app that has upto 300 sprites on screen at once and inside each 
sprite is a textfield with embedded font (all Arial font).

In IE7, when you move the main Sprite around the sprite/textfield text gets 
stuck on the screen then eventually disappears. Its like the browser isn't 
refreshing fast or something. The amount of time it takes for the 
sprite/textfields to all go away varies sometimes 5 seconds sometimes 30 
seconds.

Wondering if its because of the way FP10 handles text now or ???

TIA



Re:Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread j2me_soul
Here is the codes:
 
  override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void{
super.updateDisplayList(unscaledWidth, unscaledHeight); 
lal.setActualSize(unscaledWidth, unscaledHeight);
  }
  
  override protected function createChildren():void{
super.createChildren();
   
if( lal == null ){
  lal = new Label;
  lal.text = "Label";
  addChild(lal);
}
  }
  
  override protected function measure():void{
super.measure();
measuredWidth = lal.getExplicitOrMeasuredWidth();
measuredHeight = lal.getExplicitOrMeasuredHeight();
  }
 
I track the processing of these functions. The red code excuted before the 
green code. I thought the children actual size should be set before his 
parent container and then use the children's proterties to set his parent 
container.
I comment the green code.So There is nothing on the screen. 
The value of "lal.getExplicitOrMeasuredWidth/Height();" is as same as the 
"unscaledWidth/Height"
Flex already know before setting the Label's width and height. 
Why should the label be set up again ?
 

在2009-06-04,"Manish Jethani"  写道:





On Wed, Jun 3, 2009 at 10:26 PM, Manish Jethani
 wrote:
> 2009/6/3 j2me_soul :

>>   override protected function measure():void{
>>this.explicitMinWidth = this.explicitMinHeight = 50;
>>   }
>>  }
>
> Here you should set the meauredWidth, measuredHeight, and optionally
> measuredMinWidth and measuredMinHeight (they can be set to the same as
> measuredWidth and measuredHeight respectively).

I forgot to say how to do the measurement. Here's how I'd do it:

function measure():void
{
measuredWidth = lal.getExplicitOrMeasuredWidth();
measuredHeight = lal.getExplicitOrMeasuredHeight();
}

Manish




[flexcoders] Filter Does Not Work on a Column when Record Count is more than 4000

2009-06-03 Thread Angelo Anolin
Hi FlexCoders,
I have this very strange bug which I don't have any idea why it is happening.

Basically, I have a datagrid which I am populating with an ArrayCollection 
data.  The array collection is being populated through via XML which I am 
retrieving from a web service.

When the record reaches more than 4000 records, the search functionality I 
implemented in my datagrid does not seem to fire up anymore.

Here are snippets of my codes:

private function searchFilterGrid(e:Event) :void
{
 e.stopImmediatePropagation()
 if(txtSearch.text == '')
 {
  arrDP.filterFunction = null;
 }
 else
 {
  arrDP.filterFunction = textFilter;
 }
 
 arrDP.refresh();
}
private function textFilter(item:Object) :Boolean
{
 switch(cmbColumns.text)
 {
  case "Booking Code":
   return item.BK_CODE.toLowerCase().indexOf(txtSearch.text.toLowerCase()) != 
-1;
  case "Booking Code Description":
   return item.BK_CODE_DESC.toLowerCase().indexOf(txtSearch.text.toLowerCase()) 
!= -1;
  default:
   return false;
 }
}

I invoke the searchFilterGrid function on the change event of the textInput 
control:



If I searched the Booking Code, even if the record is more than 4000, I am able 
to display the result. But when I try to search the Booking Code Description, 
when the record count is more than 4000, search and filter functionality does 
not fire up.

Any ideas/advice?  Thanks.


  

Re: [flexcoders] What to use instead of Model component in Flex 4?

2009-06-03 Thread ben gomez farrell
OK never mind, finally figured this out.  Hadn't heard of the 
declarations tag before.  And so I just created an XMLListCollection 
component, and then put the XMLList in that with my data inside that.

And then on my application MXML component, I put this new 
XMLListCollection component inside my declarations tag.  Thanks, and 
just ignore me!
ben gomez farrell wrote:
>
>
> Hey guys,
> Just starting to build my first Flex 4 app. I'm making an MenuBar as
> the first thing I'm attempting. I can get it working with XML data if I do
> 
> 
> 
> 
> 
>
> However, I'd like to break out the XML data into a separate
> file/component. Normally I'm not so organized - so I don't really think
> I ever did this in Flex 3, but I understand you can just create a Model
> container, and you're good.
>
> It doesn't look like I can do this in Flex 4. I'm trying different
> things with the DataGroup container - putting a dataprovider in it, or
> a XMLList in it, but nothing seems to work out.
>
> Does anybody know the proper way to do this?
> thanks!
> ben
>
> 


[flexcoders] How to get rid of annoying chart trial message

2009-06-03 Thread iloveyouwisconsin
I have flex 3 professional. On 2 of my projects when I create a chart the 
charts come out fine. However, on my 3rd project I get the annoying "chart 
trial" message on the chart. How do I get rid of it? The only thing I can think 
that I've done differently is the location of the project is saved on my 
desktop while the other 2 projects are saved in my documents folder. I've tried 
to create a new project and move the 3rd project to this but still get the 
chart trial message. 

(Looking at Adobe's website there is a way to convert a FB2 version w/out chart 
license to FB2 w/ license by simply copying the license key. I've built all my 
projects in FB3 so that shouldn't apply, I don't think)

What am I missing?



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-03 Thread superbokbok

> 
>  [Bindable]
>  public function set test(value:String):void
>  {
>  _test = value;
>  Alert.show(_test);
>  }
> 
> So perhaps the constructor is simply called before the variable has been
> set?
You are correct! You should call the alert box after instantiating the class & 
passing in the value & not in the constructor.

As for datagrid column names, you could access the datagrid(& therefore its 
columns) by calling Filtermanager.datagrid.dataField if you wanted.
Don't know if that helps or is exactly what you were looking for :)
cheers
erick



[flexcoders] What to use instead of Model component in Flex 4?

2009-06-03 Thread ben gomez farrell
Hey guys,
Just starting to build my first Flex 4 app.  I'm making an MenuBar as 
the first thing I'm attempting.  I can get it working with XML data if I do


   



However, I'd like to break out the XML data into a separate 
file/component.  Normally I'm not so organized - so I don't really think 
I ever did this in Flex 3, but I understand you can just create a Model 
container, and you're good.

It doesn't look like I can do this in Flex 4.  I'm trying different 
things with the DataGroup container  - putting a dataprovider in it, or 
a XMLList in it, but nothing seems to work out.

Does anybody know the proper way to do this?
thanks!
ben


[flexcoders] How to avoid recursive FABridge calls?

2009-06-03 Thread Paul Wideman
So I'm running into the problem where you cannot make recursive FAB>JS>FAB 
calls, an exception is thrown by the FAB. Here's an example:

[ActionScript code]
public function myFirstMethod(myCallback:Function)
{
  doSomething();
  myCallback();
}

public function mySecondMethod()
{
  doSomethingElse();
}

[Javascript code]
function start()
{
  myFabObject.myFirstMethod(myOtherJavascriptFunction);
}

function myOtherJavascriptFunction()
{
  myFabObject.mySecondMethod(); // this line fails
}

The only workaround I've found for this is to queue the javascript callback up 
on another thread (or whatever Flash has) with setTimeout, like so:

public function myFirstMethod(myCallback:Function)
{
  doSomething();
  flash.utils.setTimeout(myCallback, 1, myArgs);
}

This allows myFirstMethod to complete without directly calling back into 
javascript, so it breaks the chain of recursion. But it's obviously ugly & 
kludgey, so I was hoping someone out there had a better solution. Any ideas?



[flexcoders] CuePointEvent missing optional parameters

2009-06-03 Thread kris range
I'm using the VideoDisplay class and listening for cue points. I can
recieve the cue points, check out the name, time, type but cuePoints
also have an optional parameter value, which doesn't seem to be
included in this event class. Why this is missing from this event? Do
I need to access it a different way?

Thanks,
Kris


[flexcoders] Re: Is this list declining?

2009-06-03 Thread markgoldin_2000
 wrote:
>
> Not declining but getting quality of topics. all most increased exchange
> messages in the past of this list was tend to be good because most were
> newbies. But the efforts of Adobe bringing the discussion from mailing-list
> to their forum are a certain of worry about the provider be bought by a
> competitor and the major support been broken.
> 
> very clever Adobe at this point and in Forums are well done as Gordon said.
> 
> 
> Regards
> Igor Costa
> 
> 
> On Tue, Jun 2, 2009 at 10:23 AM, Amy  wrote:
> 
> >
> >
> > --- In flexcoders@yahoogroups.com , Gordon
> > Smith  wrote:
> > >
> > > There is a lot of traffic (>100 posts/day) on the Flex forum at
> > >
> > > http://forums.adobe.com/community/flex/flex_general_discussion
> > >
> > > The Adobe forums now support email.
> >
> > How's the nntp support coming?
> >
> >  
> >
> 
> 
> 
> -- 
> 
> Igor Costa
> www.igorcosta.com
> www.igorcosta.org
>




[flexcoders] SQLAssembler and long running query

2009-06-03 Thread changlim
Does any know if a long running query in SQLAssembler Data Server will block 
all query (in the same web session) from executing and returning?  Are there 
configuration settings or other tips to workaround this issue?  Restarting the 
session seems to solve this issue but it a bit too drastic.

Thanks in advanced!



[flexcoders] Re: About how to implement UIComponent

2009-06-03 Thread Amy
--- In flexcoders@yahoogroups.com, Manish Jethani  wrote:
>
> On Wed, Jun 3, 2009 at 10:26 PM, Manish Jethani
>  wrote:
> > 2009/6/3 j2me_soul :
> 
> >>   override protected function measure():void{
> >>    this.explicitMinWidth = this.explicitMinHeight = 50;
> >>   }
> >>  }
> >
> > Here you should set the meauredWidth, measuredHeight, and optionally
> > measuredMinWidth and measuredMinHeight (they can be set to the same as
> > measuredWidth and measuredHeight respectively).
> 
> I forgot to say how to do the measurement. Here's how I'd do it:
> 
>   function measure():void
>   {
> measuredWidth = lal.getExplicitOrMeasuredWidth();
> measuredHeight = lal.getExplicitOrMeasuredHeight();
>   }

Do you need to use setActualSize on the label before you measure it?



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-03 Thread Keith Hughitt
I'm testing the variable during the FilterManager constructor. I
actually don't have Flex Builder, so I've been using Alert and
ObjectUtil to output information about the variables at run-time, e.g.:

 public function FilterManager():void {
 super();
 Alert.show(test);
 this.initDataGrid(dataSource);
 this.initFilters();
 }

When I try to print out the contents of either "test" or "_test" using
Alert, a blank box pops up. I *am* able to see the contents set from
MXML during the setter:

 [Bindable]
 public function set test(value:String):void
 {
 _test = value;
 Alert.show(_test);
 }

So perhaps the constructor is simply called before the variable has been
set?

Also, I am trying out your suggestion of passing in the ArrayCollection
instead of the DataGrid itself. One of my initial reasons for using the
DataGrid was so that I could have access to the column names that had
been chosen. Perhaps what I'll do is pass in a list of columns names
along with the data.

Does this look about right though?

  public class FilterManager extends Form {

 [Bindable]
 public var dataSource:ArrayCollection;

 private var _datagrid:DataGrid;

 public function FilterManager():void {
 super();
 this.initDataGrid(dataSource);
 this.initFilters();
 }

 private function initDataGrid(d:ArrayCollection):void {
 _datagrid = new DataGrid();
 _datagrid.dataProvider = d;
 }
...



...where "dataArray" is the relevant ArrayCollection.

Thanks!
Keith




--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> That should work.
>
> When are you testing the variable test (ie. where is your breakpoint
set) when you get a null value.
>



[flexcoders] Advanced Data grid Sorting Question

2009-06-03 Thread guess what

I have implemented a Data grid from Action Script . I have enabled sorting on 
the collumn headers . Now there is a requirement that on certian rows I have 
custom values say XXX something. 
2 Questions 
1. Is it possible that I tell the datagrid to ingore those rows while sorting . 

2. if yes , then when i have sort ordrer done ,  the custom row should be in 
the same row position as it was before sorting . 





  


[flexcoders] Text stuck on screen BUG in FP10 or IE7????

2009-06-03 Thread flexaustin
So I have an app that has upto 300 sprites on screen at once and inside each 
sprite is a textfield with embedded font (all Arial font).  

In IE7, when you move the main Sprite around the sprite/textfield text gets 
stuck on the screen then eventually disappears. Its like the browser isn't 
refreshing fast or something.  The amount of time it takes for the 
sprite/textfields to all go away varies sometimes 5 seconds sometimes 30 
seconds.

Wondering if its because of the way FP10 handles text now or ???

TIA  



[flexcoders] ADG/DataGrid cell change performance on large data set

2009-06-03 Thread tntomek

When I edit a cell and press Tab to move horizontally to the next cell in the 
same row the grid behaves wonderfully. If however, I make my next selection to 
another row this becomes incredibly slow (10-15 seconds). Is there any reason 
for this slowdown? I'm using a ArrayCollection of typed objects as my main data 
source. The source is between 100-5000k rows. Surely it doesn't take Flex this 
long to switch rows. Is there anything I'm missing?



[flexcoders] Re: Performance Question

2009-06-03 Thread Tim Hoff

Using the 80-20 rule, loading all of the individuals up-front would be
the way to go (even 1000 records is reasonable).  It's going to much
better handling the search on the client with a filter; instead of
making a call for each key-stroke.  If the user types fast, it can get
very expensive.  You might also want to delay the search a half-second
or so; incase the user types additional characters.

-TH

--- In flexcoders@yahoogroups.com, "tchredeemed"  wrote:
>
> Basically, Our users have a group of Individuals
(com.gladhandle.IndividualVO) and in one part of the application they
can search the individuals.
>
> However, one of our milestones is that they are able to search and the
results are refreshed on keyup of a textinput.
>
> Seeing as this could and would cause problems with the application if
I hit the back end with an AMF call every key up, I was considering
loading all of their individuals at startup.
>
> The majority of our users will have relatively small number of
individuals (50 to 100 or so). Some will have a lot (500 to 1000) and
VERY FEW will have more than that.
>
> Which path would be better, searching and filtering by making an AMF
call which would make a subsequent database call and roundtrip the
information back to me, or take the initial hit to load them all at
startup?
>
> Thanks!
>





[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-03 Thread valdhor
Glad to be of assistance.


--- In flexcoders@yahoogroups.com, "superbokbok"  wrote:
>
> yup it should work...I did this & it worked fine :)
> 
> /***\
> 
>   * Filter Manager
>  
> \
> **/
> package custom {
> 
>  import flash.events.Event;
> 
>  import mx.containers.Form;
>  import mx.containers.FormItem;
>  import mx.controls.Alert;
>  import mx.controls.DataGrid;
>  import mx.controls.dataGridClasses.DataGridColumn;
>  import mx.utils.ObjectUtil;
> 
> 
> 
> /***\
> 
>  * Class definition for a class to manage the various search filters
> 
> \
> ***/
>  public class FilterManager extends Form {
> 
>  [Bindable]
>  public var datagrid:DataGrid;
> 
>  private var _test:String;
> 
>  private var filterSettings:Array;
> 
> 
> /***
>  * FilterManager (Constructor)
>  *
>  * Creates an instance of the filter manager class
> 
> ***/
>  public function FilterManager():void
>  {
>  super();
>  datagrid = new DataGrid();
>  datagrid.columns = createDGCols();
>  this.initFilters();
>  }
> 
>  [Bindable]
>  public function set test(value:String):void
>  {
>  _test = value;
>  trace(value);
>  }
> 
>  public function get test():String
>  {
>  return _test;
>  }
> 
> 
> /***
>  * initFilters
>  *
>  * Builds an array to manage the different filters that may be
> set
> 
> ***/
>  private function initFilters():void {
>  this.filterSettings = new Array();
> 
>  for each (var col:* in this.datagrid.columns) {
>  var d:Object = new Object();
> 
>  if (col['dataField'] != null) {
>  d.field   = col['dataField'];
>  d.enabled = false;
>  d.filter  = null;
>  this.filterSettings.push(d);
>  }
>  }
>  }
> 
> 
> private function createDGCols():Array
> {
>  /* DATAGRID Col SETUP */
>  var a:DataGridColumn = new DataGridColumn('Title');
>  a.dataField= 'FileName';
>  a.width= 80;
>  a.editable= true;
> 
>  var b:DataGridColumn = new DataGridColumn('Types');
> 
>  b.width= 130;
>  b.editable= false;
> 
>  var c:DataGridColumn = new DataGridColumn('Icon');
> 
>  c.width = 20;
>  c.editable= false;
> 
>  var dgCols:Array= [a,b,c];
>  return dgCols;
> 
> }
> 
> 
> /***
>  * component overrides
> 
> ***/
>  override protected function createChildren():void {
>  super.createChildren();
>  for each (var item:Object in this.filterSettings) {
>  var f:FormItem = new FormItem();
>  f.label = item.field;
>  addChild(f);
>  }
>  Alert.show("createChilden()");
>  }
> 
>  override protected function commitProperties():void {
>  super.commitProperties();
>  }
> 
>  override protected function measure():void {
>  super.measure();
>  }
> 
>  override protected function
> updateDisplayList(unscaledWidth:Number,
> 
> unscaledHeight:Number):void {
>  super.updateDisplayList(unscaledWidth,unscaledHeight);
>  }
> 
>  }
> }
> 
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute"
>  xmlns:custom="custom.*">
> 
>test="I'm using FilterManager" width="100%" height="100%"
> id="filManager"/>
> 
>   text="{filManager.test}"/>
> 
> 
> 
> cheers
> erick
>




Re: [flexcoders] Performance Question

2009-06-03 Thread Kevin F. Benz
Well, you have to avoid over the wire activity as it will cause a traffic
pattern called a ³galloping herd². Basically servlet latency causing
latency, causing And so forth. Your keyboard buffer will end up getting
ahead of the over the wire call and end up with enough spooled key events to
make it seem like your app has died.

The startup load is ³OK² but you have to deal with the impact of having the
client-side data getting stale compared to the server. Perhaps limit the
download to some number of characters allowing for the round-trip to occur
after the user has typed in enough characters.

Remember, although the numbers you present seem low, you have to plan for a
much larger sample, one where the numbers of users substantially escalate or
you wish to repurpose the algorithm in a more data-centric operation.
K


On 6/3/09 8:05 AM, "tchredeemed"  wrote:

>  
>   
> 
>   
> 
> Basically, Our users have a group of Individuals (com.gladhandle.IndividualVO)
> and in one part of the application they can search the individuals.
> 
> However, one of our milestones is that they are able to search and the results
> are refreshed on keyup of a textinput.
> 
> Seeing as this could and would cause problems with the application if I hit
> the back end with an AMF call every key up, I was considering loading all of
> their individuals at startup.
> 
> The majority of our users will have relatively small number of individuals (50
> to 100 or so).  Some will have a lot (500 to 1000) and VERY FEW will have more
> than that.
> 
> Which path would be better, searching and filtering by making an AMF call
> which would make a subsequent database call and roundtrip the information back
> to me, or take the initial hit to load them all at startup?
> 
> Thanks!
> 
>   
> 
> 
>> 
> 
> Kevin F. Benz
> kb...@kbenz.com425-785-7100
> http://www.kbenz.com
> 
> "We can't solve problems by using the same kind of thinking we used when we
> created them" - Albert Einstein
> 



Re: [flexcoders] Flex Builder, Flash Builder, Flash and Catalyst

2009-06-03 Thread mark . jonkman
Hi Bruce 

Flash Builder 4 replaces the product formerly known as Flex Builder. 
Flex know refers solely to the Flex SDK. 

No idea what so ever as to what they are planning on charging. 

Sincerely 
Mark R. Jonkman 

- Original Message - 
From: "brucewhealton"  
To: flexcoders@yahoogroups.com 
Sent: Wednesday, June 3, 2009 4:36:19 PM GMT -05:00 US/Canada Eastern 
Subject: [flexcoders] Flex Builder, Flash Builder, Flash and Catalyst 

Hello all, 
I was wondering about a couple things. Is Adobe going to make two separate 
products, Flash Builder 4 (aka Flex Builder) and Flex Builder 4? Maybe I read 
something wrong. Perhaps, Flex 4 is the new SDK and Flash Builder 4 will 
replace Flex 3, so there wouldn't be a Flex Builder 4. 
Then there is Catalyst. Any idea what that will cost when it comes out in it's 
final version? I guess that's a long time away. Anything else that Adobe is 
doing in the area of RIAs? 
Bruce 



 

-- 
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] Flex Builder, Flash Builder, Flash and Catalyst

2009-06-03 Thread brucewhealton
Hello all,
 I was wondering about a couple things.  Is Adobe going to make two 
separate products, Flash Builder 4 (aka Flex Builder) and Flex Builder 4?  
Maybe I read something wrong.  Perhaps, Flex 4 is the new SDK and Flash Builder 
4 will replace Flex 3, so there wouldn't be a Flex Builder 4.
Then there is Catalyst.  Any idea what that will cost when it comes out 
in it's final version?  I guess that's a long time away.  Anything else that 
Adobe is doing in the area of RIAs?
Bruce



[flexcoders] Re: Flex / Fireworks integration

2009-06-03 Thread Anthony DeBonis
Yes we tried it for a while on a project with a UI designer... it generates 
allot of extra styles ie  style_2  for something on one screen and style_2 for 
something else on another screen.  Ok for quick mock up but not all that good 
for real UI development where you want to create custom components...

--- In flexcoders@yahoogroups.com, "arieljake"  wrote:
>
> Anyone know in Fireworks how to load a css to make those styles available as 
> font styles, box styles, and image assets?
>




[flexcoders] FormItem format/validation

2009-06-03 Thread markgoldin_2000
Here is my field definition:


   

What I am trying to do is to set a flag if data has been changed and also 
format an e-mail when a user is leaving the field. 

public function formatEmails(Name:Object, bindObj:Object=null):Boolean 
{
if (validations(Name, "email") && bindObj != null)
{
Name.text = toTitleCase(Name.text);
bindObj.dataProvider[bindObj.selectedIndex][Name.id] = 
Name.text;
return true;
}  
else
{
return false;
}   
}
This code works, at most part. If I leave the field to anywhere but DataGrid 
(salesreps) then salesreps gets its email column updated correctly, but if I 
leave the email field b clicking on a row in the DataGrid then the clicked row 
gets the email value. It's my problem is clear is there a solution?

Thanks




[flexcoders] Performance Question

2009-06-03 Thread tchredeemed
Basically, Our users have a group of Individuals (com.gladhandle.IndividualVO) 
and in one part of the application they can search the individuals.

However, one of our milestones is that they are able to search and the results 
are refreshed on keyup of a textinput.

Seeing as this could and would cause problems with the application if I hit the 
back end with an AMF call every key up, I was considering loading all of their 
individuals at startup.

The majority of our users will have relatively small number of individuals (50 
to 100 or so).  Some will have a lot (500 to 1000) and VERY FEW will have more 
than that.

Which path would be better, searching and filtering by making an AMF call which 
would make a subsequent database call and roundtrip the information back to me, 
or take the initial hit to load them all at startup?

Thanks!



[flexcoders] Slider dataTip- is it possibole to have this visibale all the time

2009-06-03 Thread jossminker
I woudl like to have the datatip for my slider visible at all times, not just 
when the user is holding down the thumb. 

if this is not possible, then I would at least like the datatip to appear if 
the user moves the thumb using the arrow keys or by clicking on the track as 
the way it is at present means it will never be visible to user who are not 
using the mouse.

does anyone know of a simple way of doing this? From what I have read about 
Slider datatip there is some kind of problem with teh way it is added to the 
display that amkes it hard to customise.

TIA
joss



RE: [flexcoders] FlexBuilder Question

2009-06-03 Thread Jake Churchill
In the "Navigator" pane there is an icon with arrows going left and right.
It's called "Link with Editor".  I think that's what you want.

 

Jake Churchill

CF Webtools

11204 Davenport, Ste. 100

Omaha, NE  68154

http://www.cfwebtools.com

402-408-3733 x103

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Libby
Sent: Wednesday, June 03, 2009 10:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FlexBuilder Question

 






What option is it that, when you close a file, causes the Navigator to
switch focus back to the previous area you were in before you opened the
file? It doesn't do this in FlexBuilder plugin in eclipse, but it does it in
regular FlexBuilder and it drives me crazy! not that I had that far to go...
:)





[flexcoders] DataGrid's variableRowHeight

2009-06-03 Thread al-al :D
Hello!

Does anyone know how to set variableRowHeight depending on the data result in 
the DataGrid? I have a TextInput and a DataGrid that is able to display search 
results. The search results may vary in lines of text, meaning one row might 
have 2 or more lines of text.

variableRowHeight works fine, but I encounter a problem when I retrieve search 
results and the last record I retrieve has multiple lines of text. What happens 
is that the following empty lines of DataGrid (say, search results are only 3, 
and current view of DataGrid can view up to 20 records), all of them follow the 
multiple line row height of the last record retrieved.

I would like to avoid this. Thanks again! 



[flexcoders] FlexBuilder Question

2009-06-03 Thread Libby
What option is it that, when you close a file, causes the Navigator to switch 
focus back to the previous area you were in before you opened the file? It 
doesn't do this in FlexBuilder plugin in eclipse, but it does it in regular 
FlexBuilder and it drives me crazy! not that I had that far to go...  :)



[flexcoders] Re: Advanced Data grid Row Color using Action Script .

2009-06-03 Thread grg_blls
Hi,
maybe this will help you in what you're looking for..
http://flexpearls.blogspot.com/2008/02/row-background-color-in.html

thanks
George

--- In flexcoders@yahoogroups.com, guess what  wrote:
>
> 
> I am building an advancedDataGrid from Action script completely. I have the 
> Data grid up and running . There is a requirement which says I need to Show 
> Summary rows within the data grid in a differemt Color . What I am doing is 
> based on the data of the xml I want to draw it in different colors or say 
> make it bold . Can anyone help me in this regard .
> Since i am building it from Action Script completely . I dont know how to set 
> the bg color . This is my Code . Kindly help me folks .
> 
> var dg:AdvancedDataGrid = new AdvancedDataGrid ; 
> 
>  
>//instantiate a new DataGrid
> var dgc:AdvancedDataGridColumn;
> var aColumnsNew:Array = dg.columns
> var iTotalDGWidth:int = 0;
> for (var i:int=0;i the column definition array
>   oColumnDef = aColumnDef[i];
>   dgc = new AdvancedDataGridColumn();  
> //instantiate a new DataGridColumn
>   dgc.dataField = oColumnDef.dataField;//start 
> setting the properties from the column def array
>   dgc.width = oColumnDef.width;
>   iTotalDGWidth += dgc.width;  //add up 
> the column widths
>   dgc.editable = oColumnDef.editable;
>   dgc.sortable = oColumnDef.sortable
>   dgc.visible = oColumnDef.visible;
>   dgc.wordWrap = oColumnDef.wordWrap;
>   aColumnsNew.push(dgc)   the new dataGridColumn onto the array
> }
> 
> 
> 
> dg.columns =aColumnsNew;  the array back to the dtaGrid
> dg.width = iTotalDGWidth;
> dg.dataProvider = _xlcCatalog;
>  this.addChild(dg);
>




[flexcoders] Re: Successive Videos Display

2009-06-03 Thread bharat_00001
Manish,
Thanks for your inputs.


--- In flexcoders@yahoogroups.com, Manish Jethani  wrote:
>
> On Thu, May 28, 2009 at 11:50 PM, bharat_1  wrote:
> > Thanks for the suggestion. I have a bit of confusion. What do you mean by 
> > "load the next one when while one is playing". ActionScript isn't 
> > multiothreaded. How can it load the next and play the current at the same 
> > time. Or did I not follow whatyou said correctly?
> 
> You can call load() on one instance (or many instances) while the
> first one is playing.
> 
> ActionScript is a programming language, and it has no native support
> for threads (it has no native support for events either).
> 
> The Flash Player is the runtime. It has support for events, obviously,
> through the events API.
> 
> The player is able to perform a number of asynchronous tasks in the
> background while the application continues to function normally.
> Typically for such tasks you'll get "progress" and "complete" events.
> You don't have to do any multi-threading for such tasks yourself: just
> start the task (by calling the load() method on VideoDisplay for
> instance) and wait for the events.
> 
> Internally the player may be using multiple threads or just a single
> thread for these background tasks. It doesn't matter either way. If it
> uses a single thread, it'll just loop through these tasks in what can
> be called the "event loop" and perform them little by little on each
> iteration, at the same time processing user events as well. So you
> continue to get your mouse and keyboard events while the data is still
> downloading.
> 
> Manish
>




[flexcoders] ZOOM PANEL: like google maps

2009-06-03 Thread flexaustin
Wondering if anyone knows of a tut or component or ??? that I can use to learn 
how to build a Zoom Panel like in google maps (see google maps lower right 
corner).

I am assuming its would be implemented by taking a bitmap snapshot of whats on 
screen and then use a rectangle object in scroll rect or something?

TIA



[flexcoders] Re: Custom Actionscript component data-binding question

2009-06-03 Thread superbokbok
yup it should work...I did this & it worked fine :)

/***\

  * Filter Manager
 
\
**/
package custom {

 import flash.events.Event;

 import mx.containers.Form;
 import mx.containers.FormItem;
 import mx.controls.Alert;
 import mx.controls.DataGrid;
 import mx.controls.dataGridClasses.DataGridColumn;
 import mx.utils.ObjectUtil;



/***\

 * Class definition for a class to manage the various search filters

\
***/
 public class FilterManager extends Form {

 [Bindable]
 public var datagrid:DataGrid;

 private var _test:String;

 private var filterSettings:Array;


/***
 * FilterManager (Constructor)
 *
 * Creates an instance of the filter manager class

***/
 public function FilterManager():void
 {
 super();
 datagrid = new DataGrid();
 datagrid.columns = createDGCols();
 this.initFilters();
 }

 [Bindable]
 public function set test(value:String):void
 {
 _test = value;
 trace(value);
 }

 public function get test():String
 {
 return _test;
 }


/***
 * initFilters
 *
 * Builds an array to manage the different filters that may be
set

***/
 private function initFilters():void {
 this.filterSettings = new Array();

 for each (var col:* in this.datagrid.columns) {
 var d:Object = new Object();

 if (col['dataField'] != null) {
 d.field   = col['dataField'];
 d.enabled = false;
 d.filter  = null;
 this.filterSettings.push(d);
 }
 }
 }


private function createDGCols():Array
{
 /* DATAGRID Col SETUP */
 var a:DataGridColumn = new DataGridColumn('Title');
 a.dataField= 'FileName';
 a.width= 80;
 a.editable= true;

 var b:DataGridColumn = new DataGridColumn('Types');

 b.width= 130;
 b.editable= false;

 var c:DataGridColumn = new DataGridColumn('Icon');

 c.width = 20;
 c.editable= false;

 var dgCols:Array= [a,b,c];
 return dgCols;

}


/***
 * component overrides

***/
 override protected function createChildren():void {
 super.createChildren();
 for each (var item:Object in this.filterSettings) {
 var f:FormItem = new FormItem();
 f.label = item.field;
 addChild(f);
 }
 Alert.show("createChilden()");
 }

 override protected function commitProperties():void {
 super.commitProperties();
 }

 override protected function measure():void {
 super.measure();
 }

 override protected function
updateDisplayList(unscaledWidth:Number,

unscaledHeight:Number):void {
 super.updateDisplayList(unscaledWidth,unscaledHeight);
 }

 }
}



http://www.adobe.com/2006/mxml";
layout="absolute"
 xmlns:custom="custom.*">

 

 



cheers
erick





[flexcoders] Flex and IText text warping issue

2009-06-03 Thread Shyam
Hi coders,

Both Flex and Itext have text wrapping mechanism exposed via APIs. But they 
both behave differently! meaning flex might display a text (in a Text Area) 
wrapped in 4 lines while Itext might do the wrapping in 3 for the same area 
(width x height)  Flex does a lot of padding and aligning behind the scene 
while ITex api is pretty low level and requires the developer to set each and 
every value. 

I have looked at the TextLineMatrix class which provides some info on how a 
Text is aligned inside a TextArea and all, but how the actual wrapping works is 
not documented

Can anybody help me demystify it ?


BTW: Itext is a java library used to generate PDF files. For the sake of this 
post ,consider Itext as another API which has a Text Wrapping functionality.

Regards
Shyam



[flexcoders] Re: Vertical scroll bar not reseting

2009-06-03 Thread al-al :D
ah, so it's that simple. Thanks! :D

--- In flexcoders@yahoogroups.com, Manish Jethani  wrote:
>
> On Tue, Jun 2, 2009 at 8:39 AM, al-al :D  wrote:
> 
> > I have an application with a ViewStack and binded LinkBar, which has 2 
> > views, a DataGrid on the first, and the Form on the second. Clicking an 
> > item in the DataGrid transfers the user to the Form view.
> >
> > I have a problem regarding the scroll bar not reseting to its original 
> > position, which is at the top most. The Form on the second view is too long 
> > for the Canvas it sits on, so naturally it has a scroll bar. So when I 
> > click a record from the DataGrid for the first time, the Form view appears 
> > just fine, with the scroll bar on top. When I scroll down, navigate to the 
> > first view via the LinkBar, and select another record, the Form view 
> > appears with the scroll position right where I left it. How do I do this? I 
> > have tried using scrollPosition set to 0 but to no effect.
> 
> You have to set the second container's verticalScrollPosition to 0 in
> the change event of the ViewStack object.
> 
> Example:
> 
> 
> http://www.adobe.com/2006/mxml";
>   xmlns="*">
>change="vb2.verticalScrollPosition = 0">
> 
>   
> 
> 
>   
> 
>   
> 
> 
> Manish
>




Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread Manish Jethani
On Wed, Jun 3, 2009 at 10:26 PM, Manish Jethani
 wrote:
> 2009/6/3 j2me_soul :

>>   override protected function measure():void{
>>    this.explicitMinWidth = this.explicitMinHeight = 50;
>>   }
>>  }
>
> Here you should set the meauredWidth, measuredHeight, and optionally
> measuredMinWidth and measuredMinHeight (they can be set to the same as
> measuredWidth and measuredHeight respectively).

I forgot to say how to do the measurement. Here's how I'd do it:

  function measure():void
  {
measuredWidth = lal.getExplicitOrMeasuredWidth();
measuredHeight = lal.getExplicitOrMeasuredHeight();
  }

Manish


Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread Manish Jethani
2009/6/3 j2me_soul :
>
>
> Why the label can't be displaied on the srceen?

>  public class rectElement extends UIComponent
>  {
>   private var lal:Label;
>   public function rectElement()
>   {
>    super();
>   }

You don't have to write a constructor if all you're going to do it
call the superclass constructor. Just so you know. You can still do it
if you consider it a good practice.

>   override protected function createChildren():void{
>    if( lal == null ){
> lal = new Label;
> lal.text = "Label";
> addChild(lal);
> this.explicitWidth = lal.width;
> this.explicitHeight = lal.height;
>    }
>   }

Normally a component should not set its own
explicitWidth/explicitHeight. These properties are to be set by the
Flex framework. A component should only calculate its measuredWidth
and measuredHeight, based on its contents. The right place to do that
is the measure() implementation.

>   override protected function measure():void{
>    this.explicitMinWidth = this.explicitMinHeight = 50;
>   }
>  }

Here you should set the meauredWidth, measuredHeight, and optionally
measuredMinWidth and measuredMinHeight (they can be set to the same as
measuredWidth and measuredHeight respectively).

> http://www.adobe.com/2006/mxml"; layout="absolute"
> mlns:local="*">
>
> 
>  /* there is nothing on the screen. Where is the Label ? */
> 
> 

Okay, you haven't implemented updateDisplayList(). That's where you
have do the layout. For example, in the following way:

  function updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void
  {
super.updateDisplayList(unscaledWidth, unscaledHeight);

lal.setActualSize(unscaledWidth, unscaledHeight);
  }

Basically your component object is first measured by the framework,
and then it is assigned a size. You have to lay out the contents of
the component based on the allocated size (unscaledWidth and
unscaledHeight).

It is also a good idea to always call the superclass's
createChildren() method at the end of your implementation.

http://manishjethani.com/blog/why-the-superclasss-createchildren-should-be-called-last/

Manish


Re: [flexcoders] About how to implement UIComponent

2009-06-03 Thread Jeffry Houser


Step through the code.

Will the labels height and width have any values at the time 
createChildren runs?

Additionally you may need to set the width and height of 'this'.
Additionally, isn't the measure method supposed o set the measuredWidth 
and measuredHeight values of your component? In the sample you specify 
it does not.


j2me_soul wrote:



*Why the label can't be displaied on the srceen?*
public class rectElement extends UIComponent
{
private var lal:Label;
public function rectElement()
{
super();
}
override protected function createChildren():void{
if( lal == null ){
lal = new Label;
lal.text = "Label";
addChild(lal);
this.explicitWidth = lal.width;
this.explicitHeight = lal.height;
}
}
override protected function measure():void{
this.explicitMinWidth = this.explicitMinHeight = 50;
}
}
http://www.adobe.com/2006/mxml"; 
layout="absolute" mlns:local="*">


/* there is nothing on the screen. Where is the Label ? */






 




--
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] About how to implement UIComponent

2009-06-03 Thread j2me_soul
Why the label can't be displaied on the srceen?
 public class rectElement extends UIComponent
 {
  private var lal:Label;
  public function rectElement()
  {
   super();
  }
  override protected function createChildren():void{
   if( lal == null ){
lal = new Label;
lal.text = "Label";
addChild(lal);
this.explicitWidth = lal.width;
this.explicitHeight = lal.height;
   }
  }
  override protected function measure():void{
   this.explicitMinWidth = this.explicitMinHeight = 50;
  }
 }
 
http://www.adobe.com/2006/mxml"; layout="absolute" 
mlns:local="*">
 

 /* there is nothing on the screen. Where is the Label ? */



 

Re: [flexcoders] general tips: port javascript to as3

2009-06-03 Thread John King
Thanks, Yes, I'm using the flash/flex api now. I like this lib's
functionality better than what I can currently see available in flex, but I
couldn't find a version of markerclusterer in actionscript.


[flexcoders] AIR e DataService - autoSaveCache

2009-06-03 Thread Saulo Brust
Hi Flex Coders,

I have a little problem with AIR e DataService, when the application is
going to saveCache and the DataService is connected, appears this message
error:

[RPC Fault faultString="Could not save local cache: Error: Transaction begin
failed: SQLError: 'Error #3115: SQL Error.', details:'',
operation:'begin' at
mx.data::SQLDBCache/begin()[C:\depot\DataServices\branches\lcds26_hotfixes\frameworks\projects\airfds\src\mx\data\SQLDBCache.as:151]
(...)

The app source is here:
http://www.brust.com.br/wp-content/uploads/2009/06/marketresearch.mxml

If someone can help me, I will be very grateful.

Thanks,
Saulo


Re: [flexcoders] Re: Is this list declining?

2009-06-03 Thread Igor Costa
Not declining but getting quality of topics. all most increased exchange
messages in the past of this list was tend to be good because most were
newbies. But the efforts of Adobe bringing the discussion from mailing-list
to their forum are a certain of worry about the provider be bought by a
competitor and the major support been broken.

very clever Adobe at this point and in Forums are well done as Gordon said.


Regards
Igor Costa


On Tue, Jun 2, 2009 at 10:23 AM, Amy  wrote:

>
>
> --- In flexcoders@yahoogroups.com , Gordon
> Smith  wrote:
> >
> > There is a lot of traffic (>100 posts/day) on the Flex forum at
> >
> > http://forums.adobe.com/community/flex/flex_general_discussion
> >
> > The Adobe forums now support email.
>
> How's the nntp support coming?
>
>  
>



-- 

Igor Costa
www.igorcosta.com
www.igorcosta.org


Re: [flexcoders] Adobe Flex Language Reference

2009-06-03 Thread Igor Costa
Angelo


Not in PDF as I remember, but you can use a local version in html that is
built-in in SDK.



Regards
Igor Costa

On Wed, Jun 3, 2009 at 1:02 AM, Angelo Anolin wrote:

>
>
> Is there a PDF download for this document?  I see this a lot in the Adobe
> Developer's Guide PDF documentation.
>
> Thanks.
>
>  
>



-- 

Igor Costa
www.igorcosta.com
www.igorcosta.org


Re: [flexcoders] Compiling via Command Line

2009-06-03 Thread Angelo Anolin
Hi Gregor,

Thanks for the reply.  I found out that as long as the file PopUpInfo.mxml 
being referenced by my main mxml file is in the same path, then the SWF will be 
compiled with the reference to it as well.

Thanks again for the heads up.





From: Gregor Kiddie 
To: flexcoders@yahoogroups.com
Sent: Friday, 29 May, 2009 17:26:29
Subject: RE: [flexcoders] Compiling via Command Line





As long as you have a reference to the
PopUpInfom in your application somewhere, and you have your source path set up
correctly (look at the parameters you can pass into mxmlc), mxmlc will include
the class in your swf automatically.
 
Gk.
Gregor Kiddie
Senior Developer
INPS
Tel:   01382
564343
Registered address: The Bread Factory, 1a Broughton Street, LondonSW8 3QJ
Registered Number: 1788577
Registered in the UK
Visit our Internet Web site at 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.helpdesk@ inps.co.uk
 
 
 
 
How can I ensure then that the PopUpInfom.mxml is also compiled
using the command line compiler? 
 
Thanks
 
   


  

Re: [flexcoders] Re: FilterFunction creating duplicate items in the list

2009-06-03 Thread Rohit Sharma
   Hi All,

 I think I am able to solve the problem.
   The issue was that at every updates I was modifying the dataprovider
which was cast as array collection.
   Once filter is applied the arraycollection keeps only the filtered rooms.
So, even though a room might be
   present in the unfiltered source array, it will get added to the
dataprovider if it was not present in the filtered
   dataprovider.
To remove this, I have changed my update code to change the
underlying array rather than modifying
   the arraycollection.

   Thanks,
Rohit

On Tue, Jun 2, 2009 at 8:50 AM, Tim Hoff  wrote:

>
>
> > I update the corresponding item in the dataprovider using setItemAt. (I
> > typecast dataprovider as Arraycollection).
> > Recently I added some filters to the room list using
> > filterfunction. As soon as I start applying filters, I see few items
> getting
> > duplicated in the list. Some items exist with old values as well as new
> > values.
>
> Ok, so your indexes are not synchronized; returned data is getting set on
> the wrong items.  How are you determining the correct index when using
> setItemAt()?  If you're storing the position index when the ArrayCollection
> is un-filtered, and then filtering, the old index may not be the same as the
> new index in the filtered ArrayCollection.  You can loop through the
> ArrayCollection and check the item's id field against the updated return
> item:
> *
>
> public
> * *function* getRoomResult( newRoomVO : RoomVO ) : *void
> *{
> * for* *each* ( *var* oldRoomVO : RoomVO *in* rooms )
>  {
> *  if* ( newRoomVO.id == oldRoomVO.id )
>   {
>rooms.setItemAt( newRoomVO, getItemIndex( oldRoomVO ) );
> *   return*;
>   }
>  }
> }
>
> However, this wouldn't update any items that were not included in the
> ArrayCollection, because of a filter.  Updating the source Array itself
> would also do the trick.  But, you would have to re-cast the
> ArrayCollection after an update.
>
> Just a few thoughts,
> -TH
>
>
> --- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
> >
> >
> > Sounds like your itemRenderer might not be clearing out old data
> > correctly. Check out Question 2 in Amy's FAQ:
> >
> > http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
> > 
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com, Rohit Sharma rohit.sharma1982@
> > wrote:
> > >
> > > Hi All,
> > >
> > > I am stuck up with this problem. Please provide some insight into
> > > it.
> > >
> > > " I have a list component which shows all the game rooms currently
> > existing.
> > > As soon as some property of the room changes,
> > > I update the corresponding item in the dataprovider using setItemAt.
> > (I
> > > typecast dataprovider as Arraycollection).
> > > Recently I added some filters to the room list using
> > > filterfunction. As soon as I start applying filters, I see few items
> > getting
> > > duplicated in the list. Some items exist with old values as well as
> > new
> > > values.
> > > I also tried making the filtering and updating actions mutually
> > > exclusive using flags hoping that two different actions taking
> > > place on the same data might cause duplication of items. But the
> > duplication
> > > is still taking place.
> > > In fact I tried using itemUpdate() also in place of setItemAt but the
> > > problem still persists.
> > > I have also tried modifying only the source array during updates
> > because the
> > > filtering takes place only on the ArrayCollection and
> > > not on the source array but this also failed."
> > >
> > > Any inputs will be appreciated.
> > >
> > > Thanks,
> > > Rohit
> > >
> >
>  
>