[flexcoders] Syntax of using a variable to make an object

2008-10-17 Thread john fisher
I am stuck on some basic AS syntax.

Here is some Adobe sample code:

[Bindable]
public var dpac:ArrayCollection =  new ArrayCollection([
   {A:2000},{A:3000}, {A:6000} ]);

public function addDataItem():void {
var o:Object = {"A":2000};
dpac.addItem(o);
}


Inside a loop, I need to add a data item to an arraycollection, but I
need to get the name of the data  and the result of the data from an XML
file.
OK I've got those two things working, but now my name and dataresult are
variables not ints and strings.

[Bindable]
public var dpac:ArrayCollection =  new ArrayCollection;
for each ( var something:XML in myXML.children()) {
var dataresult:Obj = something ;  // don't know type of result 
ahead of time...
var name:String = something.name ;

var o:Object = { name + ':' + dataresult } // WRONG! 
dpac.addItem(o);

}

I am going wrong where I try to create an object out of method-results or 
variables that can be additem'ed to an arraycollection. 
And I don't really get the curly brace syntax, as you can see...

Thanks for guidance here...
John

PS what is the proper name for this like 'passing by reference vs passing by 
value' or?




[flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread sailorsea21
DOH!

Thank you very much for your help :)

-David




--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Because you introduced the Vbox container.  Neither the button or 
the
> moduleloader are children of modulestile, they are children of the 
Vbox.
> 
>  
> 
> You now need to keep references to the Vbox instead, and remove 
that.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of sailorsea21
> Sent: Friday, October 17, 2008 3:21 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> 
>  
> 
> Thanks Paul, that fixed the error in my file but I still receive 
the 
> error when I run my application, load modules and then try to 
unload 
> a loaded module. 
> 
> Error:
> 
> ArgumentError: Error #2025: The supplied DisplayObject must be a 
> child of the caller.
> at flash.display::DisplayObjectContainer/removeChild()
> at 
> 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
>  
> veChild()[E:\dev\3.1.0
> \frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
> at mx.core::Container/removeChild()[E:\dev\3.1.0
> \frameworks\projects\framework\src\mx\core\Container.as:2267]
> at content_module_template_blank/unloadclick()
> [C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004
> \src\content_module_template_blank.mxml:39]
> 
> Thanks.
> 
> --- In flexcoders@yahoogroups.com 
> , "Paul Andrews"  wrote:
> >
> > 
> > - Original Message - 
> > From: "sailorsea21" 
> > To: mailto:flexcoders%
40yahoogroups.com>
> >
> > Sent: Friday, October 17, 2008 8:01 PM
> > Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> > 
> > 
> > > Here's my updated code:
> > >
> > > private var moduleloader:ModuleLoader;
> > > private var unload_button:Button;
> > > private var vbox:VBox;
> > > private var _aChildren:Array=[];
> > >
> > > private function unloadclick(event:Event):void
> > > {
> > > var iIndexClicked:int = parseInt(event.target.id);
> > > modulestile.removeChild(_aChildren[iIndexClicked]);
> > > *error* modulestile.removeChild(event.target); 
> *error*
> > 
> > modulestile.removeChild(DisplayObject(event.target));
> > 
> > 
> > > }
> > >
> > > public function AddColumnGraphPanel():void
> > > {
> > > var iNewIndex:int = _aChildren.length;
> > > vbox = new VBox();
> > > modulestile.addChild(vbox);
> > > moduleloader = new ModuleLoader();
> > > moduleloader.url = "test.swf";
> > > _aChildren[iNewIndex] = vbox.addChild(moduleloader);
> > > unload_button = new Button();
> > > unload_button.id = String(iNewIndex);
> > > unload_button.label = "unload";
> > > unload_button.addEventListener(MouseEvent.CLICK, unloadclick);
> > > vbox.addChild(unload_button);
> > > }
> > >
> > > 
> > > 
> > >
> > > I have the following error in the script:
> > > 1118: Implicit coercion of a value with static type Object to a
> > > possibly unrelated type flash.display:DisplayObject.
> > 
> > Quite right too..
> > 
> > >
> > > Thanks again :)
> > >
> > > -David
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --- In flexcoders@yahoogroups.com
>  , "Tracy Spratt"  
> wrote:
> > >>
> > >> That is correct, you are not storing references correctly. 
> First I
> > > will
> > >> explain what is wrong with your code, but then, after seeing 
what
> > > you
> > >> are trying to do, will suggest a slightly different approach.
> > >>
> > >>
> > >>
> > >> First, you are mixing Array, which is accessed by index
> > > and "associative
> > >> array", which is an Object and accessed by property name:
> > >>
> > >> private var _oChildren:Object = new Object();
> > >>
> > >>
> > >>
> > >> Second, you are creating a new instance of that each time you 
> click
> > >> addModule. This overwrites what was in there before. Don't do
> > > that.
> > >>
> > >>
> > >>
> > >> Third, you need a unique name for each reference you add to the
> > >> associative array. Don't use "one" every time, that just puts 
a 
> new
> > >> reference in the "one" property. You can use anything you want 
> for
> > > this
> > >> property name. Pick something that is meaningful. How will you
> > >> identify which child you want to remove? Is it purely 
numerical?
> > > If so
> > >> you can use "1", "2", etc. Usually there is some string that is
> > > logical
> > >> for this, like an id, or an image's base file name. whatever,
> > > remember
> > >> it must uniquely identify the instance you want to later 
remove.
> > >>
> > >>
> > >>
> > >> Now, after looking at your code a bit more, and seeing that 
you 
> do
> > > not
> > >> have a clear string or id you can use for identifying the
> > > references, I
> > >> am gong to suggest a different approach.
> > >>
> > >> private var _aChildren:Array= []; //declare an
> > > initialize
> > >> an Array

[flexcoders] flex and oracle

2008-10-17 Thread mtkarimi
hello people
its show time

ok i have a question i'm new in programming with flex but im student
and im looking for a way that i can connect oracle data base with flex
it can help me a lot even a simple connection that can extract 
something of database

and what do u think bout adobe what they want to do?
coz silverlight growup too quickly and i'm vory bout this

thanks a lot to all of you and the admin of this group
god bless you and try to make a world better place , peace & peace



RE: [flexcoders] what is a String? (default encoding question)

2008-10-17 Thread Gordon Smith
I think AS3 uses UTF-16 internally, but I'm not sure about that, and it might 
change in the future. I suggest that you do some timing tests to see what's 
fastest.

- Gordon

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Pan 
Troglodytes
Sent: Friday, October 17, 2008 12:49 PM
To: flexcoders
Subject: [flexcoders] what is a String? (default encoding question)

How is a string represented internally in Flex?  It never actually says it in 
the help for String.  Is it UTF-8?  I think this because because mxml uses 
utf-8 as the encoding in the ?xml directive, ByteArray seems to treat utf-8 
specially, and ByteArray.readMultiByte says the return value is a utf-8 encoded 
string.

The reason I ask is because I'm reading some string data in from a binary file 
and I'm trying to figure out the most CPU efficient way to put it in the file.  
I want it to be in the file in the same encoding that won't require Flex to 
translate from one encoding to another when storing it in a String variable.

Thanks.

--
Jason



[flexcoders] Lookup performance: Dictionary in memory vs. SQLLite

2008-10-17 Thread arieljake
I am developing an AIR app, and am wondering what people believe would
be faster...I plan to implement an RSS reader in the app, and want to
filter the entries that have been read/saved already, so I will need
to do a lookup on every downloaded RSS item in a dictionary to see if
the user has looked at that item already.

Would it be faster to read these in from the SQLLite DB at startup and
check these in memory, or just perform queries on the SQLLite db directly?

Thanks.



[flexcoders] Generic XML serializer/deserializer in as3

2008-10-17 Thread arieljake
In case anyone can make use of it:

http://arieljake.onsugar.com/2383269



[flexcoders] [ANN Class] 3D Interactive UI, Papervision w/ Flex for Games and more

2008-10-17 Thread v.cekvenich
A 10 hour bootcamp in Flex to learn 3D using Papervision. Taught by
professional trainer Vic Cekvenich. In SF on 11/20 after Max,more info
at: http://papervision.proj.com $200-400.

We will cover hands on labs from scratch:

* Setting up the SDK
* Warm up: 2D Motion
* 3D Primitives
* 3D Math
* Materials
* Make a complex objects (Collada)
* Interactions
* Shadows/Reflection
* Flash 10
* Calling a remote (web java/data ) service
* and more.


This is an intensive all day class stressing techniques useful for
gaming and traditional 3D. You will walk out comfortable creating
simple 3D games or a Rich UI Web site.

You must provide your own laptop, over 1 GB ram recommended. Power
will be provided for each laptop. We will mail you class prep
materials on a usb stick 10 days before the class. You will also have
support after the class.

.V




[flexcoders] Re: Flex uploader / accessing local files?

2008-10-17 Thread Rob Kunkle
As far as I know its not possible to get a File object directly off of
the client machine...if the client is using flash 9. 

It looks like this was resolved in Flash 10 though. Yay!

http://drawlogic.com/2008/05/17/amazing-new-feature-for-flash-10/



--- In flexcoders@yahoogroups.com, "Kevin Benz" <[EMAIL PROTECTED]> wrote:
>
> This actually isn't very tough at all. You need to get the File object,
> load its  BitmapData and use the Matrix object to size it and then
> either PNGEncode or JPGEncode back out.
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of valdhor
> Sent: Friday, October 17, 2008 6:41 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Flex uploader / accessing local files?
> 
>  
> 
> It looks like you'll have to wait for Flash Player 10. See this thread:
> 
> http://tech.groups.yahoo.com/group/flexcoders/message/126563
> 
> --- In flexcoders@yahoogroups.com 
> , "Rob Kunkle"  wrote:
> >
> > Hi -
> > 
> > I've made a flex uploading application that gets a file from the
> > client's file system using FileReference() and uploads it to a server.
> 
> > 
> > I'd like to be able to resize the image before it is sent to the
> > server, but apparently flex doesn't have access to the actual bits
> > that make up the image file, only a reference to the file.
> > 
> > Surely there must be a way to manipulate that image data from the
> > client's file before it gets to the server? 
> > 
> > Has anyone done anything like this? I've looked all around but haven't
> > had much luck.
> > 
> > Thanks in advance,
> > Rob
> >
>




[flexcoders] Re: Warning on the line that does even not exist

2008-10-17 Thread markgoldin_2000
Yep, that was it. Thanks

--- In flexcoders@yahoogroups.com, Matt Chotin <[EMAIL PROTECTED]> wrote:
>
> Clean your project?  Is -keep turned on (not that that should make a 
difference)?
> 
> 
> On 10/17/08 1:54 PM, "markgoldin_2000" <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> I am getitng this warning:
> 1100: Assignment within conditional.  Did you mean == instead of =?
> 
> while a line with this code has been deleted a couple days ago?
>




Re: [flexcoders] Warning on the line that does even not exist

2008-10-17 Thread Matt Chotin
Clean your project?  Is -keep turned on (not that that should make a 
difference)?


On 10/17/08 1:54 PM, "markgoldin_2000" <[EMAIL PROTECTED]> wrote:




I am getitng this warning:
1100: Assignment within conditional.  Did you mean == instead of =?

while a line with this code has been deleted a couple days ago?



[flexcoders] Warning on the line that does even not exist

2008-10-17 Thread markgoldin_2000
I am getitng this warning:
1100: Assignment within conditional.  Did you mean == instead of =?

while a line with this code has been deleted a couple days ago?



[flexcoders] Re: datagrid scrolling problem

2008-10-17 Thread Mark
Thanks for the quick response, I'll give that a shot and let you 
know how it works out.

-M

--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> Jeez, got to slow down.  Should be LT.
> 
> myDG.verticalScrollPosition = (myDataProvider.length - array[i]) <
> (myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
> myDG.rowCount) : array[i];
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
> >
> >
> > Sorry for the typo, also not tested; obviously. :)
> >
> > myDG.verticalScrollPosition = (myDataProvider.length - array[i]) 
>
> > (myDataProvider.length - myDG.rowCount) ? 
(myDataProvider.length -
> > myDG.rowCount) : array[i];
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote:
> > >
> > >
> > > Hi Mark,
> > >
> > > You can come probably up with a more elegant way to handle each
> > > possibility, but here's an idea.
> > >
> > > myDG.verticalScrollPosition = (myDataProvider - array[i]) >
> > > (myDataProvider.length - myDG.rowCount) ? 
(myDataProvider.length -
> > > myDG.rowCount) : array[i];
> > >
> > > -TH
> > >
> > > --- In flexcoders@yahoogroups.com, "Mark" markp.shopping_id@ 
wrote:
> > > >
> > > > I have a basic datagrid that is getting the data from an
> > > > arrayCollection with each item having a startDate field, 
among
> > > > others. My boss wanted me to have the datagrid scroll down 
to the
> > > > item that has the same start date as todays date. Basically 
I'm
> just
> > > > looping thru the arrayCollection to find it and scroll down 
to it
> > > > using:
> > > >
> > > > myDG.verticalScrollPosition = array[i];
> > > >
> > > > This works fine unless that item is at the end of the 
datagrid.
> Then
> > > > it adds rows to the DG so that item is at top. What would be 
the
> > > > proper way to do this so if it's the last item, it just 
scrolls to
> > the
> > > > bottom without adding more rows?
> > > >
> > > > Thanks,
> > > > Mark
> > > >
> > >
> >
>




[flexcoders] Re: Extending UIComponent memory issues.

2008-10-17 Thread flexaustin
Well my container is about 4 classes deep. What I am focused on now is
the CarouselImage class as each carousel comp contains up to 8 of
these and their can be 2000 carousel components...see my delim? I know
at best it will be next to impossible to use but it has to be done. 

I tried converting my CarouselImage to a flexsprite but Flex rejects
it saying it needs to implement IUIComponent.



--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Jason,
> What I suggested is probably a bit to complex for what you need.
It's kind
> of a reimplementation of what you are doing.
> 
> 1. Subclass UIComponent to make your container.
> 2. Create the layout algorithm in that component.
> 3. Create a subclass of FlexSprite that is your loader component.
> 4. Add the FlexSprite subclass instances (your content) to your
UIComponent
> container class with custom layout.
> 5. Add the UIComponent class to a Container.
> 
> The above is not really a solution for you right now I'm sure, I was
just
> saying this is what I would do to get maximum performance and memory
> management.
> 
> The reason I say this is I have no idea how you are laying out those
> instances with reflection etc. How are you laying them out (with
what layout
> algorithm) ?
> 
> Mike
> 
> 
> On Fri, Oct 17, 2008 at 10:21 AM, flexaustin <[EMAIL PROTECTED]> wrote:
> 
> >   Michael, I have tried using Flexsprite but throws errors about
needing
> > to implementing IUIcomponent. Did I miss something and give up to
early?
> >
> > --- In flexcoders@yahoogroups.com ,
"Michael
> > Schmalle"
> >
> >  wrote:
> > >
> > > Doug, Jason,
> > > Since I am a self-centered person that doesn't like to be
misunderstood,
> > > ;-), I could have brought up the 4000 object issue. In previous
> > threads with
> > > Jason, he said this was a requirement from the higher order. So I
> > left it
> > > where it was, 4000 objects.
> > >
> > > As far as the IUIComponent issue, it is Container that requires
them not
> > > 'Flex' itself.
> > >
> > > This is where as flex projects, Web 2.0 and performance are reaching
> > a point
> > > where it's not just making a Flash IDE animation anymore.
> > >
> > > When the requirements of these projects come to this level there
is more
> > > engineering involved and Flex out of the box is not going to handle
> > > situations like this.
> > >
> > > The absolute way to do this is creating a UIComponent subclass that
> > is the
> > > container, creating your layout algorithm in this component.
Subclass
> > > FlexSprite, make that your content loader component.
> > >
> > > Then instantiate the content components in the UIComponent
> > container. This
> > > is the lean version of your design I envision. You could even
> > recycle the
> > > content renderers in your container component Lot's of things
> > you could
> > > do ;-)
> > >
> > > Mike
> > >
> > >
> > > On Wed, Oct 15, 2008 at 10:47 PM, flexaustin  wrote:
> > >
> > > > Doug, what would you go with? Sprite?
> > > >
> > > > I thought sprite, but you need to implement all the
IUIComponent stuff
> > > > or use composition correct? Wouldn't composition reduce the
benefits
> > > > gained by using Sprite?
> > > >
> > > > Doug, if you message me and I can tell you where to see the
component.
> > > >
> > > > jason (underscore) newport {at) hot mail
> > > >
> > > > --- In flexcoders@yahoogroups.com
 > 40yahoogroups.com>,
> >
> > "Doug
> > > > McCune"  wrote:
> > > > >
> > > > > You've got 4,000 things all moving around at once? Are all
4,000 of
> > > > those
> > > > > actually visible? 4,000 UI components seems like a lot for any
> > layout
> > > > > manager to have to deal with. I'd try to focus on figuring
out how
> > > > to reduce
> > > > > the number of UIComponents before I worried about how much
memory
> > > > each one
> > > > > is taking up. I may be totally off base, but I can't imagine a
> > scenario
> > > > > where you want 4,000 images all on the screen at the same time.
> > > > >
> > > > > And if you do really need to load 4,000 swfs all at the same
time
> > > > then you
> > > > > probably want something that's lighter than custom UIComponent
> > classes,
> > > > > which would keep those 4,000 objects out of the normal
> > > > > invalidation/validation cycles of the display list.
> > > > >
> > > > > Doug
> > > > >
> > > > > On Wed, Oct 15, 2008 at 1:34 PM, Michael Schmalle
> > > > > wrote:
> > > > >
> > > > > > A side note,
> > > > > > You are doing some very expensive leg work in the 'content'
> > setter.
> > > > > >
> > > > > > You need to break that out into commitProperties() and
> > > > updateDisplayList().
> > > > > >
> > > > > > You would get a huge performance increase for sure.
> > > > > >
> > > > > > As far as the memory, doesn't look to weird, event listeners
> > > > without weak
> > > > > > references can make thing hang around as well.
> > > > > >
> > > > > > Mike
> > > > > >
> > > > > >
> > > > > > On Wed, Oct 15, 2008 at 3:08 PM, flexaustin 

[flexcoders] Re: datagrid scrolling problem

2008-10-17 Thread Tim Hoff

Jeez, got to slow down.  Should be LT.

myDG.verticalScrollPosition = (myDataProvider.length - array[i]) <
(myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
myDG.rowCount) : array[i];

-TH

--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
>
> Sorry for the typo, also not tested; obviously. :)
>
> myDG.verticalScrollPosition = (myDataProvider.length - array[i]) >
> (myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
> myDG.rowCount) : array[i];
>
> -TH
>
> --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote:
> >
> >
> > Hi Mark,
> >
> > You can come probably up with a more elegant way to handle each
> > possibility, but here's an idea.
> >
> > myDG.verticalScrollPosition = (myDataProvider - array[i]) >
> > (myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
> > myDG.rowCount) : array[i];
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com, "Mark" markp.shopping_id@ wrote:
> > >
> > > I have a basic datagrid that is getting the data from an
> > > arrayCollection with each item having a startDate field, among
> > > others. My boss wanted me to have the datagrid scroll down to the
> > > item that has the same start date as todays date. Basically I'm
just
> > > looping thru the arrayCollection to find it and scroll down to it
> > > using:
> > >
> > > myDG.verticalScrollPosition = array[i];
> > >
> > > This works fine unless that item is at the end of the datagrid.
Then
> > > it adds rows to the DG so that item is at top. What would be the
> > > proper way to do this so if it's the last item, it just scrolls to
> the
> > > bottom without adding more rows?
> > >
> > > Thanks,
> > > Mark
> > >
> >
>




[flexcoders] Re: datagrid scrolling problem

2008-10-17 Thread Tim Hoff

Sorry for the typo, also not tested; obviously. :)

myDG.verticalScrollPosition = (myDataProvider.length - array[i]) >
(myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
myDG.rowCount) : array[i];

-TH

--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
>
> Hi Mark,
>
> You can come probably up with a more elegant way to handle each
> possibility, but here's an idea.
>
> myDG.verticalScrollPosition = (myDataProvider - array[i]) >
> (myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
> myDG.rowCount) : array[i];
>
> -TH
>
> --- In flexcoders@yahoogroups.com, "Mark" markp.shopping_id@ wrote:
> >
> > I have a basic datagrid that is getting the data from an
> > arrayCollection with each item having a startDate field, among
> > others. My boss wanted me to have the datagrid scroll down to the
> > item that has the same start date as todays date. Basically I'm just
> > looping thru the arrayCollection to find it and scroll down to it
> > using:
> >
> > myDG.verticalScrollPosition = array[i];
> >
> > This works fine unless that item is at the end of the datagrid. Then
> > it adds rows to the DG so that item is at top. What would be the
> > proper way to do this so if it's the last item, it just scrolls to
the
> > bottom without adding more rows?
> >
> > Thanks,
> > Mark
> >
>





[flexcoders] Re: datagrid scrolling problem

