[flexcoders] Flex and Google Adwords API

2007-10-02 Thread mleembruggen
Has anyone played with the google adwords api in flex?

I can't find any examples online and I am yet to actually make a 
successfull call to it.

I think the trouble I'm having is because it needs headers in the soap 
call.

I've tried using the addSimpleHeader method but no luck.

Here is the wsdl to the sandbox. 
https://sandbox.google.com/api/adwords/v10/CampaignService?wsdl

I'm just trying to make a successfull call to the 
getAllAdWordsCampaigns method.

Please help. If you have any example code that would be great.

Thanks
Mike



RE: [flexcoders] Adobe MAX event

2007-10-02 Thread David Mendels
Hello,
 
Many blog postings about MAX aggregated here: http://snipurl.com/1rp0z
 
-David



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of arieljake
Sent: Tuesday, October 02, 2007 6:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Adobe MAX event



So, what happened at MAX? Anything really good?



 


[flexcoders] Access to the WindowedApplication instance??

2007-10-02 Thread Frank Z
Is there any way to access the instantiated WindowedApplication via
code?  I can't seem to figure it out.  Do I really have to put another
container in between when I want the main window to be the container?



[flexcoders] Re: actionscript generation of mask/hitArea from bitmapdata...

2007-10-02 Thread dodtsair
Hmm constructing an array of vectors from a bitmap sounds intensive.

Here is how I solved the problem.
Application:

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







CroppedImage.xml (bad name I know):

http://www.adobe.com/2006/mxml";
creationComplete="initBuffer()" resize="initBuffer()">





Seems to support resizing.  Basically I create a BitmapData object,
and have the image draw itself onto the BitmapData. I get the pixel at
the x,y location.  I check the alpha value and return the result.

Unfortunately I couldn't figure out a way to do this before the event
handler, so each handler is going to have to call the hitAlphaPoint
and act on the result.

Mike Power


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Flash Authoring is a huge application and part of its size is due to a
> plethora of useful bitmap manipulation tools.  There aren't any built
> into Flex, maybe some third-parties have one.
>  
> You will need to describe in vectors and curves (preferably just
> vectors) the outer border of the image.
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of dodtsair
> Sent: Tuesday, October 02, 2007 10:19 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: actionscript generation of mask/hitArea from
> bitmapdata...
> 
> 
> 
> --- In flexcoders@yahoogroups.com 
> , "unaflux"  wrote:
> >
> > How can I create an arbitrarily complex Shape
> > starting from alphachannel data of a dynamically loaded image?
> > 
> > I'd like to use the shape mainly for two things:
> > - to set a complex hitArea of a Sprite
> > - to mask a DisplayObject that has MouseEvents on it 
> > 
> > The problem are somehow related:
> > 1) If I apply directly the loaded image 
> > (wrapped in a Sprite) as the hitArea
> > mousevents gets triggered in the rect area
> > that has the dimension of the loaded image.
> > 
> > 2) If I apply directly the loaded image as a mask
> > I've no problems to obtain the visual masking effect
> > but mousevents still gets triggered in the rect area
> > that has the dimension of the loaded image, not only
> > on the visible areas...
> > 
> > 
> > 
> > In the authoring environment solution is simple...
> > - take the image
> > - do a trace bitmap
> > - use the traced bitmap non transparent areas 
> > as hitArea in a SimpleButton.
> > 
> > In Actionscript, if the masking/hitArea Shape is simple...
> > - draw the masking/hitArea Shape
> > - apply it as a mask
> > 
> > 
> > In ActionScript, if the masking/hitArea is complex
> > it starts becoming a problem.
> > I think that's because I'm still working
> > with the BitmapData of the image (that is rectangular).
> > Even in the authoring environment if you use a Bitmap,
> > instead of a Shape, you get a rectangular mouseSensible area.
> > But how can I obtain a Shape from the alphachannel data
> > of the image I loaded?
> > The idea is to use this arbitrarily complex Shape
> > (wrapped in a Sprite) as a dynamically generated mask/hitArea,
> > that gives me an arbitrarily complex mouseSensible area.
> > 
> > Have you ever tried something like that?
> > Is that even possible?
> > Using Actionscript shouldn't I have access to all that
> > could be done in the authoring environment?
> > Stated in another way...
> > how can I actually do something similar to the 
> > trace bitmap operation...
> > 
> > Any suggestions
> > Thanks
> > Jo
> >
> 
> I am trying to do the same thing. I wanted to build a widget that
> would allow the user to click on a world map to select his timezone.
> 
> At this point like you I have failed to use the hitArea to filter the
> mouse events. The next thing I will try is grabing the x,y of the
> mouse event and trying to pull out the pixel data of the image at that
> point. We'll see if I succeed.
> 
> If anyone knows a better more straight forward solution I think we
> would both appreciate it.
> 
> Mike Power
>




[flexcoders] Muting sounds globally.

2007-10-02 Thread media_fw9999
I ve trolled around and tried a few things including the Flash approach 
of a global sound object but nothing seems to work.

I have a flex app which uses other swf's and has sounds in it. I want a 
mute button on the page that mutes all the sounds.

So SoundMixer.stopAll() doesnt work because it misses the AS sounds, 
and its not possible for me to go track every found object and mute it.

I tried the this.soundTransform.volume=0 which doesnt seem to do it 
either.

Isnt there a simpler way to do this in Flex. ???

/s



[flexcoders] Re: Force an update to grid renderers

2007-10-02 Thread wmjdev
Thanks for the info, but the key to it was calling this in a callLater
cause for some reason the renderer would not fire again in that frame.
Once I added this, it works great. 



[flexcoders] Re: Bug? Flex breaks composite design pattern

2007-10-02 Thread dodtsair
Thanks for the response.  I can live with it and I have a simple work
around.

Although I have noticed atleast two examples the assume a sprite can
be passed into a "addChild" function.  I can't tell whose addChild was
being called, the code itself is not explicit and I don't know enough
to be aware of any implicit types.

Example:
http://livedocs.adobe.com/flex/201/langref/flash/display/Sprite.html#hitArea

Thanks again,
Mike Power

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Actionscript does not allow overriding of function signatures, otherwise
> we would have done that.  Because we can't do that, you have to live
> with "rules".  The rules in flex are:
>  
> Navigator children must be containers
> Container children must be IUIComponents
> UIComponent children can be anything.
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of dodtsair
> Sent: Tuesday, October 02, 2007 10:11 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Bug? Flex breaks composite design pattern
> 
> 
> 
> 1. Sprite is both a DisplayObjectContainer and a DisplayObject.
> 2. A DisplayObjectContainer (like Application) has the function
> addChild(child:DisplayObject):DisplayObject.
> 
> Thus I should be able to call addChild and pass it a Sprite. However
> I can't and I get the error "TypeError: Error #1034: Type Coercion
> failed: cannot convert flash.display::[EMAIL PROTECTED] to
> mx.core.IUIComponent."
> 
> So it seems that the documentation and/or the implementation is wrong?
> You should be able to pass a sprite into addChild? Maybe I made a
> typo and just have not caught it?
> 
> Here is the app used to produce the error:
> 
>  xmlns:mx="http://www.adobe.com/2006/mxml
>  " layout="absolute"
> creationComplete="init()">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I have seen several examples use this same call, I can fix it by using
> a class that is derived from Sprite and IUIComponent.
> 
> Mike Power
>




Re: [flexcoders] Combination zipCode and state formatter

2007-10-02 Thread Jim Cheng
Patrick Lemiuex wrote:
> 
> 
> Hi:
> 
> Is there a way to get a state from a zipCode in flex, with a
> formatter or such?

While the default Flex zip code validator only checks whether the value 
looks like an acceptable US ZIP or Canadian postal code, it wouldn't be 
too hard to subclass it to emit the associated state/territory for a 
given zip code in a custom validation result event.  The range of ZIP 
codes mapping to each state or territory is relatively small and mostly 
contiguous, so you can probably get away with embedding it into a Flex 
class without a significant size overhead.

You can find a list of the mappings here:

http://en.wikipedia.org/wiki/List_of_ZIP_Codes_in_the_United_States#List_of_ZIP_code_ranges

Jim


[flexcoders] Re: How to filter out nodes from an XMLList?

2007-10-02 Thread ambrice
Thanks, that works for me.

I think while searching for a solution I read that Mozilla's
javascript engine extends E4X to support "delete" with XMLList objects
which I think should be part of the spec if it's not.  The intuitive
thing to do would be to say "delete xmlNode.children();" and not have
to worry about looping.

Aaron

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> I think the key in that is using the ordinal index into the XML list.
> 
>  
> 
> I know Adobe is following the ecma specifications, but someone needs to
> slap those ecma guys for not providing an XML.delete() method.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Tracy Spratt
> Sent: Tuesday, October 02, 2007 5:21 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] How to filter out nodes from an XMLList?
> 
>  
> 
> I have used this function to delete the child nodes of a function.  I
> think that you could replace the "children()" with any e4x expression:
> 
>   private function deleteChildren(xmlNode:XML):void
> 
>   {
> 
> var xlChildren:XMLList = xmlNode.children();
> 
> for (var i:int=xlChildren.length()-1;i>=0;i--)
> 
> {
> 
> delete xlChildren[i]; //so
> remove all the children
> 
> }   
> 
>   }//deleteChildren
> 
>  
> 
> Tracy
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of ambrice
> Sent: Tuesday, October 02, 2007 4:08 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] How to filter out nodes from an XMLList?
> 
>  
> 
> I want to delete all nodes in an XML/XMLList that match a filter. 
> Something like:
> 
> delete myxml..employee.(@name == "Bob");
> 
> However I get an error saying you can't use delete on an XMLList. I
> tried:
> 
> for each (var node:XML in myxmllist) {
> delete node;
> }
> 
> But I get an error about not being able to delete a staticly assigned
> variable or something like that. There also doesn't seem to be a
> node.remove() method or anything handy like that. Actionscript's E4X
> implementation seems to think that you would only want to add nodes to
> an XML. Any ideas?
> 
> Thanks,
> Aaron
>




RE: [flexcoders] Mouse Wheel over TextArea

2007-10-02 Thread Alex Harui
I would subclass TextArea, override mouseWheelHandler and just have it
return without doing anything.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of toofah_gm
Sent: Tuesday, October 02, 2007 3:46 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Mouse Wheel over TextArea



I have a Canvas with a number of TextArea components, Images, Sprites,
etc, on top of it. The Canvas itself is a scrollable area. When I
use the Mouse Wheel over most parts of the Canvas, it scrolls up and
down. If my mouse is on top of one of my TextAreas, the Canvas does
not scroll when I use the Mouse Wheel. This is the case even though
my TextAreas are not editable nor selectable.

Is there a way to get my Mouse Wheel to scroll my Canvas even when it
is over my TextArea components?



 


RE: [flexcoders] help builing a component in Flash CS3 for Flex

2007-10-02 Thread Alex Harui
It'll probably be easier to expose properties on the Flash component
where the Flex app can pass a reference to the Flex webservice and fetch
the array from the component



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark
Sent: Tuesday, October 02, 2007 3:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] help builing a component in Flash CS3 for Flex



I'm building a pretty simple component in Flash and need to access my 
a few things that sit on the application in Flex.

I'd like to pass an array from the Flash to Flex and would also like 
to invoke my web service from the Flash as well. Can anyone lend a 
hand in this? There must be a way to access the vars, arrays, etc. 
from the Flex part of this. 

Here's the basics

addEventListener("click", clicker);

protected function clicker (event:Event):void {
//web service
ws2.GetGlobalRadarFullById.send();
//get's the date in a main movieClip in the Flash
trace((parent as MovieClip).dates);
}

Thanks,
Mark



 


RE: [flexcoders] TileList invalidateList not working

2007-10-02 Thread Alex Harui
Beta2.  Just came out this week.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Tuesday, October 02, 2007 4:02 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] TileList invalidateList not working



What version of Moxie? i am running M2 Beta 1 Release (build 3.0.172437)
and it doesn't work.

charles

On Oct 2, 2007, at 5:52 PM, Alex Harui wrote:


When I ran your app, I used Moxie and it worked fine.  In 2.x,
it does not and the reason has to do with those pesky 'can't bind..."
warnings
 
In 2.x, the data property of the renderer is not reassigned as
since the label is looking for the .data subproperty but it isn't
bindable, it can't see that either.
 
In Moxie, it looks like we're slightly more tolerant.



From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com  ]
On Behalf Of Charles Galpin
Sent: Tuesday, October 02, 2007 1:52 PM
To: flexcoders@yahoogroups.com
 
Subject: Re: [flexcoders] TileList invalidateList not working






On Oct 2, 2007, at 3:29 PM, Alex Harui wrote:


By default, and for performance reasons, there is no
write-detection to properties.  You use proxy, [bindable] or setters to
detect writes.
 
Collections will watch their items for changes if they
can, but you are using dynamic objects and they have to write-detection.
Collections have an itemUpdated method to allow you to manually notify
the collection that something that could not be watched changed.


Yeah I was trying to keep it simple and show a non-binding
example, but maybe I oversimplified.  Typically we end up setting
multiple properties at once and get a flurry of events when only one is
needed with bindable properties. 

but I tried the itemUpdated method and it isn't working for me.
I tried both

var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(obj);


and


var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;

dataCollection.itemUpdated(dataCollection.getItemAt(indices[i]));


What am I doing wrong?


But looking at the docs did clue me in on the
disableAutoUpdate() and enableAutoUpdate() methods which I'll try for
our objects with bindable properties.

thanks
charles
p.s. In case you don't hear it enough, thanks for the time you
devote to this list - I am sure it goes well beyond the call of duty as
an adobe employee.




 


RE: [flexcoders] Problem with FB3

2007-10-02 Thread Alex Harui
Sounds like you have to recompile the resource bundles.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of learner
Sent: Tuesday, October 02, 2007 10:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with FB3



Hi all,
I am trying to migrate my application from FB3 beta 1 - air beta 1 to
FB3 beta2 - air beta 2
and whenever i am trying to run this application after making changes to
tha app.xml I am getting following error... 
please please please help...Its really becoming a complete show stopper
for me.

The error is :

ArgumentError: Error #1063: Argument count mismatch on
mx.resources::ResourceManager/http://www.adobe.com/2006/flex/mx/internal
::installCompiledResourceBundles (). Expected 3, got 2.
at
mx.core::FlexModuleFactory/private::installCompiledResourceBundles()
at mx.core::FlexModuleFactory/private::docFrameHandler()

