RE: [flexcoders] Re: Sort: Datagrid sorting numbers and strings

2009-06-12 Thread Alex Harui
You'll get errors if objects in the collection are missing properties mentioned 
in the sortFields, I think the first element is tested.

Your compare function will have to determine if the string is a number and if 
both are numbers, convert them to number and compare.  For IP addresses you 
have to break them into their four parts convert to numbers and compare

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: Friday, June 12, 2009 9:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Sort: Datagrid sorting numbers and strings





Ok, so I am closer.

If I have this:

192.168.168.12
192.168.168.129
192.168.168.24
hellokitty
bigsmelly

When sorting I get this (with the normal flex sorting):

192.168.168.129
192.168.168.12
192.168.168.24
bigsmelly
hellokitty

And if I use my own sort function and perform several sorts quickly I get an 
Error:

"Find criteria must contain at least one sort field value "

My sort function:

private function testCompareFunc(itemA:Object, itemB:Object):int {
var valueA:String = itemA;
var valueB:String = itemB;
return ObjectUtil.stringCompare(valueA, valueB);
}

Any suggestions? Not sure how to do a string and number comparison.

TIA

--- In flexcoders@yahoogroups.com, 
"flexaustin"  wrote:
>
> Also the 192.12 are from xml so probably seen as Strings, not numbers. Would 
> that affect it?
>
>
>
> --- In flexcoders@yahoogroups.com, 
> "flexaustin"  wrote:
> >
> > Using the built in sort I get
> >
> > angus
> > 192.12
> > 187.34
> > hello
> > range
> > zoolu
> >
> > Wonder if their is a space or return before it in the data I am given? Not 
> > sure if that would affect it.
> >
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, 
> > Alex Harui  wrote:
> > >
> > > The standard sort should sort those as:
> > >
> > > 192.12
> > > angus
> > > hello
> > > range 39.30 - 34.50
> > > zoolu 12
> > >
> > > What did you want instead? It will probably require a custom sort function
> > >
> > > Alex Harui
> > > Flex SDK Developer
> > > Adobe Systems Inc.
> > > Blog: http://blogs.adobe.com/aharui
> > >
> > > From: flexcoders@yahoogroups.com 
> > > [mailto:flexcoders@yahoogroups.com] 
> > > On Behalf Of flexaustin
> > > Sent: Wednesday, June 10, 2009 8:43 AM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Sort: Datagrid sorting numbers and strings
> > >
> > >
> > >
> > >
> > >
> > > So I have a datagrid that has columns that can contain a number or string 
> > > or both. I was wondering if anyone has seen a sort function that can 
> > > handle this. Below is a sample of the types of data that can be in a 
> > > column.
> > >
> > > 192.12
> > > hello
> > > angus
> > > range 39.30 - 34.50
> > > zoolu 12
> > >
> > > Anyway to sort these?
> > >
> >
>



[flexcoders] Re: ambiguous reference error

2009-06-12 Thread Tim Hoff
Are you by any chance using a getter/setter for the isValid var?  If so, you 
may need to change the setter to public.

-TH

--- In flexcoders@yahoogroups.com, "[p e r c e p t i c o n]"  
wrote:
>
> Hi Tracy,that was a mistake, actually i called it 'isValid' like this
> 
>  label="Continue"click="Submit();" enabled="{isValid}"/>
> 
> 
> is valid is a boolean that i declared in my code-behind
> 
> also
> 
> i noticed that when i put defaultButton in the root node of my mxml
> component it does the same thing...
> 
> very confused
> 
> 
> On Fri, Jun 12, 2009 at 8:42 AM, Tracy Spratt  wrote:
> 
> >
> >
> >  Which reference is ambiguous?
> >
> >
> >
> > I would mistrust a variable named "valid" as being a system reserved word.
> >
> >
> >
> > Tracy Spratt,
> >
> > Lariat Services, development services available
> >   --
> >
> > *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> > Behalf Of *[p e r c e p t i c o n]
> > *Sent:* Thursday, June 11, 2009 5:01 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* Re: [flexcoders] ambiguous reference error
> >
> >
> >
> >
> >
> >
> >  valid is not the same as enabled...i don't think...
> >
> >
> >
> >
> >
> > On Thu, Jun 11, 2009 at 1:23 AM, Tom Chiverton <
> > tom.chiver...@...> wrote:
> >
> >
> >
> >
> >
> > On Wednesday 10 Jun 2009, [p e r c e p t i c o n] wrote:
> > >  > > click="Submit();" enabled="{valid}"/>
> >
> > So using
> > submitButton.valid
> > is a work around ?
> >
> > --
> > Helping to globally strategize error-free eligible professional products as
> >
> > part of the IT team of the year, '09 and '08
> >
> >
> >
> >   *Tom Chiverton *
> > Developer
> > Tel: +44 0161 618 5032
> > Fax: +44 0161 618 5099
> > tom.chiver...@...
> > 3 Hardman Square, Manchester, M3 3EB
> > *www.Halliwells.com* 
> >
> >
> >
> > 
> >
> > 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] Flex 4 Profiling Question - GC Root?

2009-06-12 Thread Mark Lapasa
I getcha, thx Alex -mL

Alex Harui wrote:
>
>
> The mark and sweep starts from several places (ApplicationDomain, 
> Stage, a few internal places in the Player, stack). Those are 
> currently called GCRoots, although I’d push for changing it if we 
> could come up with a better name.
>
> Often when you looked at an object in the Flex 3 profiler it had many 
> backreferences, most of which were circular, and others that were long 
> chains through many different objects and still were circular, or 
> didn’t matter because the real problem was that some other object 
> along that chain was the culprit.
>
> The Flex 4 profiler removes all circular references and then will 
> filter out chains that have long paths back to the root as those are 
> less likely to be the source of a problem.
>
> 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 *Mark Lapasa
> *Sent:* Thursday, June 11, 2009 7:39 AM
> *To:* Flexcoders
> *Subject:* [flexcoders] Flex 4 Profiling Question - GC Root?
>
>
>
>
> I was going over the Adobe Flex 4 Feature and Migration PDF which is
> pretty good synopsis so far of what's new in Flex 4. Under the Profiling
> Enhancements section, it says "you can now view all the shortest paths
> from the object to the garbage collector root (GC root)"
>
> I understand as much as the mark & sweep but what does the above exactly
> mean?
>
> Thx,
>
> -mL
>
> Notice of confidentiality:
> The information contained in this e-mail is intended only for the use 
> of the individual or entity named above and may be confidential. 
> Should the reader of this message not be the intended recipient, you 
> are hereby notified that any unauthorized dissemination, distribution 
> or reproduction of this message is strictly prohibited. If you have 
> received this message in error, please advise the sender immediately 
> and destroy the e-mail.
>
> 