2008-10-17 Thread Tim Hoff

Hi Mark,

You can come probably up with a more elegant way to handle each
possibility, but here's an idea.

myDG.verticalScrollPosition = (myDataProvider - array[i]) >
(myDataProvider.length - myDG.rowCount) ? (myDataProvider.length -
myDG.rowCount) : array[i];

-TH

--- In flexcoders@yahoogroups.com, "Mark" <[EMAIL PROTECTED]> wrote:
>
> I have a basic datagrid that is getting the data from an
> arrayCollection with each item having a startDate field, among
> others. My boss wanted me to have the datagrid scroll down to the
> item that has the same start date as todays date. Basically I'm just
> looping thru the arrayCollection to find it and scroll down to it
> using:
>
> myDG.verticalScrollPosition = array[i];
>
> This works fine unless that item is at the end of the datagrid. Then
> it adds rows to the DG so that item is at top. What would be the
> proper way to do this so if it's the last item, it just scrolls to the
> bottom without adding more rows?
>
> Thanks,
> Mark
>





RE: [flexcoders] datagrid scrolling problem

2008-10-17 Thread Tracy Spratt
You will have to add conditional logic to use the rowCount and index to
calculate the scroll position.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark
Sent: Friday, October 17, 2008 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] datagrid scrolling problem

 

I have a basic datagrid that is getting the data from an 
arrayCollection with each item having a startDate field, among 
others. My boss wanted me to have the datagrid scroll down to the 
item that has the same start date as todays date. Basically I'm just 
looping thru the arrayCollection to find it and scroll down to it 
using:

myDG.verticalScrollPosition = array[i];

This works fine unless that item is at the end of the datagrid. Then 
it adds rows to the DG so that item is at top. What would be the 
proper way to do this so if it's the last item, it just scrolls to the 
bottom without adding more rows?

Thanks,
Mark

 



RE: [flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread Tracy Spratt
Because you introduced the Vbox container.  Neither the button or the
moduleloader are children of modulestile, they are children of the Vbox.

 

You now need to keep references to the Vbox instead, and remove that.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sailorsea21
Sent: Friday, October 17, 2008 3:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.

 

Thanks Paul, that fixed the error in my file but I still receive the 
error when I run my application, load modules and then try to unload 
a loaded module. 

Error:

ArgumentError: Error #2025: The supplied DisplayObject must be a 
child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
 
veChild()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
at mx.core::Container/removeChild()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\core\Container.as:2267]
at content_module_template_blank/unloadclick()
[C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004
\src\content_module_template_blank.mxml:39]

Thanks.

--- In flexcoders@yahoogroups.com 
, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> 
> - Original Message - 
> From: "sailorsea21" <[EMAIL PROTECTED]>
> To: mailto:flexcoders%40yahoogroups.com>
>
> Sent: Friday, October 17, 2008 8:01 PM
> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> 
> 
> > Here's my updated code:
> >
> > private var moduleloader:ModuleLoader;
> > private var unload_button:Button;
> > private var vbox:VBox;
> > private var _aChildren:Array=[];
> >
> > private function unloadclick(event:Event):void
> > {
> > var iIndexClicked:int = parseInt(event.target.id);
> > modulestile.removeChild(_aChildren[iIndexClicked]);
> > *error* modulestile.removeChild(event.target); 
*error*
> 
> modulestile.removeChild(DisplayObject(event.target));
> 
> 
> > }
> >
> > public function AddColumnGraphPanel():void
> > {
> > var iNewIndex:int = _aChildren.length;
> > vbox = new VBox();
> > modulestile.addChild(vbox);
> > moduleloader = new ModuleLoader();
> > moduleloader.url = "test.swf";
> > _aChildren[iNewIndex] = vbox.addChild(moduleloader);
> > unload_button = new Button();
> > unload_button.id = String(iNewIndex);
> > unload_button.label = "unload";
> > unload_button.addEventListener(MouseEvent.CLICK, unloadclick);
> > vbox.addChild(unload_button);
> > }
> >
> > 
> > 
> >
> > I have the following error in the script:
> > 1118: Implicit coercion of a value with static type Object to a
> > possibly unrelated type flash.display:DisplayObject.
> 
> Quite right too..
> 
> >
> > Thanks again :)
> >
> > -David
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- In flexcoders@yahoogroups.com
 , "Tracy Spratt"  
wrote:
> >>
> >> That is correct, you are not storing references correctly. 
First I
> > will
> >> explain what is wrong with your code, but then, after seeing what
> > you
> >> are trying to do, will suggest a slightly different approach.
> >>
> >>
> >>
> >> First, you are mixing Array, which is accessed by index
> > and "associative
> >> array", which is an Object and accessed by property name:
> >>
> >> private var _oChildren:Object = new Object();
> >>
> >>
> >>
> >> Second, you are creating a new instance of that each time you 
click
> >> addModule. This overwrites what was in there before. Don't do
> > that.
> >>
> >>
> >>
> >> Third, you need a unique name for each reference you add to the
> >> associative array. Don't use "one" every time, that just puts a 
new
> >> reference in the "one" property. You can use anything you want 
for
> > this
> >> property name. Pick something that is meaningful. How will you
> >> identify which child you want to remove? Is it purely numerical?
> > If so
> >> you can use "1", "2", etc. Usually there is some string that is
> > logical
> >> for this, like an id, or an image's base file name. whatever,
> > remember
> >> it must uniquely identify the instance you want to later remove.
> >>
> >>
> >>
> >> Now, after looking at your code a bit more, and seeing that you 
do
> > not
> >> have a clear string or id you can use for identifying the
> > references, I
> >> am gong to suggest a different approach.
> >>
> >> private var _aChildren:Array= []; //declare an
> > initialize
> >> an Array
> >>
> >>
> >>
> >> ...
> >>
> >> public function addModule():void {
> >> var iNewIndex:int = _aChildren.length; //this will be the next
> >> available index in the array
> >>
> >> button = new Button();
> >>
> >> button.id = String(iNewIndex); //NOTE: you can NOT use this 
id
> > as a
> >> reference, but you CAN access its value
> >> button.label = "unload";
> >> button.addEventListener(MouseEvent.CLICK, onClickUnload);
> >> tiletest.addChild(bu

[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

They are styles Mark,

cavas.setStyle("top",10);

-TH

--- In flexcoders@yahoogroups.com, "markflex2007" <[EMAIL PROTECTED]>
wrote:
>
> But why I can do this with actionscript
>
> I have the object like
>
> public var canvas:Canvas = new Canvas();
>
> but I get error for
>
> canvas.top = 10;
> canvas.left = 10;
>
> I wonder how to do this with actionscript.
>
> Thanks
>
> mk
>
> --- In flexcoders@yahoogroups.com, "Paul Andrews" paul@ wrote:
> >
> > Yes, I'm just old school this time round!
> > - Original Message -
> > From: Tim Hoff
> > To: flexcoders@yahoogroups.com
> > Sent: Friday, October 17, 2008 7:58 PM
> > Subject: [flexcoders] Re: how to add internal padding in canvas?
> >
> >
> > Just preference, but I'd rather see:
> >
> > 
> > 
> > // my content
> > 
> > 
> >
> > -TH
> >
>





[flexcoders] datagrid scrolling problem

2008-10-17 Thread Mark
I have a basic datagrid that is getting the data from an 
arrayCollection with each item having a startDate field, among 
others.  My boss wanted me to have the datagrid scroll down to the 
item that has the same start date as todays date.  Basically I'm just 
looping thru the arrayCollection to find it and scroll down to it 
using:

myDG.verticalScrollPosition = array[i];

This works fine unless that item is at the end of the datagrid.  Then 
it adds rows to the DG so that item is at top.  What would be the 
proper way to do this so if it's the last item, it just scrolls to the 
bottom without adding more rows?

Thanks,
Mark



[flexcoders] Re: Overriding width of DateField

2008-10-17 Thread aceoohay
Gordon:

I did the following;

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

measuredWidth=94;
measuredMinWidth=94;
}

It still doesn't seem to change the width of the component in 
flexbuilder's design mode.

Any ideas?

Paul

--- In flexcoders@yahoogroups.com, Gordon Smith <[EMAIL PROTECTED]> wrote:
>
> Try subclassing and overriding the measure() method to return a 
greater measuredWidth.
> 
> Gordon Smith
> Adobe Flex SDK Team
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of aceoohay
> Sent: Friday, October 17, 2008 12:25 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Overriding width of DateField
> 
> 
> One anomaly I've found in flex is the width of the DateField. It's
> width is about 90px. If you use it with no width, and make it
> editable, when the user puts in a date in mm/dd/ format it will
> move the left 2 characters out of the box to the left.
> 
> To correct this issue, I would like to create a version of the
> DateField and override the width, if not provided by the developer 
to
> be 94px. I can easily do that by putting;
> 
> if (!this.width)this.width = 94;
> 
> in the initialize method. The problem is this does not display the
> correct size object in flexbuilder during design mode.
> 
> My question is, how can I subclass the object in such a way as to 
have
> it display properly (the enhanced width attribute) in design mode?
> 
> Paul
>




[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread markflex2007
But why I can do this with actionscript

I have the object like

public var canvas:Canvas = new Canvas(); 

but I get error for

canvas.top = 10;
canvas.left = 10;

I wonder how to do this with actionscript.

Thanks

mk

--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> Yes, I'm just old school this time round!
>   - Original Message - 
>   From: Tim Hoff 
>   To: flexcoders@yahoogroups.com 
>   Sent: Friday, October 17, 2008 7:58 PM
>   Subject: [flexcoders] Re: how to add internal padding in canvas?
> 
> 
>   Just preference, but I'd rather see:
> 
>   
>   
>// my content
>   
>   
> 
>   -TH
> 
 



[flexcoders] what is a String? (default encoding question)

2008-10-17 Thread Pan Troglodytes
How is a string represented internally in Flex?  It never actually says it
in the help for String.  Is it UTF-8?  I think this because because mxml
uses utf-8 as the encoding in the ?xml directive, ByteArray seems to treat
utf-8 specially, and ByteArray.readMultiByte says the return value is a
utf-8 encoded string.

The reason I ask is because I'm reading some string data in from a binary
file and I'm trying to figure out the most CPU efficient way to put it in
the file.  I want it to be in the file in the same encoding that won't
require Flex to translate from one encoding to another when storing it in a
String variable.

Thanks.

-- 
Jason


[flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread sailorsea21
Thanks Paul, that fixed the error in my file but I still receive the 
error when I run my application, load modules and then try to unload 
a loaded module. 

Error:

ArgumentError: Error #2025: The supplied DisplayObject must be a 
child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
veChild()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
at mx.core::Container/removeChild()[E:\dev\3.1.0
\frameworks\projects\framework\src\mx\core\Container.as:2267]
at content_module_template_blank/unloadclick()
[C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004
\src\content_module_template_blank.mxml:39]

Thanks.




--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> 
> - Original Message - 
> From: "sailorsea21" <[EMAIL PROTECTED]>
> To: 
> Sent: Friday, October 17, 2008 8:01 PM
> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> 
> 
> > Here's my updated code:
> >
> > private var moduleloader:ModuleLoader;
> > private var unload_button:Button;
> > private var vbox:VBox;
> > private var _aChildren:Array=[];
> >
> > private function unloadclick(event:Event):void
> > {
> > var iIndexClicked:int = parseInt(event.target.id);
> > modulestile.removeChild(_aChildren[iIndexClicked]);
> > *error* modulestile.removeChild(event.target); 
*error*
> 
> modulestile.removeChild(DisplayObject(event.target));
> 
> 
> > }
> >
> > public function AddColumnGraphPanel():void
> > {
> > var iNewIndex:int = _aChildren.length;
> > vbox = new VBox();
> > modulestile.addChild(vbox);
> > moduleloader = new ModuleLoader();
> > moduleloader.url = "test.swf";
> > _aChildren[iNewIndex] = vbox.addChild(moduleloader);
> > unload_button = new Button();
> > unload_button.id = String(iNewIndex);
> > unload_button.label = "unload";
> > unload_button.addEventListener(MouseEvent.CLICK, unloadclick);
> > vbox.addChild(unload_button);
> > }
> >
> > 
> > 
> >
> > I have the following error in the script:
> > 1118: Implicit coercion of a value with static type Object to a
> > possibly unrelated type flash.display:DisplayObject.
> 
> Quite right too..
> 
> >
> > Thanks again :)
> >
> > -David
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, "Tracy Spratt"  
wrote:
> >>
> >> That is correct, you are not storing references correctly.  
First I
> > will
> >> explain what is wrong with your code, but then, after seeing what
> > you
> >> are trying to do, will suggest a slightly different approach.
> >>
> >>
> >>
> >> First, you are mixing Array, which is accessed by index
> > and "associative
> >> array", which is an Object and accessed by property name:
> >>
> >> private var _oChildren:Object = new Object();
> >>
> >>
> >>
> >> Second, you are creating a new instance of that each time you 
click
> >> addModule.  This overwrites what was in there before.  Don't do
> > that.
> >>
> >>
> >>
> >> Third, you need a unique name for each reference you add to the
> >> associative array.  Don't use "one" every time, that just puts a 
new
> >> reference in the "one" property.  You can use anything you want 
for
> > this
> >> property name.  Pick something that is meaningful.  How will you
> >> identify which child you want to remove?  Is it purely numerical?
> > If so
> >> you can use "1", "2", etc.  Usually there is some string that is
> > logical
> >> for this, like an id, or an image's base file name.  whatever,
> > remember
> >> it must uniquely identify the instance you want to later remove.
> >>
> >>
> >>
> >> Now, after looking at your code a bit more, and seeing that you 
do
> > not
> >> have a clear string or id you can use for identifying the
> > references, I
> >> am gong to suggest a different approach.
> >>
> >> private var _aChildren:Array= [];   //declare an
> > initialize
> >> an Array
> >>
> >>
> >>
> >> ...
> >>
> >> public function addModule():void {
> >>   var iNewIndex:int = _aChildren.length;  //this will be the next
> >> available index in the array
> >>
> >>   button = new Button();
> >>
> >>   button.id = String(iNewIndex);   //NOTE: you can NOT use this 
id
> > as a
> >> reference, but you CAN access its value
> >>   button.label = "unload";
> >>   button.addEventListener(MouseEvent.CLICK, onClickUnload);
> >>   tiletest.addChild(button);
> >>
> >>   moduleloader = new ModuleLoader();
> >>   moduleloader.url = "test.swf";
> >>   _aChildren[iNewIndex] = tiletest.addChild
(moduleloader);  //NOTE:
> > the
> >> associated button id property value matches the index of the 
array
> > ref
> >> }// addModule
> >>
> >>
> >>
> >> private function onClickUnload (event:Event):void {
> >>   var iIndexClicked:int = parseInt(event.target.id);
> >>
> >>   tiletest.removeChild(_aChildren[iIndexClicked]);
> >>   tiletest.removeChild(event.target);
> >> }// onClickUnload
> >>
> >>
> >>
> >> Try this.  it is untested.
> >>
> >>
> >>
> >

[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

Here here.  Ha, it's good that we have people on this list that look at
solutions from different perspectives.  There isn't always a "best" way,
but there is usually a "better" way. :-)

-TH

--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> The irony to all this over analyzation is;
> We never heard the OP say WHY he even wanted to do this (padding in
Canvas)
> let alone if he even needed a canvas to do what he needed to do!
>
> I just need to stay out of these application questions. ;-)
>
> Tim, It is really exciting to see the future of flex and CSS.
> I definitely encourage using things that deal with styles since the
> framework is going to tip that way soon anyway. This is in reference
to
> using constraints.
>
> I see loading style sheets as modules sooner than later. :)
>
> Mike
>
>
> On Fri, Oct 17, 2008 at 3:19 PM, Tim Hoff [EMAIL PROTECTED] wrote:
>
> >
> > I hear ya man. Just like to keep things simple and, when possible,
> > allow for pulling the styles out to CSS. I'm sure using a Box with
> > padding would work for this too; instead of having two containers.
> >
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com ,
"Paul
> > Andrews" paul@ wrote:
> > >
> > > Yes, I'm just old school this time round!
> > > - Original Message -
> > > From: Tim Hoff
> > > To: flexcoders@yahoogroups.com 
> > > Sent: Friday, October 17, 2008 7:58 PM
> > > Subject: [flexcoders] Re: how to add internal padding in canvas?
> > >
> > >
> > > Just preference, but I'd rather see:
> > >
> > > 
> > > 
> > > // my content
> > > 
> > > 
> > >
> > > -TH
> > >
> > > --- In flexcoders@yahoogroups.com ,
"Paul
> > Andrews" paul@ wrote:
> > > >
> > > > - Original Message -
> > > > From: "Paul Andrews" paul@
> > > > To: flexcoders@yahoogroups.com 
> > > > Sent: Friday, October 17, 2008 7:22 PM
> > > > Subject: Re: [flexcoders] Re: how to add internal padding in
canvas?
> > > >
> > > >
> > > > > - Original Message -
> > > > > From: "markflex2007" markflex2007@
> > > > > To: flexcoders@yahoogroups.com 
> > > > > Sent: Friday, October 17, 2008 6:51 PM
> > > > > Subject: [flexcoders] Re: how to add internal padding in
canvas?
> > > > >
> > > > >
> > > > >> Please give me a simple demo,how to do " nest the canvas
inside
> > > > >> another container to get the margin"?
> > > > >
> > > > > Something like this perhaps..
> > > > >
> > > > > I'm assuming that the reason for the margin is to leave a gap
> > around the
> > > > > edges. Lets say you want a 5 pixel gap.
> > > > >
> > > > > 
> > > > >  > > >
> > > > Oops..  > > >
> > > > > height="{outerCanvas-10}" x=5 y=5 >
> > > >
> > > > height="{outerCanvas.height-10}" x=5 y=5 >
> > > >
> > > > >
> > > > > add other stuff here
> > > > >
> > > > > 
> > > > > 
> > > > >
> > > > > Any good?
> > > > >
> > > > > Maybe I've got the wrong idea about why you want the margin.
> > > > >
> > > > > Paul
> > > > >
> > > > >
> > > > >>
> > > > >> Thanks for help
> > > > >>
> > > > >> Mark
> > > > >> --- In flexcoders@yahoogroups.com
,
> > "Paul Andrews" paul@ wrote:
> > > > >>>
> > > > >>> You can always nest the canvas inside another container to
get
> > the
> > > > >> margin..
> > > > >>
> > > > >>
> > > > >>
> > > > >> 
> > > > >>
> > > > >> --
> > > > >> 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 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
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> >
> >
>
>
>
> --
> Teoti Graphix, LLC
> http://www.teotigraphix.com
>
> Teoti Graphix Blog
> http://www.blog.teotigraphix.com
>
> You can find more by solving the problem then by 'asking the
question'.
>





RE: [flexcoders] Overriding width of DateField

2008-10-17 Thread Gordon Smith
Try subclassing and overriding the measure() method to return a greater 
measuredWidth.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of aceoohay
Sent: Friday, October 17, 2008 12:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Overriding width of DateField


One anomaly I've found in flex is the width of the DateField. It's
width is about 90px. If you use it with no width, and make it
editable, when the user puts in a date in mm/dd/ format it will
move the left 2 characters out of the box to the left.

To correct this issue, I would like to create a version of the
DateField and override the width, if not provided by the developer to
be 94px. I can easily do that by putting;

if (!this.width)this.width = 94;

in the initialize method. The problem is this does not display the
correct size object in flexbuilder during design mode.

My question is, how can I subclass the object in such a way as to have
it display properly (the enhanced width attribute) in design mode?

Paul



Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Michael Schmalle
The irony to all this over analyzation is;
We never heard the OP say WHY he even wanted to do this (padding in Canvas)
let alone if he even needed a canvas to do what he needed to do!

I just need to stay out of these application questions. ;-)

Tim, It is really exciting to see the future of flex and CSS.
I definitely encourage using things that deal with styles since the
framework is going to tip that way soon anyway. This is in reference to
using constraints.

I see loading style sheets as modules sooner than later. :)

Mike


On Fri, Oct 17, 2008 at 3:19 PM, Tim Hoff <[EMAIL PROTECTED]> wrote:

>
> I hear ya man. Just like to keep things simple and, when possible,
> allow for pulling the styles out to CSS. I'm sure using a Box with
> padding would work for this too; instead of having two containers.
>
>
> -TH
>
> --- In flexcoders@yahoogroups.com , "Paul
> Andrews" <[EMAIL PROTECTED]> wrote:
> >
> > Yes, I'm just old school this time round!
> > - Original Message -
> > From: Tim Hoff
> > To: flexcoders@yahoogroups.com 
> > Sent: Friday, October 17, 2008 7:58 PM
> > Subject: [flexcoders] Re: how to add internal padding in canvas?
> >
> >
> > Just preference, but I'd rather see:
> >
> > 
> > 
> > // my content
> > 
> > 
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com , "Paul
> Andrews" paul@ wrote:
> > >
> > > - Original Message -
> > > From: "Paul Andrews" paul@
> > > To: flexcoders@yahoogroups.com 
> > > Sent: Friday, October 17, 2008 7:22 PM
> > > Subject: Re: [flexcoders] Re: how to add internal padding in canvas?
> > >
> > >
> > > > - Original Message -
> > > > From: "markflex2007" markflex2007@
> > > > To: flexcoders@yahoogroups.com 
> > > > Sent: Friday, October 17, 2008 6:51 PM
> > > > Subject: [flexcoders] Re: how to add internal padding in canvas?
> > > >
> > > >
> > > >> Please give me a simple demo,how to do " nest the canvas inside
> > > >> another container to get the margin"?
> > > >
> > > > Something like this perhaps..
> > > >
> > > > I'm assuming that the reason for the margin is to leave a gap
> around the
> > > > edges. Lets say you want a 5 pixel gap.
> > > >
> > > > 
> > > >  > >
> > > Oops..  > >
> > > > height="{outerCanvas-10}" x=5 y=5 >
> > >
> > > height="{outerCanvas.height-10}" x=5 y=5 >
> > >
> > > >
> > > > add other stuff here
> > > >
> > > > 
> > > > 
> > > >
> > > > Any good?
> > > >
> > > > Maybe I've got the wrong idea about why you want the margin.
> > > >
> > > > Paul
> > > >
> > > >
> > > >>
> > > >> Thanks for help
> > > >>
> > > >> Mark
> > > >> --- In flexcoders@yahoogroups.com ,
> "Paul Andrews" paul@ wrote:
> > > >>>
> > > >>> You can always nest the canvas inside another container to get
> the
> > > >> margin..
> > > >>
> > > >>
> > > >>
> > > >> 
> > > >>
> > > >> --
> > > >> 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 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
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Overriding width of DateField

2008-10-17 Thread aceoohay
One anomaly I've found in flex is the width of the DateField. It's 
width is about 90px. If you use it with no width, and make it 
editable, when the user puts in a date in mm/dd/ format it will 
move the left 2 characters out of the box to the left.

To correct this issue, I would like to create a version of the 
DateField and override the width, if not provided by the developer to 
be 94px. I can easily do that by putting;

if (!this.width)this.width = 94;

in the initialize method. The problem is this does not display the 
correct size object in flexbuilder during design mode.

My question is, how can I subclass the object in such a way as to have 
it display properly (the enhanced width attribute) in design mode?

Paul



RE: [flexcoders] Re: LCDS 2.6 and Hibernate - Does it work?

2008-10-17 Thread Jeff Vroom
We did rename some of the jar files so make sure you remove all of the old 
flex-messaging* jar files before copying in the new ones.  In particular 
flex-messaging.jar went away and is replaced by lots of smaller jar files 
flex-messaging-data.jar etc.   This was to implement the BlazeDS/LCDS split.

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of headjoog
Sent: Friday, October 17, 2008 11:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: LCDS 2.6 and Hibernate - Does it work?


Thanks for the follow-up Jeff.

I couldn't even get the LCDS CRM sample to work. I will try again
with the log settings you suggested. If there's something suspicious
I'll post.

Joe

<><>

[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

I hear ya man.  Just like to keep things simple and, when possible,
allow for pulling the styles out to CSS.  I'm sure using a Box with
padding would work for this too; instead of having two containers.

-TH

--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> Yes, I'm just old school this time round!
> - Original Message -
> From: Tim Hoff
> To: flexcoders@yahoogroups.com
> Sent: Friday, October 17, 2008 7:58 PM
> Subject: [flexcoders] Re: how to add internal padding in canvas?
>
>
> Just preference, but I'd rather see:
>
> 
> 
> // my content
> 
> 
>
> -TH
>
> --- In flexcoders@yahoogroups.com, "Paul Andrews" paul@ wrote:
> >
> > - Original Message -
> > From: "Paul Andrews" paul@
> > To: flexcoders@yahoogroups.com
> > Sent: Friday, October 17, 2008 7:22 PM
> > Subject: Re: [flexcoders] Re: how to add internal padding in canvas?
> >
> >
> > > - Original Message -
> > > From: "markflex2007" markflex2007@
> > > To: flexcoders@yahoogroups.com
> > > Sent: Friday, October 17, 2008 6:51 PM
> > > Subject: [flexcoders] Re: how to add internal padding in canvas?
> > >
> > >
> > >> Please give me a simple demo,how to do " nest the canvas inside
> > >> another container to get the margin"?
> > >
> > > Something like this perhaps..
> > >
> > > I'm assuming that the reason for the margin is to leave a gap
around the
> > > edges. Lets say you want a 5 pixel gap.
> > >
> > > 
> > >  >
> > Oops..  >
> > > height="{outerCanvas-10}" x=5 y=5 >
> >
> > height="{outerCanvas.height-10}" x=5 y=5 >
> >
> > >
> > > add other stuff here
> > >
> > > 
> > > 
> > >
> > > Any good?
> > >
> > > Maybe I've got the wrong idea about why you want the margin.
> > >
> > > Paul
> > >
> > >
> > >>
> > >> Thanks for help
> > >>
> > >> Mark
> > >> --- In flexcoders@yahoogroups.com, "Paul Andrews" paul@ wrote:
> > >>>
> > >>> You can always nest the canvas inside another container to get
the
> > >> margin..
> > >>
> > >>
> > >>
> > >> 
> > >>
> > >> --
> > >> 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 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
> > >
> > >
> > >
> > >
> >
>





Re: [flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread Paul Andrews

- Original Message - 
From: "sailorsea21" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 17, 2008 8:01 PM
Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.


> Here's my updated code:
>
> private var moduleloader:ModuleLoader;
> private var unload_button:Button;
> private var vbox:VBox;
> private var _aChildren:Array=[];
>
> private function unloadclick(event:Event):void
> {
> var iIndexClicked:int = parseInt(event.target.id);
> modulestile.removeChild(_aChildren[iIndexClicked]);
> *error* modulestile.removeChild(event.target); *error*

modulestile.removeChild(DisplayObject(event.target));


> }
>
> public function AddColumnGraphPanel():void
> {
> var iNewIndex:int = _aChildren.length;
> vbox = new VBox();
> modulestile.addChild(vbox);
> moduleloader = new ModuleLoader();
> moduleloader.url = "test.swf";
> _aChildren[iNewIndex] = vbox.addChild(moduleloader);
> unload_button = new Button();
> unload_button.id = String(iNewIndex);
> unload_button.label = "unload";
> unload_button.addEventListener(MouseEvent.CLICK, unloadclick);
> vbox.addChild(unload_button);
> }
>
> 
> 
>
> I have the following error in the script:
> 1118: Implicit coercion of a value with static type Object to a
> possibly unrelated type flash.display:DisplayObject.

Quite right too..

>
> Thanks again :)
>
> -David
>
>
>
>
>
>
>
>
>
>
>
> --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>>
>> That is correct, you are not storing references correctly.  First I
> will
>> explain what is wrong with your code, but then, after seeing what
> you
>> are trying to do, will suggest a slightly different approach.
>>
>>
>>
>> First, you are mixing Array, which is accessed by index
> and "associative
>> array", which is an Object and accessed by property name:
>>
>> private var _oChildren:Object = new Object();
>>
>>
>>
>> Second, you are creating a new instance of that each time you click
>> addModule.  This overwrites what was in there before.  Don't do
> that.
>>
>>
>>
>> Third, you need a unique name for each reference you add to the
>> associative array.  Don't use "one" every time, that just puts a new
>> reference in the "one" property.  You can use anything you want for
> this
>> property name.  Pick something that is meaningful.  How will you
>> identify which child you want to remove?  Is it purely numerical?
> If so
>> you can use "1", "2", etc.  Usually there is some string that is
> logical
>> for this, like an id, or an image's base file name.  whatever,
> remember
>> it must uniquely identify the instance you want to later remove.
>>
>>
>>
>> Now, after looking at your code a bit more, and seeing that you do
> not
>> have a clear string or id you can use for identifying the
> references, I
>> am gong to suggest a different approach.
>>
>> private var _aChildren:Array= [];   //declare an
> initialize
>> an Array
>>
>>
>>
>> ...
>>
>> public function addModule():void {
>>   var iNewIndex:int = _aChildren.length;  //this will be the next
>> available index in the array
>>
>>   button = new Button();
>>
>>   button.id = String(iNewIndex);   //NOTE: you can NOT use this id
> as a
>> reference, but you CAN access its value
>>   button.label = "unload";
>>   button.addEventListener(MouseEvent.CLICK, onClickUnload);
>>   tiletest.addChild(button);
>>
>>   moduleloader = new ModuleLoader();
>>   moduleloader.url = "test.swf";
>>   _aChildren[iNewIndex] = tiletest.addChild(moduleloader);  //NOTE:
> the
>> associated button id property value matches the index of the array
> ref
>> }// addModule
>>
>>
>>
>> private function onClickUnload (event:Event):void {
>>   var iIndexClicked:int = parseInt(event.target.id);
>>
>>   tiletest.removeChild(_aChildren[iIndexClicked]);
>>   tiletest.removeChild(event.target);
>> }// onClickUnload
>>
>>
>>
>> Try this.  it is untested.
>>
>>
>>
>> Tracy
>>
>>
>>
>> 
>>
>> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
>> Behalf Of sailorsea21
>> Sent: Friday, October 17, 2008 11:45 AM
>> To: flexcoders@yahoogroups.com
>> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
>>
>>
>>
>> Hi Tracy,
>>
>> I don't think I'm successfully storing the reference of the
> children
>> into the array.
>>
>> This is what I had tried:
>>
>> private var moduleloader:ModuleLoader;
>> private var button:Button;
>> private var _aChildren:Array;
>>
>> private function click(evt:MouseEvent):void {
>> tiletest.removeChild(_aChildren["one"]);
>> tiletest.removeChild(button);
>> }
>>
>> public function AddModule():void {
>> moduleloader = new ModuleLoader();
>> moduleloader.url = "test.swf";
>> button = new Button();
>> button.label = "unload";
>> button.addEventListener(MouseEvent.CLICK, click);
>> tiletest.addChild(button);
>> _aChildren = new Array();
>> _aChildren["one"] = tiletest.addChild(moduleloader);
>> }
>>
>> But I keep getting the "ArgumentError: Error #2025: The supplied
>> DisplayObject must 

Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
Yes, I'm just old school this time round!
  - Original Message - 
  From: Tim Hoff 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 7:58 PM
  Subject: [flexcoders] Re: how to add internal padding in canvas?


  Just preference, but I'd rather see:

  
  
   // my content
  
  

  -TH

  --- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
  >
  > - Original Message - 
  > From: "Paul Andrews" [EMAIL PROTECTED]
  > To: flexcoders@yahoogroups.com
  > Sent: Friday, October 17, 2008 7:22 PM
  > Subject: Re: [flexcoders] Re: how to add internal padding in canvas?
  > 
  > 
  > > - Original Message - 
  > > From: "markflex2007" [EMAIL PROTECTED]
  > > To: flexcoders@yahoogroups.com
  > > Sent: Friday, October 17, 2008 6:51 PM
  > > Subject: [flexcoders] Re: how to add internal padding in canvas?
  > >
  > >
  > >> Please give me a simple demo,how to do " nest the canvas inside
  > >> another container to get the margin"?
  > >
  > > Something like this perhaps..
  > >
  > > I'm assuming that the reason for the margin is to leave a gap around the
  > > edges. Lets say you want a 5 pixel gap.
  > >
  > > 
  > >  
  > Oops..  
  > > height="{outerCanvas-10}" x=5 y=5 >
  > 
  > height="{outerCanvas.height-10}" x=5 y=5 >
  > 
  > >
  > > add other stuff here
  > >
  > > 
  > > 
  > >
  > > Any good?
  > >
  > > Maybe I've got the wrong idea about why you want the margin.
  > >
  > > Paul
  > >
  > >
  > >>
  > >> Thanks for help
  > >>
  > >> Mark
  > >> --- In flexcoders@yahoogroups.com, "Paul Andrews" paul@ wrote:
  > >>>
  > >>> You can always nest the canvas inside another container to get the
  > >> margin..
  > >>
  > >>
  > >>
  > >> 
  > >>
  > >> --
  > >> 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 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] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread sailorsea21
Here's my updated code:

private var moduleloader:ModuleLoader;
private var unload_button:Button;   
private var vbox:VBox;
private var _aChildren:Array=[]; 

private function unloadclick(event:Event):void 
{
var iIndexClicked:int = parseInt(event.target.id);  
modulestile.removeChild(_aChildren[iIndexClicked]);
*error* modulestile.removeChild(event.target); *error*
}

public function AddColumnGraphPanel():void 
{
var iNewIndex:int = _aChildren.length;
vbox = new VBox();
modulestile.addChild(vbox);
moduleloader = new ModuleLoader();
moduleloader.url = "test.swf";
_aChildren[iNewIndex] = vbox.addChild(moduleloader);
unload_button = new Button();
unload_button.id = String(iNewIndex);
unload_button.label = "unload";
unload_button.addEventListener(MouseEvent.CLICK, unloadclick);
vbox.addChild(unload_button);
}

   
  

I have the following error in the script:
1118: Implicit coercion of a value with static type Object to a 
possibly unrelated type flash.display:DisplayObject.

Thanks again :)

-David











--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> That is correct, you are not storing references correctly.  First I 
will
> explain what is wrong with your code, but then, after seeing what 
you
> are trying to do, will suggest a slightly different approach.
> 
>  
> 
> First, you are mixing Array, which is accessed by index 
and "associative
> array", which is an Object and accessed by property name:
> 
> private var _oChildren:Object = new Object();
> 
>  
> 
> Second, you are creating a new instance of that each time you click
> addModule.  This overwrites what was in there before.  Don't do 
that.
> 
>  
> 
> Third, you need a unique name for each reference you add to the
> associative array.  Don't use "one" every time, that just puts a new
> reference in the "one" property.  You can use anything you want for 
this
> property name.  Pick something that is meaningful.  How will you
> identify which child you want to remove?  Is it purely numerical? 
If so
> you can use "1", "2", etc.  Usually there is some string that is 
logical
> for this, like an id, or an image's base file name.  whatever, 
remember
> it must uniquely identify the instance you want to later remove.
> 
>  
> 
> Now, after looking at your code a bit more, and seeing that you do 
not
> have a clear string or id you can use for identifying the 
references, I
> am gong to suggest a different approach.
> 
> private var _aChildren:Array= [];   //declare an 
initialize
> an Array
> 
>  
> 
> ...
> 
> public function addModule():void {
>   var iNewIndex:int = _aChildren.length;  //this will be the next
> available index in the array
> 
>   button = new Button();
> 
>   button.id = String(iNewIndex);   //NOTE: you can NOT use this id 
as a
> reference, but you CAN access its value
>   button.label = "unload";
>   button.addEventListener(MouseEvent.CLICK, onClickUnload);
>   tiletest.addChild(button);  
> 
>   moduleloader = new ModuleLoader();
>   moduleloader.url = "test.swf";
>   _aChildren[iNewIndex] = tiletest.addChild(moduleloader);  //NOTE: 
the
> associated button id property value matches the index of the array 
ref
> }// addModule
> 
>  
> 
> private function onClickUnload (event:Event):void {
>   var iIndexClicked:int = parseInt(event.target.id);  
> 
>   tiletest.removeChild(_aChildren[iIndexClicked]);
>   tiletest.removeChild(event.target);
> }// onClickUnload
> 
>  
> 
> Try this.  it is untested.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of sailorsea21
> Sent: Friday, October 17, 2008 11:45 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> 
>  
> 
> Hi Tracy, 
> 
> I don't think I'm successfully storing the reference of the 
children 
> into the array. 
> 
> This is what I had tried:
> 
> private var moduleloader:ModuleLoader;
> private var button:Button;
> private var _aChildren:Array;
> 
> private function click(evt:MouseEvent):void {
> tiletest.removeChild(_aChildren["one"]);
> tiletest.removeChild(button);
> } 
> 
> public function AddModule():void {
> moduleloader = new ModuleLoader();
> moduleloader.url = "test.swf";
> button = new Button();
> button.label = "unload";
> button.addEventListener(MouseEvent.CLICK, click);
> tiletest.addChild(button);
> _aChildren = new Array();
> _aChildren["one"] = tiletest.addChild(moduleloader);
> } 
> 
> But I keep getting the "ArgumentError: Error #2025: The supplied 
> DisplayObject must be a child of the caller." error.
> 
> Thanks again.
> 
> -David
> 
> --- In flexcoders@yahoogroups.com 
> , "Tracy Spratt"  wrote:
>

[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

Just preference, but I'd rather see:


 
  // my content
 


-TH

--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> - Original Message -
> From: "Paul Andrews" [EMAIL PROTECTED]
> To: flexcoders@yahoogroups.com
> Sent: Friday, October 17, 2008 7:22 PM
> Subject: Re: [flexcoders] Re: how to add internal padding in canvas?
>
>
> > - Original Message -
> > From: "markflex2007" [EMAIL PROTECTED]
> > To: flexcoders@yahoogroups.com
> > Sent: Friday, October 17, 2008 6:51 PM
> > Subject: [flexcoders] Re: how to add internal padding in canvas?
> >
> >
> >> Please give me a simple demo,how to do " nest the canvas inside
> >> another container to get the margin"?
> >
> > Something like this perhaps..
> >
> > I'm assuming that the reason for the margin is to leave a gap around
the
> > edges. Lets say you want a 5 pixel gap.
> >
> > 
> > 
> Oops.. 
> > height="{outerCanvas-10}" x=5 y=5 >
>
> height="{outerCanvas.height-10}" x=5 y=5 >
>
> >
> > add other stuff here
> >
> > 
> > 
> >
> > Any good?
> >
> > Maybe I've got the wrong idea about why you want the margin.
> >
> > Paul
> >
> >
> >>
> >> Thanks for help
> >>
> >> Mark
> >> --- In flexcoders@yahoogroups.com, "Paul Andrews" paul@ wrote:
> >>>
> >>> You can always nest the canvas inside another container to get the
> >> margin..
> >>
> >>
> >>
> >> 
> >>
> >> --
> >> 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 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] Re: LCDS 2.6 and Hibernate - Does it work?

2008-10-17 Thread headjoog
Thanks for the follow-up Jeff.


I couldn't even get the LCDS CRM sample to work.  I will try again
with the log settings you suggested.  If there's something suspicious
I'll post.


Joe



RE: [flexcoders] Re: Reusing HTTPService

2008-10-17 Thread Jeff Vroom
I do like this approach - that's what I do when I code using AsyncTokens.

In the SDK's trunk depot, we have implemented a different way of using the 
AsyncTokens which makes it easier to add per-call event listeners and result 
objects particularly from MXML.   It is in the class mx.rpc.CallResponder.  
Here's a sample of how you'd use it:





Each CallResponder monitors a single AsyncToken at a time and propagates its 
result and fault events to listeners on the call responder.  It also stores the 
lastResult property.  This allows you to cache the previous result while the 
next call is in progress.   Any feedback folks have on this approach will be 
appreciated.

I'll admit that modifying the token after the call was made is 
counter-intuitive.  It works because the AS VM cannot deliver any events on 
that token until after the current executing code path has completed.   We did 
consider passing in the token as an argument to the async calls but didn't 
think it really made things easier to understand and adds a risk that you'll 
use the same token for two simultaneous calls.

Jeff



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
lagos_tout
Sent: Friday, October 17, 2008 10:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Reusing HTTPService


I like! This line says it all:

> service.send().addResponder(new MyIResponder(resultB, faultB));

Thanks much. I think this is the solution.