Regards
PS



 


RE: [flexcoders] swc question

2007-10-02 Thread Alex Harui
Every class has a compilation timestamp whether sourced from swc or
source-paths.  Most recent wins.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: Tuesday, October 02, 2007 6:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] swc question



Just to confirm, in regards to include swc files in your swc, the docs
say, 

In most cases, the symbols defined in the SWF file that are referenced
by the application are embedded in the Flex application at compile-time.
This is known as static linking. The application compiler only includes
those classes that are used by your application, and dependent classes,
in the final SWF file.


My question, does the compiler include dependant classes from the swc
that are already included in the swf, for example if UIComponent is used
in the swc will it add it again to my swf unnecessarily adding to the
file size?




regards,


Bjorn



 


RE: [flexcoders] Changing highlight color for textArea

2007-10-02 Thread Alex Harui
The selection color cannot be changed.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flexawesome
Sent: Tuesday, October 02, 2007 8:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Changing highlight color for textArea



can I change the highlight color in textArea? I am going to change the
text highlight color from default black color to other.

Cheers



 


[flexcoders] Problem with FB3

2007-10-02 Thread learner
Hi all,
I am trying to migrate my application from FB3 beta 1 - air beta 1 to FB3
beta2 - air beta 2
and whenever i am trying to run this application after making changes to tha
app.xml I am getting following error...
please please please help...Its really becoming a complete show stopper for
me.

The error is :

ArgumentError: Error #1063: Argument count mismatch on
mx.resources::ResourceManager/http://www.adobe.com/2006/flex/mx/internal::installCompiledResourceBundles().
Expected 3, got 2.
at mx.core::FlexModuleFactory/private::installCompiledResourceBundles()
at mx.core::FlexModuleFactory/private::docFrameHandler()

Regards
PS


RE: [flexcoders] LCDS: Reordering managed collections?

2007-10-02 Thread Jeff Vroom
If you implement the Assembler interface (rather than using the
sync-method tag), you can use the addItemToFill and removeItemFromFill
methods in the Assembler interface.  You should see the item get removed
from the fill at one location and added at another one.  This has not
been a heavily used feature so let me know if you run into problems with
it.  Here are the javadoc comments - note the "warning" about the fact
that these methods do not support any conflict detection:

 

/**

 * Called when a client adds an item to a filled collection.

 * 

 * You can use this method to track changes made to a filled
collection

 * by client applications.  Usually the results of a fill are
maintained

 * by a query made on the server and so changes made by the client 

 * are temporary or replaced when the server has a chance to update
the fill

 * based on reexecuting the query.  In some cases though, you may
want 

 * to turn auto-refresh off for the fill, and track the changes made
by

 * the client to the filled collection.  You might do this if the
list of

 * items returned for a given fill is maintained by an explicit list
of

 * object ids.

 * 

 * Warning: if you need clients to maintain a consistent order

 * of items, you may not want to use this technique.  If two clients

 * insert different items into the same position at roughly the

 * same time, each will have processed the inserts in different

 * orders and so will have the two items swapped.  You can ignore

 * the position and maintain consistent lists where order is not

 * critical or the client sorts the list.

 * 

 * @param fillParameters the list of parameters which identify the
fill 

 * that the client changed.

 * @param position the index where a new item was added

 * @param identity the identity of the item added at the specified
position

 */

void addItemToFill(List fillParameters, int position, Map identity);

 

/**

 * Called when a client removes an item from a filled collection.

 * Like addItemToFill, you can use this method to monitor and record
changes made by

 * a client to a given filled collection.

 *

 * @param fillParameters the list of parameters which identify the
fill 

 * that the client changed.

 * @param position the index where a new item was removed

 * @param identity the identity of the item removed at the specified
position

 */

void removeItemFromFill(List fillParameters, int position, Map
identity);

 

Jeff

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Robert Csiki
Sent: Tuesday, October 02, 2007 12:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS: Reordering managed collections?

 

Hello,

Suppose I have a managed collection and I want to reorder its items 
(say via Drag and Drop, on a TileList).
I want the FDS to save this new item order to the persistance layer 
(database).
On the LCDS side how to get the changes done as a result of 
rearranging the items done by the user?

I noticed my data service destination's "sync" method gets invoked by 
the framework, but it only contains what items to "delete" and what 
to "create", and nothing about the new item position in the list.

I am using the Java adapter on the LCDS side.
Please help.

Thanks
Robert

 



Re: [flexcoders] swc question

2007-10-02 Thread Bjorn Schultheiss

Hey Pat,

I was more interested of the contents of the swf that includes the swc.

Say i create a custom button and compc it to swc.
Then include that swc into my flex app.
Can the flex compiler work out that some of the classes in my swc,
are already in my flex app and therefore not 'duplicate' them in the  
compiled end swf?


I guess i'm mainly interested in the flex framework classes.



regards,

Bjorn


On 03/10/2007, at 1:51 PM, Patrick Lemiuex wrote:



Actually, I don't know the answer to your question Bjorn but you  
can inspect the contents of a swc  by renaming the extension to zip  
and then browsing the contents after you unzip it with winzip (or  
winrar).   The swc is just a wrapper.


Hope this helps.
Patrick



On Oct 2, 2007, at 6:16 PM, Bjorn Schultheiss wrote:

Just to confirm, in regards to include swc files in your swc, the  
docs say,



In most cases, the symbols defined in the SWF file that are  
referenced by the application are embedded in the Flex application  
at compile-time. This is known as static linking. The application  
compiler only includes those classes that are used by your  
application, and dependent classes, in the final SWF file.


My question, does the compiler include dependant classes from the  
swc that are already included in the swf, for example if  
UIComponent is used in the swc will it add it again to my swf  
unnecessarily adding to the file size?



regards,

Bjorn










Re: [flexcoders] swc question

2007-10-02 Thread Patrick Lemiuex
Actually, I don't know the answer to your question Bjorn but you can  
inspect the contents of a swc  by renaming the extension to zip and  
then browsing the contents after you unzip it with winzip (or  
winrar).   The swc is just a wrapper.


Hope this helps.
Patrick



On Oct 2, 2007, at 6:16 PM, Bjorn Schultheiss wrote:

Just to confirm, in regards to include swc files in your swc, the  
docs say,



In most cases, the symbols defined in the SWF file that are  
referenced by the application are embedded in the Flex application  
at compile-time. This is known as static linking. The application  
compiler only includes those classes that are used by your  
application, and dependent classes, in the final SWF file.


My question, does the compiler include dependant classes from the  
swc that are already included in the swf, for example if  
UIComponent is used in the swc will it add it again to my swf  
unnecessarily adding to the file size?



regards,

Bjorn







[flexcoders] Changing highlight color for textArea

2007-10-02 Thread flexawesome
can I change the highlight color in textArea? I am going to change the
text highlight color from default black color to other.

Cheers



[flexcoders] swc question

2007-10-02 Thread Bjorn Schultheiss
Just to confirm, in regards to include swc files in your swc, the  
docs say,


In most cases, the symbols defined in the SWF file that are  
referenced by the application are embedded in the Flex application at  
compile-time. This is known as static linking. The application  
compiler only includes those classes that are used by your  
application, and dependent classes, in the final SWF file.


My question, does the compiler include dependant classes from the swc  
that are already included in the swf, for example if UIComponent is  
used in the swc will it add it again to my swf unnecessarily adding  
to the file size?



regards,

Bjorn



RE: [flexcoders] Re: Flex Refresh Command

2007-10-02 Thread Tracy Spratt
Look at this example:

http://www.cflex.net/showFileDetails.cfm?ObjectID=560

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of iilsley
Sent: Tuesday, October 02, 2007 8:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex Refresh Command

 

--- In flexcoders@yahoogroups.com 
, "Andrew" <[EMAIL PROTECTED]> wrote:
>
> In my flex movie i have a custom component that looks at a php script
> for how many users there are online. But, it does not automatically
> update leaving it always at the number of users there are online when
> you first arrive at the site. Is there a refresh command that i can
> add to get the component to refresh after like 1 min?
> 
> Any help would be great. Thanks
>

Take a look @ Timer and TimerEvent

 



[flexcoders] Re: Flex Refresh Command

2007-10-02 Thread iilsley
--- In flexcoders@yahoogroups.com, "Andrew" <[EMAIL PROTECTED]> wrote:
>
> In my flex movie i have a custom component that looks at a php script
> for how many users there are online. But, it does not automatically
> update leaving it always at the number of users there are online when
> you first arrive at the site. Is there a refresh command that i can
> add to get the component to refresh after like 1 min?
> 
> Any help would be great. Thanks
>

Take a look @ Timer and TimerEvent





RE: [flexcoders] How to filter out nodes from an XMLList?

2007-10-02 Thread Tracy Spratt
There is no Object.appendChild(), or Object.insertChildBefore(), or
Object.insertChildAfter(), or Object.children(), or Object.parent(),
or

 

If that is indeed the argument, then I think it is a "foolish
consistency".

 

But that is just my emotional opinion, I do not even pretend to think at
that level of design.  I'm a coder, in the end, I'll work within the
language.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, October 02, 2007 5:41 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to filter out nodes from an XMLList?

 

I think their argument is that there is no Object.delete() either.  To
me, the whole point of E4X is to get at XML more like it was an object.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Tuesday, October 02, 2007 2:27 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to filter out nodes from an XMLList?

I think the key in that is using the ordinal index into the XML list.

I know Adobe is following the ecma specifications, but someone needs to
slap those ecma guys for not providing an XML.delete() method.

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Tuesday, October 02, 2007 5:21 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to filter out nodes from an XMLList?

I have used this function to delete the child nodes of a function.  I
think that you could replace the "children()" with any e4x expression:

  private function deleteChildren(xmlNode:XML):void

  {

var xlChildren:XMLList = xmlNode.children();

for (var i:int=xlChildren.length()-1;i>=0;i--)

{

delete xlChildren[i]; //so
remove all the children

}   

  }//deleteChildren

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ambrice
Sent: Tuesday, October 02, 2007 4:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to filter out nodes from an XMLList?

I want to delete all nodes in an XML/XMLList that match a filter. 
Something like:

delete myxml..employee.(@name == "Bob");

However I get an error saying you can't use delete on an XMLList. I
tried:

for each (var node:XML in myxmllist) {
delete node;
}

But I get an error about not being able to delete a staticly assigned
variable or something like that. There also doesn't seem to be a
node.remove() method or anything handy like that. Actionscript's E4X
implementation seems to think that you would only want to add nodes to
an XML. Any ideas?

Thanks,
Aaron

 



[flexcoders] AIR and Flex

2007-10-02 Thread Adam Reynolds
Hi,
After reading about the Air Derby winners 
http://blog.everythingflex.com/2007/10/02/air-derby-winners/

I downloaded and installed Digimix.

Please please please tell me that AIR is going to have a better removal 
system. It stuck the Digimix app launcher in the Start->All Programs 
folder rather than creating a separate folder for it and providing an 
uninstall facility as part of the install. I had to go into the control 
panel and remove it from there.

Now I don't know if this was the way the Digimix AIR app was designed or 
whether this is an inherent issue with the way Flex Air apps are built, 
but there needs to be an obvious uninstaller as part of an Air install 
and it should always create a folder into which the programme launcher 
goes (with associated uninstall).

I also noticed that the install process only gave me the option if I 
wanted to create a shortcut on the desktop only.

I expect to be downloading 10s of apps and trying them out. What I don't 
want is not obviously un-installable AIR apps all over the place.

This is not a criticism of Digimix, just a concern that AIR apps do not 
behave "installation wise" as I would expect by creating a programme 
launch folder which may also contains an uninstall option.

Adam





[flexcoders] Re: Passing Application.application.parameters to a Flex component

2007-10-02 Thread CO_China_Girl
Thank you very much!  I took this approach and got everything working.

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Just leave off the "new":
> 
> service = PropertyService(Application.application.parameters.psAddr);
> 
>  
> 
> I typically do:
> 
>   import mx.core.Application;
> 
>   private var _app:Application;
> 
>  
> 
>   private function initComp():void 
> 
>   {
> 
> _app = Application.application;
> 
>   ...
> 
>  
> 
> Then I can use _app whenever I need to access the top level application
> scope.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of CO_China_Girl
> Sent: Monday, October 01, 2007 7:12 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Passing Application.application.parameters to a
> Flex component
> 
>  
> 
> I'm working on a Flex application that has a tab navigator component.
> To prevent my main MXML file from becoming huge I decided to make
> each tab "page" a separate component. The problem I have now is that
> one of my Flex components need to have access to
> Application.application.parameters. How do I pass this information to
> my component, or how do I make this information available to my
> component?
> 
> = Main MXML file =
> 
> 
> http://www.adobe.com/2006/mxml
>  "
> xmlns:pf2="*" layout="horizontal">
> 
> 
> 
> 
> 
> 
> 
> 
> = Component file =
> 
> http://www.adobe.com/2006/mxml
>  "
> label="Properties" width="100%" height="100%">
> 
> 
> 
> 
>  creationComplete="init()">
> 
> 
> 
> 
> 
> 
> ==
> 
> Thanks.
>




Re: [flexcoders] Re: Flex Builder 3 Beta2 / Amfphp / services-config.xml

2007-10-02 Thread Muzak
Actually you should avoid hardcoding the domain and port:
http://{server.name}:{server.port}/amfphp2/gateway.php



- Original Message - 
From: "gelu11" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, October 02, 2007 10:36 AM
Subject: [flexcoders] Re: Flex Builder 3 Beta2 / Amfphp / services-config.xml


Hi,

You can edit your services-config.xml and add a port number to your
endpoint URI. ("http://localhost:80/gateway/gateway.php";). This should
solve the problem.

Gelu Blanariu






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! 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] TileList.selectedIndices problem

2007-10-02 Thread Charles Galpin
If you can find the time at some point, please do. I simply made that  
as a convenience to not have to do the check to see what view is  
active but I sure it's being used appropriately.  I'll double check,  
but I did put a breakpoint in it and double checked everything is  
doing what I expect each time it is called.


charles

On Oct 2, 2007, at 6:11 PM, Alex Harui wrote:

I'd have to build it and step through it which I don't have time to  
do right now, but I'm suspicious of having centralized  
selectedIndices properties that point to the tilelist or grid.   
Seems like it could return the wrong one when switching.


From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Charles Galpin

Sent: Tuesday, October 02, 2007 2:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] TileList.selectedIndices problem