Notice of confidentiality:
The information contained in this e-mail is intended only for the use of the 
individual or entity named above and may be confidential. Should the reader of 
this message not be the intended recipient, you are hereby notified that any 
unauthorized dissemination, distribution or reproduction of this message is 
strictly prohibited. If you have received this message in error, please advise 
the sender immediately and destroy the e-mail.



Re: [flexcoders] ambiguous reference error

2009-06-12 Thread [p e r c e p t i c o n]
Hi Tracy,that was a mistake, actually i called it 'isValid' like this




is valid is a boolean that i declared in my code-behind

also

i noticed that when i put defaultButton in the root node of my mxml
component it does the same thing...

very confused


On Fri, Jun 12, 2009 at 8:42 AM, Tracy Spratt  wrote:

>
>
>  Which reference is ambiguous?
>
>
>
> I would mistrust a variable named “valid” as being a system reserved word.
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> Behalf Of *[p e r c e p t i c o n]
> *Sent:* Thursday, June 11, 2009 5:01 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] ambiguous reference error
>
>
>
>
>
>
>  valid is not the same as enabled...i don't think...
>
>
>
>
>
> On Thu, Jun 11, 2009 at 1:23 AM, Tom Chiverton <
> tom.chiver...@halliwells.com> wrote:
>
>
>
>
>
> On Wednesday 10 Jun 2009, [p e r c e p t i c o n] wrote:
> >  > click="Submit();" enabled="{valid}"/>
>
> So using
> submitButton.valid
> is a work around ?
>
> --
> Helping to globally strategize error-free eligible professional products as
>
> part of the IT team of the year, '09 and '08
>
>
>
>   *Tom Chiverton *
> Developer
> Tel: +44 0161 618 5032
> Fax: +44 0161 618 5099
> tom.chiver...@halliwells.com
> 3 Hardman Square, Manchester, M3 3EB
> *www.Halliwells.com* 
>
>
>
> 
>
> 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] Flex 4 Profiling Question - GC Root?

2009-06-12 Thread Alex Harui
Somewhere you can adjust the cut off of how many paths to root are filtered 
out.  I don't have the UI handy right now

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 Doug McCune
Sent: Thursday, June 11, 2009 5:58 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 4 Profiling Question - GC Root?





>  will filter out chains that have long paths back to the root as those are 
> less likely to be the source of a problem.
>

I'm curious about this part about filtering out chains with very long
paths. I've come across quite a few instances of loitering objects in
the FB 4 profiler that don't show any back references. When you expand
the reference it just lists itself and it says that it is a GC root
node. But then doing some really aggressive stuff to try to free up
all possible references does indded get those items collected (meaning
that I don't think it can be blamed on the GC simply not running when
I took my snapshot, etc).

Could this be because there are filtered out chains that I'm not
seeing? Is there any way to selectively turn any kind of filtering
like this off?

Doug



Re: [flexcoders] Re: Flex App for iPhone or iPod Touch

2009-06-12 Thread Jeffry Houser

 I suspect Tom is referring top this post:
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg122969.html


Tom Chiverton wrote:
>
>
>
>
> On Thursday 11 Jun 2009, Jeffry Houser wrote:
> > The Full Flash Player 10 [and therefore Flex] is supposed to be out for
> > the Palm Pre later this year, and it coming to other devices.
>
> Look in the archives for my recent 'ARM' post.
>
> -- 
> Helping to greatly conquer revolutionary cross-platform 
> principle-centered
> value-added solutions as part of the IT team of the year, '09 and '08
>
>
> Tom Chiverton
> Developer
> Tel: +44 0161 618 5032
> Fax: +44 0161 618 5099
> tom.chiver...@halliwells.com 
> 3 Hardman Square, Manchester, M3 3EB
> www.Halliwells.com 
>
> 
>
> 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 
> .
>
>
>
>
>
> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Re: ArrayCollection and Datagrid Binding and DataProvider Question

2009-06-12 Thread valdhor
I think I understand why. The dataprovider in the example is the actual XML 
List. I was wrapping the XML List in an XML List Collection so it wasn't 
updating the underlying dataprovider.