It meets my requirements: no long conditionals; one-to-one matching of
service calls to fault/result handlers; reuse of the same service
object; and, if i create a separate class (implemementing IResponder
and containing it's own fault and result handlers, rather than passing
it in as you've done) for each type of service call, i think i get to
live another day by the OO mantra "closed to modification, open to
extension".

Weird though how Flex requires one to add the responder after the call
is already made, don't you think? One would think the responder
should be in place before the call to service.send().

Thanks again!

LT

--- In flexcoders@yahoogroups.com, shaun 
<[EMAIL PROTECTED]> wrote:
>
>
> How about something like this:
>
> (note: I've not tried it, just slapped it straight into the email)
>
> public class MyClassThatInvokesHTTPServices {
>
> //inner helper class.
> class MyIResponder implements IResponder{
> public var f:Function;
> public var r:Function;
>
> public MyIResponder(r:Function, f:Function){
> this.r = r;
> this.f = f;
> }
>
> public function fault(info:Object):void {
> f.call(info);
> }
>
> public function result(result:Object):void {
> r.call(result);
> }
> }
>
> //Your handlers for service calls.
> protected function resultA(result:Object){ ... }
> protected function faultA(info:Object){...}
> protected function resultB(result:Object){ ... }
> protected function faultB(info:Object){...}
>
> var service:HTTPService ...//assume exists, reused for various
calls.
>
> //send for service A.
> funciton sendA(args:Object){
> service.url = "../A.html";
> service.send(args).addResponder(new MyIResponder(resultA,
faultA));
> }
>
> //send for service B.
> function sendB(){
> service.url = "../B.html";
> service.send().addResponder(new MyIResponder(resultB, faultB));
> }
>
>
> }
>
> [snip]
>
>  --- In flexcoders@yahoogroups.com, 
>  "lagos_tout" 
> >> wrote:
> > Hi,
> >
> > I'm re-using an instance of HTTPService, changing the request
> > arguments to get different responses from the server. But I
> >> found
> > that if, for instance, I made 3 calls this way with the
> >>> HTTPService,
> > each of the 3 result handlers registered for each call is
> >> executed
> > every time a result returned.
> >
> > I solved this by storing a reference to the unique AsyncToken
> >>> returned
> > by each service call and matching it to the AsyncToken
> > contained
> >>> in
> > each ResultEvent's "token" property in order to determine
> > which
> >>> result
> > handler to execute.
> >
> > I'm not terribly happy with this setup. It seems messy. I'd
> > appreciate any suggestions on how I can reuse an HTTPService
> >>> instance
> > without ending up with long switch statements with countless
> > "if
> > thisAsyncToken then do thisHandler, else if thatAsyncToken
> > then
> >> do
> > thatHandler... and so on".
> >
> > Thanks much.
> >
> > LT
> >
> >
> >
> >
> >
>

<><>

Re: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
Thanks!  You rock.  I'd never used setItemAt on an ArrayCollection 
because its more verbose to pull the copy the item out and set the 
property you need, then pass it back in - so it never occured to me that 
you had to do that.
Again, thanks, and i'll put the same fix on my list component.
ben

Tracy Spratt wrote:
>
> Yes, this:
> groupsdata.getItemAt(f).state = true/false
> is a low-level assignment directly to the dataprovider item and does not
> dispatch the events necessary for the update of the UI.
>
> You can change it to use setItemAt() or you can call itemUpdated(item)
> after the assignment.
>
> I am sure both of these use the invalidation mechanism and optimize the
> rendering.
>
> I am not sure about refresh(), and that is not the correct usage anyway.
>
> Tracy
>
> -Original Message-
> From: flexcoders@yahoogroups.com  
> [mailto:flexcoders@yahoogroups.com 
> ] On
> Behalf Of ben gomez farrell
> Sent: Friday, October 17, 2008 2:01 PM
> To: flexcoders@yahoogroups.com 
> Subject: Re: [flexcoders] Refreshing graphics in a tree
>
> I have an arraycollection called groupsdata
> groupsdata.getItemAt(f).state = true/false
>
> And then in my itemRenderer, I override like this:
>
> override public function set data(value:Object):void {
> super.data = value;
> if ( !value ) { return; }
> // remove check box from child nodes if present
> if ( !value.toplevel && this.getChildByName("checkbox") ) {
> this.removeChild( this.getChildByName("checkbox") ); }
> }
>
> override protected function updateDisplayList(unscaledWidth:Number,
> unscaledHeight:Number):void
> {
> super.updateDisplayList(unscaledWidth, unscaledHeight);
> if(super.data)
> {
> if (super.icon != null)
> {
> checkBox.x = super.icon.x;
> checkBox.y = 12;
> super.icon.x = checkBox.x + checkBox.width + 17;
> super.label.x = super.icon.x + super.icon.width + 3;
> checkBox.selected = super.data.state;
> }
> else
> {
> checkBox.x = super.label.x;
> checkBox.y = 12;
> super.label.x = checkBox.x + checkBox.width + 17;
> checkBox.selected = super.data.state;
> }
> }
> }
>
> So it looks like the data object is getting set correctly, but
> updateDisplayList isn't getting called when the data is refreshed - but
> it does get called on mouse over.
> thanks again for the help!
> ben
>
> Tracy Spratt wrote:
> >
> > So how are you updating the dataProvider items with the checkbox
> state?
> >
> > Are you using the ArrayCollection API? If so, then the UI will update
> > automatically.
> >
> > Note: refresh() applies a sort. It does not generically "refesh" the
> > UI. Also, if you use the API, it should not be necessary to do
> > anything else for the list either.
> >
> > Tracy
> >
> >
> --
> >
> > *From:* flexcoders@yahoogroups.com 
>  
> [mailto:flexcoders@yahoogroups.com ]
>
> > *On Behalf Of *ben gomez farrell
> > *Sent:* Friday, October 17, 2008 1:36 PM
> > *To:* flexcoders@yahoogroups.com 
> > *Subject:* Re: [flexcoders] Refreshing graphics in a tree
> >
> > My data is an ArrayCollection is set via mytree.dataProvider =
> > myArrayCollection;
> > I have a list as well, and when I do mylist.dataProvider.refresh(),
> the
> > checkboxes on those update just fine.
> > Unfortunately doing mytree.dataProvider.refresh() doesn't work - and
> > only mousing over will update the graphics of the item.
> > I'll look into itemUpdated though, and see how I can use it, thanks!
> > ben
> >
> > Tracy Spratt wrote:
> > >
> > > How are you updateing the dataProvider? If you use the correct API,
> > > the changes should reflect automatically. If you are using lower
> > > level assignments, then you might need to call itemUpdated for
> > > collections.
> > >
> > >
> > >
> > > What is your dataprovider?
> > >
> > >
> > >
> > > Tracy
> > >
> > >
> > >
> > > --
> > >
> > > *From:* flexcoders@yahoogroups.com 
> 
> > 
> > [mailto:flexcoders@yahoogroups.com 
> ]
> > > *On Behalf Of *ben gomez farrell
> > > *Sent:* Friday, October 17, 2008 12:40 PM
> > > *To:* flexcoders@yahoogroups.com 
> 
> > > *Subject:* [flexcoders] Refreshing graphics in a tree
> > >
> > >
> > >
> > > Hey, I have a tree with a itemRenderer to have a clickable checkbox
> in
> > > it. I need to set the checkbox state sometimes through code.
> > > Everything works great, except the graphics of the checkbox don't
> update
> > > when it's set through code (mousing over the node will refresh the
> > > graphics)
> > > Is there a way to refresh the graphics of

RE: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread Tracy Spratt
Yes, this:
groupsdata.getItemAt(f).state = true/false
is a low-level assignment directly to the dataprovider item and does not
dispatch the events necessary for the update of the UI.

You can change it to use setItemAt() or you can call itemUpdated(item)
after the assignment.

I am sure both of these use the invalidation mechanism and optimize the
rendering.

I am not sure about refresh(), and that is not the correct usage anyway.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben gomez farrell
Sent: Friday, October 17, 2008 2:01 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Refreshing graphics in a tree

I have an arraycollection called groupsdata
groupsdata.getItemAt(f).state = true/false

And then in my itemRenderer, I override like this:

override public function set data(value:Object):void {
super.data = value;
if ( !value ) { return; }
// remove check box from child nodes if present
if ( !value.toplevel && this.getChildByName("checkbox") ) { 
this.removeChild( this.getChildByName("checkbox") ); }
}

override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(super.data)
{
if (super.icon != null)
{
checkBox.x = super.icon.x;
checkBox.y = 12;
super.icon.x = checkBox.x + checkBox.width + 17;
super.label.x = super.icon.x + super.icon.width + 3;
checkBox.selected = super.data.state;
}
else
{
checkBox.x = super.label.x;
checkBox.y = 12;
super.label.x = checkBox.x + checkBox.width + 17;
checkBox.selected = super.data.state;
}
}
}

So it looks like the data object is getting set correctly, but 
updateDisplayList isn't getting called when the data is refreshed - but 
it does get called on mouse over.
thanks again for the help!
ben

Tracy Spratt wrote:
>
> So how are you updating the dataProvider items with the checkbox
state?
>
> Are you using the ArrayCollection API? If so, then the UI will update 
> automatically.
>
> Note: refresh() applies a sort. It does not generically "refesh" the 
> UI. Also, if you use the API, it should not be necessary to do 
> anything else for the list either.
>
> Tracy
>
>

>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]

> *On Behalf Of *ben gomez farrell
> *Sent:* Friday, October 17, 2008 1:36 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Refreshing graphics in a tree
>
> My data is an ArrayCollection is set via mytree.dataProvider =
> myArrayCollection;
> I have a list as well, and when I do mylist.dataProvider.refresh(),
the
> checkboxes on those update just fine.
> Unfortunately doing mytree.dataProvider.refresh() doesn't work - and
> only mousing over will update the graphics of the item.
> I'll look into itemUpdated though, and see how I can use it, thanks!
> ben
>
> Tracy Spratt wrote:
> >
> > How are you updateing the dataProvider? If you use the correct API,
> > the changes should reflect automatically. If you are using lower
> > level assignments, then you might need to call itemUpdated for
> > collections.
> >
> >
> >
> > What is your dataprovider?
> >
> >
> >
> > Tracy
> >
> >
> >
> > --
> >
> > *From:* flexcoders@yahoogroups.com 
>  
> [mailto:flexcoders@yahoogroups.com
]
> > *On Behalf Of *ben gomez farrell
> > *Sent:* Friday, October 17, 2008 12:40 PM
> > *To:* flexcoders@yahoogroups.com

> > *Subject:* [flexcoders] Refreshing graphics in a tree
> >
> >
> >
> > Hey, I have a tree with a itemRenderer to have a clickable checkbox
in
> > it. I need to set the checkbox state sometimes through code.
> > Everything works great, except the graphics of the checkbox don't
update
> > when it's set through code (mousing over the node will refresh the
> > graphics)
> > Is there a way to refresh the graphics of all the nodes through some
> > method of the tree? I CAN open and close the nodes to refresh the
> > graphics, but it seems really silly, and I have to track whats open
and
> > closed and make sure it gets back to the same state again.
> >
> > Thanks!
> > ben
> >
> >
>
>  



--
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] Force compile of Modules

2008-10-17 Thread Greg Hess
Hi Folks,

I am having problems building my project that is divided into separate
modules. Compilation errors are not always reported. My main
application is just a module loader and I think that the compiler does
not 'always' detect changes in files/classes referenced in modules.
What happens is that my compile completes without errors but some(ones
with errors) of my modules are not compiled to a swf. I only detect
this when I run the application and see some of my modules are blank
or even worse the test runs with an old module and I am not even
executing latest code usualy discovered when a break point is never
reached... I then have to add an empty space in each of my module main
files to get them to recompile and get the error. I am using
FlexBuilder-Eclipse to build my projects.

This is obvously bothersome especially that last night I broke the
nightly build and had to buy donuts today ;-(. Last night I built,
deployed, tested and committed. If I had of done a clean build I would
have caught it...

Is there anyway to have fix with with compilier/module setting?

Any help much appreciated.

Greg


Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
- Original Message - 
From: "Paul Andrews" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 17, 2008 7:22 PM
Subject: Re: [flexcoders] Re: how to add internal padding in canvas?


> - Original Message - 
> From: "markflex2007" <[EMAIL PROTECTED]>
> To: 
> Sent: Friday, October 17, 2008 6:51 PM
> Subject: [flexcoders] Re: how to add internal padding in canvas?
>
>
>> Please give me a simple demo,how to do " nest the canvas inside
>> another container to get the margin"?
>
> Something like this perhaps..
>
> I'm assuming that the reason for the margin is to leave a gap around the
> edges. Lets say you want a 5 pixel gap.
>
> 
>  height="{outerCanvas-10}" x=5 y=5 >

height="{outerCanvas.height-10}" x=5 y=5 >

>
> add other stuff here
>
> 
> 
>
> Any good?
>
> Maybe I've got the wrong idea about why you want the margin.
>
> Paul
>
>
>>
>> Thanks for help
>>
>> Mark
>> --- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>>>
>>> You can always nest the canvas inside another container to get the
>> margin..
>>
>>
>>
>> 
>>
>> --
>> 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 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
>
>
>
> 



Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
- Original Message - 
From: "markflex2007" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 17, 2008 6:51 PM
Subject: [flexcoders] Re: how to add internal padding in canvas?


> Please give me a simple demo,how to do " nest the canvas inside
> another container to get the margin"?

Something like this perhaps..

I'm assuming that the reason for the margin is to leave a gap around the 
edges. Lets say you want a 5 pixel gap.




add other stuff here




Any good?

Maybe I've got the wrong idea about why you want the margin.

Paul


>
> Thanks for help
>
> Mark
> --- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>>
>> You can always nest the canvas inside another container to get the
> margin..
>
>
>
> 
>
> --
> 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
>
>
>
> 



Re: [flexcoders] web compiler

2008-10-17 Thread Matt Chotin
The J2EE web compiler does this, the Apache/IIS ones don't.

In general we don't think that the web compilers get enough use to warrant our 
full-blown investment.  We're going to make sure that the source is available 
(should be in a few weeks for Apache/IIS and J2EE is already in Subversion), 
and we will do some amount of upgrading of the J2EE one.  But we probably won't 
expand the feature-set, and we will never consider them fully tested or 
performant enough to recommend for a production system.

Matt


On 10/17/08 11:00 AM, "Michael Schmalle" <[EMAIL PROTECTED]> wrote:




Ok,

I had this in my plans to investigate in a couple months for my server.

So is there something that caches swf on the first run, then only recompiles 
when the mxml has changed?

Where did I hear that? This is in my head from a year or two ago.

Mike

On Fri, Oct 17, 2008 at 1:46 PM, Paul Andrews <[EMAIL PROTECTED]> wrote:



If there isn't a mechanism for caching the compilation result (user requests 
mxml, but actually gets html/swf), performance in a production environment 
would be appaling. That wouldn't matter for development.

- Original Message -

From:  Michael  Schmalle 

To: flexcoders@yahoogroups.com

Sent: Friday, October 17, 2008 5:57  PM

Subject: Re: [flexcoders] web  compiler



Matt,


> They're only meant for dev-time, not  production,



What do  you mean by that? I thought you could use them to compile are you 
saying they  are buggy or not completely implemented?



Mike


On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin <[EMAIL PROTECTED]> wrote:







We have a web compiler available for Apache, IIS, and J2EE. They're only  meant 
for dev-time, not production, but I'd imagine that's what's being  used. You 
need to make sure that they're set up with the same config as Flex  Builder.

Matt



On 10/17/08 4:07 AM, "Tom Chiverton" <[EMAIL PROTECTED] 
 > wrote:

On Friday  17 Oct 2008, jitendra jain wrote:
> I want to do some load testing and  that's why iam using .mxml files.

But you'll only do the compile once  for each release, not once for each
request... it can't be as important  as the calls that application actually
makes.

--
Tom  Chiverton
Helping to paradigmatically morph B2C fourth-generation  methodologies



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. Any reference 
to a  partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation  Authority.

CONFIDENTIALITY

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

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



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






--
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti  Graphix Blog
http://www.blog.teotigraphix.com

You  can find more by solving the problem then by 'asking the  question'.







Re: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
I have an arraycollection called groupsdata
groupsdata.getItemAt(f).state = true/false

And then in my itemRenderer, I override like this:

override public function set data(value:Object):void {
super.data = value;
if ( !value ) { return; }
// remove check box from child nodes if present
if ( !value.toplevel && this.getChildByName("checkbox") ) { 
this.removeChild( this.getChildByName("checkbox") ); }
}

override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(super.data)
{
if (super.icon != null)
{
checkBox.x = super.icon.x;
checkBox.y = 12;
super.icon.x = checkBox.x + checkBox.width + 17;
super.label.x = super.icon.x + super.icon.width + 3;
checkBox.selected = super.data.state;
}
else
{
checkBox.x = super.label.x;
checkBox.y = 12;
super.label.x = checkBox.x + checkBox.width + 17;
checkBox.selected = super.data.state;
}
}
}

So it looks like the data object is getting set correctly, but 
updateDisplayList isn't getting called when the data is refreshed - but 
it does get called on mouse over.
thanks again for the help!
ben

Tracy Spratt wrote:
>
> So how are you updating the dataProvider items with the checkbox state?
>
> Are you using the ArrayCollection API? If so, then the UI will update 
> automatically.
>
> Note: refresh() applies a sort. It does not generically “refesh” the 
> UI. Also, if you use the API, it should not be necessary to do 
> anything else for the list either.
>
> Tracy
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *ben gomez farrell
> *Sent:* Friday, October 17, 2008 1:36 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Refreshing graphics in a tree
>
> My data is an ArrayCollection is set via mytree.dataProvider =
> myArrayCollection;
> I have a list as well, and when I do mylist.dataProvider.refresh(), the
> checkboxes on those update just fine.
> Unfortunately doing mytree.dataProvider.refresh() doesn't work - and
> only mousing over will update the graphics of the item.
> I'll look into itemUpdated though, and see how I can use it, thanks!
> ben
>
> Tracy Spratt wrote:
> >
> > How are you updateing the dataProvider? If you use the correct API,
> > the changes should reflect automatically. If you are using lower
> > level assignments, then you might need to call itemUpdated for
> > collections.
> >
> >
> >
> > What is your dataprovider?
> >
> >
> >
> > Tracy
> >
> >
> >
> > --
> >
> > *From:* flexcoders@yahoogroups.com 
>  
> [mailto:flexcoders@yahoogroups.com ]
> > *On Behalf Of *ben gomez farrell
> > *Sent:* Friday, October 17, 2008 12:40 PM
> > *To:* flexcoders@yahoogroups.com 
> > *Subject:* [flexcoders] Refreshing graphics in a tree
> >
> >
> >
> > Hey, I have a tree with a itemRenderer to have a clickable checkbox in
> > it. I need to set the checkbox state sometimes through code.
> > Everything works great, except the graphics of the checkbox don't update
> > when it's set through code (mousing over the node will refresh the
> > graphics)
> > Is there a way to refresh the graphics of all the nodes through some
> > method of the tree? I CAN open and close the nodes to refresh the
> > graphics, but it seems really silly, and I have to track whats open and
> > closed and make sure it gets back to the same state again.
> >
> > Thanks!
> > ben
> >
> >
>
>  



--
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:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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



Re: [flexcoders] web compiler

2008-10-17 Thread Michael Schmalle
Ok,
I had this in my plans to investigate in a couple months for my server.

So is there something that caches swf on the first run, then only recompiles
when the mxml has changed?

Where did I hear that? This is in my head from a year or two ago.

Mike

On Fri, Oct 17, 2008 at 1:46 PM, Paul Andrews <[EMAIL PROTECTED]> wrote:

>If there isn't a mechanism for caching the compilation result (user
> requests mxml, but actually gets html/swf), performance in a production
> environment would be appaling. That wouldn't matter for development.
>
> - Original Message -
> *From:* Michael Schmalle <[EMAIL PROTECTED]>
> *To:* flexcoders@yahoogroups.com
> *Sent:* Friday, October 17, 2008 5:57 PM
> *Subject:* Re: [flexcoders] web compiler
>
> Matt,
> > They're only meant for dev-time, not production,
>
> What do you mean by that? I thought you could use them to compile are you
> saying they are buggy or not completely implemented?
>
> Mike
>
> On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin <[EMAIL PROTECTED]> wrote:
>
>>   We have a web compiler available for Apache, IIS, and J2EE. They're
>> only meant for dev-time, not production, but I'd imagine that's what's being
>> used. You need to make sure that they're set up with the same config as Flex
>> Builder.
>>
>> Matt
>>
>>
>> On 10/17/08 4:07 AM, "Tom Chiverton" <[EMAIL 
>> PROTECTED]>
>> wrote:
>>
>> On Friday 17 Oct 2008, jitendra jain wrote:
>> > I want to do some load testing and that's why iam using .mxml files.
>>
>> But you'll only do the compile once for each release, not once for each
>> request... it can't be as important as the calls that application actually
>> makes.
>>
>> --
>> Tom Chiverton
>> Helping to paradigmatically morph B2C fourth-generation methodologies
>>
>> 
>>
>> 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. Any
>> reference to a partner in relation to Halliwells LLP means a member of
>> Halliwells LLP. Regulated by The Solicitors Regulation Authority.
>>
>> CONFIDENTIALITY
>>
>> This email is intended only for the use of the addressee named above and
>> may be confidential or legally privileged. If you are not the addressee you
>> must not read it and must not use any information contained in nor copy it
>> nor inform any person other than Halliwells LLP or the addressee of its
>> existence or contents. If you have received this email in error please
>> delete it and notify Halliwells LLP IT Department on 0870 365 2500.
>>
>> For more information about Halliwells LLP visit www.halliwells.com.
>>
>> 
>>
>> --
>> Flexcoders 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
>>
>>
>
>
> --
> Teoti Graphix, LLC
> http://www.teotigraphix.com
>
> Teoti Graphix Blog
> http://www.blog.teotigraphix.com
>
> You can find more by solving the problem then by 'asking the question'.
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread markflex2007
Please give me a simple demo,how to do " nest the canvas inside
another container to get the margin"?

Thanks for help

Mark
--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> You can always nest the canvas inside another container to get the
margin..
 



RE: [flexcoders] Custom event - Create, dispatch, and listen to.

2008-10-17 Thread Gordon Smith
> You also may want to avveride the clone method in the custom event class