Sorry, try now.


charles

On Oct 2, 2007, at 5:38 PM, Alex Harui wrote:


Your viewsource link is not working.


This slightly more complex test case (right click to see source)  
shows it nicely though if you follow the steps above


http://labs.lhsw.com/~cgalpin/flex/Problem/bin/Problem.html

totally stumped...
charles









Re: [flexcoders] TileList invalidateList not working

2007-10-02 Thread Charles Galpin
What version of Moxie? i am running M2 Beta 1 Release (build  
3.0.172437) and it doesn't work.


charles

On Oct 2, 2007, at 5:52 PM, Alex Harui wrote:

When I ran your app, I used Moxie and it worked fine.  In 2.x, it  
does not and the reason has to do with those pesky 'can't bind..."  
warnings


In 2.x, the data property of the renderer is not reassigned as  
since the label is looking for the .data subproperty but it isn't  
bindable, it can't see that either.


In Moxie, it looks like we're slightly more tolerant.

From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Charles Galpin

Sent: Tuesday, October 02, 2007 1:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] TileList invalidateList not working



On Oct 2, 2007, at 3:29 PM, Alex Harui wrote:

By default, and for performance reasons, there is no write- 
detection to properties.  You use proxy, [bindable] or setters to  
detect writes.


Collections will watch their items for changes if they can, but  
you are using dynamic objects and they have to write-detection.
Collections have an itemUpdated method to allow you to manually  
notify the collection that something that could not be watched  
changed.


Yeah I was trying to keep it simple and show a non-binding example,  
but maybe I oversimplified.  Typically we end up setting multiple  
properties at once and get a flurry of events when only one is  
needed with bindable properties.


but I tried the itemUpdated method and it isn't working for me. I  
tried both


var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(obj);

and

var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(dataCollection.getItemAt(indices[i]));

What am I doing wrong?


But looking at the docs did clue me in on the disableAutoUpdate()  
and enableAutoUpdate() methods which I'll try for our objects with  
bindable properties.


thanks
charles
p.s. In case you don't hear it enough, thanks for the time you  
devote to this list - I am sure it goes well beyond the call of  
duty as an adobe employee.







[flexcoders] help builing a component in Flash CS3 for Flex

2007-10-02 Thread Mark
I'm building a pretty simple component in Flash and need to access my 
a few things that sit on the application in Flex.

I'd like to pass an array from the Flash to Flex and would also like 
to invoke my web service from the Flash as well.  Can anyone lend a 
hand in this?  There must be a way to access the vars, arrays, etc. 
from the Flex part of this.  

Here's the basics


addEventListener("click", clicker);

protected function clicker (event:Event):void {
//web service
ws2.GetGlobalRadarFullById.send();
//get's the date in a main movieClip in the Flash
trace((parent as MovieClip).dates);
}

Thanks,
Mark



[flexcoders] Mouse Wheel over TextArea

2007-10-02 Thread toofah_gm
I have a Canvas with a number of TextArea components, Images, Sprites,
etc, on top of it.  The Canvas itself is a scrollable area.  When I
use the Mouse Wheel over most parts of the Canvas, it scrolls up and
down.  If my mouse is on top of one of my TextAreas, the Canvas does
not scroll when I use the Mouse Wheel.  This is the case even though
my TextAreas are not editable nor selectable.

Is there a way to get my Mouse Wheel to scroll my Canvas even when it
is over my TextArea components?



[flexcoders] Adobe MAX event

2007-10-02 Thread arieljake
So, what happened at MAX? Anything really good?



[flexcoders] Wheel-scroll on Mac

2007-10-02 Thread williamkusumo
Is wheel-scroll bug on Mac gonna be fixed anytime soon? I am thinking
if it's worth doing the Javascript hack I've found online to solve
this issue for now.

Thanks!



[flexcoders] Re: Return a person's age

2007-10-02 Thread Doug Lowder
Ah, but if the OP wants an answer in the form "the person is X years 
old today," that's where the problem arises.  A good edge case is:

Birthday: 2/28/2000
Today: 2/27/2001

With the getTime() approach, new Date("2/27/2001").getTime() - new 
Date("2/28/2000").getTime() gives 3153600 (Jan 1, 1971 UTC), or 
365 days.  In this case the age is not 1 though, because that year 
was 366 days instead of 365.  That's why I would still choose to do 
the calculation without getTime(), and why I don't think those doc 
examples are particularly good ones - a day is not always 24 hours, a 
year is not always 365 days, etc.



And sorry for beating a dead horse so badly! :)

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Oops, yes, the subtraction should be reversed.
> 
>  
> 
> But one of the overloads of the Date constructor takes a single
> argument, the number of milliseconds from the reference date, the 
same
> reference date as the getTime() method.  The doc example shows this
> method for adding time to a date, but I expect it will work for
> subracting time as well.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Doug Lowder
> Sent: Tuesday, October 02, 2007 3:37 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Return a person's age
> 
>  
> 
> Wouldn't that produce a negative number, given that birthDate 
> probably comes before todayDate?
> 
> Discounting that, I think that would give you the person's age in 
> milliseconds.
> 
> --- In flexcoders@yahoogroups.com 
> , "Tracy Spratt"  wrote:
> >
> > Based on my reading of the docs, there is a simpler way:
> > 
> > var age = new Date(birthDate.getTime() - todayDate.getTime);
> > 
> > Untested.
> > 
> > Tracy
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of JRBower
> > Sent: Tuesday, October 02, 2007 2:29 AM
> > To: flexcoders@yahoogroups.com  
> > Subject: Re: [flexcoders] Return a person's age
> > 
> > 
> > 
> > 
> > Doug,
> > Thank you. I will give your code a go. :)
> > 
> > Best Regards,
> > James
> > 
> > Doug Lowder wrote:
> > > 
> > > Here's how I would do it:
> > > 
> > > var age:Number = todayDate.fullYear - birthDate.fullYear;
> > > if (todayDate.month < birthDate.month || (todayDate.month == 
> > > birthDate.month && todayDate.date < birthDate.date)) age--;
> > > return age;
> > > 
> > > 
> > 
> > -- 
> > View this message in context:
> > http://www.nabble.com/Return-a-person%27s-age-
>  
> tf4545118.html#a12993386
> >   
> tf4545118.html#a12993386>
> > 
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >
>




RE: [flexcoders] TileList.selectedIndices problem

2007-10-02 Thread Alex Harui
I'd have to build it and step through it which I don't have time to do
right now, but I'm suspicious of having centralized selectedIndices
properties that point to the tilelist or grid.  Seems like it could
return the wrong one when switching.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Tuesday, October 02, 2007 2:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] TileList.selectedIndices problem



Sorry, try now. 

charles

On Oct 2, 2007, at 5:38 PM, Alex Harui wrote:


Your viewsource link is not working.






This slightly more complex test case (right click to see source)
shows it nicely though if you follow the steps above

http://labs.lhsw.com/~cgalpin/flex/Problem/bin/Problem.html
 

totally stumped... 
charles 





 


RE: [flexcoders] Force an update to grid renderers

2007-10-02 Thread Alex Harui
ICollectionView.itemUpdated



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of wmjdev
Sent: Tuesday, October 02, 2007 12:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Force an update to grid renderers



I have an array of generic objects (not flagged as bindable) I am also
using item editors as renderers in all columns. but if I change a
value in an underlying object, is there anyway short of a full refresh
or calling updateList on the grid to get it to pick up the change. If
I resize the grid I can see the change, but for the life of me, I can
not figure out what event to dispatch on the list to tell the current
row to repaint.



 


RE: [flexcoders] Bug? Flex breaks composite design pattern

2007-10-02 Thread Alex Harui
Actionscript does not allow overriding of function signatures, otherwise
we would have done that.  Because we can't do that, you have to live
with "rules".  The rules in flex are:
 
Navigator children must be containers
Container children must be IUIComponents
UIComponent children can be anything.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dodtsair
Sent: Tuesday, October 02, 2007 10:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bug? Flex breaks composite design pattern



1. Sprite is both a DisplayObjectContainer and a DisplayObject.
2. A DisplayObjectContainer (like Application) has the function
addChild(child:DisplayObject):DisplayObject.

Thus I should be able to call addChild and pass it a Sprite. However
I can't and I get the error "TypeError: Error #1034: Type Coercion
failed: cannot convert flash.display::[EMAIL PROTECTED] to
mx.core.IUIComponent."

So it seems that the documentation and/or the implementation is wrong?
You should be able to pass a sprite into addChild? Maybe I made a
typo and just have not caught it?

Here is the app used to produce the error:

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









I have seen several examples use this same call, I can fix it by using
a class that is derived from Sprite and IUIComponent.

Mike Power



 


RE: [flexcoders] Re: actionscript generation of mask/hitArea from bitmapdata...

2007-10-02 Thread Alex Harui
Flash Authoring is a huge application and part of its size is due to a
plethora of useful bitmap manipulation tools.  There aren't any built
into Flex, maybe some third-parties have one.
 
You will need to describe in vectors and curves (preferably just
vectors) the outer border of the image.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dodtsair
Sent: Tuesday, October 02, 2007 10:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: actionscript generation of mask/hitArea from
bitmapdata...



--- In flexcoders@yahoogroups.com 
, "unaflux" <[EMAIL PROTECTED]> wrote:
>
> How can I create an arbitrarily complex Shape
> starting from alphachannel data of a dynamically loaded image?
> 
> I'd like to use the shape mainly for two things:
> - to set a complex hitArea of a Sprite
> - to mask a DisplayObject that has MouseEvents on it 
> 
> The problem are somehow related:
> 1) If I apply directly the loaded image 
> (wrapped in a Sprite) as the hitArea
> mousevents gets triggered in the rect area
> that has the dimension of the loaded image.
> 
> 2) If I apply directly the loaded image as a mask
> I've no problems to obtain the visual masking effect
> but mousevents still gets triggered in the rect area
> that has the dimension of the loaded image, not only
> on the visible areas...
> 
> 
> 
> In the authoring environment solution is simple...
> - take the image
> - do a trace bitmap
> - use the traced bitmap non transparent areas 
> as hitArea in a SimpleButton.
> 
> In Actionscript, if the masking/hitArea Shape is simple...
> - draw the masking/hitArea Shape
> - apply it as a mask
> 
> 
> In ActionScript, if the masking/hitArea is complex
> it starts becoming a problem.
> I think that's because I'm still working
> with the BitmapData of the image (that is rectangular).
> Even in the authoring environment if you use a Bitmap,
> instead of a Shape, you get a rectangular mouseSensible area.
> But how can I obtain a Shape from the alphachannel data
> of the image I loaded?
> The idea is to use this arbitrarily complex Shape
> (wrapped in a Sprite) as a dynamically generated mask/hitArea,
> that gives me an arbitrarily complex mouseSensible area.
> 
> Have you ever tried something like that?
> Is that even possible?
> Using Actionscript shouldn't I have access to all that
> could be done in the authoring environment?
> Stated in another way...
> how can I actually do something similar to the 
> trace bitmap operation...
> 
> Any suggestions
> Thanks
> Jo
>

I am trying to do the same thing. I wanted to build a widget that
would allow the user to click on a world map to select his timezone.

At this point like you I have failed to use the hitArea to filter the
mouse events. The next thing I will try is grabing the x,y of the
mouse event and trying to pull out the pixel data of the image at that
point. We'll see if I succeed.

If anyone knows a better more straight forward solution I think we
would both appreciate it.

Mike Power



 


RE: [flexcoders] Newbie Focus on Result Question

2007-10-02 Thread Alex Harui
set verticalScrollPosition on the form.
 
Other folks shrink the datagrid and grow the form so it doesn't have
scrollbars then reverse when the user is "done" with the form.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of its_llpj
Sent: Tuesday, October 02, 2007 8:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Focus on Result Question



Hello,

I have a datagrid and underneath the datagrid I'm using a Form to
display the entire record. When I click on a cell in the datagrid it
shows the data in the form, but you have to manually scroll down to
view the information. I would like to scroll down the page and focus
to the Form to show the rest of the record. This way I can keep the
datagrid reasonably small. 

Thanks!



 


[flexcoders] access a component value on another state + disable selection background.

2007-10-02 Thread Ary
Hi Guys!,


is it possible to turn off selection color/background
on tile list? and also i want to set the value of a
text component in another state (not start state) i
try to point it directly but getting error...could
someone help me out on this?

greatly appreciated!

zack


  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 




[flexcoders] Linechart dataprovider question

2007-10-02 Thread Nate Pearson
I have a line chart where I'm dynamically adding line series.

At first, I have no data in the chart.  Then I add a series.  The
horizontal axis is a category axis.  When I add the series I have to
set the dataprovider on the linechart to the same dataprovider for
that series.

Now lets say I add another series who's category access exceeds that
of the already set linechart dataprovider.  How can I get that data to
show?

Here's an example to make it more clear.

1)I add line series one and set the linechart dp to it.  It has data
from august 05 to jan 07.

2)I add a second line series.  It has data from july 06 to sept 07.  

3) The line chart does not show any category axis fields after jan07.

Anyone know how to make it so it justs adjusts to the min and max of
the data I give it?



RE: [flexcoders] TileList invalidateList not working

2007-10-02 Thread Alex Harui
When I ran your app, I used Moxie and it worked fine.  In 2.x, it does
not and the reason has to do with those pesky 'can't bind..." warnings
 
In 2.x, the data property of the renderer is not reassigned as since the
label is looking for the .data subproperty but it isn't bindable, it
can't see that either.
 
In Moxie, it looks like we're slightly more tolerant.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Tuesday, October 02, 2007 1:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] TileList invalidateList not working





On Oct 2, 2007, at 3:29 PM, Alex Harui wrote:


By default, and for performance reasons, there is no
write-detection to properties.  You use proxy, [bindable] or setters to
detect writes.
 
Collections will watch their items for changes if they can, but
you are using dynamic objects and they have to write-detection.
Collections have an itemUpdated method to allow you to manually notify
the collection that something that could not be watched changed.


Yeah I was trying to keep it simple and show a non-binding example, but
maybe I oversimplified.  Typically we end up setting multiple properties
at once and get a flurry of events when only one is needed with bindable
properties. 

but I tried the itemUpdated method and it isn't working for me. I tried
both

var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(obj);


and


var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(dataCollection.getItemAt(indices[i]));


What am I doing wrong?


But looking at the docs did clue me in on the disableAutoUpdate() and
enableAutoUpdate() methods which I'll try for our objects with bindable
properties.