--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> No, you maybe had something else going on.  Here is an example based on the
> example in the docs.
> 
>  
> 
> 
> 
> 
> 
> http://www.adobe.com/2006/mxml"; >
> 
>  
> 
>
> paddingTop="10" paddingLeft="10" paddingRight="10">
> 
>  
> 
>  
>   text="Select a row in the DataGrid control."/>
> 
>  
> 
>  
>   dataProvider="{employees}" editable="true">
> 
>   
> 
>  editable="true"/>
> 
>  editable="true"/>
> 
>  editable="true"/>
> 
>   
> 
> 
> 
>  
> 
> 
> 
> 
> 
>   
> 
>   
> 
>   
> 
> 
> 
>   Christina Coenraets
> 
>   555-219-2270
> 
>   ccoenra...@...
> 
>   true
> 
> 
> 
> 
> 
>   Joanne Wall
> 
>   555-219-2012
> 
>   jw...@...
> 
>   true
> 
> 
> 
> 
> 
>   Maurice Smith
> 
>   555-219-2012
> 
>   maur...@...
> 
>   false
> 
> 
> 
> 
> 
>   Mary Jones
> 
>   555-219-2000
> 
>   mjo...@...
> 
>   true
> 
> 
> 
> 
> 
>
> 
>  
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of valdhor
> Sent: Friday, June 12, 2009 11:57 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: ArrayCollection and Datagrid Binding and
> DataProvider Question
> 
>  
> 
> 
> 
> 
> 
> 
> I didn't know this.
> 
> When I tried it, it didn't update the dataprovider. Is there anything
> special that needs to happen.
> 
> --- In flexcod...@yahoogro  ups.com,
> "Tracy Spratt"  wrote:
> >
> > Data binding in general is not two-way, but an editable datagrid is a
> > special case. It will update the dataProvider items automatically.
> > 
> > 
> > 
> > Tracy Spratt,
> > 
> > Lariat Services, development services available
> > 
> > _ 
> > 
> > From: flexcod...@yahoogro  ups.com
> [mailto:flexcod...@yahoogro  ups.com]
> On
> > Behalf Of valdhor
> > Sent: Friday, June 12, 2009 9:42 AM
> > To: flexcod...@yahoogro  ups.com
> > Subject: [flexcoders] Re: ArrayCollection and Datagrid Binding and
> > DataProvider Question
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Basically, no. The datagrid is like a window into your dataprovider.
> > 
> > If you need to modify your dataprovider you need to listem for the
> > itemEditEnd event, grab the data that was modified and update the
> underlying
> > dataprovider.
> > 
> > The data binding will note that the dataprovider has changed and will
> update
> > the datagrid on the next redraw.
> > 
> > What data binding does is add an event dispatcher to the variable you have
> > defined as bindable. When the variable changes an event is generated to
> let
> > any component that is bound to that variable know that the variable has
> > changed and update itself with the new data.
> > 
> > Now, As I understand it (And I could be wrong) Flex 4 (Gumbo) does do full
> > two way data binding. I have not read up on what or how it does this but
> it
> > sounds interesting.
> > 
> > HTH
> > 
> > Steve
> > 
> > --- In flexcod...@yahoogro  ups.com,
> > Angelo Anolin  wrote:
> > >
> > > Good day.
> > > 
> > > Learning Flex here for the past two (like three actually) weeks. Using
> > only mxml compiler.
> > > 
> > > I have a question with regards to the above subject:
> > > 
> > > Assuming I declared an ArrayCollection as follows:
> > > 
> > > [Bindable] private var _arrItems:ArrayCollection = new
> > ArrayCollection([{"itemNo":"1", "testItem":"Angelo"}, {"itemNo":"2",
> > "testItem":"Dinah"}]);
> > > 
> > > This array I am binding to a datagrid as follows:
> > > 
> > >  > > dataProvider="{_arrItems}" 
> > > useRollOver="false" 
> > > height="450"
> > > width="100%" 
> > > verticalScrollPolicy="auto" 
> > > sortableColumns="false" 
> > > draggableColumns="false" 
> > > resizableColumns="false">
> > > 
> > > 
> > >  > width="200">
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > No problem initially, as the itemNo and the testItem values are
> displayed
> > properly on the datagrid.
> > > 
> > > Now for example, if I modified my first row which contains itemNo:1 and
> > testItem:Angelo, where I changed Angelo to Mickey, will the dataprovider
> > reflect the change in the said row?
> > > How do I make so that the changes in the datagrid be reflected into the
> > ArrayCollection? such that when I changed the testItem data for the first
> > row and access the item, via:
> > > 
> > > _arrItems.getItemAt(arrLength -1).itemNo
> > > _arrItems.getItemAt(arrLength 

[flexcoders] Re: Dispatch Event Issue on BreadCrumb Trail Click

2009-06-12 Thread Tim Hoff

Looks like you may be thinking about a little backwards.  First add this
method to the script in contentpane:

import mx.events.ItemClickEvent;

public function handleBreadCrumbItemClick( event:ItemClickEvent ):void
{
  // do something
}

Then Main.mxml would have:


  




-TH

--- In flexcoders@yahoogroups.com, "n_manjunatha" 
wrote:
>
> Hi Tim
> Thanks for your time and reply. Yes you are right, I am not using MVC
Framework.
>
> I tried this
> my main.mxml is like this...of course not with exact format of flex...
> script
> {
> breadcrumclicked(event:Event) which comes canvas below
> }
>  
> 
> 
> 
>
> I guess i cant send the public method breadcrumclicked(event) in
> my contentpane bcoz i cant give something like this
> 
>
> i tried this it doesnt work..it says cant resolve attribute
breadcrumclicked for contentpane.
>
> Thanks
>
>
> --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote:
> >
> >
> > Hi,
> >
> > If you're not using an MVC framework, an easy way is to create a
public
> > method in contentpane.mxml, that will set the tree selection. On
> > breadcrumb click, pass the event:
contentpane.myPublicSelectionMethod(
> > event ).
> >
> > -TH
> >
>




[flexcoders] Re: Datagrid - Using and Editing Data From XMLListCollection

2009-06-12 Thread azona26
Thanks. I will try your updateData function. I was trying to grab the data in a 
different manner. I believe I was using the following:

private function endEdit(event:DataGridEvent):void {

trace('event.itemRenderer.data - ' + 
event.itemRenderer.data)

}
I will try your method and am guessing that it will work. 

Thanks for the assistance.

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> It works for me...
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute"
>  creationComplete="onCreationComplete()">
>  
>  
>  
>   dataProvider="{building_xmlcoll}" itemEditEnd="updateData(event)">
>  
>   labelFunction="getValue" editable="true"/>
>  
>  
> 
> 
> --- In flexcoders@yahoogroups.com, "azona26"  wrote:
> >
> > Thanks for the help. I did try using an itemEditEnd eventlistener. The
> issue I was having was that the data value wasn't being changed it was
> still the original value.
> >
> > --- In flexcoders@yahoogroups.com, "valdhor" valdhorlists@ wrote:
> > >
> > > You would need to add an event listener for the itemeditend event.
> Then grab the data that was edited and modify the dataprovider.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, "azona26" 
> wrote:
> > > >
> > > > I have an editable datagrid with data being populated from an
> > > > XMLListCollection. I am attempting to edit the data in one of the
> > > > columns that is using a labelFunction to get its value. This
> column does
> > > > not have a dataField value. How can I edit the data in the field
> and
> > > > have the XMLListCollection reflect the updated change correctly as
> well
> > > > as have the field value change? As it stands now I can change the
> data
> > > > in the column, however once I leave that datafield it reverts back
> to
> > > > the original value and the XMLListCollection remains unchanged.
> > > >
> > > > Here is the DG code:
> > > >
> > > >   > > > dataProvider="{building_xmlcoll}" >
> > > >  
> > > >   > > > labelFunction="getValue" editable="true" />
> > > >  
> > > >  
> > > > 
> > > >  
> > > >  
> > > >
> > > > XML CODE:
> > > > 
> > > >  Office
> > > >  Lunch
> > > >  333
> > > >  404
> > > > 
> > > >
> > > > Thanks.
> > > >
> > >
> >
>




[flexcoders] Re: Sort: Datagrid sorting numbers and strings

2009-06-12 Thread flexaustin
Ok, so I am closer.

If I have this: 

192.168.168.12
192.168.168.129
192.168.168.24
hellokitty
bigsmelly

When sorting I get this (with the normal flex sorting):

192.168.168.129
192.168.168.12
192.168.168.24
bigsmelly
hellokitty


And if I use my own sort function and perform several sorts quickly I get an 
Error:

"Find criteria must contain at least one sort field value "

My sort function:
 
private function testCompareFunc(itemA:Object, itemB:Object):int {
var valueA:String = itemA;
var valueB:String = itemB;
return ObjectUtil.stringCompare(valueA, valueB);
}

Any suggestions? Not sure how to do a string and number comparison.

TIA




--- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
>
> Also the 192.12 are from xml so probably seen as Strings, not numbers. Would 
> that affect it?
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "flexaustin"  wrote:
> >
> > Using the built in sort I get 
> > 
> > angus
> > 192.12
> > 187.34
> > hello 
> > range
> > zoolu
> > 
> > Wonder if their is a space or return before it in the data I am given? Not 
> > sure if that would affect it.
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> > >
> > > The standard sort should sort those as:
> > > 
> > > 192.12
> > > angus
> > > hello
> > > range 39.30 - 34.50
> > > zoolu 12
> > > 
> > > What did you want instead?  It will probably require a custom sort 
> > > function
> > > 
> > > 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 10, 2009 8:43 AM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Sort: Datagrid sorting numbers and strings
> > > 
> > > 
> > > 
> > > 
> > > 
> > > So I have a datagrid that has columns that can contain a number or string 
> > > or both. I was wondering if anyone has seen a sort function that can 
> > > handle this. Below is a sample of the types of data that can be in a 
> > > column.
> > > 
> > > 192.12
> > > hello
> > > angus
> > > range 39.30 - 34.50
> > > zoolu 12
> > > 
> > > Anyway to sort these?
> > >
> >
>




[flexcoders] Re: ArrayCollection and Datagrid Binding and DataProvider Question

2009-06-12 Thread valdhor
I didn't know this.

When I tried it, it didn't update the dataprovider. Is there anything special 
that needs to happen.


--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Data  binding in general is not two-way, but an editable datagrid is a
> special case.  It will update the dataProvider items automatically.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of valdhor
> Sent: Friday, June 12, 2009 9:42 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: ArrayCollection and Datagrid Binding and
> DataProvider Question
> 
>  
> 
> 
> 
> 
> 
> 
> Basically, no. The datagrid is like a window into your dataprovider.
> 
> If you need to modify your dataprovider you need to listem for the
> itemEditEnd event, grab the data that was modified and update the underlying
> dataprovider.
> 
> The data binding will note that the dataprovider has changed and will update
> the datagrid on the next redraw.
> 
> What data binding does is add an event dispatcher to the variable you have
> defined as bindable. When the variable changes an event is generated to let
> any component that is bound to that variable know that the variable has
> changed and update itself with the new data.
> 
> Now, As I understand it (And I could be wrong) Flex 4 (Gumbo) does do full
> two way data binding. I have not read up on what or how it does this but it
> sounds interesting.
> 
> HTH
> 
> Steve
> 
> --- In flexcod...@yahoogro  ups.com,
> Angelo Anolin  wrote:
> >
> > Good day.
> > 
> > Learning Flex here for the past two (like three actually) weeks.  Using
> only mxml compiler.
> > 
> > I have a question with regards to the above subject:
> > 
> > Assuming I declared an ArrayCollection as follows:
> > 
> > [Bindable] private var _arrItems:ArrayCollection = new
> ArrayCollection([{"itemNo":"1", "testItem":"Angelo"}, {"itemNo":"2",
> "testItem":"Dinah"}]);
> > 
> > This array I am binding to a datagrid as follows:
> > 
> >  >   dataProvider="{_arrItems}" 
> >   useRollOver="false" 
> >   height="450"
> >   width="100%" 
> >   verticalScrollPolicy="auto" 
> >   sortableColumns="false" 
> >   draggableColumns="false" 
> >   resizableColumns="false">
> >  
> >  
> >   width="200">
> >   
> >
> > 
> >
> >   
> >  
> >  
> >  
> > 
> > 
> > No problem initially, as the itemNo and the testItem values are displayed
> properly on the datagrid.
> > 
> > Now for example, if I modified my first row which contains itemNo:1 and
> testItem:Angelo, where I changed Angelo to Mickey, will the dataprovider
> reflect the change in the said row?
> > How do I make so that the changes in the datagrid be reflected into the
> ArrayCollection?  such that when I changed the testItem data for the first
> row and access the item, via:
> > 
> > _arrItems.getItemAt(arrLength -1).itemNo
> > _arrItems.getItemAt(arrLength -1).testItem
> > 
> > The result would be "1" and "Mickey" respectively?
> > 
> > I am a bit puzzled on how databinding actually works in Flex. Is it like a
> two-way live update (such that when you modify the value in the datagrid, it
> is reflected back to the arraycollection)?
> > 
> > Would love to hear your inputs.
> > 
> > Thanks and regards,
> > Angelo
> >
>




RE: [flexcoders] problem with Tree control data provider

2009-06-12 Thread Tracy Spratt
You may need to use a custom DataDescriptor.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of srini3477
Sent: Wednesday, June 10, 2009 2:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] problem with Tree control data provider

 