You should always override the clone() method in a custom event class that adds 
new properties. Otherwise, re-dispatching such an event (calling 
dispatchEvent(event) inside a handler for that event) won't work properly.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of claudiu 
ursica
Sent: Friday, October 17, 2008 12:45 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Custom event - Create, dispatch, and listen to.

You also may want to avveride the clone method in the custom event class:
/**
 *  @private
 */
override public function clone():Event
{
return new RemoteClick(type, bubbles, cancelable);
}
   - just omit the arguments if you are not using any

Cheers,
Claudiu
- Original Message 
From: shaun <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 6:23:59 AM
Subject: Re: [flexcoders] Custom event - Create, dispatch, and listen to.

Hi,

Class names should begin with an Uppercase letter. RemoteClick not
remoteClick.
The type String can be lowercase if you want..

Something like the following..

package modulecode
{
import flash.events. Event;

public static const remoteClick: String="remoteCl ick";

public class RemoteClick extends Event
{
public function RemoteClick( type:String= "remoteClick" ,
bubbles:Boolean= false,

cancelable:Boolean= false)
{
super(type, bubbles, cancelable);
}
}
}

//Some component that dispatches and handles RemoteClick events



public function handleButtonClick( ):void{
var eventObj:RemoteClic k = new RemoteClick( ); //no bubble
dispatchEvent( eventObj) ;
}

public function handleRemoteClickEv ent(e:RemoteClic k):void{
trace("handleRemote Click: "+e);
}

public function init():void{
addEventListener( "remoteClick" , handleRemoteClickEv ent);
}








Or

//Some component that dispatches RemoteClick events. NOTE : the name of
the event and the type.



[Event(name= "remoteClick" , type="modulecode. RemoteClick" )]



public function handleButtonClick( ):void{
var eventObj:RemoteClic k = new RemoteClick( ); //no bubble
dispatchEvent( eventObj) ;
}








Use MyCanvas2 in another component..



function handleRemoteClick( e:RemoteClick) :void{ ... }





HTH.
- shaun

__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



RE: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread Tracy Spratt
So how are you updating the dataProvider items with the checkbox state? 

 

Are you using the ArrayCollection API?  If so, then the UI will update
automatically.

 

Note: refresh() applies a sort.  It does not generically "refesh" the
UI.  Also, if you use the API, it should not be necessary to do anything
else for the list either.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben gomez farrell
Sent: Friday, October 17, 2008 1:36 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Refreshing graphics in a tree

 

My data is an ArrayCollection is set via mytree.dataProvider = 
myArrayCollection;
I have a list as well, and when I do mylist.dataProvider.refresh(), the 
checkboxes on those update just fine.
Unfortunately doing mytree.dataProvider.refresh() doesn't work - and 
only mousing over will update the graphics of the item.
I'll look into itemUpdated though, and see how I can use it, thanks!
ben

Tracy Spratt wrote:
>
> How are you updateing the dataProvider? If you use the correct API, 
> the changes should reflect automatically. If you are using lower 
> level assignments, then you might need to call itemUpdated for 
> collections.
>
> 
>
> What is your dataprovider?
>
> 
>
> Tracy
>
> 
>
> --
>
> *From:* flexcoders@yahoogroups.com

[mailto:flexcoders@yahoogroups.com 
] 
> *On Behalf Of *ben gomez farrell
> *Sent:* Friday, October 17, 2008 12:40 PM
> *To:* flexcoders@yahoogroups.com 

> *Subject:* [flexcoders] Refreshing graphics in a tree
>
> 
>
> Hey, I have a tree with a itemRenderer to have a clickable checkbox in
> it. I need to set the checkbox state sometimes through code.
> Everything works great, except the graphics of the checkbox don't
update
> when it's set through code (mousing over the node will refresh the 
> graphics)
> Is there a way to refresh the graphics of all the nodes through some
> method of the tree? I CAN open and close the nodes to refresh the
> graphics, but it seems really silly, and I have to track whats open
and
> closed and make sure it gets back to the same state again.
>
> Thanks!
> ben
>
> 

 



Re: [flexcoders] web compiler

2008-10-17 Thread Paul Andrews
If there isn't a mechanism for caching the compilation result (user requests 
mxml, but actually gets html/swf), performance in a production environment 
would be appaling. That wouldn't matter for development.
  - Original Message - 
  From: Michael Schmalle 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 5:57 PM
  Subject: Re: [flexcoders] web compiler


  Matt,


  > They're only meant for dev-time, not production, 


  What do you mean by that? I thought you could use them to compile are you 
saying they are buggy or not completely implemented?


  Mike


  On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin <[EMAIL PROTECTED]> wrote:

We have a web compiler available for Apache, IIS, and J2EE. They're only 
meant for dev-time, not production, but I'd imagine that's what's being used. 
You need to make sure that they're set up with the same config as Flex Builder.

Matt



On 10/17/08 4:07 AM, "Tom Chiverton" <[EMAIL PROTECTED]> wrote:

On Friday 17 Oct 2008, jitendra jain wrote:
> I want to do some load testing and that's why iam using .mxml files.

But you'll only do the compile once for each release, not once for each
request... it can't be as important as the calls that application actually
makes.

--
Tom Chiverton
Helping to paradigmatically morph B2C fourth-generation methodologies



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. Any reference to 
a partner in relation to Halliwells LLP means a member of Halliwells LLP. 
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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






  -- 
  Teoti Graphix, LLC
  http://www.teotigraphix.com

  Teoti Graphix Blog
  http://www.blog.teotigraphix.com

  You can find more by solving the problem then by 'asking the question'.

   

Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Michael Schmalle
Tracy,
Container::getScrollableRect():Rectangle

uses usePadding,

Dumb answer on my part. I had to subclass canvas where I actually wanted the
padding to count in the scrollRect.

Sorry for the noise, I'm thinking to much these days. I agree, from a design
perspective there is no need to do what I said.

But for the sake of an explanation, usePadding has to do with the
contentPane and how it gets shifted when there is scrollable content, so
overriding that would give you padding even though your component is at 0,0
in the contentPane.

Mike

On Fri, Oct 17, 2008 at 1:36 PM, Tracy Spratt <[EMAIL PROTECTED]> wrote:

>Hold on a minute.  Canvas uses absolute positioning.  So "padding"
> would only affect percentage resizing?  And 0,0 would still be top left
> corner, regardless of the padding?
>
>
>
> This seems kind of confusing.  I'm with Tim, and think this would be better
> solved with constraints.  I suppose you could declare Spacers of
> height="100%" and whatever width you wanted, and position them with
> constraints.
>
>
>
> Tracy
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Tim Hoff
> *Sent:* Friday, October 17, 2008 12:01 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: how to add internal padding in canvas?
>
>
>
>
> Another alternative, if you have to use a Canvas and don't want to
> subclass, is to use constraints (top, bottom, left, right) on the
> children.
>
> -TH
>
> --- In flexcoders@yahoogroups.com ,
> "markflex2007" <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi,Mike
> >
> > Please let me know this in detail.
> >
> > I can extends Canvas and create a new class (like samrtcavas).
> >
> > I confuse how to use the class in mxml and how to set left/right
> paddings
> >
> > Thanks for your help
> >
> > Mark
> >
> >
> >
> > --- In flexcoders@yahoogroups.com ,
> "Michael Schmalle"
> > teoti.graphix@ wrote:
> > >
> > > A hack that can be done if you really want Canvas is;
> > > Create a subclass of Canvas and override the usePadding property.
> > >
> > > override mx_internal get usePadding():Boolean
> > > {
> > > return true;
> > > }
> > >
> > > This will turn the padding back on when the
> > > layout calculates viewMetricsAndPadding.
> > >
> > > Mike
> > >
> >
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
You can always nest the canvas inside another container to get the margin..
  - Original Message - 
  From: Tracy Spratt 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 6:36 PM
  Subject: RE: [flexcoders] Re: how to add internal padding in canvas?


  Hold on a minute.  Canvas uses absolute positioning.  So "padding" would only 
affect percentage resizing?  And 0,0 would still be top left corner, regardless 
of the padding?

   

  This seems kind of confusing.  I'm with Tim, and think this would be better 
solved with constraints.  I suppose you could declare Spacers of height="100%" 
and whatever width you wanted, and position them with constraints.

   

  Tracy 

   


--

  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim 
Hoff
  Sent: Friday, October 17, 2008 12:01 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: how to add internal padding in canvas?

   


  Another alternative, if you have to use a Canvas and don't want to
  subclass, is to use constraints (top, bottom, left, right) on the
  children.

  -TH

  --- In flexcoders@yahoogroups.com, "markflex2007" <[EMAIL PROTECTED]>
  wrote:
  >
  > Hi,Mike
  >
  > Please let me know this in detail.
  >
  > I can extends Canvas and create a new class (like samrtcavas).
  >
  > I confuse how to use the class in mxml and how to set left/right
  paddings
  >
  > Thanks for your help
  >
  > Mark
  >
  >
  >
  > --- In flexcoders@yahoogroups.com, "Michael Schmalle"
  > teoti.graphix@ wrote:
  > >
  > > A hack that can be done if you really want Canvas is;
  > > Create a subclass of Canvas and override the usePadding property.
  > >
  > > override mx_internal get usePadding():Boolean
  > > {
  > > return true;
  > > }
  > >
  > > This will turn the padding back on when the
  > > layout calculates viewMetricsAndPadding.
  > >
  > > Mike
  > >
  >

   

Re: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
My data is an ArrayCollection is set via mytree.dataProvider =  
myArrayCollection;
I have a list as well, and when I do mylist.dataProvider.refresh(), the 
checkboxes on those update just fine.
Unfortunately doing mytree.dataProvider.refresh() doesn't work - and 
only mousing over will update the graphics of the item.
I'll look into itemUpdated though, and see how I can use it, thanks!
ben

Tracy Spratt wrote:
>
> How are you updateing the dataProvider?  If you use the correct API, 
> the changes should reflect automatically.  If you are using lower 
> level assignments, then you might need to call itemUpdated for 
> collections.
>
>  
>
> What is your dataprovider?
>
>  
>
> Tracy
>
>  
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *ben gomez farrell
> *Sent:* Friday, October 17, 2008 12:40 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Refreshing graphics in a tree
>
>  
>
> Hey, I have a tree with a itemRenderer to have a clickable checkbox in
> it. I need to set the checkbox state sometimes through code.
> Everything works great, except the graphics of the checkbox don't update
> when it's set through code (mousing over the node will refresh the 
> graphics)
> Is there a way to refresh the graphics of all the nodes through some
> method of the tree? I CAN open and close the nodes to refresh the
> graphics, but it seems really silly, and I have to track whats open and
> closed and make sure it gets back to the same state again.
>
> Thanks!
> ben
>
>  


[flexcoders] Re: Reusing HTTPService

2008-10-17 Thread lagos_tout
I like!  This line says it all:

> service.send().addResponder(new MyIResponder(resultB, faultB));

Thanks much.  I think this is the solution.  

It meets my requirements: no long conditionals; one-to-one matching of 
service calls to fault/result handlers; reuse of the same service 
object; and, if i create a separate class (implemementing IResponder 
and containing it's own fault and result handlers, rather than passing 
it in as you've done) for each type of service call, i think i get to 
live another day by the OO mantra "closed to modification, open to 
extension".

Weird though how Flex requires one to add the responder after the call 
is already made, don't you think?  One would think the responder 
should be in place before the call to service.send().

Thanks again!

LT


--- In flexcoders@yahoogroups.com, shaun <[EMAIL PROTECTED]> wrote:
>
> 
> How about something like this:
> 
> (note: I've not tried it, just slapped it straight into the email)
> 
> public class MyClassThatInvokesHTTPServices {
> 
> //inner helper class.
> class MyIResponder implements IResponder{
>public var f:Function;
>public var r:Function;
> 
>public MyIResponder(r:Function, f:Function){
>  this.r = r;
>  this.f = f;
>}
> 
>public function fault(info:Object):void {
>f.call(info);
>}
> 
>public function result(result:Object):void {
>r.call(result);
>}
> }
> 
> //Your handlers for service calls.
> protected function resultA(result:Object){ ... }
> protected function faultA(info:Object){...}
> protected function resultB(result:Object){ ... }
> protected function faultB(info:Object){...}
> 
> var service:HTTPService ...//assume exists, reused for various 
calls.
> 
>   //send for service A.
>   funciton sendA(args:Object){
> service.url = "../A.html";
> service.send(args).addResponder(new MyIResponder(resultA, 
faultA));
>   }
> 
>   //send for service B.
>   function sendB(){
> service.url = "../B.html";
> service.send().addResponder(new MyIResponder(resultB, faultB));
>   }
> 
> 
> }
> 
> [snip]
> 
>  --- In flexcoders@yahoogroups.com, "lagos_tout"  
> >> wrote:
> > Hi,
> >
> > I'm re-using an instance of HTTPService, changing the request 
> > arguments to get different responses from the server.  But I 
> >> found 
> > that if, for instance, I made 3 calls this way with the 
> >>> HTTPService, 
> > each of the 3 result handlers registered for each call is 
> >> executed 
> > every time a result returned.  
> >
> > I solved this by storing a reference to the unique AsyncToken 
> >>> returned 
> > by each service call and matching it to the AsyncToken 
> > contained 
> >>> in 
> > each ResultEvent's "token" property in order to determine 
> > which 
> >>> result 
> > handler to execute. 
> >
> > I'm not terribly happy with this setup.  It seems messy.  I'd 
> > appreciate any suggestions on how I can reuse an HTTPService 
> >>> instance 
> > without ending up with long switch statements with countless 
> > "if 
> > thisAsyncToken then do thisHandler, else if thatAsyncToken 
> > then 
> >> do 
> > thatHandler... and so on".
> >
> > Thanks much.
> >
> > LT
> >
> > 
> > 
> > 
> >
>



RE: [flexcoders] How to display message in empty Tree component

2008-10-17 Thread Tracy Spratt
I'd use a ViewStack.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Carter
Sent: Friday, October 17, 2008 6:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to display message in empty Tree component

 


I'm using a Tree component with a dataProvider set using an XML object.
Also
showRoot=false.

If I set using a childless XML object then one item is shown in the
tree.
That's a bit weird but it sort of allows me a way to display my message
(using labelFunc) to "No items". But then I have to be careful with all
my
event handlers because this item is not really a real item for my
purposes.

However, if I use an XML with, say, one child, then that child is
displayed.
If I then remove that child, then nothing is displayed (and so I see no
way
to display the message).

What is the best way to display a message (like "No items") in the Tree
component should the dataprovider be empty?
-- 
View this message in context:
http://www.nabble.com/How-to-display-message-in-empty-Tree-component-tp2
0030878p20030878.html
 
Sent from the FlexCoders mailing list archive at Nabble.com.

 



RE: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread Tracy Spratt
How are you updateing the dataProvider?  If you use the correct API, the
changes should reflect automatically.  If you are using lower level
assignments, then you might need to call itemUpdated for collections.

 

What is your dataprovider?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben gomez farrell
Sent: Friday, October 17, 2008 12:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Refreshing graphics in a tree

 

Hey, I have a tree with a itemRenderer to have a clickable checkbox in 
it. I need to set the checkbox state sometimes through code. 
Everything works great, except the graphics of the checkbox don't update

when it's set through code (mousing over the node will refresh the
graphics)
Is there a way to refresh the graphics of all the nodes through some 
method of the tree? I CAN open and close the nodes to refresh the 
graphics, but it seems really silly, and I have to track whats open and 
closed and make sure it gets back to the same state again.

Thanks!
ben

 



RE: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tracy Spratt
Hold on a minute.  Canvas uses absolute positioning.  So "padding" would
only affect percentage resizing?  And 0,0 would still be top left
corner, regardless of the padding?

 

This seems kind of confusing.  I'm with Tim, and think this would be
better solved with constraints.  I suppose you could declare Spacers of
height="100%" and whatever width you wanted, and position them with
constraints.

 

Tracy 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Hoff
Sent: Friday, October 17, 2008 12:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to add internal padding in canvas?

 


Another alternative, if you have to use a Canvas and don't want to
subclass, is to use constraints (top, bottom, left, right) on the
children.

-TH

--- In flexcoders@yahoogroups.com 
, "markflex2007" <[EMAIL PROTECTED]>
wrote:
>
> Hi,Mike
>
> Please let me know this in detail.
>
> I can extends Canvas and create a new class (like samrtcavas).
>
> I confuse how to use the class in mxml and how to set left/right
paddings
>
> Thanks for your help
>
> Mark
>
>
>
> --- In flexcoders@yahoogroups.com
 , "Michael Schmalle"
> teoti.graphix@ wrote:
> >
> > A hack that can be done if you really want Canvas is;
> > Create a subclass of Canvas and override the usePadding property.
> >
> > override mx_internal get usePadding():Boolean
> > {
> > return true;
> > }
> >
> > This will turn the padding back on when the
> > layout calculates viewMetricsAndPadding.
> >
> > Mike
> >
>

 



[flexcoders] Re: WebORB 3.5 - Error: Call to a member function getServiceURI() on a non-objec

2008-10-17 Thread valdhor
Unknown.

I just downloaded WebORB 3.5, unzipped it, uploaded it to my server
and pointed my browser to weborb.php. The response was:

WebORB v3.5.0

I would make sure you are pointing to the correct directory where
weborb.php is located.

Also, you may want to post to the WebORB forum at
http://tech.groups.yahoo.com/group/flashorb/

--- In flexcoders@yahoogroups.com, "Hyder" <[EMAIL PROTECTED]> wrote:
>
> I just downloaded WebORB 3.5 and got done setting it up.   Now, my
> project is setup on my system (xampp / php 5.2.5). And when I point my
> browser to weborb.php, I get the following fatal error:  Fatal error:
> Call to a member function getServiceURI() on a non-object in
> C:\xampp\htdocs\projects\gulfspecials\weborb\Message\Request.php on line
> 75
> Anyone know how to fix this problem?
>




[flexcoders] Re: Stepping through Flex SDK code while in Flex Builder debugger

2008-10-17 Thread lagos_tout
Holy crap! I can't believe it! It actually works now.
:) Awesomeness!
I'd been wrestling with this for over a week now!  Thanks so much.  
That was exactly the problem.

LT

--- In flexcoders@yahoogroups.com, "hu22hugo" <[EMAIL PROTECTED]> wrote:
>
> --- In flexcoders@yahoogroups.com, "lagos_tout"  wrote:
> >
> > Hi, all.
> > 
> > Is it possible to step through Flex SDK code using Flex Builder 3 
> > debugger?  
> > 
> > I was able to set break points in only a couple of SDK 
> > classes (eg AdvancedDataGrid).  I did this by adding
> >  
> > C:\Program Files\Adobe\Flex Builder 3 Plug-
> > in\sdks\3.1.0\fbpro\projects\datavisualization\src
> > 
> > to the source lookup file list in the debug configuration panel in 
> > Flex Builder.
> > 
> > But adding 
> > 
> > C:\Program Files\Adobe\Flex Builder 3 Plug-
> > in\sdks\3.1.0\frameworks\projects\framework\src
> > 
> > doesn't have the same effect of letting me step through framework 
> > code.
> 
> I had a similar issue with two particular projects using Flex
> 3.1.0.2???. All other projects were fine. It turned out that linking
> the framework as runtime shared library was the culprit. Turning 
back
> to merging the framework classes into the project.swf made me a 
happy man.
> Marc, http://faindu.wordpress.com/
>