thanks
charles
p.s. In case you don't hear it enough, thanks for the time you devote to
this list - I am sure it goes well beyond the call of duty as an adobe
employee.

 


Re: [flexcoders] TileList.selectedIndices problem

2007-10-02 Thread Charles Galpin

Sorry, try now.

charles

On Oct 2, 2007, at 5:38 PM, Alex Harui wrote:


Your viewsource link is not working.


This slightly more complex test case (right click to see source)  
shows it nicely though if you follow the steps above


http://labs.lhsw.com/~cgalpin/flex/Problem/bin/Problem.html

totally stumped...
charles






RE: [flexcoders] How to filter out nodes from an XMLList?

2007-10-02 Thread Alex Harui
I think their argument is that there is no Object.delete() either.  To
me, the whole point of E4X is to get at XML more like it was an object.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Tuesday, October 02, 2007 2:27 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to filter out nodes from an XMLList?



I think the key in that is using the ordinal index into the XML list.

I know Adobe is following the ecma specifications, but someone needs to
slap those ecma guys for not providing an XML.delete() method.

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Tuesday, October 02, 2007 5:21 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to filter out nodes from an XMLList?

I have used this function to delete the child nodes of a function.  I
think that you could replace the "children()" with any e4x expression:

  private function deleteChildren(xmlNode:XML):void

  {

var xlChildren:XMLList = xmlNode.children();

for (var i:int=xlChildren.length()-1;i>=0;i--)

{

delete xlChildren[i]; //so
remove all the children

}   

  }//deleteChildren

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ambrice
Sent: Tuesday, October 02, 2007 4:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to filter out nodes from an XMLList?

I want to delete all nodes in an XML/XMLList that match a filter. 
Something like:

delete myxml..employee.(@name == "Bob");

However I get an error saying you can't use delete on an XMLList. I
tried:

for each (var node:XML in myxmllist) {
delete node;
}

But I get an error about not being able to delete a staticly assigned
variable or something like that. There also doesn't seem to be a
node.remove() method or anything handy like that. Actionscript's E4X
implementation seems to think that you would only want to add nodes to
an XML. Any ideas?

Thanks,
Aaron

 


RE: [flexcoders] Re: Problem filtering custom list component

2007-10-02 Thread Alex Harui
I don't know if you've followed the thread about "multipurpose item
renderers" or other recent threads I've responded to, but you'll see me
constantly pushing for "following the recipe".  This is particularly
true in renderers because they get recycled so that one instance of the
renderer can be re-used to display some other data item in the
dataprovider.
 
The renderer isn't quite "following the recipe".  Normally, a renderer
does not listen for change events from the owner list.  Instead, we
recommend that visual updates be done in overrides of updateDisplayList
which will be called on your renderer when selection changes, and a call
to isItemSelected should let you update the checkbox appropriately.  I
don't think I'd be trying to update visuals in a setter for listData
either.
 
I can't guarantee that is your problem, but could eliminate some
timing/recycling issues.  So, I'd start there and see if that clears up
the issue.  Apparently, it is difficult for many of you to find the
appropriate documentation on how to build renderers.  Where are you
looking and what can we do better to help you understand the "process"?
 
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ricrootnc
Sent: Tuesday, October 02, 2007 9:04 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problem filtering custom list component



Ping  

Sadly, I'm still stumped by this one.

--- In flexcoders@yahoogroups.com 
, "Rick Root" <[EMAIL PROTECTED]> wrote:
>
> So I'm using this CheckBoxList component that someone on this list
> created for me.
> 
> I've got a problem though when filtering the list using the
> dataProvider's filterFunction property.
> 
> SOMETIMES the list items remain selected when they disappear from 
view
> due to being filtered, and sometimes they don't. The problem is
> somewhat erratic as to WHEN it happens.
> 
> A secondary problem, which I can't replicate in my test app, is that
> when I clear the list by setting the selectedIndex property to -1,
> *SOMETIMES* the actual checkboxes stay checked, even though the 
items
> aren't selected any more (the blue highlight goes away, but the
> checkbox stays).
> 
> The MXML code CheckBoxListTest.mxml, along with the components
> (CheckBoxList.as and CheckBoxListItemRenderer.as) are linkable from
> the test application:
> 
> http://www.it.dev.duke.edu/public/CheckBoxListTest.html
 
> 
> I appreciate any inside folks can offer.
> 
> 
> -- 
> Rick Root
> Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
> www.opensourcecf.com
>



 


RE: [flexcoders] How to filter out nodes from an XMLList?

2007-10-02 Thread Tracy Spratt
I think the key in that is using the ordinal index into the XML list.

 

I know Adobe is following the ecma specifications, but someone needs to
slap those ecma guys for not providing an XML.delete() method.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Tuesday, October 02, 2007 5:21 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to filter out nodes from an XMLList?

 

I have used this function to delete the child nodes of a function.  I
think that you could replace the "children()" with any e4x expression:

  private function deleteChildren(xmlNode:XML):void

  {

var xlChildren:XMLList = xmlNode.children();

for (var i:int=xlChildren.length()-1;i>=0;i--)

{

delete xlChildren[i]; //so
remove all the children

}   

  }//deleteChildren

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ambrice
Sent: Tuesday, October 02, 2007 4:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to filter out nodes from an XMLList?

 

I want to delete all nodes in an XML/XMLList that match a filter. 
Something like:

delete myxml..employee.(@name == "Bob");

However I get an error saying you can't use delete on an XMLList. I
tried:

for each (var node:XML in myxmllist) {
delete node;
}

But I get an error about not being able to delete a staticly assigned
variable or something like that. There also doesn't seem to be a
node.remove() method or anything handy like that. Actionscript's E4X
implementation seems to think that you would only want to add nodes to
an XML. Any ideas?

Thanks,
Aaron

 



RE: [flexcoders] How to filter out nodes from an XMLList?

2007-10-02 Thread Tracy Spratt
I have used this function to delete the child nodes of a function.  I
think that you could replace the "children()" with any e4x expression:

  private function deleteChildren(xmlNode:XML):void

  {

var xlChildren:XMLList = xmlNode.children();

for (var i:int=xlChildren.length()-1;i>=0;i--)

{

delete xlChildren[i]; //so
remove all the children

}   

  }//deleteChildren

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ambrice
Sent: Tuesday, October 02, 2007 4:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to filter out nodes from an XMLList?

 

I want to delete all nodes in an XML/XMLList that match a filter. 
Something like:

delete myxml..employee.(@name == "Bob");

However I get an error saying you can't use delete on an XMLList. I
tried:

for each (var node:XML in myxmllist) {
delete node;
}

But I get an error about not being able to delete a staticly assigned
variable or something like that. There also doesn't seem to be a
node.remove() method or anything handy like that. Actionscript's E4X
implementation seems to think that you would only want to add nodes to
an XML. Any ideas?

Thanks,
Aaron

 



[flexcoders] Combination zipCode and state formatter

2007-10-02 Thread Patrick Lemiuex
Hi:

Is there a way to get a state from a zipCode in flex, with a  
formatter or such?

Thanks,
Patrick


RE: [flexcoders] Re: Return a person's age

2007-10-02 Thread Tracy Spratt
Oops, yes, the subtraction should be reversed.

 

But one of the overloads of the Date constructor takes a single
argument, the number of milliseconds from the reference date, the same
reference date as the getTime() method.  The doc example shows this
method for adding time to a date, but I expect it will work for
subracting time as well.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Doug Lowder
Sent: Tuesday, October 02, 2007 3:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Return a person's age

 

Wouldn't that produce a negative number, given that birthDate 
probably comes before todayDate?

Discounting that, I think that would give you the person's age in 
milliseconds.

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Based on my reading of the docs, there is a simpler way:
> 
> var age = new Date(birthDate.getTime() - todayDate.getTime);
> 
> Untested.
> 
> Tracy
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of JRBower
> Sent: Tuesday, October 02, 2007 2:29 AM
> To: flexcoders@yahoogroups.com  
> Subject: Re: [flexcoders] Return a person's age
> 
> 
> 
> 
> Doug,
> Thank you. I will give your code a go. :)
> 
> Best Regards,
> James
> 
> Doug Lowder wrote:
> > 
> > Here's how I would do it:
> > 
> > var age:Number = todayDate.fullYear - birthDate.fullYear;
> > if (todayDate.month < birthDate.month || (todayDate.month == 
> > birthDate.month && todayDate.date < birthDate.date)) age--;
> > return age;
> > 
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Return-a-person%27s-age-
 
tf4545118.html#a12993386
>  
tf4545118.html#a12993386>
> 
> Sent from the FlexCoders mailing list archive at Nabble.com.
>

 



Re: [flexcoders] TileList invalidateList not working

2007-10-02 Thread Charles Galpin


On Oct 2, 2007, at 3:29 PM, Alex Harui wrote:

By default, and for performance reasons, there is no write- 
detection to properties.  You use proxy, [bindable] or setters to  
detect writes.


Collections will watch their items for changes if they can, but you  
are using dynamic objects and they have to write-detection.
Collections have an itemUpdated method to allow you to manually  
notify the collection that something that could not be watched  
changed.


Yeah I was trying to keep it simple and show a non-binding example,  
but maybe I oversimplified.  Typically we end up setting multiple  
properties at once and get a flurry of events when only one is needed  
with bindable properties.


but I tried the itemUpdated method and it isn't working for me. I  
tried both


var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(obj);

and

var obj:Object = dataCollection.getItemAt(indices[i]);
obj.data = val.text;
dataCollection.itemUpdated(dataCollection.getItemAt(indices[i]));

What am I doing wrong?


But looking at the docs did clue me in on the disableAutoUpdate() and  
enableAutoUpdate() methods which I'll try for our objects with  
bindable properties.


thanks
charles
p.s. In case you don't hear it enough, thanks for the time you devote  
to this list - I am sure it goes well beyond the call of duty as an  
adobe employee.

[flexcoders] How to filter out nodes from an XMLList?

2007-10-02 Thread ambrice
I want to delete all nodes in an XML/XMLList that match a filter. 
Something like:

delete myxml..employee.(@name == "Bob");

However I get an error saying you can't use delete on an XMLList.  I
tried:

for each (var node:XML in myxmllist) {
  delete node;
}

But I get an error about not being able to delete a staticly assigned
variable or something like that.  There also doesn't seem to be a
node.remove() method or anything handy like that.  Actionscript's E4X
implementation seems to think that you would only want to add nodes to
an XML.  Any ideas?

Thanks,
Aaron




RE: [flexcoders] Re: Tilelist and image

2007-10-02 Thread Alex Harui
When I grab the thumb and scroll quickly, it skips over a bunch of
images.  If you're having problems, try it in Moxie.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nxzone
Sent: Tuesday, October 02, 2007 8:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tilelist and image



That shouldn't be true but it is...

Here a simple example for you:
http://www.ideeclic.com/tilebug/scrollbug.html
 

Check the communication with Charles proxy.

Thank you
David

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> That shouldn't be true either. To grab the scroll thumb to quickly
> scroll through 2 images will cause you to skip lots of the images.
> 
> Note also that loads are synchronous when testing from FlexBuilder and
> will behave differently when deployed to the web.
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of nxzone
> Sent: Friday, September 28, 2007 11:16 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Tilelist and image
> 
> 
> 
> Hi,
> 
> Thank you for you answer. I expect the loads stop and new ones start
> when scolling but it's false... The load never stop until he is
> loader! Why, i dont know but it's stup** :). So if i have a tile list
> with 2 images, if i scroll at the bottom very very fast, i will
> load all the 2 images. And if i want to see only the image number
> 1, i must wait to load the 1 before. Crasy...
> 
> --- In flexcoders@yahoogroups.com


> , "Alex Harui"  wrote:
> >
> > I would expect the loads to stop and new ones to start when
scrolling.
> > SuperImage from quietlyscheming.com should alleviate some of that
> > 
> > When you close the Canvas, there is nothing to tell the renderers to
> > stop loading. You can build that in if you want.
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com


> [mailto:flexcoders@yahoogroups.com


> ] On
> > Behalf Of nxzone
> > Sent: Wednesday, September 26, 2007 6:56 PM
> > To: flexcoders@yahoogroups.com 
 
> > Subject: [flexcoders] Tilelist and image
> > 
> > 
> > 
> > Hi,
> > 
> > I try to do a image browser with a tilelist like this:
> >  > borderStyle="solid" dataProvider="{_dataprovider}" height="100%" 
> > width="100%" verticalScrollPolicy="on">
> > 
> > 
> > My dataprovider can be a list of hundreds of images. 
> > 
> > If I scroll, all visible need to be load.
> > 
> > This is working but... why when i scroll, all image start to load 
> > but never stop to load even when they are hidden... I mean if the 
> > image is a 10% of loading, when i scroll and the image is been hide 
> > why the loader doesn't stop to load this specific image??
> > Even if i close my Canvas that containt the tilelist, all image 
> > continu to load pointlessly.
> > Thank you!
> >
>



 


[flexcoders] Newbie Focus on Result Question

2007-10-02 Thread its_llpj
Hello,

I have a datagrid and underneath the datagrid I'm using a Form to
display the entire record. When I click on a cell in the datagrid it
shows the data in the form, but you have to manually scroll down to
view the information. I would like to scroll down the page and focus
to the Form to show the rest of the record. This way I can keep the
datagrid reasonably small. 

Thanks!






[flexcoders] Re: actionscript generation of mask/hitArea from bitmapdata...

2007-10-02 Thread dodtsair
--- In flexcoders@yahoogroups.com, "unaflux" <[EMAIL PROTECTED]> wrote:
>
> How can I create an arbitrarily complex Shape
> starting from alphachannel data of a dynamically loaded image?
> 
> I'd like to use the shape mainly for two things:
> - to set a complex hitArea of a Sprite
> - to mask a DisplayObject that has MouseEvents on it 
> 
> The problem are somehow related:
> 1) If I apply directly the loaded image 
>(wrapped in a Sprite) as the hitArea
>mousevents gets triggered in the rect area
>that has the dimension of the loaded image.
>
> 2) If I apply directly the loaded image as a mask
>I've no problems to obtain the visual masking effect
>but mousevents still gets triggered in the rect area
>that has the dimension of the loaded image, not only
>on the visible areas...
> 
> 
> 
> In the authoring environment solution is simple...
> - take the image
> - do a trace bitmap
> - use the traced bitmap non transparent areas 
>   as hitArea in a SimpleButton.
> 
> In Actionscript, if the masking/hitArea Shape is simple...
> - draw the masking/hitArea Shape
> - apply it as a mask
> 
> 
> In ActionScript, if the masking/hitArea is complex
> it starts becoming a problem.
> I think that's because I'm still working
> with the BitmapData of the image (that is rectangular).
> Even in the authoring environment if you use a Bitmap,
> instead of a Shape, you get a rectangular mouseSensible area.
> But how can I obtain a Shape from the alphachannel data
> of the image I loaded?
> The idea is to use this arbitrarily complex Shape
> (wrapped in a Sprite) as a dynamically generated mask/hitArea,
> that gives me an arbitrarily complex mouseSensible area.
> 
> Have you ever tried something like that?
> Is that even possible?
> Using Actionscript shouldn't I have access to all that
> could be done in the authoring environment?
> Stated in another way...
> how can I actually do something similar to the 
> trace bitmap operation...
> 
> Any suggestions
> Thanks
> Jo
>