In my application i am using the tree control and the data for tree is
coming from server as the list of dtos.All the branch nodes are in the top
level dtos and this lop level dto contains the list of sub dtos, these sub
level dtos represents the leaf nodes of that branch node.

I am not able to combine as data provider for the tree control.The list here
i am talking is ArrayCollection.

Please can any body suggest, how to make this list as the data provider.





RE: [flexcoders] ambiguous reference error

2009-06-12 Thread Tracy Spratt
Which reference is ambiguous?

 

I would mistrust a variable named "valid" as being a system reserved word.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of [p e r c e p t i c o n]
Sent: Thursday, June 11, 2009 5:01 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] ambiguous reference error

 






valid is not the same as enabled...i don't think...

 

 

On Thu, Jun 11, 2009 at 1:23 AM, Tom Chiverton mailto:tom.chiver...@halliwells.com> halliwells.com> wrote:

 



On Wednesday 10 Jun 2009, [p e r c e p t i c o n] wrote:
>  click="Submit();" enabled="{valid}"/>

So using
submitButton.valid 
is a work around ?

-- 
Helping to globally strategize error-free eligible professional products as 
part of the IT team of the year, '09 and '08









 


Tom Chiverton 
Developer 
Tel: +44 0161 618 5032 
Fax: +44 0161 618 5099 
  tom.chiver...@halliwells.com 