RE: [flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread Tracy Spratt
That is correct, you are not storing references correctly.  First I will
explain what is wrong with your code, but then, after seeing what you
are trying to do, will suggest a slightly different approach.

 

First, you are mixing Array, which is accessed by index and "associative
array", which is an Object and accessed by property name:

private var _oChildren:Object = new Object();

 

Second, you are creating a new instance of that each time you click
addModule.  This overwrites what was in there before.  Don't do that.

 

Third, you need a unique name for each reference you add to the
associative array.  Don't use "one" every time, that just puts a new
reference in the "one" property.  You can use anything you want for this
property name.  Pick something that is meaningful.  How will you
identify which child you want to remove?  Is it purely numerical? If so
you can use "1", "2", etc.  Usually there is some string that is logical
for this, like an id, or an image's base file name.  whatever, remember
it must uniquely identify the instance you want to later remove.

 

Now, after looking at your code a bit more, and seeing that you do not
have a clear string or id you can use for identifying the references, I
am gong to suggest a different approach.

private var _aChildren:Array= [];   //declare an initialize
an Array

 

...

public function addModule():void {
  var iNewIndex:int = _aChildren.length;  //this will be the next
available index in the array

  button = new Button();

  button.id = String(iNewIndex);   //NOTE: you can NOT use this id as a
reference, but you CAN access its value
  button.label = "unload";
  button.addEventListener(MouseEvent.CLICK, onClickUnload);
  tiletest.addChild(button);  

  moduleloader = new ModuleLoader();
  moduleloader.url = "test.swf";
  _aChildren[iNewIndex] = tiletest.addChild(moduleloader);  //NOTE: the
associated button id property value matches the index of the array ref
}// addModule

 

private function onClickUnload (event:Event):void {
  var iIndexClicked:int = parseInt(event.target.id);  

  tiletest.removeChild(_aChildren[iIndexClicked]);
  tiletest.removeChild(event.target);
}// onClickUnload

 

Try this.  it is untested.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sailorsea21
Sent: Friday, October 17, 2008 11:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.

 

Hi Tracy, 

I don't think I'm successfully storing the reference of the children 
into the array. 

This is what I had tried:

private var moduleloader:ModuleLoader;
private var button:Button;
private var _aChildren:Array;

private function click(evt:MouseEvent):void {
tiletest.removeChild(_aChildren["one"]);
tiletest.removeChild(button);
} 

public function AddModule():void {
moduleloader = new ModuleLoader();
moduleloader.url = "test.swf";
button = new Button();
button.label = "unload";
button.addEventListener(MouseEvent.CLICK, click);
tiletest.addChild(button);
_aChildren = new Array();
_aChildren["one"] = tiletest.addChild(moduleloader);
} 

But I keep getting the "ArgumentError: Error #2025: The supplied 
DisplayObject must be a child of the caller." error.

Thanks again.

-David

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Well, you did not do what I suggested.
> 
> 
> 
> What do you think is in "moduleloader" when you click the remove 
button?
> The last thing you put in it.
> 
> 
> 
> Re-read my response.
> 
> 
> 
> Tracy
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of sailorsea21
> Sent: Thursday, October 16, 2008 4:38 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> 
> 
> 
> Hi Tracy, thank you for your quick response.
> I'm a little stuck on this one... I can't get it to work...
> 
> I'm now able to load a module and unload it. But if I load several 
> modules, I'm only able to unload the latest one. 
> 
> When I try unloading the other loaded modules I receive the follow 
> error:
> 
> ArgumentError: Error #2025: The supplied DisplayObject must be a 
> child of the caller.
> at flash.display::DisplayObjectContainer/removeChild()
> at 
> 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
 
>  > 
> veChild()[E:\dev\3.1.0
> \frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
> at mx.core::Container/removeChild()[E:\dev\3.1.0
> \frameworks\projects\framework\src\mx\core\Container.as:2267]
> at content_module_template_blank/click()
> [C:\Inet

Re: [flexcoders] web compiler

2008-10-17 Thread Michael Schmalle
Matt,
> They're only meant for dev-time, not production,

What do you mean by that? I thought you could use them to compile are you
saying they are buggy or not completely implemented?

Mike

On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin <[EMAIL PROTECTED]> wrote:

>   We have a web compiler available for Apache, IIS, and J2EE. They're only
> meant for dev-time, not production, but I'd imagine that's what's being
> used. You need to make sure that they're set up with the same config as Flex
> Builder.
>
> Matt
>
>
> On 10/17/08 4:07 AM, "Tom Chiverton" <[EMAIL 
> PROTECTED]>
> wrote:
>
> On Friday 17 Oct 2008, jitendra jain wrote:
> > I want to do some load testing and that's why iam using .mxml files.
>
> But you'll only do the compile once for each release, not once for each
> request... it can't be as important as the calls that application actually
> makes.
>
> --
> Tom Chiverton
> Helping to paradigmatically morph B2C fourth-generation methodologies
>
> 
>
> 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. Any
> reference to a partner in relation to Halliwells LLP means a member of
> Halliwells LLP. Regulated by The Solicitors Regulation Authority.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and
> may be confidential or legally privileged. If you are not the addressee you
> must not read it and must not use any information contained in nor copy it
> nor inform any person other than Halliwells LLP or the addressee of its
> existence or contents. If you have received this email in error please
> delete it and notify Halliwells LLP IT Department on 0870 365 2500.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
> 
>
> --
> Flexcoders 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
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
Hey, I have a tree with a itemRenderer to have a clickable checkbox in 
it.  I need to set the checkbox state sometimes through code.  
Everything works great, except the graphics of the checkbox don't update 
when it's set through code (mousing over the node will refresh the graphics)
Is there a way to refresh the graphics of all the nodes through some 
method of the tree?  I CAN open and close the nodes to refresh the 
graphics, but it seems really silly, and I have to track whats open and 
closed and make sure it gets back to the same state again.

Thanks!
ben


Re: [flexcoders] AS equivalent for perl's chop/chomp?

2008-10-17 Thread john fisher
thanks Guy
and of course you're right  if they irritate my sense of code style, I
can just wrap them up.
Just thought I'd ask in case I missed something.
John

Guy Morton wrote:
> I don't think so...I've never seen one, but what's hard about using
> String.replace? Aren't the following functionally equivalent?
>
> //perl's chomp
> String.replace(/[\r\n]*$/);
>
> //perl's chop
> String.replace(/.$/);
>
> I guess if you really care, you could extend the String class to add
> them?
>
> Guy
>
>


Re: [flexcoders] web compiler

2008-10-17 Thread Matt Chotin
We have a web compiler available for Apache, IIS, and J2EE.  They're only meant 
for dev-time, not production, but I'd imagine that's what's being used.  You 
need to make sure that they're set up with the same config as Flex Builder.

Matt


On 10/17/08 4:07 AM, "Tom Chiverton" <[EMAIL PROTECTED]> wrote:

On Friday 17 Oct 2008, jitendra jain wrote:
> I want to do some load testing and that's why iam using .mxml files.

But you'll only do the compile once for each release, not once for each
request... it can't be as important as the calls that application actually
makes.

--
Tom Chiverton
Helping to paradigmatically morph B2C fourth-generation methodologies





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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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






RE: [flexcoders] Re: FZip loads cached zip before downloading online

2008-10-17 Thread Kevin Benz
When you destroy the FZip object, don't necessarily know and if you
don't know, you have to clean up after yourself. Remember, when you use
HTTP, you are subject to timeouts that may or may not expire as you
expect them let alone the myriad of other errors along the way
(permissions, server error, etc). If you only wait for a Complete event,
then the HTTP object is left hanging and the file is certainly in a
dirty state as well. 

 

K

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of diigiibot
Sent: Friday, October 17, 2008 9:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: FZip loads cached zip before downloading
online

 

Yes, that could be a solution. I'll try it out. 
Only I'm not sure the partially downloaded zip will be removed from
the temp folder when I remove the FZip object.

--- In flexcoders@yahoogroups.com 
, "Kevin Benz" <[EMAIL PROTECTED]> wrote:
>
> Not sure exactly what is happening but I suggest an improvement to
your
> approach.
> 
> 
> 
> You should detect the change in network connection status and use that
> event to flush any objects that are waiting on an event to fire. AIR
> fires a NETWORK_CHANGED event and I would make sure you clean up your
> objects at that point. You cannot depend on the quality of the bits
you
> just downloaded regardless and need to re-enter the process.
> 
> 
> 
> KFB 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of diigiibot
> Sent: Friday, October 17, 2008 3:31 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] FZip loads cached zip before downloading online
> 
> 
> 
> I'm using FZip in an AIR application, the application loads the zip
> from a location on our server, unpacks the zip and move the files to
> their local folder. Everything runs smooth until I cut off my internet
> connection while the zip is downloading.
> When I restart the application it looks like FZip is first checking
> the temp folder for the cached zip and if found, it uses that one to
> unzip, even if the zip was not completed the last time.
> 
> Does anyone know of a way to prevent that?
> 
> I use the default load method of the FZip library, this is a part of
> the code I use.
> 
> var moduleLink:String = [EMAIL PROTECTED];
> 
> var zip:FZip = new FZip();
> 
> zip.addEventListener(Event.COMPLETE, onComplete);
> 
> zip.load(new URLRequest(moduleLink));
> 
> private function onComplete(evt:Event):void 
> {
> var moduleDir:File =
> File.applicationStorageDirectory.resolvePath("modules");
> 
> var outStream:FileStream;
> 
> for(var i:int; i {
> var zipFile:FZipFile = evt.target.getFileAt(i);
> 
> if(zipFile.sizeUncompressed == 0 &&
> zipFile.filename.toString().substr(-1) == "/")
> {
> var rootDir:File =
>
File.applicationStorageDirectory.resolvePath("modules/"+zipFile.filename
> .toString());
> }
> else
> {
> var tempFile:File = moduleDir.resolvePath(zipFile.filename);
> 
> outStream = new FileStream();
> 
> outStream.open(tempFile, FileMode.WRITE);
> 
> outStream.writeBytes(zipFile.content, 0, zipFile.sizeUncompressed);
> 
> outStream.close();
> }
> }
> evt.target.close();
> }
> 
> Thanks in advance
>

 

<><>

[flexcoders] Re: FZip loads cached zip before downloading online

2008-10-17 Thread diigiibot
Well, it looks like it is valid. 
When it starts to unzip the zip in the temp folder I get the 2 first
folders in it. So that doesn't give me an IOError. 
I also tried to compare the number of files in the local zip with the
one online(just with a hardcoded var) but that puts me in a loop where
he keeps extracting the zip over and over.


--- In flexcoders@yahoogroups.com, Jon Bradley <[EMAIL PROTECTED]> wrote:
>
> 
> On Oct 17, 2008, at 10:17 AM, Kevin Benz wrote:
> 
> > When I restart the application it looks like FZip is first checking
> > the temp folder for the cached zip and if found, it uses that one to
> > unzip, even if the zip was not completed the last time.
> >
> > Does anyone know of a way to prevent that?
> 
> Scratch my last comment btw... duh... when you're not connected you  
> have no idea if it's been completed.
> 
> What you can do is see if FZip will open up the ZIP archive that  
> didn't download completely. You should have an error thrown that it's  
> not valid because, well, the ZIP archive wouldn't be valid if it's  
> not fully downloaded.
> 
> just a thought,
> 
> jb
>




RE: [flexcoders] LCDS 2.6 and Hibernate - Does it work?

2008-10-17 Thread Jeff Vroom
We did change from hibernate 3.1 to 3.2 in LCDS2.6 but otherwise I don't know 
of any compatibility problems introduced.   We did that primarily so we could 
support the hibernate JPA annotations and there might have been a tweak or two 
to the hibernate assembler to get it to work in that environment.

A good first step to diagnosing your problems would be to turn on the debug 
logging (in services-config.xml, set level="Debug" and makes sure Service.*, 
Configuration and Message.* are in the patterns below).From those logs we 
can probably get a clue as to what is going on.  If they are large, feel free 
to send them to me offlist: [EMAIL PROTECTED].

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of headjoog
Sent: Friday, October 17, 2008 5:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS 2.6 and Hibernate - Does it work?


Hi -

I tried upgrading from LCDS 2.5 to LCDS 2.6. I have a project using
Hibernate 3.1 and it was working fine in LCDS 2.5. But after
upgrading LCDS 2.6 things have broken and I'm having a bear of a time
figuring out what has gone wrong. I roll it back to 2.5 and it works.

Has anyone else tried this? Or is there anything from Adobe on
Hibernate compatibility with LCDS 2.6?

Thanks,
Joe

<><>

[flexcoders] Re: Listen to transition complete?

2008-10-17 Thread Tim Hoff

Hi Chris,

For the component that has a transition or effect, listen for the
effectEnd event:



-TH

--- In flexcoders@yahoogroups.com, "Christoph Leva" <[EMAIL PROTECTED]>
wrote:
>
> Hi all,
>
> is it possible to add an eventListener, that listens for the end of a
> transition between two states? Couldn't find anything.
>
> Don't want to listen to a stateChange Event and don't want to use a
timer,
> that sends an TimerEvent.TIMER_COMPLETE after the duration of the
> transition.
>
> Thanks, Chris
>




[flexcoders] Re: FZip loads cached zip before downloading online

2008-10-17 Thread diigiibot
Yes, that could be a solution. I'll try it out. 
Only I'm not sure the partially downloaded zip will be removed from
the temp folder when I remove the FZip object.

--- In flexcoders@yahoogroups.com, "Kevin Benz" <[EMAIL PROTECTED]> wrote:
>
> Not sure exactly what is happening but  I suggest an improvement to your
> approach.
> 
>  
> 
> You should detect the change in network connection status and use that
> event to flush any objects that are waiting on an event to fire. AIR
> fires a NETWORK_CHANGED event and I would make sure you clean up your
> objects at that point.  You cannot depend on the quality of the bits you
> just downloaded regardless and need to re-enter the  process.
> 
>  
> 
> KFB 
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of diigiibot
> Sent: Friday, October 17, 2008 3:31 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] FZip loads cached zip before downloading online
> 
>  
> 
> I'm using FZip in an AIR application, the application loads the zip
> from a location on our server, unpacks the zip and move the files to
> their local folder. Everything runs smooth until I cut off my internet
> connection while the zip is downloading.
> When I restart the application it looks like FZip is first checking
> the temp folder for the cached zip and if found, it uses that one to
> unzip, even if the zip was not completed the last time.
> 
> Does anyone know of a way to prevent that?
> 
> I use the default load method of the FZip library, this is a part of
> the code I use.
> 
> var moduleLink:String = [EMAIL PROTECTED];
> 
> var zip:FZip = new FZip();
> 
> zip.addEventListener(Event.COMPLETE, onComplete);
> 
> zip.load(new URLRequest(moduleLink));
> 
> private function onComplete(evt:Event):void 
> {
> var moduleDir:File =
> File.applicationStorageDirectory.resolvePath("modules");
> 
> var outStream:FileStream;
> 
> for(var i:int; i {
> var zipFile:FZipFile = evt.target.getFileAt(i);
> 
> if(zipFile.sizeUncompressed == 0 &&
> zipFile.filename.toString().substr(-1) == "/")
> {
> var rootDir:File =
> File.applicationStorageDirectory.resolvePath("modules/"+zipFile.filename
> .toString());
> }
> else
> {
> var tempFile:File = moduleDir.resolvePath(zipFile.filename);
> 
> outStream = new FileStream();
> 
> outStream.open(tempFile, FileMode.WRITE);
> 
> outStream.writeBytes(zipFile.content, 0, zipFile.sizeUncompressed);
> 
> outStream.close();
> }
> }
> evt.target.close();
> }
> 
> Thanks in advance
>




[flexcoders] Re: Need help for mx:MenuBar?

2008-10-17 Thread valdhor
I don't understand what you want. Do you want the menu to drop down
when you mouseover it or when you click it?

Have you checked out the example at:

http://livedocs.adobe.com/flex/3/html/help.html?content=menucontrols_6.html


--- In flexcoders@yahoogroups.com, "markflex2007" <[EMAIL PROTECTED]>
wrote:
>
> I see a demo at
> 
> http://www.customware.net/repository/display/FLEX/Flex+Menu+Example 
> 
> The mouse over works after first click a menu.
> 
> How this works?
>




[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

Another alternative, if you have to use a Canvas and don't want to
subclass, is to use constraints (top, bottom, left, right) on the
children.

-TH

--- In flexcoders@yahoogroups.com, "markflex2007" <[EMAIL PROTECTED]>
wrote:
>
> Hi,Mike
>
> Please let me know this in detail.
>
> I can extends Canvas and create a new class (like samrtcavas).
>
> I confuse how to use the class in mxml and how to set left/right
paddings
>
> Thanks for your help
>
> Mark
>
>
>
> --- In flexcoders@yahoogroups.com, "Michael Schmalle"
> teoti.graphix@ wrote:
> >
> > A hack that can be done if you really want Canvas is;
> > Create a subclass of Canvas and override the usePadding property.
> >
> > override mx_internal get usePadding():Boolean
> > {
> > return true;
> > }
> >
> > This will turn the padding back on when the
> > layout calculates viewMetricsAndPadding.
> >
> > Mike
> >
>





[flexcoders] Alex Blog: Datagrid Column Header and ComboBox

2008-10-17 Thread ilikeflex
Hi Alex

I looked through your blog. I implemented below functionality
http://blogs.adobe.com/aharui/ComboBoxHeader/dg.swf.

Now if i want to show that as soon as the datagrid loads, combobox
shows "Below 40" and data is also sorted. I want to change the item in
combo box. How to do that?

Any pointer is highly appreciated.

Thanks
ilikeflex



[flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread sailorsea21
Hi Tracy, 

I don't think I'm successfully storing the reference of the children 
into the array. 

This is what I had tried:

private var moduleloader:ModuleLoader;
private var button:Button;
private var _aChildren:Array;

private function click(evt:MouseEvent):void {
tiletest.removeChild(_aChildren["one"]);
tiletest.removeChild(button);
}   

public function AddModule():void {
moduleloader = new ModuleLoader();
moduleloader.url = "test.swf";
button = new Button();
button.label = "unload";
button.addEventListener(MouseEvent.CLICK, click);
tiletest.addChild(button);
_aChildren = new Array();
_aChildren["one"] = tiletest.addChild(moduleloader);
}   

But I keep getting the "ArgumentError: Error #2025: The supplied 
DisplayObject must be a child of the caller." error.

Thanks again.

-David

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Well, you did not do what I suggested.
> 
>  
> 
> What do you think is in "moduleloader" when you click the remove 
button?
> The last thing you put in it.
> 
>  
> 
> Re-read my response.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of sailorsea21
> Sent: Thursday, October 16, 2008 4:38 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
> 
>  
> 
> Hi Tracy, thank you for your quick response.
> I'm a little stuck on this one... I can't get it to work...
> 
> I'm now able to load a module and unload it. But if I load several 
> modules, I'm only able to unload the latest one. 
> 
> When I try unloading the other loaded modules I receive the follow 
> error:
> 
> ArgumentError: Error #2025: The supplied DisplayObject must be a 
> child of the caller.
> at flash.display::DisplayObjectContainer/removeChild()
> at 
> 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
>  
> veChild()[E:\dev\3.1.0
> \frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
> at mx.core::Container/removeChild()[E:\dev\3.1.0
> \frameworks\projects\framework\src\mx\core\Container.as:2267]
> at content_module_template_blank/click()
> [C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004
> \src\content_module_template_blank.mxml:29]
> 
> This is my code: 
> 
> import mx.states.RemoveChild;
> import mx.modules.ModuleLoader;
> import mx.controls.Button; 
> 
> private var moduleloader:ModuleLoader;
> private var button:Button;
> 
> public function loadmodule():void {
> moduleloader = new ModuleLoader();
> tiletest.addChild(moduleloader);
> moduleloader.url = "test.swf";
> button = new Button();
> button.label = "unload";
> button.addEventListener(MouseEvent.CLICK, click);
> tiletest.addChild(button);
> } 
> 
> private function click(evt:MouseEvent):void {
> tiletest.removeChild(moduleloader);
> tiletest.removeChild(button);
> } 
> 
>  
> 
> 
> Thank you very much.
> 
> -David.
>




[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread markflex2007
Hi,Mike

Please let me know this in detail.

I can extends Canvas and create a new class (like samrtcavas).

I confuse how to use the class in mxml and how to set left/right paddings

Thanks for your help

Mark



--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> A hack that can be done if you really want Canvas is;
> Create a subclass of Canvas and override the usePadding property.
> 
> override mx_internal get usePadding():Boolean
> {
> return true;
> }
> 
> This will turn the padding back on when the
> layout calculates viewMetricsAndPadding.
> 
> Mike
> 
 



[flexcoders] How to setup LCDS woth Jboss Application server?

2008-10-17 Thread markflex2007
Hi,

Please give me a detail about this or useful links.

I search with google and I have not get a useful result yet.

Thanks a lot


Mark



Re: [flexcoders] Module Interfaces Inheritance question

2008-10-17 Thread Purushottam Yeluripati
Ralf,
   I tried to include all the common classes into a library which is linked 
into the main application, but that did not resolve it. I tried the option of 
loading all the modules into the main application's ApplicationDomain. No luck 
still. But now the module is not able to get a handle to the parentApplication 
instance. It throws a null reference or property access error in the getter for 
the parent Application.


Purush




- Original Message 
From: Ralf Bokelberg <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 10:30:35 AM
Subject: Re: [flexcoders] Module Interfaces Inheritance question


It has to do with the ApplicationDomain. Unless otherwise specified, a
module lives in its own ApplicationDomain. This way it can have its
own copies of every class. If you load the modules into the same
ApplicationDomain as the main application, the warning should be gone
as well. Its just, in this case the classes are still included in all
of the modules.

Ralf.

On Fri, Oct 17, 2008 at 2:23 PM, Purushottam Yeluripati
<[EMAIL PROTECTED] com> wrote:
> Thank you for your response, Ralf. I am going to try that option as well.
> But I am still not clear on why the current setup does not work. I have
> ensured (through explicit package import and variable declaration in MyApp)
> that IAppModule, IModule1 and IModule2 are all referenced within the main
> application.
>
> I have been trying a host of other things such as trying to load all the
> modules into the same domain as the application, but no luck there either :(
>
> - Original Message 
> From: Ralf Bokelberg 
> To: [EMAIL PROTECTED] ups.com
> Sent: Friday, October 17, 2008 2:36:19 AM
> Subject: Re: [flexcoders] Module Interfaces Inheritance question
>
> Hi Purush
>
> I think iAppModule needs to go into a library project, which is
> referenced by the modules but marked as external, while it is embedded
> completely in the main application.
>
> Ralf.
>
> On Fri, Oct 17, 2008 at 2:51 AM, purush_y <[EMAIL PROTECTED] com> wrote:
>> Hi,
>> I did a basic search on this topic and read a few posts, but I
>> think my case seems to be a little different here. I have a fairly
>> large application that I am designing to be broken into one main
>> application that loads multiple modules as required.
>>
>> My main application implements an IMyApp interface with one method
>> right now:
>> getModule(modName: String):*
>>
>> All my modules implement a generic IAppModule interface which includes
>> 2 methods:
>> -initModule( ) Called after loading and creation of module
>> -handleEvent( evt:Event) : Called whenever an event such as MenuEvent
>> etc need to be passed to the module.
>>
>> Each of the modules implement a specific interface, for eg. Module1
>> implements IModule1 which extends IAppModule, and Module2 implements
>> IModule2 which also extends IAppModule to expose specific
>> functionality within each of the module.
>>
>> So I have the following package structure and classes with their
>> interfaces:
>> 1) class a.MyApp implements a.mod.common. IMyApp (My main app)
>> 2) interface a.mod.common. IModule1 extends interface
>> a.mod.common. IAppModule
>> 3) interface a.mod.common. IModule2 extends interface
>> a.mod.common. IAppModule
>> 4) class a.mod.mod1.Module1 implements
>> a.mod.common. IModule1 (Module 1 compiles to Module1.swf)
>> 5) class a.mod.mod2.Module 2 implements
>> a.mod.common. IModule2 (Module 2 compiles to Module2.swf)
>>
>> My main application handles the logic of loading all the modules at
>> starting and as required as runtime and any module requiring access to
>> another module asks the main application (through the IMyApp
>> interface) for a handle to the other module.
>>
>> Here is my problem. I am trying to access IModule2 from within
>> Module1. I use IMyApp.getModule( "Module2" ) to get a handle to the
>> second module, but when I try to downcast it to IModule2, it throws me
>> an error saying it encountered error with the type coercion. In the
>> error detail it says that it cannot convert
>> a.mod.mod2.Module2 to a.mod.common. IModule2 which
>> stumps me as the class implements that specific interface.
>>
>> If I include all methods from IModule1 and IModule2 into the base
>> interface IAppModule, remove IModule2 entirely and try to cast the
>> IMyApp.getModule( "Module2" ) to IAppModule, it works fine, but this is
>> not what I was looking for. I will end up with one monolithic
>> IAppModule with every method from every module interface. I am not
>> sure what I am missing here. Is there a problem with interface
>> inheritance and modules? When I run a link report for the modules, I
>> am not sure if I am reading the report right, but I do not see
>> IModule2 interface as part of the definitions within script Module2.
>>
>> Can someone please point me in the right direction for this problem?
>>
>> Thank you for your help,
>> Purush
>
> 


RE: [flexcoders] Re: Flex uploader / accessing local files?

2008-10-17 Thread Kevin Benz
This actually isn't very tough at all. You need to get the File object,
load its  BitmapData and use the Matrix object to size it and then
either PNGEncode or JPGEncode back out.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Friday, October 17, 2008 6:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex uploader / accessing local files?

 

It looks like you'll have to wait for Flash Player 10. See this thread:

http://tech.groups.yahoo.com/group/flexcoders/message/126563

--- In flexcoders@yahoogroups.com 
, "Rob Kunkle" <[EMAIL PROTECTED]> wrote:
>
> Hi -
> 
> I've made a flex uploading application that gets a file from the
> client's file system using FileReference() and uploads it to a server.

> 
> I'd like to be able to resize the image before it is sent to the
> server, but apparently flex doesn't have access to the actual bits
> that make up the image file, only a reference to the file.
> 
> Surely there must be a way to manipulate that image data from the
> client's file before it gets to the server? 
> 
> Has anyone done anything like this? I've looked all around but haven't
> had much luck.
> 
> Thanks in advance,
> Rob
>

 

<><>

[flexcoders] Re: [LCDS] Using "where in" in the SQL assembler

2008-10-17 Thread kwbillchan
Hi Benjamin,

I also tried 
select * from 
employee where lastname in (123)
directly on database console. I got an empty result instead of sql 
error

William

--- In flexcoders@yahoogroups.com, "kwbillchan" <[EMAIL PROTECTED]> wrote:
>
> Hi Benjamin, 
> 
> I tried the in clause statement without any problem. Here are what 
I 
> did
> 
> getSomeEmployees
> 
>   select id as "id", firstname as "firstname", 
> lastname as "lastname", phonenumber as "phonenumber" 
>   from employee 
>   where id in (#ids#)
>   and
>   phonenumber like concat(#areacode#,'%')
>   
> 
> 
> getSomeEmployeesWithSameLastName
> 
>   select id as "id", firstname as "firstname", 
> lastname as "lastname", phonenumber as "phonenumber"
>   from employee
>   where lastname in (#lastNames#)
>   
> 
> 
> fill using number array:
> var ids: Array = [1,3,5,7,9];
> var token: AsyncToken = ds.fill
> (people, "getSomeEmployees", {ids:ids,areacode:"617"});
> fill using String array:
> var lastnames: Array = ["Cattel"];
> var token: AsyncToken = ds.fill
> (people, "getSomeEmployeesWithSameLastName", 
{lastNames:lastnames});
> 
> 
> 
> 
> William
> 
> --- In flexcoders@yahoogroups.com, "benjidudu"  
> wrote:
> >
> > I am unsuccesfully trying using a
> > "SELECT index_id, vpn_id  FROM circuit WHERE index_id in 
> ('123', '234')"
> > sql statement with LCDS' SQL assembler.
> > 
> > In my data-management-config.xml, I configured the sql as
> > "SELECT index_id, vpn_id  FROM circuit WHERE index_id in 
(#list#)".
> > And in Flex, I tried sending 'list' as an Array, a String (with 
and
> > without quotes) but without success. It always return an empty 
set 
> but
> > does not return a fault.
> > 
> > Does anybody know how I should code this?
> > 
> > Thanks,
> > Benjamin.
> >
>




Re: [flexcoders] Re: Rippling through state changes

2008-10-17 Thread Paul Andrews
- Original Message - 
From: "Amy" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 17, 2008 3:38 PM
Subject: [flexcoders] Re: Rippling through state changes


> --- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>>
>> I have some custom components (nothing special) that are displaying
> product
>> information. essentially I can use the same component for seprate
> purposes:
>>
>> Product info (each product can be added to the shopping cart),
> shopping cart
>> (each product can be removed from the cart). Within the main
> component, I
>> have TileLists or datagrdids with item renderers. When the custom
> component
>> flips between states, I need the individual items contained therein
> to
>> switch state too.
>>
>> I'm trying to think of the most elegant way to do this. Any thoughs
> 9apart
>> from the fact I'll go Doh! real soon now).
>>
>> I've tended to avoid states, but seem to be embracing them big time
> now..
>
> I'd look at the Button code and see how it uses stateful skins.  And
> I've found that using styles for this kind of thing works pretty
> well.  You can either extend TileList to pass through the appropriate
> style into the component or you can look at my TileList_withStyle
> component, available at http://flexdiary.blogspot.com.  Or you can
> just change the style declaration for your custom component on the
> fly to change the applicable style/state at runtime.

Thanks Amy.

> HTH;
>
> Amy
>
>
> 
>
> --
> 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] Listen to transition complete?

2008-10-17 Thread Christoph Leva
Hi all,

is it possible to add an eventListener, that listens for the end of a
transition between two states? Couldn't find anything.

Don't want to listen to a stateChange Event and don't want to use a timer,
that sends an TimerEvent.TIMER_COMPLETE after the duration of the
transition.

Thanks, Chris



Re: [flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread Jon Bradley


On Oct 17, 2008, at 10:17 AM, Kevin Benz wrote:


When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?


Scratch my last comment btw... duh... when you're not connected you  
have no idea if it's been completed.


What you can do is see if FZip will open up the ZIP archive that  
didn't download completely. You should have an error thrown that it's  
not valid because, well, the ZIP archive wouldn't be valid if it's  
not fully downloaded.


just a thought,

jb

Re: [flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread Jon Bradley


On Oct 17, 2008, at 10:17 AM, Kevin Benz wrote:


When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?


Compare file sizes.

cheers,

jon



Re: [flexcoders] how to add internal padding in canvas?

2008-10-17 Thread Michael Schmalle
A hack that can be done if you really want Canvas is;
Create a subclass of Canvas and override the usePadding property.

override mx_internal get usePadding():Boolean
{
return true;
}

This will turn the padding back on when the
layout calculates viewMetricsAndPadding.

Mike

On Fri, Oct 17, 2008 at 10:17 AM, claudiu ursica <[EMAIL PROTECTED]>wrote:

>   The panel component supports padding, wil that suit you?
>
> HTH,
> Claudiu
>
> - Original Message 
> From: markflex2007 <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Friday, October 17, 2008 5:07:27 PM
> Subject: [flexcoders] how to add internal padding in canvas?
>
>  I want to add right padding and left padding inside canvas so the
> controls in side do not touch the side of canvas, but canvas do not
> have padding attribute, how to do this.
>
> Thanks
>
> MK
>
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


Re: [flexcoders] Re: Extending UIComponent memory issues.

2008-10-17 Thread Michael Schmalle
Jason,
What I suggested is probably a bit to complex for what you need. It's kind
of a reimplementation of what you are doing.

1. Subclass UIComponent to make your container.
2. Create the layout algorithm in that component.
3. Create a subclass of FlexSprite that is your loader component.
4. Add the FlexSprite subclass instances (your content) to your UIComponent
container class with custom layout.
5. Add the UIComponent class to a Container.

The above is not really a solution for you right now I'm sure, I was just
saying this is what I would do to get maximum performance and memory
management.

The reason I say this is I have no idea how you are laying out those
instances with reflection etc. How are you laying them out (with what layout
algorithm) ?

Mike


On Fri, Oct 17, 2008 at 10:21 AM, flexaustin <[EMAIL PROTECTED]> wrote:

>   Michael, I have tried using Flexsprite but throws errors about needing
> to implementing IUIcomponent. Did I miss something and give up to early?
>
> --- In flexcoders@yahoogroups.com , "Michael
> Schmalle"
>
> <[EMAIL PROTECTED]> wrote:
> >
> > Doug, Jason,
> > Since I am a self-centered person that doesn't like to be misunderstood,
> > ;-), I could have brought up the 4000 object issue. In previous
> threads with
> > Jason, he said this was a requirement from the higher order. So I
> left it
> > where it was, 4000 objects.
> >
> > As far as the IUIComponent issue, it is Container that requires them not
> > 'Flex' itself.
> >
> > This is where as flex projects, Web 2.0 and performance are reaching
> a point
> > where it's not just making a Flash IDE animation anymore.
> >
> > When the requirements of these projects come to this level there is more
> > engineering involved and Flex out of the box is not going to handle
> > situations like this.
> >
> > The absolute way to do this is creating a UIComponent subclass that
> is the
> > container, creating your layout algorithm in this component. Subclass
> > FlexSprite, make that your content loader component.
> >
> > Then instantiate the content components in the UIComponent
> container. This
> > is the lean version of your design I envision. You could even
> recycle the
> > content renderers in your container component Lot's of things
> you could
> > do ;-)
> >
> > Mike
> >
> >
> > On Wed, Oct 15, 2008 at 10:47 PM, flexaustin <[EMAIL PROTECTED]> wrote:
> >
> > > Doug, what would you go with? Sprite?
> > >
> > > I thought sprite, but you need to implement all the IUIComponent stuff
> > > or use composition correct? Wouldn't composition reduce the benefits
> > > gained by using Sprite?
> > >
> > > Doug, if you message me and I can tell you where to see the component.
> > >
> > > jason (underscore) newport {at) hot mail
> > >
> > > --- In flexcoders@yahoogroups.com 
> > >  40yahoogroups.com>,
>
> "Doug
> > > McCune"  wrote:
> > > >
> > > > You've got 4,000 things all moving around at once? Are all 4,000 of
> > > those
> > > > actually visible? 4,000 UI components seems like a lot for any
> layout
> > > > manager to have to deal with. I'd try to focus on figuring out how
> > > to reduce
> > > > the number of UIComponents before I worried about how much memory
> > > each one
> > > > is taking up. I may be totally off base, but I can't imagine a
> scenario
> > > > where you want 4,000 images all on the screen at the same time.
> > > >
> > > > And if you do really need to load 4,000 swfs all at the same time
> > > then you
> > > > probably want something that's lighter than custom UIComponent
> classes,
> > > > which would keep those 4,000 objects out of the normal
> > > > invalidation/validation cycles of the display list.
> > > >
> > > > Doug
> > > >
> > > > On Wed, Oct 15, 2008 at 1:34 PM, Michael Schmalle
> > > > wrote:
> > > >
> > > > > A side note,
> > > > > You are doing some very expensive leg work in the 'content'
> setter.
> > > > >
> > > > > You need to break that out into commitProperties() and
> > > updateDisplayList().
> > > > >
> > > > > You would get a huge performance increase for sure.
> > > > >
> > > > > As far as the memory, doesn't look to weird, event listeners
> > > without weak
> > > > > references can make thing hang around as well.
> > > > >
> > > > > Mike
> > > > >
> > > > >
> > > > > On Wed, Oct 15, 2008 at 3:08 PM, flexaustin  wrote:
> > > > >
> > > > >> So I have this base component, that when running profiler,
> says its
> > > > >> eating up tons of memory. I have about 4000 of these at one
> time in
> > > > >> my Flex app (see component code below). This base component is
> > > > >> extended by two other components, which are then extended by
> two more
> > > > >> components each so 3 or 4 levels above this base component.
> > > > >>
> > > > >> 1. My first question is does the profiler just point to the base
> > > class
> > > > >> or are there actually 4000 of these being created outside of
> their
> > > > >> extended children?
> > > > >>
> > > > >> 2. My 2nd question is is their anything wrong w

Re: [flexcoders] Re: AMFPHP tutorial

2008-10-17 Thread Vivian Richard
Wow Jonnie, simply outstanding!

I can see that you have now a Flex version of WP.
Really cool!! You rock

Your tutorials are also very helpful.

Regards,

Viv.




On Fri, Oct 17, 2008 at 3:10 AM, Jonnie Spratley <[EMAIL PROTECTED]> wrote:
> Here are some tutorials that I created, see if they are what you were
> looking for.
>
> -Jonnie Spratley
>
> Links:
>
> http://jonniespratley.com/2008/10/15/adobe-flex-amfphp-video-tutorial-part-1/
> http://jonniespratley.com/mini-cookbook/
> http://jonniespratley.com/2008/09/21/adobe-flexair-creating-a-serviceproxy-for-amfphp/
>
> If you want to see how to use amfphp with a pretty big project, look at this
>
> http://flexpress.jonniespratley.com/fp-admin/Flexpress.html
>
> Right click for source.
>
> 


Re: [flexcoders] custom event not working in popup

2008-10-17 Thread shaun
Hey,

hoz wrote:
> Hey Shaun,
> 
> Thanks for the reply, and YES, it finally worked. It's always those little
> typos that gotcha's!! The $'s were just taken from code relating to PHP
> format; obviously, not needed.
> 

Right, i see.  :)

> I did find it interesting that I could also do this and skip the metadata
> tag in the popup:

Yep. You use that metadata tag when you want to expose the event to a 
container component via mxml
(Eg.)

If you look at the source of mx:Button you'll see the metadata for the 
click event.

I wasn't sure if you knew that so i didn't comment on it.

So you would use the metadata tag if you wanted to do the following.




  private function handleFormSubmitted(e:CustomEvent):void {...}






MyComponent would have the metadata tag declaring the name and the type 
of the event it dispatches and then it appears in FlexBuilder as a hint.

This is pretty much the same as writing the following:
mc.addEventListener("formSubmitted", handleForSubmitted);

HTH.

cheers,
  - shaun


[flexcoders] Re: Rippling through state changes

2008-10-17 Thread Amy
--- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> I have some custom components (nothing special) that are displaying 
product 
> information. essentially I can use the same component for seprate 
purposes:
> 
> Product info (each product can be added to the shopping cart), 
shopping cart 
> (each product can be removed from the cart). Within the main 
component, I 
> have TileLists or datagrdids with item renderers. When the custom 
component 
> flips between states, I need the individual items contained therein 
to 
> switch state too.
> 
> I'm trying to think of the most elegant way to do this. Any thoughs 
9apart 
> from the fact I'll go Doh! real soon now).
> 
> I've tended to avoid states, but seem to be embracing them big time 
now..

I'd look at the Button code and see how it uses stateful skins.  And 
I've found that using styles for this kind of thing works pretty 
well.  You can either extend TileList to pass through the appropriate 
style into the component or you can look at my TileList_withStyle 
component, available at http://flexdiary.blogspot.com.  Or you can 
just change the style declaration for your custom component on the 
fly to change the applicable style/state at runtime.

HTH;

Amy



[flexcoders] Re: [LCDS] Using "where in" in the SQL assembler

2008-10-17 Thread kwbillchan
Hi Benjamin, 

I tried the in clause statement without any problem. Here are what I 
did

getSomeEmployees

select id as "id", firstname as "firstname", 
lastname as "lastname", phonenumber as "phonenumber" 
from employee 
where id in (#ids#)
and
phonenumber like concat(#areacode#,'%')



getSomeEmployeesWithSameLastName

select id as "id", firstname as "firstname", 
lastname as "lastname", phonenumber as "phonenumber"
from employee
where lastname in (#lastNames#)



fill using number array:
var ids: Array = [1,3,5,7,9];
var token: AsyncToken = ds.fill
(people, "getSomeEmployees", {ids:ids,areacode:"617"});
fill using String array:
var lastnames: Array = ["Cattel"];
var token: AsyncToken = ds.fill
(people, "getSomeEmployeesWithSameLastName", {lastNames:lastnames});




William

--- In flexcoders@yahoogroups.com, "benjidudu" <[EMAIL PROTECTED]> 
wrote:
>
> I am unsuccesfully trying using a
> "SELECT index_id, vpn_id  FROM circuit WHERE index_id in 
('123', '234')"
> sql statement with LCDS' SQL assembler.
> 
> In my data-management-config.xml, I configured the sql as
> "SELECT index_id, vpn_id  FROM circuit WHERE index_id in (#list#)".
> And in Flex, I tried sending 'list' as an Array, a String (with and
> without quotes) but without success. It always return an empty set 
but
> does not return a fault.
> 
> Does anybody know how I should code this?
> 
> Thanks,
> Benjamin.
>




Re: [flexcoders] Module Interfaces Inheritance question

2008-10-17 Thread Ralf Bokelberg
It has to do with the ApplicationDomain. Unless otherwise specified, a
module lives in its own ApplicationDomain. This way it can have its
own copies of every class. If you load the modules into the same
ApplicationDomain as the main application, the warning should be gone
as well. Its just, in this case the classes are still included in all
of the modules.

Ralf.

On Fri, Oct 17, 2008 at 2:23 PM, Purushottam Yeluripati
<[EMAIL PROTECTED]> wrote:
> Thank you for your response, Ralf. I am going to try that option as well.
> But I am still not clear on why the current setup does not work. I have
> ensured (through explicit package import and variable declaration in MyApp)
> that IAppModule, IModule1 and IModule2 are all referenced within the main
> application.
>
> I have been trying a host of other things such as trying to load all the
> modules into the same domain as the application, but no luck there either :(
>
> - Original Message 
> From: Ralf Bokelberg <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Friday, October 17, 2008 2:36:19 AM
> Subject: Re: [flexcoders] Module Interfaces Inheritance question
>
> Hi Purush
>
> I think iAppModule needs to go into a library project, which is
> referenced by the modules but marked as external, while it is embedded
> completely in the main application.
>
> Ralf.
>
> On Fri, Oct 17, 2008 at 2:51 AM, purush_y <[EMAIL PROTECTED] com> wrote:
>> Hi,
>> I did a basic search on this topic and read a few posts, but I
>> think my case seems to be a little different here. I have a fairly
>> large application that I am designing to be broken into one main
>> application that loads multiple modules as required.
>>
>> My main application implements an IMyApp interface with one method
>> right now:
>> getModule(modName: String):*
>>
>> All my modules implement a generic IAppModule interface which includes
>> 2 methods:
>> -initModule( ) Called after loading and creation of module
>> -handleEvent( evt:Event) : Called whenever an event such as MenuEvent
>> etc need to be passed to the module.
>>
>> Each of the modules implement a specific interface, for eg. Module1
>> implements IModule1 which extends IAppModule, and Module2 implements
>> IModule2 which also extends IAppModule to expose specific
>> functionality within each of the module.
>>
>> So I have the following package structure and classes with their
>> interfaces:
>> 1) class a.MyApp implements a.mod.common. IMyApp (My main app)
>> 2) interface a.mod.common. IModule1 extends interface
>> a.mod.common. IAppModule
>> 3) interface a.mod.common. IModule2 extends interface
>> a.mod.common. IAppModule
>> 4) class a.mod.mod1.Module1 implements
>> a.mod.common. IModule1 (Module 1 compiles to Module1.swf)
>> 5) class a.mod.mod2.Module 2 implements
>> a.mod.common. IModule2 (Module 2 compiles to Module2.swf)
>>
>> My main application handles the logic of loading all the modules at
>> starting and as required as runtime and any module requiring access to
>> another module asks the main application (through the IMyApp
>> interface) for a handle to the other module.
>>
>> Here is my problem. I am trying to access IModule2 from within
>> Module1. I use IMyApp.getModule( "Module2" ) to get a handle to the
>> second module, but when I try to downcast it to IModule2, it throws me
>> an error saying it encountered error with the type coercion. In the
>> error detail it says that it cannot convert
>> a.mod.mod2.Module2 to a.mod.common. IModule2 which
>> stumps me as the class implements that specific interface.
>>
>> If I include all methods from IModule1 and IModule2 into the base
>> interface IAppModule, remove IModule2 entirely and try to cast the
>> IMyApp.getModule( "Module2" ) to IAppModule, it works fine, but this is
>> not what I was looking for. I will end up with one monolithic
>> IAppModule with every method from every module interface. I am not
>> sure what I am missing here. Is there a problem with interface
>> inheritance and modules? When I run a link report for the modules, I
>> am not sure if I am reading the report right, but I do not see
>> IModule2 interface as part of the definitions within script Module2.
>>
>> Can someone please point me in the right direction for this problem?
>>
>> Thank you for your help,
>> Purush
>
> 


Re: [flexcoders] custom event not working in popup

2008-10-17 Thread hoz

Hey Shaun,

Thanks for the reply, and YES, it finally worked. It's always those little
typos that gotcha's!! The $'s were just taken from code relating to PHP
format; obviously, not needed.

I did find it interesting that I could also do this and skip the metadata
tag in the popup:

application.systemManager.addEventListener(CustomEvent.ON_TEST_CASE,handleUpdateFormSubmitted);

not sure if that's bad practice, but we have finally solved the popup window
to main scenario!!


shaun etherton wrote:
> 
> Mark Hosny wrote:
>> Hey guys,
>> 
>> I now know that my custom event is not working properly in my popup 
>> window when listening for the event in the main app. When I do this, it 
>> works:
> 
> [snip]
> 
>> 
>> public static const ON_TEST_CASE:String = "formSubmitted";
>> public function CustomEvent($type:String, $params:Object, 
>> $bubbles:Boolean = true, $cancelable:Boolean = true)
>> {
>> super($type, true, $cancelable);
>> 
>> this.params = $params;
>> }
> 
> [snip]
> 
> 
> You are dispatching an even with a "type" String value of
> "formSubmitted" and listening/registering for "formUpdate".
> Change the event constant to "formUpdate" and it will work again..
> 
> 
> [Event(name="formUpdate",type="com.event.CustomEvent")]
> 
> 
> MAIN APP
> application.systemManager.addEventListener("formUpdate",handleUpdateFormSubmitted);
> 
> 
> // event constants
> public static const ON_TEST_CASE:String = "formSubmitted";
> 
> new CustomEvent(CustomEvent.ON_TEST_CASE,
>  {
>  memberID:memberID_txt.text
>  }
>  );
>   this.dispatchEvent(evt);
> 
> 
> By the way, whats with the $ signs in the arg names?
> 
> HTH.
> 
> cheers,
>   - shaun
> 
> 

-- 
View this message in context: 
http://www.nabble.com/custom-event-not-working-in-popup-tp20033915p20034275.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Extending UIComponent memory issues.

2008-10-17 Thread flexaustin
Michael, I have tried using Flexsprite but throws errors about needing
to implementing IUIcomponent. Did I miss something and give up to early?



--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Doug, Jason,
> Since I am a self-centered person that doesn't like to be misunderstood,
> ;-), I could have brought up the 4000 object issue. In previous
threads with
> Jason, he said this was a requirement from the higher order. So I
left it
> where it was, 4000 objects.
> 
> As far as the IUIComponent issue, it is Container that requires them not
> 'Flex' itself.
> 
> This is where as flex projects, Web 2.0 and performance are reaching
a point
> where it's not just making a Flash IDE animation anymore.
> 
> When the requirements of these projects come to this level there is more
> engineering involved and Flex out of the box is not going to handle
> situations like this.
> 
> The absolute way to do this is creating a UIComponent subclass that
is the
> container, creating your layout algorithm in this component. Subclass
> FlexSprite, make that your content loader component.
> 
> Then instantiate the content components in the UIComponent
container. This
> is the lean version of your design I envision. You could even
recycle the
> content renderers in your container component Lot's of things
you could
> do ;-)
> 
> Mike
> 
> 
> On Wed, Oct 15, 2008 at 10:47 PM, flexaustin <[EMAIL PROTECTED]> wrote:
> 
> >   Doug, what would you go with? Sprite?
> >
> > I thought sprite, but you need to implement all the IUIComponent stuff
> > or use composition correct? Wouldn't composition reduce the benefits
> > gained by using Sprite?
> >
> > Doug, if you message me and I can tell you where to see the component.
> >
> > jason (underscore) newport {at) hot mail
> >
> > --- In flexcoders@yahoogroups.com ,
"Doug
> > McCune"  wrote:
> > >
> > > You've got 4,000 things all moving around at once? Are all 4,000 of
> > those
> > > actually visible? 4,000 UI components seems like a lot for any
layout
> > > manager to have to deal with. I'd try to focus on figuring out how
> > to reduce
> > > the number of UIComponents before I worried about how much memory
> > each one
> > > is taking up. I may be totally off base, but I can't imagine a
scenario
> > > where you want 4,000 images all on the screen at the same time.
> > >
> > > And if you do really need to load 4,000 swfs all at the same time
> > then you
> > > probably want something that's lighter than custom UIComponent
classes,
> > > which would keep those 4,000 objects out of the normal
> > > invalidation/validation cycles of the display list.
> > >
> > > Doug
> > >
> > > On Wed, Oct 15, 2008 at 1:34 PM, Michael Schmalle
> > > wrote:
> > >
> > > > A side note,
> > > > You are doing some very expensive leg work in the 'content'
setter.
> > > >
> > > > You need to break that out into commitProperties() and
> > updateDisplayList().
> > > >
> > > > You would get a huge performance increase for sure.
> > > >
> > > > As far as the memory, doesn't look to weird, event listeners
> > without weak
> > > > references can make thing hang around as well.
> > > >
> > > > Mike
> > > >
> > > >
> > > > On Wed, Oct 15, 2008 at 3:08 PM, flexaustin  wrote:
> > > >
> > > >> So I have this base component, that when running profiler,
says its
> > > >> eating up tons of memory. I have about 4000 of these at one
time in
> > > >> my Flex app (see component code below). This base component is
> > > >> extended by two other components, which are then extended by
two more
> > > >> components each so 3 or 4 levels above this base component.
> > > >>
> > > >> 1. My first question is does the profiler just point to the base
> > class
> > > >> or are there actually 4000 of these being created outside of
their
> > > >> extended children?
> > > >>
> > > >> 2. My 2nd question is is their anything wrong with the code
> > below? Why
> > > >> is it eatin memory? The parameter "content" when pulled in is
a swf
> > > >> file (icon) that is 5kb each so 5kb * 4000... you get the math.
> > > >>
> > > >> When I run this progam the CarouselImage's are using up 30%
to 35% of
> > > >> my apps memory usage. And my app is eating up 725,000kb of
mem usage,
> > > >> thus crashing my pretty decent computer.
> > > >>
> > > >> // --- BEGIN CODE --
> > > >> package com.mysite.views.components
> > > >> {
> > > >>
> > > >> import flash.display.DisplayObject;
> > > >> import flash.system.ApplicationDomain;
> > > >>
> > > >> import mx.core.UIComponent;
> > > >> import mx.events.ResizeEvent;
> > > >>
> > > >> public class CarouselImage extends UIComponent
> > > >> {
> > > >> // Content
> > > >> private var _content:DisplayObject;
> > > >> private var _contentWidth:Number;
> > > >> private var _contentHeight:Number;
> > > >>
> > > >> public function CarouselImage(content:*=null)
> > > >> {
> > > >> super();
> > > >>
> > > >> // Set content
> > > >> this.content 

RE: [flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread Kevin Benz
Not sure exactly what is happening but  I suggest an improvement to your
approach.

 

You should detect the change in network connection status and use that
event to flush any objects that are waiting on an event to fire. AIR
fires a NETWORK_CHANGED event and I would make sure you clean up your
objects at that point.  You cannot depend on the quality of the bits you
just downloaded regardless and need to re-enter the  process.

 

KFB 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of diigiibot
Sent: Friday, October 17, 2008 3:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FZip loads cached zip before downloading online

 

I'm using FZip in an AIR application, the application loads the zip
from a location on our server, unpacks the zip and move the files to
their local folder. Everything runs smooth until I cut off my internet
connection while the zip is downloading.
When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?

I use the default load method of the FZip library, this is a part of
the code I use.

var moduleLink:String = [EMAIL PROTECTED];

var zip:FZip = new FZip();

zip.addEventListener(Event.COMPLETE, onComplete);

zip.load(new URLRequest(moduleLink));

private function onComplete(evt:Event):void 
{
var moduleDir:File =
File.applicationStorageDirectory.resolvePath("modules");

var outStream:FileStream;

for(var i:int; i

Re: [flexcoders] how to add internal padding in canvas?

2008-10-17 Thread claudiu ursica
The panel component supports padding, wil that suit you?

HTH,
Claudiu



- Original Message 
From: markflex2007 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 5:07:27 PM
Subject: [flexcoders] how to add internal padding in canvas?


I want to add right padding and left padding inside canvas so the
controls in side do not touch the side of canvas, but canvas do not
have padding attribute, how to do this.

Thanks

MK



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [flexcoders] custom event not working in popup

2008-10-17 Thread shaun
Mark Hosny wrote:
> Hey guys,
> 
> I now know that my custom event is not working properly in my popup 
> window when listening for the event in the main app. When I do this, it 
> works:

[snip]

> 
> public static const ON_TEST_CASE:String = "formSubmitted";
> public function CustomEvent($type:String, $params:Object, 
> $bubbles:Boolean = true, $cancelable:Boolean = true)
> {
> super($type, true, $cancelable);
> 
> this.params = $params;
> }

[snip]


You are dispatching an even with a "type" String value of
"formSubmitted" and listening/registering for "formUpdate".
Change the event constant to "formUpdate" and it will work again..


[Event(name="formUpdate",type="com.event.CustomEvent")]


MAIN APP
application.systemManager.addEventListener("formUpdate",handleUpdateFormSubmitted);


// event constants
public static const ON_TEST_CASE:String = "formSubmitted";

new CustomEvent(CustomEvent.ON_TEST_CASE,
 {
 memberID:memberID_txt.text
 }
 );
  this.dispatchEvent(evt);


By the way, whats with the $ signs in the arg names?

HTH.

cheers,
  - shaun


[flexcoders] Re: mogulus.com => looking for flex/flash talent in NYC

2008-10-17 Thread valdhor
For further reference, Flex job postings should go to the flexjobs
group here on Yahoo...

http://tech.groups.yahoo.com/group/flexjobs/


--- In flexcoders@yahoogroups.com, "philworthy" <[EMAIL PROTECTED]> wrote:
>
> Hi All.
> 
> I hope job postings are allowed in this mailing list. If not, apologies.
> 
> We are looking for a talented Flex/Flash Designer/Developer to join
the team immediately.
> Rather than post here though, anyone interested should check out:
> http://www.mogulus.com/info/jobdesc?id=7
> 
> Thanks
> Phil Worthington
> Chief Product Officer
> Mogulus
>




Re: [flexcoders] custom event not working in popup

2008-10-17 Thread claudiu ursica
Are you sure you are listening for the same event type in main? From what I can 
see your custom event is of type
"formSubmitted" while the main listens for "formUpdate" ...

Claudiu



- Original Message 
From: Mark Hosny <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 4:59:55 PM
Subject: [flexcoders] custom event not working in popup


Hey guys,

I now know that my custom event is not working properly in my popup window when 
listening for the event in the main app. When I do this, it works:

POPUP WINDOW

[Event(name= "formUpdate" ,type="flash. events.Event" )]


dispatchEvent(new Event('formUpdate',true));

MAIN APP
application. systemManager. addEventListener ("formUpdate",handleUpdateFormSu 
bmitted);

private function handleUpdateFormSub mitted(event: Event):void {
Alert.show('SUCCESS');
}

When I use a custom event it doesn't work:

[Event(name= "formUpdate" ,type="com. event.CustomEven t")]


var evt:CustomEvent = new CustomEvent( CustomEvent. ON_TEST_CASE,
{
memberID:memberID_ txt.text
}
);
 this.dispatchEvent( evt);

MAIN APP
application. systemManager. addEventListener ("formUpdate",handleUpdateFormSu 
bmitted);

private function handleUpdateFormSub mitted(event: CustomEvent) :void {
Alert.show('SUCCESS');
}

CUSTOM EVENT
package com.event

{
import flash.events. *
   

public class CustomEvent extends Event
{


//- PUBLIC & INTERNAL VARIABLES  - - - 
- - - -
   

// event constants
public static const ON_TEST_CASE: String = "formSubmitted";
   

public var params:Object;

public function CustomEvent( $type:String, $params:Object, 
$bubbles:Boolean = true, $cancelable: Boolean = true)
{
super($type, true, $cancelable) ;
   

this.params = $params;
}
   


   

public override function clone():Event
{
return new CustomEvent( type, this.params, bubbles, cancelable);
}
   

public override function toString():String
{
returnformatToString("CustomEvent", "params", "type", "bubbles", 
"cancelable");
}
   

//- END CLASS  - - - - - 
- - - -
}

}

Thanks,

Hoz





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[flexcoders] how to add internal padding in canvas?

2008-10-17 Thread markflex2007
I want to add right padding and left padding inside canvas so the
controls in side do not touch the side of canvas, but canvas do not
have padding attribute, how to do this.

Thanks

MK



[flexcoders] custom event not working in popup

2008-10-17 Thread Mark Hosny

Hey guys,

I now know that my custom event is not working properly in my popup  
window when listening for the event in the main app. When I do this,  
it works:


POPUP WINDOW

[Event(name="formUpdate",type="flash.events.Event")]


dispatchEvent(new Event('formUpdate',true));

MAIN APP
application 
.systemManager.addEventListener("formUpdate",handleUpdateFormSubmitted);


private function handleUpdateFormSubmitted(event:Event):void {
Alert.show('SUCCESS');  
}

When I use a custom event it doesn't work:

[Event(name="formUpdate",type="com.event.CustomEvent")]


var evt:CustomEvent = new CustomEvent(CustomEvent.ON_TEST_CASE,
{
memberID:memberID_txt.text
}
);
this.dispatchEvent(evt);

MAIN APP
application 
.systemManager.addEventListener("formUpdate",handleUpdateFormSubmitted);


private function handleUpdateFormSubmitted(event:CustomEvent):void {
Alert.show('SUCCESS');  
}

CUSTOM EVENT
package com.event

{
import flash.events.*

public class CustomEvent extends Event
{

//- PUBLIC & INTERNAL VARIABLES  
---


// event constants
public static const ON_TEST_CASE:String = "formSubmitted";

public var params:Object;

public function CustomEvent($type:String, $params:Object,  
$bubbles:Boolean = true, $cancelable:Boolean = true)

{
super($type, true, $cancelable);

this.params = $params;
}



public override function clone():Event
{
return new CustomEvent(type, this.params, bubbles,  
cancelable);

}

public override function toString():String
{
return formatToString("CustomEvent", "params", "type",  
"bubbles", "cancelable");

}

//- END CLASS  
-

}

}

Thanks,

Hoz






Re: [flexcoders] genie effect, i need help

2008-10-17 Thread Carlo Gulliani
really i don't remember who's wrote this code, i have downloaded it earlier. I 
have uploaded mini-project 
https://download.yousendit.com/TTdIS3hkQ1I3N0N4dnc9PQ if 
"" it's below, then it work, if above then it doesn't 
work


- Original Message 
From: Tom Chiverton <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 5:18:13 PM
Subject: Re: [flexcoders] genie effect, i need help

On Friday 17 Oct 2008, Carlo Gulliani wrote:
> hi all, does somebody knows how to make 'genie effect' like on macosx? i've
> found example for flex, but i can't understand how it work((( and i've
> found bug, it work only if my workspace is  preview panel. maybe somebody
> could tell me how to think and how to make it. thanks in advance

Well, for starters:
Who's code are you using ? Show us your working code example, and also your 
non working code example ?

-- 
Tom Chiverton
Helping to conveniently cluster viral end-to-end visionary data





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. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [flexcoders] Re: Reusing HTTPService

2008-10-17 Thread shaun

How about something like this:

(note: I've not tried it, just slapped it straight into the email)

public class MyClassThatInvokesHTTPServices {

//inner helper class.
class MyIResponder implements IResponder{
   public var f:Function;
   public var r:Function;

   public MyIResponder(r:Function, f:Function){
 this.r = r;
 this.f = f;
   }

   public function fault(info:Object):void {
   f.call(info);
   }

   public function result(result:Object):void {
   r.call(result);
   }
}

//Your handlers for service calls.
protected function resultA(result:Object){ ... }
protected function faultA(info:Object){...}
protected function resultB(result:Object){ ... }
protected function faultB(info:Object){...}

var service:HTTPService ...//assume exists, reused for various calls.

  //send for service A.
  funciton sendA(args:Object){
service.url = "../A.html";
service.send(args).addResponder(new MyIResponder(resultA, faultA));
  }

  //send for service B.
  function sendB(){
service.url = "../B.html";
service.send().addResponder(new MyIResponder(resultB, faultB));
  }


}

[snip]

 --- In flexcoders@yahoogroups.com, "lagos_tout"  
>> wrote:
> Hi,
>
> I'm re-using an instance of HTTPService, changing the request 
> arguments to get different responses from the server.  But I 
>> found 
> that if, for instance, I made 3 calls this way with the 
>>> HTTPService, 
> each of the 3 result handlers registered for each call is 
>> executed 
> every time a result returned.  
>
> I solved this by storing a reference to the unique AsyncToken 
>>> returned 
> by each service call and matching it to the AsyncToken 
> contained 
>>> in 
> each ResultEvent's "token" property in order to determine 
> which 
>>> result 
> handler to execute. 
>
> I'm not terribly happy with this setup.  It seems messy.  I'd 
> appreciate any suggestions on how I can reuse an HTTPService 
>>> instance 
> without ending up with long switch statements with countless 
> "if 
> thisAsyncToken then do thisHandler, else if thatAsyncToken 
> then 
>> do 
> thatHandler... and so on".
>
> Thanks much.
>
> LT
>
> 
> 
> 
> 



[flexcoders] Re: adding the user input to an arraycollection

2008-10-17 Thread valdhor
This is how I would do it (Others may do it differently)...

Assuming the text fields have id's of bookType and sales:

private function addToArray():void
{
 var newBook:Object = new Object();
 newBook.bookType = bookType.text;
 newBook.sales= bookType.sales;
 bookSales.addItem(newBook);
}

--- In flexcoders@yahoogroups.com, sainath evuri <[EMAIL PROTECTED]>
wrote:
>
> i would like to get the input from the user using textinput boxes and
add them to the arraycollection defined in the code below.
>
> i had defined a method addToArray for serving the purpose.what should
be the type of the arguments passed to that function.
> th code follows:
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute">
> 
> 
> 
> 
> 
> 
>  labelFunction="chartLabel">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
>   Connect with friends all over the world. Get Yahoo! India
Messenger at http://in.messenger.yahoo.com/?wm=n/
>



Re: [flexcoders] Rippling through state changes

2008-10-17 Thread Johannes Nel
this is also a nice way to test around the presentation model pattern, your
pres model exposes the state the view should be in and dependent on what the
data state of your pres model is in

On Fri, Oct 17, 2008 at 3:41 PM, claudiu ursica <[EMAIL PROTECTED]>wrote:

>   How about write a custom item renderer and expose a public property
> "state" name it however you want. Bind that property
> to the current state of your custom component. When the parent state
> changes, the item renderer wil update also.
>
> HTH,
> Claudiu
>
>
> - Original Message 
> From: Paul Andrews <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Friday, October 17, 2008 4:33:45 PM
> Subject: [flexcoders] Rippling through state changes
>
>  I have some custom components (nothing special) that are displaying
> product
> information. essentially I can use the same component for seprate purposes:
>
> Product info (each product can be added to the shopping cart), shopping
> cart
> (each product can be removed from the cart). Within the main component, I
> have TileLists or datagrdids with item renderers. When the custom component
>
> flips between states, I need the individual items contained therein to
> switch state too.
>
> I'm trying to think of the most elegant way to do this. Any thoughs 9apart
> from the fact I'll go Doh! real soon now).
>
> I've tended to avoid states, but seem to be embracing them big time now..
>
> Paul
>
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>  
>



-- 
j:pn
\\no comment


  1   2   >