I am trying to do the same thing.  I wanted to build a widget that
would allow the user to click on a world map to select his timezone.

At this point like you I have failed to use the hitArea to filter the
mouse events.  The next thing I will try is grabing the x,y of the
mouse event and trying to pull out the pixel data of the image at that
point.  We'll see if I succeed.

If anyone knows a better more straight forward solution I think we
would both appreciate it.

Mike Power



[flexcoders] Re: SQL connection error when running on live server

2007-10-02 Thread wtf_anyprofileisfine
That sounds like the credentials for your DSN on the live server are
not correct. 

If you have access to the CF Administrator check the DSN settings, or
make sure that in your cfc you are passing along the correct username
and password for the query. 

--- In flexcoders@yahoogroups.com, "stephen50232" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I have a Flex application, which runs fine locally, but on the live
> server I get a error message when running queries in a CFC which I'm
> calling using remoting.
> The error message I get is 
> 
> RPC Fault faultString = "Error Executing Database Query"
> faultCode="Server.processing"
> faultDetail="Login failed for user '***'
> 
> Now on the test server there are no user accounts and everything is
> working fine, on the live server it seems to be checking with a user
> login, but I haven't set one up.
> 
> Do i need to create a user account to run these CFC's? 
> 
> Stephen
>




[flexcoders] Bug? Flex breaks composite design pattern

2007-10-02 Thread dodtsair
1. Sprite is both a DisplayObjectContainer and a DisplayObject.
2. A DisplayObjectContainer (like Application) has the function
addChild(child:DisplayObject):DisplayObject.

Thus I should be able to call addChild and pass it a Sprite.  However
I can't and I get the error "TypeError: Error #1034: Type Coercion
failed: cannot convert flash.display::[EMAIL PROTECTED] to
mx.core.IUIComponent."

So it seems that the documentation and/or the implementation is wrong?
 You should be able to pass a sprite into addChild?  Maybe I made a
typo and just have not caught it?

Here is the app used to produce the error:

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

  



  



I have seen several examples use this same call, I can fix it by using
a class that is derived from Sprite and IUIComponent.

Mike Power



[flexcoders] Re: Simple RemoteObject call - cannot figure out what is wrong

2007-10-02 Thread dffmyco
1. May seem simple but run the cfc from a cfm page in the same 
location at the flex file. I always make sure my cfc works outside 
of flex

2. Installl this to help with debuging
http://www.mikenimer.com/index.cfm/2006/7/5/FlexDebugPanel
This may provide some additional information






--- In flexcoders@yahoogroups.com, "George Georgiou" 
<[EMAIL PROTECTED]> wrote:
>
> Hi all,
> 
> I am trying to switch from httpservice into remoteobject but i m 
having a
> problem in here which i cannot figure out how to solve.
> 
> I have managed to read data using a CFC and display them in a grid 
(I have
> really wrote my own component that I can pass SQL there and 
display data).
> However I cannot pass parameters into the CFC and insert or update 
my
> database. Here is my code:
> 
> 
> 
> http://www.adobe.com/2006/mxml"; 
layout="absolute">
> 
>  
>   
>  
> 
>  
>   
>  
> 
>  
> 
> 
> 
> 
> and here is a VERY simple CFC
> 
> 
> 
> 
> insert into tbl_test (firstName)
> values ('FlexGeorge')
> 
> 
> 
> 
> 
> When I click the button, I getr the following error:
> 
> 
> 
> [RPC Fault faultString="Unable to invoke CFC" 
faultCode="Server.Processing"
> faultDetail="For details, turn on Robust Exception Information in 
the
> ColdFusion Administrator"]
>  at
> 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::f
aultHandler
> ()
>  at mx.rpc::Responder/fault()
>  at mx.rpc::AsyncRequest/fault()
>  at
> ::NetConnectionMessageResponder/NetConnectionChannel.as$40:NetConne
ctionMessageResponder::statusHandler()
>  at mx.messaging::MessageResponder/status()
> 
> 
> 
> any ideas on how to achieve this simple task that I m trying to do?
> 
> 
> 
> thanks,
> 
> George
>




[flexcoders] Force an update to grid renderers

2007-10-02 Thread wmjdev
I have an array of generic objects (not flagged as bindable) I am also
using item editors as renderers in all columns. but if I change a
value in an underlying object, is there anyway short of a full refresh
or calling updateList on the grid to get it to pick up the change. If
I resize the grid I can see the change, but for the life of me, I can
not figure out what event to dispatch on the list to tell the current
row to repaint.



Re: [flexcoders] itemRender set data question

2007-10-02 Thread Wayne LaRochelle
HI!!

Thanks that was it.



- Original Message 
From: Alex Harui <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, October 2, 2007 9:26:40 AM
Subject: RE: [flexcoders] itemRender set data question









  







read about IDropInListItemRend erer and see how we use it in 
TextInput and Label 




From: [EMAIL PROTECTED] ups.com 
[mailto:flexcoders@ yahoogroups. com] On Behalf Of waynelll
Sent: 
Tuesday, October 02, 2007 8:35 AM
To: 
[EMAIL PROTECTED] ups.com
Subject: [flexcoders] itemRender set data 
question






HI!!

I am building a screen that is a DataGrid. Each DataGrid cell 
contains
2 Buttons and a TextArea. The DataGrid is built dynamically from 
data
read from a file containing 
XML.
 = = = ==
 






 = = = 

I 
build the DataGrid 

 = = = 

var 
dataList:XMLList = XmlData;
var field_name:String;
var dataObj:Object = 
new Object();

dataObj.name = 
dataList.student. child("name" );
index = 0;

for each(var 
child:XML in dataList.student. *)
{
field_name = "Test" + 
index;
DataObj[field_ name] = 
child;
index++;
}
 = = = = =
I 
add the XML data to the ArrayCollection and then assign it as 
the
DataProvider for the 
DataGrid
 = = = = ===
columnCollection. addItem(dataObj) ;
gradeGrid.dataProvi der 
= 
columnCollection;
 = = = = ===
I 
add the itemRender to the 
DataGridColumn
 = = = = =

for 
(var i:Number = 1; i








   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

RE: [flexcoders] VerifyError: Error #1053: Illegal override of virtualWidth in mx.controls.HScrol

2007-10-02 Thread Alex Harui
Are the modules and app all built using the same SDK version?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sk_acura
Sent: Tuesday, October 02, 2007 10:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] VerifyError: Error #1053: Illegal override of
virtualWidth in mx.controls.HScrol



Hi All,

I am getting the Following Error when i try to load a module in my app..

I have found a JIRA Issue already opened on this ..But i don't see
any info reg how this can be resolved..

the URL is http://bugs.adobe.com/jira/browse/SDK-10858
 

The Environment i am using is:

Open SUSE10.1
Flex 3 SDK Beta 1
Flex Live Cycle DataServices
Tomcat Version 6.0.9
JDK Version 1.5.0_10

[ERROR]

VerifyError: Error #1053: Illegal override of virtualWidth in
mx.controls.HScrollBar.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DataGridStyle__embed_css_Assets_swf_cursorStretch_2002600740 is not
defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DividedBoxStyle__embed_css_Assets_swf_mx_skins_cursor_VBoxDivider_27775
5828
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_1249535
2
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeFolderClosed_80449675 is not
defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_20452
48557
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeNodeIcon_132999082 is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_HDividedBoxStyle__embed_css_Assets_swf_mx_skins_cursor_HBoxDivider_1559
228938
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_HDividedBoxStyle__embed_css_Assets_swf_mx_skins_BoxDividerSkin_39339693
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeDisclosureOpen_1208473086 is not
defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeDisclosureClosed_1632204892 is
not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_1245737
5
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_HDividedBoxStyle__embed_css_Assets_swf_mx_skins_cursor_VBoxDivider_2777
55828
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeFolderOpen_1660035325 is not
defined.
at flash.display::MovieClip/nextFrame()
at mx.core::Flex

[flexcoders] LCDS: Reordering managed collections?

2007-10-02 Thread Robert Csiki
Hello,

Suppose I have a managed collection and I want to reorder its items 
(say via Drag and Drop, on a TileList).
I want the FDS to save this new item order to the persistance layer 
(database).
On the LCDS side how to get the changes done as a result of 
rearranging the items done by the user?

I noticed my data service destination's "sync" method gets invoked by 
the framework, but it only contains what items to "delete" and what 
to "create", and nothing about the new item position in the list.

I am using the Java adapter on the LCDS side.
Please help.

Thanks
Robert



RE: [flexcoders] Framework Caching not working

2007-10-02 Thread Alex Harui
Darrell, can you look at this?
 
Thanks,
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danielvlopes
Sent: Tuesday, October 02, 2007 11:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Framework Caching not working



Hello, i having problems when i try use framework caching on moxie.

I compile my project using this build.xml trouhg Apache Ant:















 













 



All my modules using RSL and main app to.
Everything is compiled ok, and framework to... but framework not
caching. After i load the application first time and enter again, ok,
cache is ok, but when i clear the cache of my browser all framework is
loaded again.

Anyone know how it is possible?
Thanks.



 


RE: [flexcoders] Sorting content in a List component

2007-10-02 Thread Alex Harui
I would take a sample set of data returned from CF and bake it into the
app and see if it sorts.  If not, then you can post that as a test case.
 
Also, shouldn't you be doing this in dragDrop and not dragComplete?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Root
Sent: Tuesday, October 02, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Sorting content in a List component



The data I want to sort on is the label, which is actually a row in the
query that is returned... coldfusion manufacturers the label content in
the query.
 
So it's just a string.
 
Rick


 
On 10/2/07, Alex Harui <[EMAIL PROTECTED]  >
wrote: 


what does the data look like?



From: flexcoders@yahoogroups.com   [mailto:
flexcoders@  yahoogroups.com
 ] On Behalf Of Rick Root
Sent: Tuesday, October 02, 2007 8:59 AM
To: [EMAIL PROTECTED] ups.com  
Subject: [flexcoders] Sorting content in a List component

 


I have two lists, with the ability to drag items from one to the
other. works fine..

However, my users have asked that the data in the "destination"
list
be sorted alphabetically rather than just dropped in place. 

I can't get this to work though. By default, the list items are
dragged in and placed in the array collection where they are
dropped.

So I've added the following code to my dragComplete vent
handler: 

var target:List = List(cboSelectedFundcodes);
var sort:Sort = new Sort();
sort.fields = [new SortField("LABEL", true)];

ArrayCollection(target.dataProvider).sort = sort;
ArrayCollection(target.dataProvider ).refresh();

However, this doesn't seem to have any affect.

Any suggestions?

-- 
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com  











-- 
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com   

 


RE: [flexcoders] Re: My column doesn't sort correctly in Flex 3 Beta 2

2007-10-02 Thread Alex Harui
That's a bug in AdvancedDG, regular DG works fine for me.  Please file a
bug.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Tuesday, October 02, 2007 12:28 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: My column doesn't sort correctly in Flex 3
Beta 2



Just FYI this example works fine here (Beta 1) so I think they are being
interpreted as numbers in actionscript. 

charles

On Oct 2, 2007, at 2:33 PM, Nate Pearson wrote:


The code below demonstrates the problem.  Although I am not

specifically typing margin revenue to a number I think AS3 is
doing it

since I don't have quotes.  In my real application i am using a
class

that does type it to Number.




Just try to sort the marginRevenue column and you'll see what I
mean.


 


[flexcoders] Re: Return a person's age

2007-10-02 Thread Doug Lowder
Wouldn't that produce a negative number, given that birthDate 
probably comes before todayDate?

Discounting that, I think that would give you the person's age in 
milliseconds.


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Based on my reading of the docs, there is a simpler way:
> 
> var age = new Date(birthDate.getTime() - todayDate.getTime);
> 
> Untested.
> 
> Tracy
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of JRBower
> Sent: Tuesday, October 02, 2007 2:29 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Return a person's age
> 
>  
> 
> 
> Doug,
> Thank you. I will give your code a go. :)
> 
> Best Regards,
> James
> 
> Doug Lowder wrote:
> > 
> > Here's how I would do it:
> > 
> > var age:Number = todayDate.fullYear - birthDate.fullYear;
> > if (todayDate.month < birthDate.month || (todayDate.month == 
> > birthDate.month && todayDate.date < birthDate.date)) age--;
> > return age;
> > 
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Return-a-person%27s-age-
tf4545118.html#a12993386
> 
> 
> Sent from the FlexCoders mailing list archive at Nabble.com.
>




RE: [flexcoders] TileList invalidateList not working

2007-10-02 Thread Alex Harui
By default, and for performance reasons, there is no write-detection to
properties.  You use proxy, [bindable] or setters to detect writes.
 
Collections will watch their items for changes if they can, but you are
using dynamic objects and they have to write-detection.   Collections
have an itemUpdated method to allow you to manually notify the
collection that something that could not be watched changed.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Tuesday, October 02, 2007 11:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] TileList invalidateList not working



Hopefully an easy one. Please try the simple test case below. Select one
or more items, enter a new label and click "Update". You can optionally
select the checkbox to force an invalidateNow after the update, but
either way, the list doesn't refresh. If you scroll down and up, then
they refresh.

How can I get my TileList to refresh when data changes?

thanks
charles



http://www.adobe.com/2006/mxml
 " layout="absolute"
applicationComplete="appInit()">





















 


Re: [flexcoders] Re: My column doesn't sort correctly in Flex 3 Beta 2

2007-10-02 Thread Charles Galpin
Just FYI this example works fine here (Beta 1) so I think they are  
being interpreted as numbers in actionscript.