3 Hardman Square, Manchester, M3 3EB
  www.Halliwells.com 

 





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] Re: ArrayCollection and Datagrid Binding and DataProvider Question

2009-06-12 Thread Tracy Spratt
Data  binding in general is not two-way, but an editable datagrid is a
special case.  It will update the dataProvider items automatically.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, June 12, 2009 9:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ArrayCollection and Datagrid Binding and
DataProvider Question

 






Basically, no. The datagrid is like a window into your dataprovider.

If you need to modify your dataprovider you need to listem for the
itemEditEnd event, grab the data that was modified and update the underlying
dataprovider.

The data binding will note that the dataprovider has changed and will update
the datagrid on the next redraw.

What data binding does is add an event dispatcher to the variable you have
defined as bindable. When the variable changes an event is generated to let
any component that is bound to that variable know that the variable has
changed and update itself with the new data.

Now, As I understand it (And I could be wrong) Flex 4 (Gumbo) does do full
two way data binding. I have not read up on what or how it does this but it
sounds interesting.

HTH

Steve

--- In flexcod...@yahoogro  ups.com,
Angelo Anolin  wrote:
>
> Good day.
> 
> Learning Flex here for the past two (like three actually) weeks.  Using
only mxml compiler.
> 
> I have a question with regards to the above subject:
> 
> Assuming I declared an ArrayCollection as follows:
> 
> [Bindable] private var _arrItems:ArrayCollection = new
ArrayCollection([{"itemNo":"1", "testItem":"Angelo"}, {"itemNo":"2",
"testItem":"Dinah"}]);
> 
> This array I am binding to a datagrid as follows:
> 
>dataProvider="{_arrItems}" 
>   useRollOver="false" 
>   height="450"
>   width="100%" 
>   verticalScrollPolicy="auto" 
>   sortableColumns="false" 
>   draggableColumns="false" 
>   resizableColumns="false">
>  
>  
>  
>   
>
> 
>
>   
>  
>  
>  
> 
> 
> No problem initially, as the itemNo and the testItem values are displayed
properly on the datagrid.
> 
> Now for example, if I modified my first row which contains itemNo:1 and
testItem:Angelo, where I changed Angelo to Mickey, will the dataprovider
reflect the change in the said row?
> How do I make so that the changes in the datagrid be reflected into the
ArrayCollection?  such that when I changed the testItem data for the first
row and access the item, via:
> 
> _arrItems.getItemAt(arrLength -1).itemNo
> _arrItems.getItemAt(arrLength -1).testItem
> 
> The result would be "1" and "Mickey" respectively?
> 
> I am a bit puzzled on how databinding actually works in Flex. Is it like a
two-way live update (such that when you modify the value in the datagrid, it
is reflected back to the arraycollection)?
> 
> Would love to hear your inputs.
> 
> Thanks and regards,
> Angelo
>





[flexcoders] Re: Datagrid - Using and Editing Data From XMLListCollection

2009-06-12 Thread valdhor
It works for me...


http://www.adobe.com/2006/mxml";
layout="absolute"
 creationComplete="onCreationComplete()">
 
 
 
 
 
 
 
 


--- In flexcoders@yahoogroups.com, "azona26"  wrote:
>
> Thanks for the help. I did try using an itemEditEnd eventlistener. The
issue I was having was that the data value wasn't being changed it was
still the original value.
>
> --- In flexcoders@yahoogroups.com, "valdhor" valdhorlists@ wrote:
> >
> > You would need to add an event listener for the itemeditend event.
Then grab the data that was edited and modify the dataprovider.
> >
> >
> > --- In flexcoders@yahoogroups.com, "azona26" 
wrote:
> > >
> > > I have an editable datagrid with data being populated from an
> > > XMLListCollection. I am attempting to edit the data in one of the
> > > columns that is using a labelFunction to get its value. This
column does
> > > not have a dataField value. How can I edit the data in the field
and
> > > have the XMLListCollection reflect the updated change correctly as
well
> > > as have the field value change? As it stands now I can change the
data
> > > in the column, however once I leave that datafield it reverts back
to
> > > the original value and the XMLListCollection remains unchanged.
> > >
> > > Here is the DG code:
> > >
> > >   > > dataProvider="{building_xmlcoll}" >
> > >  
> > >   > > labelFunction="getValue" editable="true" />
> > >  
> > >  
> > > 
> > >  
> > >  
> > >
> > > XML CODE:
> > > 
> > >  Office
> > >  Lunch
> > >  333
> > >  404
> > > 
> > >
> > > Thanks.
> > >
> >
>



RE: [flexcoders] Charting dataFunction issues

2009-06-12 Thread Jake Churchill
Sorry, I meant to follow up on this yesterday.  Thanks for your reply but I
figured it out.  I had the wrong type of horizontal axis applied so when I
was returning an xField value it was actually drawing the chart off to the
right somewhere.

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
http://www.cfwebtools.com
402-408-3733 x103
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Sam Lai
Sent: Friday, June 12, 2009 9:27 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Charting dataFunction issues

Can you try removing some of those series to isolate the problem?
Also, can we see the console output from the trace statements in
seriesDataFunction?

Maybe the values are out of bounds? Some sample data would be useful
too if that's possible.

2009/6/12 Jake Churchill :
>
>
> Charting people, please help!
>
>
>
> I’m using examples right out of Adobe’s guides and several other guides
I’ve
> found online on how to use a series dataFunction.  The issue is that when
I
> try to use the dataFunction, I get nothing.  The Series doesn’t display at
> all.  When I go back to using yField, everything is fine.  Below is the
MXML
> for the chart and series.  The dataprovider is an ArrayCollection of VO’s
> with the following properties:
>
>
>
> public var ceiling:Number;
>
> public var costOfProd:Number;
>
> public var cropProfileID:Number;
>
> public var floor:Number;
>
> public var historyDt:Date;
>
> public var insGuarantee:Number;
>
> public var revenue:Number;
>
>
>
> Here is the dataFunction that I’m using (straight out of an example from
> http://flexdiary.blogspot.com/2008/08/charting-example.html) which I
changed
> to work with my data:
>
>
>
> public function seriesDataFunction( series:Series,
> item:UserRevenueHistoryVO, fieldName:String ):Object
>
> {
>
>     var returnValue:Object = null;
>
>     switch( fieldName )
>
>     {
>
>     case "xValue":
>
>     returnValue =
> item.historyDt;
>
>     break;
>
>     case "yValue":
>
>     returnValue = 25;
>
>     break;
>
>     case "minValue":
>
>     returnValue =
item.ceiling;
>
>     break;
>
>     }
>
>     trace(fieldName + " " + returnValue);
>
>
>
>     return returnValue;
>
> }
>
>
>
> Finally, here’s the chart code.  The Line Series work fine because I’m
using
> yField.  If I switch the AreaSeries to yField instead of dataFunction,
they
> work as well but I need to do some work with the ceiling data in this
case.
>
>
>
> 
>
> id
> = "chart"
>
>
> width
> = "100%"
>
>
> height
> = "100%"
>
>
> showDataTips
> = "true"
>
>
> dataProvider
> = "{Model.instance.acUserRevenueHistory}"
>
>     >
>
>     
>
>     
>
> id    =
> "floorSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Floor"
>
>
> form  = "step"
>
>
> dataFunction = "dataFunc"
>
>     >
>
>
> 
>
>
> 
>
> weight  = "1"
>
>
> alpha = "100"
>
>
> color  = "0x00"
>
>
> />
>
>
> 
>
>
> 
>
>     
>     color="0xE9E4C7"
>
>     alpha="1"
>
>     />
>
>     
>
>
>
>     
>
>     
>
> id    =
> "revenueSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Actual Revenue"
>
>
> form  = "curve"
>
>
> yField    = "revenue"
>
>     >
>
>
> 
>
>
> 
>
> weight  = "2"
>
>
> alpha = "100"
>
>
> color  = "0x00"
>
>
> />
>
>
> 
>
>     
>
>     
>
> id    =
> "costOfProductionSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Cost of Production"
>
>
> yField    = "costOfProd"
>
>    

[flexcoders] Re: Flex App for iPhone or iPod Touch

2009-06-12 Thread Tom Chiverton
On Thursday 11 Jun 2009, Jeffry Houser wrote:
>  The Full Flash Player 10 [and therefore Flex] is supposed to be out for
> the Palm Pre later this year, and it coming to other devices.

Look in the archives for my recent 'ARM' post.

-- 
Helping to greatly conquer revolutionary cross-platform principle-centered 
value-added solutions as part of the IT team of the year, '09 and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



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] Charting dataFunction issues

2009-06-12 Thread Sam Lai
Can you try removing some of those series to isolate the problem?
Also, can we see the console output from the trace statements in
seriesDataFunction?

Maybe the values are out of bounds? Some sample data would be useful
too if that's possible.