charles

On Oct 2, 2007, at 2:33 PM, Nate Pearson wrote:


The code below demonstrates the problem.  Although I am not
specifically typing margin revenue to a number I think AS3 is doing it
since I don't have quotes.  In my real application i am using a class
that does type it to Number.

Just try to sort the marginRevenue column and you'll see what I mean.




[flexcoders] FileReference + multiple uploads

2007-10-02 Thread Matthew Ganz
Hi.

I thought that if I have an array of FileReference objects, I can iterate over 
them and call upload() on each one without waiting for a response from the 
previous one. The problem is that my java upload service is only uploading 1 
file and I don't know why the others aren't going thru. 

Here is my code. Has anyone else experienced this before?

Thanks for any tips. -- Matt. 

private function uploadFiles(event:MouseEvent):void{
 var request:URLRequest = new 
URLRequest("http://localhost:8080/MyServer/esri/UploadFile.action";);
try
{
 if(fileRefObjects.length == 3){
 for(var i:int=0;i

RE: [flexcoders] Re: Sort string like number in datagrid

2007-10-02 Thread Tracy Spratt
My understanding is that the DG will sort numerically if the column
contains true numbers (not strings that look like numbers).

 

Be sure you are placing a true number in the dataProvider  item
property.  But to store the data formatted as money, it can't be a
number, so...

 

Another solution would be a custom sort function.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danielvlopes
Sent: Tuesday, October 02, 2007 2:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Sort string like number in datagrid

 

Some one?

--- In flexcoders@yahoogroups.com 
, "danielvlopes" <[EMAIL PROTECTED]>
wrote:
>
> Ola, I am with the following problem...
> I have the field value in some tables of my DB, in flex I store values
> in format ,00 (money) but when I return the stored items for my
> datagrid and click header to sort it no right sorted because is
string.
> 
> I'm using amfphp to get values from PHP. 
> 
> If i use, decimal on mysql, i think php will cast this decimal to
> string before send to flex.
> 
> Which would be the best way to fix this problem? 
> 
> Thanks
>

 



[flexcoders] TileList invalidateList not working

2007-10-02 Thread Charles Galpin
Hopefully an easy one. Please try the simple test case below. Select  
one or more items, enter a new label and click "Update". You can  
optionally select the checkbox to force an invalidateNow after the  
update, but either way, the list doesn't refresh. If you scroll down  
and up, then they refresh.


How can I get my TileList to refresh when data changes?

thanks
charles



http://www.adobe.com/2006/mxml";  
layout="absolute"

applicationComplete="appInit()">










		height="150"
			change="{ val.text = list.selectedIndices.length > 0 ? '' :  
list.selectedItem.data}"

columnCount="1" labelField="data" 
dataProvider="{dataCollection}" >











[flexcoders] Re: My column doesn't sort correctly in Flex 3 Beta 2

2007-10-02 Thread Nate Pearson
The code below demonstrates the problem.  Although I am not
specifically typing margin revenue to a number I think AS3 is doing it
since I don't have quotes.  In my real application i am using a class
that does type it to Number.

Just try to sort the marginRevenue column and you'll see what I mean.


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













--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Please post a test case or file a bug.  Maybe we goofed somewhere.
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Nate Pearson
> Sent: Tuesday, October 02, 2007 9:26 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: My column doesn't sort correctly in Flex 3
> Beta 2
> 
> 
> 
> actually, my data is of type number and I am using a label function to
> display it in a currency format. I just used the commas to improve
> readability for my forum post.
> 
> here is the actual data:
> 
> 16559240.56
> 28022462.90
> 4101969.43
> 6472891.11
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > If your data is 28,000,000, the DG will now sort alphabetically
> because
> > that isn't number, but rather a string. I actually think the old
> > behavior just chopped off 28, 16, 6 and 4 and sorted by those numbers
> > such that 28,123,456 and 28,234,567 weren't guaranteed to be ordered.
> > 
> > 
> > 
> > If you want numeric sorting, data should be of type int or Number and
> a
> > labelFunction should be used to format what you see.
> > 
> > 
> > 
> > This behavior become more strict in order to fix a bug where there was
> > no way to specify non-numeric sorts in mixed alpha/number strings.
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of Nate Pearson
> > Sent: Monday, October 01, 2007 4:56 PM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] My column doesn't sort correctly in Flex 3 Beta
> 2
> > 
> > 
> > 
> > My column used to sort correctly, IE:
> > 28,000,000
> > 16,000,000
> > 6,000,000
> > 4,000,000
> > 
> > Now in Beta 2 with no code changes I get:
> > 16,000,000
> > 28,000,000
> > 4,000,000
> > 6,000,000
> > 
> > What gives? Is it sorting it alphabetically? If so how do I change
> > it back to the way it was?
> > 
> > Thanks,
> > 
> > Nate
> >
>




[flexcoders] B2 Upgrade overwrites html template

2007-10-02 Thread Richard Rodseth
I just installed FB3 B2, and noticed that my modification of
index.template.html (which I had checked into Subversion luckily) was
overwritten when I restarted eclipse with the new plugins. Just a
heads up to anyone else who has modified this file.

By the way, I like to install FB3 in an Eclipse extension location,
and the only way I've been able to do this reliably has been to
install into an Eclipse classic folder, and then copy the features and
plug-ins to my extension location. In the absence of an Eclipse update
site,  I'd like to see this supported more directly in the installer.

Good news is the builds seem quite a bit snappier!


[flexcoders] Re: dataGrid Printing: validNexPage always TRUE

2007-10-02 Thread hammer995
Looks like it was a BUG.  The new M2 fixed it.

Thanks.



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Please post a small test case.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of hammer995
> Sent: Monday, October 01, 2007 12:13 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: dataGrid Printing: validNexPage always TRUE
> 
>  
> 
> I have. The grid is a search result. So, if I query for something
> that takes up more than two pages then the result is the footer gets
> printer on the second page, but a third page prints out with just the
> footer.
> 
> I've also tried it with just 10 rows of datathe second page in
> that case will just be the footer.
> 
> --- In flexcoders@yahoogroups.com 
> , "Alex Harui"  wrote:
> >
> > Maybe a bug on a boundary condition. Try changing the size of the PDG
> > and see if that makes a difference.
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com 
> ] On
> > Behalf Of hammer995
> > Sent: Monday, October 01, 2007 10:56 AM
> > To: flexcoders@yahoogroups.com  
> > Subject: [flexcoders] Re: dataGrid Printing: validNexPage always TRUE
> > 
> > 
> > 
> > I should clarify that I do get a false from validNextPage but it seems
> > to be after all the data has been printed. I then get an extra page
> > with just the footer.
> > 
> > --- In flexcoders@yahoogroups.com
> 
> 
> > , "hammer995"  wrote:
> > >
> > > So I followed the example from the docs to print a datagrid. For
> some
> > > reason I always get validNextPage to be true even when there is not
> > > enough data to fill a page. 
> > > 
> > > The example works fine but I cannot get it to work with my
> > application.
> > > 
> > > Here is the code:
> > > private function printExecution():void {
> > > var printJob:FlexPrintJob = new FlexPrintJob;
> > > 
> > > if ( printJob.start() ) {
> > > var thePrintView:FormPrintView = new FormPrintView();
> > > thePrintView.visible = false;
> > > thePrintView.includeInLayout = false;
> > > Application.application.addChild(thePrintView);
> > > 
> > > thePrintView.width = printJob.pageWidth;
> > > thePrintView.height = printJob.pageHeight;
> > > 
> > > thePrintView.acct = acctArray[accts.selectedIndex]; 
> > > 
> > > thePrintView.fromDate = df.format(fromDate.selectedDate);
> > > thePrintView.toDate = df.format(toDate.selectedDate);
> > > thePrintView.totalTrades = numFmt.format(totalTrades);
> > > thePrintView.totalQty = numFmt.format(totalQty);
> > > thePrintView.totalComm = total.format(totalComm);
> > > thePrintView.dg_printDG.dataProvider =
> > > dg_report.dataProvider; 
> > > 
> > > thePrintView.showPage("single"); 
> > > thePrintView.footer.includeInLayout = true;
> > > thePrintView.footer.visible = true; 
> > > 
> > > trace("VALIDNEXTPAGE1 = " +
> > > thePrintView.dg_printDG.validNextPage)
> > > if (!thePrintView.dg_printDG.validNextPage) { 
> > 
> > > printJob.addObject(thePrintView);
> > > } else {
> > > thePrintView.showPage("first");
> > > printJob.addObject(thePrintView);
> > > thePrintView.pageNumber++;
> > > 
> > > while(true) {
> > > thePrintView.dg_printDG.nextPage(); 
> > > thePrintView.showPage("last");
> > > trace("VALIDNEXTPAGE2 = " +
> > > thePrintView.dg_printDG.validNextPage)
> > > if (!thePrintView.dg_printDG.validNextPage) { 
> > > 
> > > printJob.addObject(thePrintView);
> > > break;
> > > } else {
> > > thePrintView.showPage("middle");
> > > printJob.addObject(thePrintView);
> > > thePrintView.pageNumber++;
> > > trace("PAGE = " + thePrintView.pageNumber);
> > > }
> > > }
> > > }
> > > Application.application.removeChild(thePrintView);
> > > }
> > > printJob.send();
> > > }
> > > 
> > > 
> > > Any help would be appreciated...I've been banging my head for a few
> > > days now.
> > > 
> > > thanks!
> > >
> >
>




[flexcoders] Re: Sort string like number in datagrid

2007-10-02 Thread danielvlopes
Some one?

--- In flexcoders@yahoogroups.com, "danielvlopes" <[EMAIL PROTECTED]>
wrote:
>
> Ola, I am with the following problemÂ…
> I have the field value in some tables of my DB, in flex I store values
> in format ,00 (money) but when I return the stored items for my
> datagrid and click header to sort it no right sorted because is string.
> 
> I'm using amfphp to get values from PHP. 
> 
> If i use, decimal on mysql, i think php will cast this decimal to
> string before send to flex.
> 
> Which would be the best way to fix this problem? 
> 
> Thanks
>




[flexcoders] Framework Caching not working

2007-10-02 Thread danielvlopes
Hello, i having problems when i try use framework caching on moxie.

I compile my project using this build.xml trouhg Apache Ant:
















 













   
   



All my modules using RSL and main app to.
Everything is compiled ok, and framework to... but framework not
caching. After i load the application first time and enter again, ok,
cache is ok, but when i clear the cache of my browser all framework is
loaded again.

Anyone know how it is possible?
Thanks.



RE: [flexcoders] Return a person's age

2007-10-02 Thread Tracy Spratt
Based on my reading of the docs, there is a simpler way:

var age = new Date(birthDate.getTime() - todayDate.getTime);

Untested.

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JRBower
Sent: Tuesday, October 02, 2007 2:29 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Return a person's age

 


Doug,
Thank you. I will give your code a go. :)

Best Regards,
James

Doug Lowder wrote:
> 
> Here's how I would do it:
> 
> var age:Number = todayDate.fullYear - birthDate.fullYear;
> if (todayDate.month < birthDate.month || (todayDate.month == 
> birthDate.month && todayDate.date < birthDate.date)) age--;
> return age;
> 
> 

-- 
View this message in context:
http://www.nabble.com/Return-a-person%27s-age-tf4545118.html#a12993386


Sent from the FlexCoders mailing list archive at Nabble.com.

 



Re: [flexcoders] Re: Problem filtering custom list component

2007-10-02 Thread Rick Root
Good to know that it's not just me, bad to know that it's a problem.

My beta users (we're curretnly beta testing an application where I'm using
this pretty heavily) absolutely love th feature.  If they want to select 5
or so items from a list of several hundred, it makes things a LOT easier for
them.. except when you select one item and it gets unselected when you
filter again and select another item! :)

Rick


On 10/2/07, Charles Galpin <[EMAIL PROTECTED]> wrote:
>
>   I wish I could help other than tell you I am facing similar problems
> with selections and think this stuff needs a good look at by adobe. I
> managed to make a simple test case that displayed my problem and Alex
> offered a workaround, but the workaround isn't working on my actual app!
>
> charles
>
> On Oct 2, 2007, at 12:03 PM, ricrootnc wrote:
>
> > Ping 
> >
> > Sadly, I'm still stumped by this one.
> >
> > --- In flexcoders@yahoogroups.com , "Rick
> Root" <[EMAIL PROTECTED]> wrote:
> >>
> >> So I'm using this CheckBoxList component that someone on this list
> >> created for me.
> >>
> >> I've got a problem though when filtering the list using the
> >> dataProvider's filterFunction property.
> >>
> >> SOMETIMES the list items remain selected when they disappear from
> > view
> >> due to being filtered, and sometimes they don't. The problem is
> >> somewhat erratic as to WHEN it happens.
> >>
> >> A secondary problem, which I can't replicate in my test app, is that
> >> when I clear the list by setting the selectedIndex property to -1,
> >> *SOMETIMES* the actual checkboxes stay checked, even though the
> > items
> >> aren't selected any more (the blue highlight goes away, but the
> >> checkbox stays).
> >>
> >> The MXML code CheckBoxListTest.mxml, along with the components
> >> (CheckBoxList.as and CheckBoxListItemRenderer.as) are linkable from
> >> the test application:
> >>
> >> http://www.it.dev.duke.edu/public/CheckBoxListTest.html
> >>
> >> I appreciate any inside folks can offer.
> >>
> >>
> >> --
> >> Rick Root
> >> Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
> >> www.opensourcecf.com
> >>
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives: 
> > http://www.mail-archive.com/flexcoders%
> > 40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> 
>



-- 
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com


Re: [flexcoders] Sorting content in a List component

2007-10-02 Thread Rick Root
The data I want to sort on is the label, which is actually a row in the
query that is returned... coldfusion manufacturers the label content in the
query.

So it's just a string.

Rick



On 10/2/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>what does the data look like?
>
>  --
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Rick Root
> *Sent:* Tuesday, October 02, 2007 8:59 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Sorting content in a List component
>
>
>
> I have two lists, with the ability to drag items from one to the
> other. works fine..
>
> However, my users have asked that the data in the "destination" list
> be sorted alphabetically rather than just dropped in place.
>
> I can't get this to work though. By default, the list items are
> dragged in and placed in the array collection where they are dropped.
>
> So I've added the following code to my dragComplete vent handler:
>
> var target:List = List(cboSelectedFundcodes);
> var sort:Sort = new Sort();
> sort.fields = [new SortField("LABEL", true)];
>
> ArrayCollection(target.dataProvider).sort = sort;
> ArrayCollection(target.dataProvider).refresh();
>
> However, this doesn't seem to have any affect.
>
> Any suggestions?
>
> --
> Rick Root
> Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
> www.opensourcecf.com
>
> 
>