2009/6/12 Jake Churchill :
>
>
> Charting people, please help!
>
>
>
> I’m using examples right out of Adobe’s guides and several other guides I’ve
> found online on how to use a series dataFunction.  The issue is that when I
> try to use the dataFunction, I get nothing.  The Series doesn’t display at
> all.  When I go back to using yField, everything is fine.  Below is the MXML
> for the chart and series.  The dataprovider is an ArrayCollection of VO’s
> with the following properties:
>
>
>
> public var ceiling:Number;
>
> public var costOfProd:Number;
>
> public var cropProfileID:Number;
>
> public var floor:Number;
>
> public var historyDt:Date;
>
> public var insGuarantee:Number;
>
> public var revenue:Number;
>
>
>
> Here is the dataFunction that I’m using (straight out of an example from
> http://flexdiary.blogspot.com/2008/08/charting-example.html) which I changed
> to work with my data:
>
>
>
> public function seriesDataFunction( series:Series,
> item:UserRevenueHistoryVO, fieldName:String ):Object
>
> {
>
>     var returnValue:Object = null;
>
>     switch( fieldName )
>
>     {
>
>     case "xValue":
>
>     returnValue =
> item.historyDt;
>
>     break;
>
>     case "yValue":
>
>     returnValue = 25;
>
>     break;
>
>     case "minValue":
>
>     returnValue = item.ceiling;
>
>     break;
>
>     }
>
>     trace(fieldName + " " + returnValue);
>
>
>
>     return returnValue;
>
> }
>
>
>
> Finally, here’s the chart code.  The Line Series work fine because I’m using
> yField.  If I switch the AreaSeries to yField instead of dataFunction, they
> work as well but I need to do some work with the ceiling data in this case.
>
>
>
> 
>
> id
> = "chart"
>
>
> width
> = "100%"
>
>
> height
> = "100%"
>
>
> showDataTips
> = "true"
>
>
> dataProvider
> = "{Model.instance.acUserRevenueHistory}"
>
>     >
>
>     
>
>     
>
> id    =
> "floorSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Floor"
>
>
> form  = "step"
>
>
> dataFunction = "dataFunc"
>
>     >
>
>
> 
>
>
> 
>
> weight  = "1"
>
>
> alpha = "100"
>
>
> color  = "0x00"
>
>
> />
>
>
> 
>
>
> 
>
>     
>     color="0xE9E4C7"
>
>     alpha="1"
>
>     />
>
>     
>
>
>
>     
>
>     
>
> id    =
> "revenueSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Actual Revenue"
>
>
> form  = "curve"
>
>
> yField    = "revenue"
>
>     >
>
>
> 
>
>
> 
>
> weight  = "2"
>
>
> alpha = "100"
>
>
> color  = "0x00"
>
>
> />
>
>
> 
>
>     
>
>     
>
> id    =
> "costOfProductionSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Cost of Production"
>
>
> yField    = "costOfProd"
>
>     >
>
>
> 
>
>
> 
>
> weight  = "1"
>
>
> alpha = "100"
>
>
> color  = "0x00"
>
>
> />
>
>
> 
>
>     
>
>     
>
> id    =
> "insuranceGuaranteeSeries"
>
>
> showDataEffect    = "{seriesEffect}"
>
>
> displayName  = "Insurance Guarantee"
>
>
> yField    = "insGuarantee"
>
>    

[flexcoders] Re: Datagrid - Using and Editing Data From XMLListCollection

2009-06-12 Thread azona26
Thanks for the help. I did try using an itemEditEnd eventlistener. The issue I 
was having was that the data value wasn't being changed it was still the 
original value.

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> You would need to add an event listener for the itemeditend event. Then grab 
> the data that was edited and modify the dataprovider.
> 
> 
> --- In flexcoders@yahoogroups.com, "azona26"  wrote:
> >
> > I have an editable datagrid with data being populated from an
> > XMLListCollection. I am attempting to edit the data in one of the
> > columns that is using a labelFunction to get its value. This column does
> > not have a dataField value. How can I edit the data in the field and
> > have the XMLListCollection reflect the updated change correctly as well
> > as have the field value change? As it stands now I can change the data
> > in the column, however once I leave that datafield it reverts back to
> > the original value and the XMLListCollection remains unchanged.
> > 
> > Here is the DG code:
> > 
> >   > dataProvider="{building_xmlcoll}" >
> >  
> >   > labelFunction="getValue" editable="true" />
> >  
> >  
> > 
> >  
> >  
> > 
> > XML CODE:
> > 
> >  Office
> >  Lunch
> >  333
> >  404
> > 
> > 
> > Thanks.
> >
>




[flexcoders] Re: ArrayCollection and Datagrid Binding and DataProvider Question

2009-06-12 Thread valdhor
Basically, no. The datagrid is like a window into your dataprovider.

If you need to modify your dataprovider you need to listem for the itemEditEnd 
event, grab the data that was modified and update the underlying dataprovider.

The data binding will note that the dataprovider has changed and will update 
the datagrid on the next redraw.

What data binding does is add an event dispatcher to the variable you have 
defined as bindable. When the variable changes an event is generated to let any 
component that is bound to that variable know that the variable has changed and 
update itself with the new data.

Now, As I understand it (And I could be wrong) Flex 4 (Gumbo) does do full two 
way data binding. I have not read up on what or how it does this but it sounds 
interesting.


HTH



Steve


--- In flexcoders@yahoogroups.com, Angelo Anolin  wrote:
>
> Good day.
> 
> Learning Flex here for the past two (like three actually) weeks.  Using only 
> mxml compiler.
> 
> I have a question with regards to the above subject:
> 
> Assuming I declared an ArrayCollection as follows:
> 
> [Bindable] private var _arrItems:ArrayCollection = new 
> ArrayCollection([{"itemNo":"1", "testItem":"Angelo"}, {"itemNo":"2", 
> "testItem":"Dinah"}]);
> 
> This array I am binding to a datagrid as follows:
> 
>    dataProvider="{_arrItems}" 
>   useRollOver="false" 
>   height="450"
>   width="100%" 
>   verticalScrollPolicy="auto" 
>   sortableColumns="false" 
>   draggableColumns="false" 
>   resizableColumns="false">
>  
>  
>   width="200">
>   
>    
> 
>    
>   
>  
>  
>  
> 
> 
> No problem initially, as the itemNo and the testItem values are displayed 
> properly on the datagrid.
> 
> Now for example, if I modified my first row which contains itemNo:1 and 
> testItem:Angelo, where I changed Angelo to Mickey, will the dataprovider 
> reflect the change in the said row?
> How do I make so that the changes in the datagrid be reflected into the 
> ArrayCollection?  such that when I changed the testItem data for the first 
> row and access the item, via:
> 
> _arrItems.getItemAt(arrLength -1).itemNo
> _arrItems.getItemAt(arrLength -1).testItem
> 
> The result would be "1" and "Mickey" respectively?
> 
> I am a bit puzzled on how databinding actually works in Flex. Is it like a 
> two-way live update (such that when you modify the value in the datagrid, it 
> is reflected back to the arraycollection)?
> 
> Would love to hear your inputs.
> 
> Thanks and regards,
> Angelo
>




[flexcoders] Re: Datagrid - Using and Editing Data From XMLListCollection

2009-06-12 Thread valdhor
You would need to add an event listener for the itemeditend event. Then grab 
the data that was edited and modify the dataprovider.


--- In flexcoders@yahoogroups.com, "azona26"  wrote:
>
> I have an editable datagrid with data being populated from an
> XMLListCollection. I am attempting to edit the data in one of the
> columns that is using a labelFunction to get its value. This column does
> not have a dataField value. How can I edit the data in the field and
> have the XMLListCollection reflect the updated change correctly as well
> as have the field value change? As it stands now I can change the data
> in the column, however once I leave that datafield it reverts back to
> the original value and the XMLListCollection remains unchanged.
> 
> Here is the DG code:
> 
>   dataProvider="{building_xmlcoll}" >
>  
>   labelFunction="getValue" editable="true" />
>  
>  
> 
>  
>  
> 
> XML CODE:
> 
>  Office
>  Lunch
>  333
>  404
> 
> 
> Thanks.
>




Re: [flexcoders] Re: Label a Button just like Flex Builder helps

2009-06-12 Thread Harish Sivaramakrishnan
While you add the child (TextInput) , make a dictionary to track the
childIndex or even better the instance itself and bump it off once you
complete the editing

Harish

On Fri, Jun 12, 2009 at 6:06 PM, chandruflex  wrote:

>
>
> Ok, I can use removeChildAt() for the question that I have asked. Actually
> I had to think about the next step. In my application, I will have a lot of
> other components (both statically and dynamically created). One or many of
> those dynamically created components may be Button components.
>
>
> --- In flexcoders@yahoogroups.com , Harish
> Sivaramakrishnan  wrote:
> >
> > just curious, why can't you use removeChildAt()?
> >
> > On Fri, Jun 12, 2009 at 11:58 AM, chandruflex  wrote:
> >
> > >
> > >
> > > In my application, I have a Button. I want to double-click this Button,
> and
> > > edit its label, just like we do in Flex Builder.
> > >
> > > To do this, I have a double-click event-handler for my Button. In this
> > > event-handler, I have written code to create a TextInput control (in
> > > ActionScript). I have specified an enter-event-handler for this
> TextInput
> > > control. In the enter-event-handler of the TextInput control, I assign
> the
> > > typed-in Text to my Button control. I have to remove the TextInput
> control
> > > now. Here is where I have a problem. I want to remove this TextInput
> > > control, which has been created dynamically using ActionScript, only
> using
> > > "removeChild()" and not using "removeChildAt()".
> > >
> > > I get an error "Cannot access a property or method of a null object
> > > reference", when using the "removeChild()" to remove the TextInput
> control.
> > >
> > > I would like to know, how I can remove this TextInput control, that I
> have
> > > created using ActionScript.
> > >
> > >
> > >
> >
>
>  
>


[flexcoders] Re: Label a Button just like Flex Builder helps

2009-06-12 Thread chandruflex
Ok, I can use removeChildAt() for the question that I have asked. Actually I 
had to think about the next step. In my application, I will have a lot of other 
components (both statically and dynamically created). One or many of those 
dynamically created components may be Button components.


--- In flexcoders@yahoogroups.com, Harish Sivaramakrishnan 
 wrote:
>
> just curious, why can't you use removeChildAt()?
> 
> On Fri, Jun 12, 2009 at 11:58 AM, chandruflex  wrote:
> 
> >
> >
> > In my application, I have a Button. I want to double-click this Button, and
> > edit its label, just like we do in Flex Builder.
> >
> > To do this, I have a double-click event-handler for my Button. In this
> > event-handler, I have written code to create a TextInput control (in
> > ActionScript). I have specified an enter-event-handler for this TextInput
> > control. In the enter-event-handler of the TextInput control, I assign the
> > typed-in Text to my Button control. I have to remove the TextInput control
> > now. Here is where I have a problem. I want to remove this TextInput
> > control, which has been created dynamically using ActionScript, only using
> > "removeChild()" and not using "removeChildAt()".
> >
> > I get an error "Cannot access a property or method of a null object
> > reference", when using the "removeChild()" to remove the TextInput control.
> >
> > I would like to know, how I can remove this TextInput control, that I have
> > created using ActionScript.
> >
> >  
> >
>




[flexcoders] Re: Dispatch Event Issue on BreadCrumb Trail Click

2009-06-12 Thread n_manjunatha
Hi Tim
Thanks for your time and reply. Yes you are right, I am not using MVC 
Framework. 

I tried this
my main.mxml is like this...of course not with exact format of flex...
script
{
 breadcrumclicked(event:Event) which comes canvas below
}





I guess i cant send the public method breadcrumclicked(event) in
my contentpane bcoz i cant give something like this


i tried this it doesnt work..it says cant resolve attribute breadcrumclicked 
for contentpane.

Thanks 


--- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
>
> 
> Hi,
> 
> If you're not using an MVC framework, an easy way is to create a public
> method in contentpane.mxml, that will set the tree selection.  On
> breadcrumb click, pass the event: contentpane.myPublicSelectionMethod(
> event ).
> 
> -TH
> 




Re: [flexcoders] Read Items / Loop Through Datagrid Rows

2009-06-12 Thread Harish Sivaramakrishnan
use the itemEditEnd event on the DataGrid to get the value you entered in
the TextInputs. (It is fired when you tab out or change focus from rows.)

Harish

On Fri, Jun 12, 2009 at 5:25 AM, Angelo Anolin wrote:

>
>
> Hi,
>
> Would you care to share some codes of what you did previously?
> Thanks.
>
> Regards,
>
> Angelo
>
>
>
>  --
> *From:* Everson Alves 
> *To:* flexcoders@yahoogroups.com
> *Sent:* Friday, 12 June, 2009 5:47:27
> *Subject:* Re: [flexcoders] Read Items / Loop Through Datagrid Rows
>
>  Hi,
>  I did something quite similar but using List + renderer manually added
> instead. The custom line renderer dispatches events when edited so I can
> save the values, remove or add new lines, block the others rows etc. My
> previous implementation was using datagrid like you is trying but this new
> approach is better for me, I've far more control over what I can do.
>
> On Thu, Jun 11, 2009 at 10:12 AM, Angelo Anolin  yahoo.com
> > wrote:
>
>>
>>
>>
>> Hi FlexCoders,
>>
>> I am dynamically creating a datagrid with 5 columns and 10 rows.  Columns
>> 2, 3, 4 and 5 are all rendered as textinput control where user can enter
>> some information.
>>
>> How do I loop through all the datagrid rows and store the values entered
>> in the datagrid into an array collection?
>>
>> Been trying to find some nice examples to achieve this but came up empty
>> handed. Would appreciate your inputs.
>>
>> By the way, I'd also like to ensure that no rows would be skipped by the
>> user when filling up the datagrid (i.e. He could only populate row 1 before
>> he can populate row 2 and so forth).  That way, when the array collection
>> stores the values of the datagrid, there is no blank or null value.  The
>> remaining blank rows would simply be ignored in the loop.
>>
>> Thanks.
>>
>> Regards,
>>
>> Angelo
>>
>>
>>
>>
>
>
> --
> Jhonny Everson
>
>  
>


Re: [flexcoders] Label a Button just like Flex Builder helps

2009-06-12 Thread Harish Sivaramakrishnan
just curious, why can't you use removeChildAt()?

On Fri, Jun 12, 2009 at 11:58 AM, chandruflex  wrote:

>
>
> In my application, I have a Button. I want to double-click this Button, and
> edit its label, just like we do in Flex Builder.
>
> To do this, I have a double-click event-handler for my Button. In this
> event-handler, I have written code to create a TextInput control (in
> ActionScript). I have specified an enter-event-handler for this TextInput
> control. In the enter-event-handler of the TextInput control, I assign the
> typed-in Text to my Button control. I have to remove the TextInput control
> now. Here is where I have a problem. I want to remove this TextInput
> control, which has been created dynamically using ActionScript, only using
> "removeChild()" and not using "removeChildAt()".
>
> I get an error "Cannot access a property or method of a null object
> reference", when using the "removeChild()" to remove the TextInput control.
>
> I would like to know, how I can remove this TextInput control, that I have
> created using ActionScript.
>
>  
>


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

2009-06-12 Thread Tom Chiverton
On Wednesday 03 Jun 2009, tntomek wrote:
> The source is between 100-5000k rows.

That's a lot ! You could probably serve your users better by having a small 
data set anyway, which will also fix your performance problems.

-- 
Helping to simultaneously engage network B2B second-generation compelling 
design-patterns as part of the IT team of the year, '09 and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



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.