-- 
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com


[flexcoders] VerifyError: Error #1053: Illegal override of virtualWidth in mx.controls.HScrol

2007-10-02 Thread sk_acura
Hi All,

  I am getting the Following Error when i try to load a module in my app..


  I have found a JIRA Issue already opened on this ..But i don't see
any info reg how this can be resolved..

  the URL is http://bugs.adobe.com/jira/browse/SDK-10858

The Environment i am using is:

Open SUSE10.1
Flex 3 SDK Beta 1
Flex Live Cycle DataServices
Tomcat Version 6.0.9
JDK Version 1.5.0_10


[ERROR]

VerifyError: Error #1053: Illegal override of virtualWidth in
mx.controls.HScrollBar.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DataGridStyle__embed_css_Assets_swf_cursorStretch_2002600740 is not
defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DividedBoxStyle__embed_css_Assets_swf_mx_skins_cursor_VBoxDivider_277755828
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_12495352
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeFolderClosed_80449675 is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_2045248557
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeNodeIcon_132999082 is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_HDividedBoxStyle__embed_css_Assets_swf_mx_skins_cursor_HBoxDivider_1559228938
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_HDividedBoxStyle__embed_css_Assets_swf_mx_skins_BoxDividerSkin_39339693
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeDisclosureOpen_1208473086 is not
defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeDisclosureClosed_1632204892 is
not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_12457375
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_HDividedBoxStyle__embed_css_Assets_swf_mx_skins_cursor_VBoxDivider_277755828
is not defined.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/::deferredNextFrame()
at mx.core::FlexModuleFactory/::update()
at mx.core::FlexModuleFactory/::moduleCompleteHandler()
ReferenceError: Error #1065: Variable
_TreeStyle__embed_css_Assets_swf_TreeFolderOpen_1660035325 is not defined.
at flash.display::MovieClip/nextF

RE: [flexcoders] Passing Application.application.parameters to a Flex component

2007-10-02 Thread Tracy Spratt
Just leave off the "new":

service = PropertyService(Application.application.parameters.psAddr);

 

I typically do:

  import mx.core.Application;

  private var _app:Application;

 

  private function initComp():void 

  {

_app = Application.application;

  ...

 

Then I can use _app whenever I need to access the top level application
scope.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of CO_China_Girl
Sent: Monday, October 01, 2007 7:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Passing Application.application.parameters to a
Flex component

 

I'm working on a Flex application that has a tab navigator component.
To prevent my main MXML file from becoming huge I decided to make
each tab "page" a separate component. The problem I have now is that
one of my Flex components need to have access to
Application.application.parameters. How do I pass this information to
my component, or how do I make this information available to my
component?

= Main MXML file =


http://www.adobe.com/2006/mxml
 "
xmlns:pf2="*" layout="horizontal">








= Component file =

http://www.adobe.com/2006/mxml
 "
label="Properties" width="100%" height="100%">











==

Thanks.

 



RE: [flexcoders] OT: Flex Consultants

2007-10-02 Thread Tracy Spratt
A single valid posting here is usually acceptable, but also check out:

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

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy French
Sent: Tuesday, October 02, 2007 10:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] OT: Flex Consultants

 

Sorry if this is OT, but since a number of the members of this group are
Flex consultants, I was wondering if anyone could tell me the best way
to secure the services of one.  We're building a fairly large flex app,
and find ourselves a bit over our heads, and would like to pay someone
to help guide us and answer questions - possibly to do some work as
well.  Is there a popular site for such a request, or another avenue to
pursue this kind of arrangement? 

 

How are you normally contacted for work?

 



RE: [flexcoders] Sleep() method

2007-10-02 Thread Tracy Spratt
A third way is to use Timer()

http://www.cflex.net/showFileDetails.cfm?ObjectID=560

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Seth Caldwell
Sent: Tuesday, October 02, 2007 12:39 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Sleep() method

 

Two ways:

function pollServer():void {

//do polling here

if(shouldcontinuepolling) setTimeout(pollServer,1000);

}

 

Or

 

function pollServer():void {

//do polling here

}

var pollInterval:uint=null;

function onCreationComplete():void {

pollInterval = setInterval(pollServer,1000);

}

Later when you need to stop polling:

if(pollInterval!=null) { clearInterval(pollInterval); pollInterval=null;
}



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mayank
Sent: Tuesday, October 02, 2007 8:33 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Sleep() method

 

I have a usecase where I need to keep polling the server for a value.
How can I achieve that without a sleep method?

On 10/2/07, Tom Chiverton < [EMAIL PROTECTED]
 > wrote:

On Tuesday 02 Oct 2007, [EMAIL PROTECTED] 
wrote:
> there is a lot of use for sleep function.

There is (as opposed to setTimeout which executes a method after a
delay) ?
When ?

--
Tom Chiverton
Helping to continuously restore dynamic design-patterns 
on: http://thefalken.livejournal.com  



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

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office
address is at St James's Court Brown Street Manchester M2 2JF.  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
8008. 

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


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
 
Yahoo! Groups Links 


(Yahoo! ID required)

mailto:[EMAIL PROTECTED]
 



 

 



RE: [flexcoders] Last displayed character of a textArea?

2007-10-02 Thread Alex Harui
It should involve getting to the underlying textfield, getting
bottomScrollV, calling getLineLength and other get* methods.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason The Saj
Sent: Tuesday, October 02, 2007 9:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Last displayed character of a textArea?



I am dealing with a rather annoying dilemma. 

Often I'll set text or htmlText of a textArea dynamically. I will also
turn off scrolling. 

Often as the case may be, the set text is longer than the displayable
area. I'd like to be able to get the "displayed text length" (ie:
last character position displayed). This is extremely hard to
calculate due to the large variety of factors (ie: font size, word
spacing, word wrap, etc). 

This must exist internally because Flash already recognizes whether a
word extends beyond the bounds of the textArea and instead of simply
cutting it off at the edge; it removes the entire word from display.

Anyone aware of any way to get the last displayed character?



 


Re: [flexcoders] Last displayed character of a textArea?

2007-10-02 Thread Daniel Freiman
TextArea uses TextField to render the text characters.  If you look at the
livedocs (
http://livedocs.adobe.com/flex/201/langref/flash/text/TextField.html),
you'll see a lot of useful methods and properties.  There are probably a
couple ways to do this.  I would iterate through the lines of text using
getLineMetrics() and check to see if the line was inside the bounding box of
the TextField.  The character before that line should be the last character
shown.  Note that I'm not sure if you're going to care about the position of
the top of each line, or the bottom of each line.  You'll have to test
things like that for yourself.  To get to the textField of a TextArea you
can either subclass the TextArea or use textArea.mx_internal::getTextField().
(for more information on mx_internal see
http://nondocs.blogspot.com/2007/04/mxcoremxinternal.html)

- Dan Freiman

On 10/2/07, Jason The Saj <[EMAIL PROTECTED]> wrote:
>
>   I am dealing with a rather annoying dilemma.
>
> Often I'll set text or htmlText of a textArea dynamically. I will also
> turn off scrolling.
>
> Often as the case may be, the set text is longer than the displayable
> area. I'd like to be able to get the "displayed text length" (ie:
> last character position displayed). This is extremely hard to
> calculate due to the large variety of factors (ie: font size, word
> spacing, word wrap, etc).
>
> This must exist internally because Flash already recognizes whether a
> word extends beyond the bounds of the textArea and instead of simply
> cutting it off at the edge; it removes the entire word from display.
>
> Anyone aware of any way to get the last displayed character?
>
>  
>


RE: [flexcoders] Re: My column doesn't sort correctly in Flex 3 Beta 2

2007-10-02 Thread Alex Harui
Please post a test case or file a bug.  Maybe we goofed somewhere.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Tuesday, October 02, 2007 9:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: My column doesn't sort correctly in Flex 3
Beta 2



actually, my data is of type number and I am using a label function to
display it in a currency format. I just used the commas to improve
readability for my forum post.

here is the actual data:

16559240.56
28022462.90
4101969.43
6472891.11

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> If your data is 28,000,000, the DG will now sort alphabetically
because
> that isn't number, but rather a string. I actually think the old
> behavior just chopped off 28, 16, 6 and 4 and sorted by those numbers
> such that 28,123,456 and 28,234,567 weren't guaranteed to be ordered.
> 
> 
> 
> If you want numeric sorting, data should be of type int or Number and
a
> labelFunction should be used to format what you see.
> 
> 
> 
> This behavior become more strict in order to fix a bug where there was
> no way to specify non-numeric sorts in mixed alpha/number strings.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Nate Pearson
> Sent: Monday, October 01, 2007 4:56 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] My column doesn't sort correctly in Flex 3 Beta
2
> 
> 
> 
> My column used to sort correctly, IE:
> 28,000,000
> 16,000,000
> 6,000,000
> 4,000,000
> 
> Now in Beta 2 with no code changes I get:
> 16,000,000
> 28,000,000
> 4,000,000
> 6,000,000
> 
> What gives? Is it sorting it alphabetically? If so how do I change
> it back to the way it was?
> 
> Thanks,
> 
> Nate
>



 


RE: [flexcoders] Change text color of row of Datagrid based on property

2007-10-02 Thread Alex Harui
See styledItemRenderer on my blog (blogs.adobe.com/aharui)



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Tuesday, October 02, 2007 9:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Change text color of row of Datagrid based on
property



I want to be able to set the text color of all cells in a row of a
datagrid based on a certain property

Basically each row represents a students data. One property of a student
is whether or not the student is active or not.

So I want to set the text for all non active students to red.

Thanks in advance!!

Paul 

 


RE: [flexcoders] Alert Bug - positioning of icon / text layout

2007-10-02 Thread Alex Harui
Please make a simple test case and file a bug.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Giles Roadnight
Sent: Tuesday, October 02, 2007 12:34 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Alert Bug - positioning of icon / text layout



Hi All

I use alerts in my application to warn about errors, give information
ect and most of the time it is fine.

Sometimes however the text falls off the side of the box and the icon
is in compleatly the wrong place (see image:
http://giles.roadnight.name/images/AlertError.gif
 )

When this Alert first appears the image is in the correct place (I
assume that the text is ok as well) but a second Alrt is popped up
over the top shortly afterwards and that's when the Error alert goes
funny:

http://giles.roadnight.name/images/AlertOK.gif
 

I would have thought it would be ok to have 2 alerts popped up at the
same time?

TIA

Giles



 


RE: [flexcoders] Re: Datagrid masking

2007-10-02 Thread Alex Harui
If you can make a small test case, post it here or file a bug.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of freska
Sent: Monday, October 01, 2007 11:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Datagrid masking



I use Moxie, but I have the same problem as Giles, data of the last
row appears outside the box.

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> According to others, it should work, but you might have to do a full
> clean and rebuild.
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Giles Roadnight
> Sent: Thursday, September 27, 2007 1:05 AM
> To: flexcoders@yahoogroups.com  
> Subject: Re: [flexcoders] Datagrid masking
> 
> 
> 
> Ok, I've installed Moxie to give it a shot but it won't compile as the
> charting component is not licensed
> 
> My Flex 2 serial doesn't work for charts but it did for Flex Builder.
> 
> Any advice?
> 
> Thanks again. 
> 
> 
> On 9/26/07, Alex Harui <[EMAIL PROTECTED]  >
> wrote: 
> 
> 
> 
> Some problems were fixed in Moxie.
> 
> 
> 
> From: flexcoders@yahoogroups.com 

> [mailto:flexcoders@yahoogroups.com
   > ] On Behalf
> Of Giles Roadnight
> Sent: Wednesday, September 26, 2007 6:22 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Datagrid masking
> 
> 
> 
> 
> Hi All
> 
> I've got an intermittent problem with the masking on my
> datagrids.
> Occassionally the scrolling content of the datagrid appears
> outside
> the bounds of the box.
> 
> I can see the contents of the row below the last displayed one
> when it
> should be masked and not visible.
> 
> When you scroll the problem fixes its self.
> 
> Has this happened to anyone else?
> Is there a fix?
> 
> I've got Flex Builder 2.0.1.167022 (with Hotfix 2).
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Giles Roadnight
> http://giles.roadnight.name 
 >
>



 


[flexcoders] Re: Is it possible to get a list of Shared Local Objects from my domain ?

2007-10-02 Thread helihobby
So I guess no way to do it within AS3 ...

Ok.

Thank you for all the help,

Sean - HeliHobby.com

--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> 
wrote:
>
> Assuming you can read directories on the local client system, then 
> sure.  Take a look at how Darron Schall's SolVE program does it:
> 
> http://solve.sourceforge.net/
> 
> 
> --- In flexcoders@yahoogroups.com, "helihobby"  wrote:
> >
> > Hello,
> > 
> > Is it possible to somehow get a list of all the available Shared 
> Local 
> > Objects that are saved on disk that belong to my domain ?
> > 
> > 
> > Regards,
> > 
> > Sean.
> > 
> > Click below to view my ALON Design Pattern:
> > 
> > http://www.helihobby.com/html/alon_desingpattern.html
> >
>




RE: [flexcoders] arraycollection contains() method

2007-10-02 Thread Alex Harui
Each time you use {} you create a different object, so the two
collections have different objects with the same data.  Contains just
sees if the reference to an object is in the collection and doesn't
investigate internal properties.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of freska
Sent: Monday, October 01, 2007 11:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] arraycollection contains() method



Hi there,
I want to compare two arraycollection and take the different items
out. I tried using contains() method to check if the first item of
arraycollection arrayControl is in arraycollection arrayColPref, but
it just doesn't work. I mean, it is supposed to say "True" instead of
"False". So, here's my code. Please show me where I did it wrong.

[Bindable]
public var arrayControl:ArrayCollection = new
ArrayCollection([{name:"Message", data:"colMessage"}, {name:"Assigned
to", data:"colAssignedto"}, {name:"Start date", data:"colStartdate"},
{name:"Due date", data:"colDuedate"}, {name:"Status",
data:"colStatus"}, {name:"Priority", data:"colPriority"},
{name:"Posted by", data:"colPostedby"}]);

[Bindable]
public var arrayColPref:ArrayCollection = new
ArrayCollection([{name:"Message", data:"colMessage"},
{name:"Priority", data:"colPriority"}, {name:"Assigned to",
data:"colAssignedto"}, {name:"Status", data:"colStatus"}]);

public function isDuplicate():void {
var bool:Boolean = arrayColPref.contains(arrayControl.getItemAt(0));
Alert.show(String(bool));
}



 


[flexcoders] Change text color of row of Datagrid based on property

2007-10-02 Thread Paul Steven
I want to be able to set the text color of all cells in a row of a datagrid
based on a certain property

 

Basically each row represents a students data. One property of a student is
whether or not the student is active or not.

 

So I want to set the text for all non active students to red.

 

Thanks in advance!!

 

Paul 



RE: [flexcoders] Passing Application.application.parameters to a Flex component

2007-10-02 Thread Alex Harui
Your example looks correct.  You can access
Application.application.parameters from a component.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of CO_China_Girl
Sent: Monday, October 01, 2007 4:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Passing Application.application.parameters to a
Flex component



I'm working on a Flex application that has a tab navigator component.
To prevent my main MXML file from becoming huge I decided to make
each tab "page" a separate component. The problem I have now is that
one of my Flex components need to have access to
Application.application.parameters. How do I pass this information to
my component, or how do I make this information available to my
component?

= Main MXML file =


http://www.adobe.com/2006/mxml
 "
xmlns:pf2="*" layout="horizontal">








= Component file =

http://www.adobe.com/2006/mxml
 "
label="Properties" width="100%" height="100%">











==

Thanks.



 


RE: [flexcoders] Re: Placement of Image within Image Control

2007-10-02 Thread Alex Harui
You are welcome to file an ECR for alignment properties or styles, but
keep in mind that in most people's use cases, you don't want to stretch
the Image beyond the size of the bitmap so there might be some play in
one dimension, but not the other.  This is because most of the time, you
want to use the layout rules instead of having things overlap.  I would
also recomment not filling available space with Image in your renderer
either.
 
I asked in the other thread that you post a couple of the swfs so I can
look at them.  I'm now thinking that the content in the swf is not
aligned to topleft.
 
I wish AVM1Movie had timeline APIs too, but like I said, the Player team
chose not to implement interoperability between the two worlds.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of droponrcll
Sent: Tuesday, October 02, 2007 6:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Placement of Image within Image Control



--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> The image content is always at the top-left of the Image. Based on
> scaleContent, the Image will scale the content or try to shrink 
itself
> down. There are no 9 choices, the image content fully fills the 
Image
> plus/or/minus extra space in order to maintain aspect ratio if
> requested.

I've asked the image control to fill 100% of the available space. So 
if the image is not the same shape as the space, the image winds up 
in an odd spot. I know there are no 9 choices now, and I suspect you 
know a bit more about the Flex team's abilities than I do, but I 
would not consider it outside the range of what they are capable of 
to allow you to choose where the content will reside in the image 
control. Considering how much time and effort they've spent making 
other features user friendly, I'd think that this would be a good use 
of engineering time. After all, they've managed plenty of other 
controls that allow you to select top, middle, bottom, left, center, 
right alignment. It shouldn't be that big a deal to add it to the 
image control.

> You use the parent container's layout to further position
> the Image. The VBox wrapper is trying to react to the new measured
> sizes by adjusting the size and position of the Image and while it
> should just work, sounds like something is off there. 

I wouldn't think the VBox would be able to move the content inside 
the 100% image control, but clearly SOMETHING is moving it. Oddly, 
all the miniature images appear in the same spot in the thumbnail 
renderers. Possibly because there is only one main control that is 
being switched out, whereas each renderer has to present only one 
image.

> If the image
> content is a SWF you further complicate the problem because the SWF 
can
> resize itself, but the Image is only checking the size of the first
> frame. Are your SWFs "well-behaved" in that they appear centered in
> their stages and are aligned relative to the top-left and don't go 
into
> negative coordinates? It might require more code to deal with 
different
> stage alignments.

I think all the swfs I've used for my prototype are the same or 
nearly the same size, so they don't have the same problems as the 
image control. BTW, why doesn't the AVM1 movie object have stop() 
and play() methods at a minimum?

-Amy



 


Re: [flexcoders] Re: Problem filtering custom list component

2007-10-02 Thread Charles Galpin
I wish I could help other than tell you I am facing similar problems  
with selections and think this stuff needs a good look at by adobe. I  
managed to make a simple test case that displayed my problem and Alex  
offered a workaround, but the workaround isn't working on my actual app!

charles

On Oct 2, 2007, at 12:03 PM, ricrootnc wrote:

> Ping 
>
> Sadly, I'm still stumped by this one.
>
> --- In flexcoders@yahoogroups.com, "Rick Root" <[EMAIL PROTECTED]> wrote:
>>
>> So I'm using this CheckBoxList component that someone on this list
>> created for me.
>>
>> I've got a problem though when filtering the list using the
>> dataProvider's filterFunction property.
>>
>> SOMETIMES the list items remain selected when they disappear from
> view
>> due to being filtered, and sometimes they don't.  The problem is
>> somewhat erratic as to WHEN it happens.
>>
>> A secondary problem, which I can't replicate in my test app, is that
>> when I clear the list by setting the selectedIndex property to -1,
>> *SOMETIMES* the actual checkboxes stay checked, even though the
> items
>> aren't selected any more (the blue highlight goes away, but the
>> checkbox stays).
>>
>> The MXML code CheckBoxListTest.mxml, along with the components
>> (CheckBoxList.as and CheckBoxListItemRenderer.as) are linkable from
>> the test application:
>>
>> http://www.it.dev.duke.edu/public/CheckBoxListTest.html
>>
>> I appreciate any inside folks can offer.
>>
>>
>> -- 
>> Rick Root
>> Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
>> www.opensourcecf.com
>>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders% 
> 40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>



RE: [flexcoders] Re: MultiPurpose ItemRenderer

2007-10-02 Thread Alex Harui
I suggest your renderer look something like this.  You'll see use of
dataChange and how to center the image.  I don't have a proxy example,
but that's a good topic for a blog article someday...
 
Can you post two image swfs that don't center correctly?  I want to make
sure those swfs are aligned to topleft otherwise this centering code
won't work for you.
 


private var _mediaObject:MediaElement;
 
[Bindable("mediaObjectChanged")]
public function get mediaObject():MediaElement
{
return _mediaObject;
}
 
public function set mediaObject(value:MediaElement):void
{
_mediaObject = value;
dispatchEvent(new Event("mediaObjectChanged");
}
 
private function centerImage():void
{
img.x = (width - img.measuredWidth) / 2;
img.y = ???
}


...
 
 
HTH,
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of droponrcll
Sent: Tuesday, October 02, 2007 7:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: MultiPurpose ItemRenderer



--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I see, if mediaObject you want to be your public interface to when 
you
> use it as a component instead of a renderer, then I would set up my
> bindings based on mediaObject instead of data. I'd probably just 
use a
> dataChange="mediaObject = data as MediaElement" in the top level 
instead
> of overriding the getter/setter.

I don't know what this means. I haven't found any documentation that 
refers to this (and believe me I have spent literally hundreds of 
hours combing the Flex documentation). Could you point me to a 
reference so I can get more information?

> In a Canvas there are no layout rules so you can place things on 
top of
> each other and turn one or the other off and on with visibility. 
That's
> what I would do and I would also calculate the centering solution 
then
> as well.

OK, bear with me as I go through this in pseudocode:

on mediaObjectChange
set img control to 100%
measure content
set img control from 100% to size of content
determine where top left of img control needs to be for img to 
appear centered
set x and y of img

Yes?

> With the advent of Actionscript 3 and the goal of maximized 
performance,
> the Flash Player did not allow interoperability between 
FlashPlayer9/AS3
> SWFs and the ActionScript in older SWFs. You can use 
localConnection,
> but that's about it. For those of you trying to integrate older swf
> content, it has become much harder to do. You can use a proxy AS2 
swf
> to communicate to your older content. That way you only have to 
tweak
> the one proxy swf instead of rebuild all of your older content.

Is there an example proxy swf available for download? You know, I 
just realized I probably can't stop these movies anyway, since they 
are nested and the designer forgot to put the stopAllClips() function 
in most of them. Oh, well.

Thanks;

Amy



 


RE: [flexcoders] Honey, my ItemRenderer is fubar!

2007-10-02 Thread Alex Harui
Only visible items have renderers, plus a couple off-screen ones,
regardless of how much datat there is.
 
Please use a debug version and show the entire stack trace.
 
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Ham
Sent: Tuesday, October 02, 2007 7:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Honey, my ItemRenderer is fubar!



I have a List with a custom item renderer. Each item in the list will
have a slightly different height, and I got this working through the
generous help of Alex and Tracy on this list.

Here's the thing: My app started crashing yesterday, and I traced it
to my set data() method, which is as follows:

override public function set data(value:Object):void {


if ( value != null) {
super.data = value;
var item:FeedItem = value as FeedItem;
if ( item.linkStatus == false ) {
itemTitle.setStyle("fontStyle", "italic");
itemTitle.setStyle("color", 0x99);

itemText.styleName = "brokenLink";
itemSource.styleName = "brokenLink";
} else {
itemTitle.setStyle("fontStyle", "normal");
itemTitle.setStyle("color", 0x33 );

itemText.styleName = "normLink";
itemSource.styleName = "normLink";
}

dispatchEvent( new FlexEvent(FlexEvent.DATA_CHANGE) );
}

The error I get is a #1009 null object reference.

I hadn't wanted to use set data() at all, but I need to display my
items differently based on their linkStatus, and this was not working
when I did it in commitProperties(), where I thought it should go.

In a possibly related issue, what are the guidelines for how much data
a List can display? My dataProvider has 7000+ items, and the list can
toggle between different filtered views of this data. Some of the
views contain a thumbnail image, and when you toggle between a
thumbnail view and a non-thumbnail, it hangs for several seconds. Any
way to optimize this, or is my data set just too big?

Thanks as always,

OK
DAH



 


[flexcoders] How do I detect when a user reorders a list?

2007-10-02 Thread David Ham
I have a list that can be reordered by drag and drop, and I need to
call a function when the list is reordered. What is the best way to
listen for this? Should I listen for a CollectionChange event, a drag
event, or is there some other third way?

Many thanks,

OK
DAH



RE: [flexcoders] help with swf size problem in windows xp and vista

2007-10-02 Thread Alex Harui
set a viewSourceURL in the application tag using FlexBuilder.  To take a
picture, I just use ALT-PrtScr and save from the clipboard into JPG
format.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gustavo Duenas
Sent: Tuesday, October 02, 2007 7:27 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] help with swf size problem in windows xp and
vista


sure, how could I? I'm just doing my first steps on flex.  

Regards


Gustavo







Can you send a picture of when it looks wrong?  Can you enable
view source in the project?







From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas
Sent: Monday, October 01, 2007 2:58 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] help with swf size problem in windows
xp and vista



yep I have this tested on mac, and no problems, this is the url:



http://leftandrightsolutions.com/lrsagency
  2/bin/LRSAgency2.html



Thanks





Gustavo

On Oct 1, 2007, at 5:01 PM, Alex Harui wrote:









Vista is still relatively new so we keep finding bugs.  However,
in your case you need to prove that the problem is a player bug.  It may
just be a timing problem.  Does your application work on other
platforms/browsers?



If you can create a small testcase, please post it and a picture
of how it looks inVista.







From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas
Sent: Monday, October 01, 2007 1:57 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] help with swf size problem in windows
xp and vista



Thanks Alex for your answer What you think of this...if I just
reset the swf loader into the app and erase the width and height can
make any difference in?

By the way so you know about some bug between flex and windows
systems (vista and xp)?





regards





Gustavo



On Oct 1, 2007, at 2:40 PM, Alex Harui wrote:










There is no way to prevent asynchronous loading of images, and
someday, you will be glad for it. I also cant guarantee that is your
problem as once the image is loaded it should force a resize, but this
is the second thread claiming this isnt working for them and Im not sure
why. I would recommend adding trace statements to report the
measuredWidth/Height of the images and see if that is making a
difference. Also make sure youve deployed the correct images to your
server and arent serving thumbnails instead.







RE: [flexcoders] File Upload Error in mozilla

2007-10-02 Thread Seth Caldwell
Yes, I logged it somewhere, can't remember where.
Oh! Here. http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform


Seth

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Chiverton
Sent: Tuesday, October 02, 2007 7:52 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] File Upload Error in mozilla

On Tuesday 02 Oct 2007, [EMAIL PROTECTED] wrote:
> So basically Milind, we are SOL until adobe tests this themselves,
confirms
> it, and then fixes it.

Have you logged a bug (via adobe.com/go/wish or bugs.adobe.com/jira) ?

-- 
Tom Chiverton
Helping to conveniently pursue front-end web-readiness
on: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and
Wales under registered number OC307980 whose registered office address is at
St James's Court Brown Street Manchester M2 2JF.  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 8008.

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


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links







RE: [flexcoders] Sleep() method

2007-10-02 Thread Seth Caldwell
Two ways:

function pollServer():void {

//do polling here

if(shouldcontinuepolling) setTimeout(pollServer,1000);

}

 

Or

 

function pollServer():void {

//do polling here

}

var pollInterval:uint=null;

function onCreationComplete():void {

pollInterval = setInterval(pollServer,1000);

}

Later when you need to stop polling:

if(pollInterval!=null) { clearInterval(pollInterval); pollInterval=null; }

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mayank
Sent: Tuesday, October 02, 2007 8:33 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Sleep() method

 

I have a usecase where I need to keep polling the server for a value. How
can I achieve that without a sleep method?

On 10/2/07, Tom Chiverton < 
[EMAIL PROTECTED]> wrote:

On Tuesday 02 Oct 2007, [EMAIL PROTECTED]  com wrote:
> there is a lot of use for sleep function.

There is (as opposed to setTimeout which executes a method after a delay) ?
When ?

--
Tom Chiverton
Helping to continuously restore dynamic design-patterns 
on: http://thefalken.  livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and
Wales under registered number OC307980 whose registered office address is at
St James's Court Brown Street Manchester M2 2JF.  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 8008. 

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


--
Flexcoders Mailing List
FAQ: http://groups.

yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-

archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links 


(Yahoo! ID required)

mailto:flexcoders-fullfeat
 [EMAIL PROTECTED]


 

 



  1   2   >