RE: [flexcoders] Flash CS3 Components - Tweens in Flex

2007-09-30 Thread Alex Harui
Please compile a debug version and show the whole stack trace.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of byte.sensei
Sent: Saturday, September 29, 2007 5:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flash CS3 Components - Tweens in Flex

 

I have some Flash CS3 animations (characters walking/running) that I 
have exported as Flex 2 components (SWC files) using the Flex 
Component Kit for Flash CS3.

I create an instance of the component in Flex, then need to be able 
to have the character move to the mouse position when a user clicks. 
As an initial test, I used a PNG image and setup a move tween, which 
works great. However, as soon as I try and use the Flex component, I 
get an "Error #1006" -- apparently the tween doesn't work on the Flex 
component object type.

Basically, what I'm trying to do when a user clicks is:

Put the Flex component into an "animated" walking state (from a 
static/standing position) then have the character move across the 
screen to where the mouse was clicked.

I've got the first part working great (the character starts 
the "walking" animation loop) but the Flex move tween is throwing the 
error.

Any ideas on how to accomplish this?

Note: I also need a simultaneous "zoom" tween to scale the character 
slightly for perspective -- again this works when I use a static 
image but throws the same Error #1006 when I try and apply it to the 
animation Flex component.

 



RE: [flexcoders] Freeze Flex Application

2007-09-30 Thread Alex Harui
Because Flash is a single-threaded runtime, freezing is a bad thing, you
can't interact with the app at all, and eventually you'll get an timeout
error.  Your users will be frustrated that they can't cancel or navigate
elsewhere in your app.

 

When will it be ok to show those popups?  You want to include that
functionality in your observeValue callback.  You can use callLater to
have your callback called repeatedly until the criteria becomes true,
but hopefully there's some other event that you can wait for instead.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Sunday, September 30, 2007 8:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Freeze Flex Application

 

the main problem I am having right now is that I have some popups that
get created using the ObserveValue tags.  I would like to be able to
prevent these popups, but the problem is that once the values come back
from DataServices in the background, they are being called via the
ObserveValue binding...

 

- kevin

 

 

 

 

 

On Sep 30, 2007, at 9:39 PM, Alex Harui wrote:





 

Therer is no one api.  What do you want to prevent?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Sunday, September 30, 2007 2:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Freeze Flex Application

 

Is there a way to freeze a flex application so that nothing can be 
executed both from a UI perspective and behind the scenes? I can 
create a modal Alert or PopUp to block user input, but I notice that 
code still get's executed behind the scenes and thus anything already 
initiated will get completed. I would like to be able halt all 
processes if possible.

- Kevin

 

 

 

 



RE: [flexcoders] Re: MultiPurpose ItemRenderer

2007-09-30 Thread Alex Harui
Like I said, I'm trying to minimize my time per message and generally
give short answers and leave out detail.  Sounds like you're on your way
and that's great.

 

Normally, though I don't override data getter/setters in my renderers.
I map the data to a type in commitProperties.  But there are exceptions
to every rule...  Nevertheless, I am concerned you haven't fully
absorbed the "recipe" and maybe looking at your code will shed some
light on it for you and others as there are things you can't do in the
setter override that you should only do in commitProperties or later and
thus your current recipe may not be cloneable on your next renderer.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of droponrcll
Sent: Sunday, September 30, 2007 9:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: MultiPurpose ItemRenderer

 

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I'm going to try to combine your other response as well.
> 
> 
> 
> Yes, the repeater lets you dictate what the data items are and the 
same
> is true for item renderers. Normally, you plug a collection or 
array or
> xmllist into a List/Tree/DataGrid, etc and the items in that 
collection
> become the data properties in the renderers.
> 
> 
> 
> The renderers job is to pull fields from the data object and stuff 
it
> into UI widgets in a renderer.
> 
> 
> 
> I'm a codehead, and while I've given many talks about itemrenderers 
at
> MAX and other venues, it is an entire hour presentation and assumes
> you're up to speed on object oriented programming and actionscript, 
and
> trying to distill this topic into an email on FlexCoders is outside 
my
> time constraints right now. I generally respond to these emails 
while
> waiting for builds and regression tests to run, and give short 
answers
> when I know others on the forum can fill in the details.
> 
> 
> 
> Sounds like you're hitting a pretty straightforward issue dealing 
with
> actionscript. If you post your code, I'll try to take a look at it 
on
> my next pass through this forum (as a true codehead, it is often 
easier
> for me to read code than your description). Also see some code I 
helped
> with in this forum yesterday with the subject "DataGrid cell access
> question"

OK, thanks. I actually tracked it down that the issue was I changed 
the data type of the data override function to my own custom object 
type.

The problem is not that I don't understand ActionScript, but that 
there are so many things to it that I can't keep them all in my head 
at once as I move forward. And the points at which AS interfaces 
with MXML make it difficult to understand (as someone new to Flex) 
where the issue is.

To _you_ it might be obvious that your statement to 
invalidateproperties was self-explanatory, but to me the important 
part that you didn't mention was "you need to override the data 
getters and setters to incorporate the desired behaviors." Since the 
getters and setters actually originated in the files you pointed me 
at, looking at them was only helpful to the extent that it let me 
know there _were_ getters and setters for data. The compiler is 
actually what told me I needed to add the override keyword ;-).

So, while clearly this is somewhat an AS issue, it is also somewhat a 
communications issue, since I am guessing that even someone 
intimately familiar with AS who was not familiar with how renderers 
work in MXML and not familiar with the inheritance involved might not 
have followed you either. Not to be critical, just pointing out how 
this looks from the perspective of someone just picking up this tool.

BTW, the stack overflow was caused by a circular reference I hadn't 
realized was in there. It's somewhat possible my amateurish earlier 
efforts might have succeeded without that, and I'd never have learned 
the proper way to override the data methods.

Thanks!

Amy

 



RE: [flexcoders] compiler arguments to save action script code

2007-09-30 Thread Alex Harui
-keep

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of essuark
Sent: Sunday, September 30, 2007 7:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] compiler arguments to save action script code

 

Hello all,

I remember back in the day when I started using Flex, I read there 
was an argument available to the compiler that would save the temp 
actionscript code. I can't seem to find that anymore.

Anyone?

thanks
Ralph

 



[flexcoders] Re: Freeze Flex Application

2007-09-30 Thread Sandeep Malik
While I believe stopping/halting system for some processing might not
be a good solution, nevertheless, there's a 'mysterious' method in
System class of Flex 3.

System.pause() and System.resume(). (There're others like System.gc()
etc). These methods, I think, have been newly added however, there're
no ASDocs for them. So, I dont know what these methods do, but you may
wanna try and find out.

Also look at the method UIComponent.stopBackgroundProcessing() and
UIComponent.resumeBackgroundProcessing() as well. (They are in Flex 2
as well)

Regards,
Sandeep

--- In flexcoders@yahoogroups.com, Sheriff <[EMAIL PROTECTED]> wrote:
>
> why dont u just add Listernes then for a popUpevent and just stop
them or cancel them or u can just remove the listener
> 
> - Original Message 
> From: Kevin <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Sunday, September 30, 2007 10:06:48 PM
> Subject: Re: [flexcoders] Freeze Flex Application
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> the main problem I am having right now is that I have
some popups that get created using the ObserveValue tags.  I would
like to be able to prevent these popups, but the problem is that once
the values come back from DataServices in the background, they are
being called via the ObserveValue binding...
> 
> 
> - kevin
> 
> 
> 
> 
> 
> 
> 
> 
> On Sep 30, 2007, at 9:39 PM, Alex Harui wrote:
> 
> 
> 
> Therer is no one api.  What do you want to prevent?
>  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Kevin
> Sent: Sunday, September 30, 2007 2:28 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Freeze Flex Application
> 
>  
> Is there a way to freeze a flex application so that nothing can be 
> executed both from a UI perspective and behind the scenes? I can 
> create a modal Alert or PopUp to block user input, but I notice that 
> code still get's executed behind the scenes and thus anything already 
> initiated will get completed. I would like to be able halt all 
> processes if possible.
> 
> - Kevin
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  

> Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
listings, and more!
> http://tv.yahoo.com/collections/3658
>




Re: [flexcoders] radiobutton label and wordwrap

2007-09-30 Thread [EMAIL PROTECTED]
Sorry, I meant to mention, I'm using Flex Builder 3.
Also, I  noticed that the "extends button" was missing in the class name 
and that was the problem. I had some trouble setting up the files and in 
the process I must have deleted that.

So ,in hindsite, "Method marked override must override another method" 
meant that the method I was trying to override did not exist. In my 
searches I found quite a few people out there who are having a hard time 
figuring out what that sentence means. The way it is makes it sound like 
you need to override the named method PLUS "another method"  which 
doesn't make any sense and I don't think that is what it is supposed to 
say. "Method marked override" doesn't make any sense either,  It should 
be "Method defined as overide cannot override nonexistent method"


Alex Harui wrote:
>
> Weird. Shou;d work. Are you using 2.0.1 hotfix 2?
>
> -Original Message-
> From: flexcoders@yahoogroups.com  
> [mailto:flexcoders@yahoogroups.com 
> ] On
> Behalf Of [EMAIL PROTECTED] 
> Sent: Sunday, September 30, 2007 1:04 AM
> To: flexcoders@yahoogroups.com 
> Subject: Re: [flexcoders] radiobutton label and wordwrap
>
> I tried this example and the Multiline RadioButton.as is giving me
> 1020: Method marked override must override another method.
> 3 times, one for each of the over rides.
>
> Method marked override must override another method.
>
> What does that mean ?
>
> Alex Harui wrote:
> >
> > Word wrapping cannot be easily calculated in the flex sizing rules, so
>
> > we don't implement it. Think about it, what should the measured width
> > and height of the radiobutton be if the label wordwraps?
> >
> > Measuring things with textflow only works when one dimension (usually
> > the width) is constrained. Flex components don't require that. Our
> > Text component just makes a guess and it is usually wrong until you
> > constrain its width.
> >
>
> > There's an example on my blog
> > (http://blogs.adobe.com/aharui/2007/04/multiline_buttons.html 
> ) of
> > wordwrapping buttons, but in order to use them you have to lock in a
> > width.
> >
> >
> --
> >
> > *From:* flexcoders@yahoogroups.com 
>  
> [mailto:flexcoders@yahoogroups.com ]
>
> > *On Behalf Of [EMAIL PROTECTED] 
> > *Sent:* Saturday, September 29, 2007 10:38 PM
> > *To:* flexcoders@yahoogroups.com 
> > *Subject:* [flexcoders] radiobutton label and wordwrap
> >
> > I'm using text next to a radio button and the mx:controls for the
> label
> > of a radiobutton don't have wordwrap- the text just disappears stage
> > right.
> > Why not allow the option to allow text to wrap ?
> > Is my only solution to not use the radiobutton label and try to put a
> > text control next to the label instead ?
> >
> > red
> >
> >
>
> --
> 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
>
>  



[flexcoders] File Upload Error in mozilla

2007-09-30 Thread nsmmilind2002
Hi All, 

I am facing issue with Mozilla Firefox browser on https.  
We have Flex application hosted in tomcat secured mode (https) in 
which we provide the functionality of upload .csv file. Which works 
fine in IE but the same is not working in Mozilla it giving me the 
following error? 

Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O 
Error. 
at com.datki.fileio::FileUpload/initBrouseDlg() 
at UserManagement/::showWarning() 
at flash.events::EventDispatcher/ 
flash.events:EventDispatcher::dispatchEventFunction() 
at flash.events::EventDispatcher/dispatchEvent() 
at mx.core::UIComponent/dispatchEvent() 
at mx.controls.alertClasses::AlertForm/::removeAlert() 
at mx.controls.alertClasses::AlertForm/::clickHandler() 


After some investigation I found some information on web which says 
this is some problem related to browser cookies but even after making 
the changes suggested over there It still not working in Mozilla and 
throwing the same error. Please check the following link 
http://thanksmister.com/?p=59
 
As File upload is very common functionality, therefore there should 
be some solution on it. 

Can anyone help me out to resolve the issue of file uploading in 
Mozilla browser in security mode (htts). 

- Milind 






Re: [flexcoders] Passing a property of repeater item

2007-09-30 Thread Paul Steven
Thanks Ralf

 

Can you elaborate a bit more please

 

How can I set a property of the button called "topicId". My 

 

I tried the following but it doesn't work

 






 

 

 

topicId is a property of my arrayCollection that is the dataprovider of the
repeater

 

helpRelatedData.addItem({topicId:id, title:title});

 

Thanks

 

Paul

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ralf Bokelberg
Sent: 30 September 2007 11:46
To: flexcoders@yahoogroups.com
Subject: [SPAM] Re: [flexcoders] Passing a property of repeater item

 

That is because the click is executed long after the repeater has done its
work. 
You need to pass in a property of the button itself to displayHelpTopic, eg.
the label. 
Cheers
Ralf. 



On 9/30/07, Paul Steven <[EMAIL PROTECTED]> wrote:

I can't figure out how to pass a property of a repeater item to a function

This is what I am trying but it is not working

 



 

Basically I want to pass the value linkrep.currentItem.title but what I have
tried above does not work.

Anyone suggest how I can do this.

The label is displaying correctly.

Thanks in advance

Paul




-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35 

 



[flexcoders] Problem occur in flex client when using Axis 2...

2007-09-30 Thread chiew_yea
Hi all,

I had one question to ask regarding web services in flex 2.Actually i
trying to switch from XFire to Axis2.However, my flex client's codes
work well when using XFire and it will hit an error when i trying to
use Axis2.The error is as shown in the following:-

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::parseMessage()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\WSDLParser.as:626]
at
mx.rpc.soap::WSDLOperation/parseMessages()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\WSDLOperation.as:62]
at
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\Operation.as:532]
at
mx.rpc.soap::Operation/send()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\Operation.as:492]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
TestWebServicesClient/TestWebServicesClient::wsdlLoadedHandler()[D:\Project\TestWebServices\Client\src\TestWebServicesClient.mxml:118]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractService/dispatchEvent()[C:\dev\enterprise_bali\frameworks\mx\rpc\AbstractService.as:236]
at
mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlHandler()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\WebService.as:662]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc.soap::WSDLParser/dispatchEvent()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\WSDLParser.as:788]
at
mx.rpc.soap::WSDLParser/mx.rpc.soap:WSDLParser::parseCompleted()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\WSDLParser.as:305]
at
mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpResultHandler()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\WSDLParser.as:181]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\dev\enterprise_bali\frameworks\mx\rpc\AbstractInvoker.as:146]
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\dev\enterprise_bali\frameworks\mx\rpc\AbstractInvoker.as:168]
at
mx.rpc::Responder/result()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:48]
at
mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest.as:82]
at
DirectHTTPChannel.as$139::DirectHTTPMessageResponder/completeHandler()[C:\dev\enterprise_bali\frameworks\mx\messaging\channels\DirectHTTPChannel.as:359]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()


My flex client's snippet code:

...
_ws = new WebService();
_ws.addEventListener(LoadEvent.LOAD, wsdlLoadedHandler);
_ws.loadWSDL("http://localhost:8080/testWebServices/services/TestWebServices?wsdl";);

...

private function wsdlLoadedHandler(event:LoadEvent):void
{
var operation:Operation = _ws["getBase64String"];
operation.resultFormat = "e4x";
operation.addEventListener(ResultEvent.RESULT, resultHandler);
operation.addEventListener(FaultEvent.FAULT, faultHandler);

var test:String = "a";

operation.send.apply(this, [test]);  >> error occurs
}


Do anyone have an idea on what's happening? Thanks



[flexcoders] Flex Beta2 is up

2007-09-30 Thread Sheriff
just incase no one visits adobe site




   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

[flexcoders] Chicago

2007-09-30 Thread grimmwerks
Geez just got into town and the whole place is asleep, can't even find  
a place to eat... This used to be  the home of Wax Trax and Ministry?

Where's everyone hiding?


[flexcoders] Re: Dynamically convert a String to a Class?

2007-09-30 Thread hannes.stockner
var ClassReference : Class =
getDefinitionByName("mx.controls.ComboBox") as Class;
var displayObject : DisplayObject = new ClassReference();
addChild(displayObject);





--- In flexcoders@yahoogroups.com, keith <[EMAIL PROTECTED]> wrote:
>
> I want to convert something like the String "mx.controls.ComboBox" to a 
> Class.
> I would use this to declare components or other classes at runtime.
> *Please don't laugh at me*
> 
> //==
> //In areas where I CAN do this...
> //-
> var testA:* = new mx.controls.ComboBox();
> addChild(testA);
> //==
> 
> //=
> //I want to DYNAMICALLY do the same...
> //
> var classname:Class = Class("mx.controls.ComboBox");
> var testB:* = new classname();
> addChild(testB);
> //=
> 
> //But get a this type of error---> TypeError: Error #1034: Type
Coercion 
> failed: cannot convert "mx.controls.ComboBox" to Class.
> 
> 
> -- Keith H --
>




RE: [flexcoders] HTTPService Error event

2007-09-30 Thread Randy Martin
Just out of curiosity, why aren't you using flash remoting?
 
~randy


   _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sheriff
Sent: Sunday, September 30, 2007 3:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] HTTPService Error event





why not just use a webService, and then only show an error if something is
wrong.?


- Original Message 
From: George Georgiou <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Sunday, September 30, 2007 3:43:55 PM
Subject: Re: [flexcoders] HTTPService Error event





Hi Scott,
 
I have been through many Flex Tutorials but unfortunately our world lacks of
tutorials for connectivity with ColdFusion. I am an experianced CF developer
but unfortunately I cannot figure out how to proceed with data through Flex
and CF. 
 
Indeed - your way is much easier to write and better to understand than the
one that I have posted. I will keep that one :-) Thanks!
 
But still... the 'fault' function in the HTTPService tag is always
triggered! Even with your own way.
 
How can I handle this? All I want is to be able to 'alert' the users that
there is some kind of error (I know how to get the exact error message
through the event handler) but I have no clue how to trigger this function
if and only if there is some kind of problem in my CFM file. 
 
any ideas?
 
Thanks,
George


 
On 9/30/07, Scott - FastLane mailto:[EMAIL PROTECTED]"
[EMAIL PROTECTED] com> wrote: 

George -

I have not seen this syntax for passing request params to an HTTPService.
Of course that doesn't mean it is wrong :)  But, here is how I would do it.

Change button definition to
 
  
then

public function callServer() :void
{
var params:Object = new Object();
params.firstName = firstName.text;
...
srv.send(params) ;
}

hth
Scott 



George Georgiou wrote: 

Hi,
 
I have this code. It works perfect but I would like to get alerted only when
I have some kind of error in my test.cfm file. Instead, the 'errorAlert(-)'
function always is triggered :(
 
Any idea's on how to make this work only when I have problems in my test.cfm
file?
 


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

http://myserver.flex/test.cfm"; \nhttp://myserver.
flex/test. cfm" 
  fault="errorAlert(-) ;"
  method="POST"> 


{firstName.text}
{ lastName.text}
{salary.text} 
{startDate.text}




 
  
 






 




 


















   _  

HYPERLINK
"http://us.rd.yahoo.com/evt=51201/*http://autos.yahoo.com/new_cars.html;_ylc
=X3oDMTE5NWVzZGVyBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0b3MtbmV3Y2Fy"Ch
eck out the hottest 2008 models today at Yahoo! Autos. 



 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.488 / Virus Database: 269.13.35/1039 - Release Date: 9/29/2007
9:46 PM
 


[flexcoders] How to dynamically set editable cells in a datagrid?

2007-09-30 Thread jacobvoneyben
I would like to dynamically set the editable property for a cells in a
datagrid depending on data in my dataprovider, but I don't see any
easy way to accomplish this with the DataGrid as it is.

Example:

My databinded xml dataprovider structure looks like this:

persons
  person
@editableFirstname (attribute)
@editableLastname  (attribute)
firstname
lastname

I have looked a bit into the source for the DataGrid and
DataGridColumn. The editable property seems to be static and set for
the entire column (not just a cell) does anyone have any idea of how I
can set a single cell to editable?

Ideally it should be possible to write something like this:

  

...
  

Where the editableFirstname is dynamically looked up in the
dataprovider the sameway as the datafield is.

Regards
Jacob von Eyben
http://ancientprogramming.blogspot.org



[flexcoders] New Conference Annoucement - WEBMANIACS 2008

2007-09-30 Thread Steve Drucker
 
http://www.webmaniacsconference.com  
 
Call for papers is now online.
 
Check it out!

Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / WebSense / Paperthin  Premier Consulting and Training
Partners
http://www.figleaf.com  
http://training.figleaf.com  


 
 
 



[flexcoders] Re: Dynamically convert a String to a Class?

2007-09-30 Thread Justin Winter
You would want to do something like this:

getDefinitionByName("flash.display::Sprite")

the "getDefinitionByName" function is in the "flash.utils" Package. 

Here are few good resources to check out too:

http://livedocs.adobe.com/flex/2/langref/flash/utils/package.html

http://www.kirupa.com/forum/showthread.php?p=1902564



[flexcoders] Resource help for beginner

2007-09-30 Thread Terri J.
Hi, I am new to Flex and am approaching it as a ColdFusion user. I have
minimal programming knowledge but am willing to learn, I just need to know
where to start. In reading through the postings, I see I am in way over my
head at the moment and would like to know what would be best for me to learn
about to better grasp and use the capabilities Flex will give my ColdFusion
base. It appears from my reading in this group that a good knowledge of
ActionScript is called for. Is this correct or have I misunderstood this as
well? I am not terribly interested in Flash and it seems many are
approaching problems from that point of view, should I extend my learning in
that direction or can I get by with CF and Flex alone? Thanks for any
pointers and here's hoping I'm not biting off more than I can chew. :)

-Terri J.

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.13.33/1036 - Release Date: 9/28/2007
3:40 PM
 



--
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] Use two DataBase tables values in a Datagrid

2007-09-30 Thread Terri J.
I did this by combining my tables, joined via SQL query and then passed the
results back to the datagrid. 

-Terri J.

> -Original Message-
> From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of jack4sol
> Sent: Wednesday, September 19, 2007 5:18 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Use two DataBase tables values in a Datagrid
> 
> The issue is I need to populate values from 2 tables, one 
> needs to be a list of names(from 1 table) and the other a 
> dropdown box containing dynamic values(and this needs to be 
> done from another table)
> 
> Mainly, gettin 2 columns from different tables in one 
> grid...is this possible firstly?
> 
> Please suggest ways to do the same..  

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.13.33/1036 - Release Date: 9/28/2007
3:40 PM
 



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


[flexcoders] Motion/Zoom Tweens on Flash CS3 Components

2007-09-30 Thread byte.sensei
I have a Flex app with some animated characters that (are supposed 
to) move around the screen when you click the mouse. The animations 
are done in Flash CS3, then exported as Flex SWC Components using the 
Flex Component Kit for Flash CS3.

Initially, I used static JPG/PNG images for characters, and created 
Move/Zoon tweens in Flex that would move the images around the screen.

However, when I replaced the static images with the SWC components, 
it didn't work.  The characters properly change from a "standing" 
state to a "walking" state (looping animation) but when I try to play 
the move/zoom tweens it throws an error (Error #1006).

Researching this error it seems it can happen when the object you are 
applying a method to is the wrong type.  But shouldn't I be able to 
use this method to move the SWC components around the screen?

If not, how can I move/zoom the SWC components when a user clicks the 
mouse?  Essentially, a mouse click should cause the character to 
enter the "walking" state/animation, then play the move/zoom tweens 
to take the component to the mouse click position, then return the 
character to a "standing" state.

Any insight is appreciated!




[flexcoders] Re: MultiPurpose ItemRenderer

2007-09-30 Thread droponrcll
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I'm going to try to combine your other response as well.
> 
>  
> 
> Yes, the repeater lets you dictate what the data items are and the 
same
> is true for item renderers.  Normally, you plug a collection or 
array or
> xmllist into a List/Tree/DataGrid, etc and the items in that 
collection
> become the data properties in the renderers.
> 
>  
> 
> The renderers job is to pull fields from the data object and stuff 
it
> into UI widgets in a renderer.
> 
>  
> 
> I'm a codehead, and while I've given many talks about itemrenderers 
at
> MAX and other venues, it is an entire hour presentation and assumes
> you're up to speed on object oriented programming and actionscript, 
and
> trying to distill this topic into an email on FlexCoders is outside 
my
> time constraints right now.  I generally respond to these emails 
while
> waiting for builds and regression tests to run, and give short 
answers
> when I know others on the forum can fill in the details.
> 
>  
> 
> Sounds like you're hitting a pretty straightforward issue dealing 
with
> actionscript.  If you post your code, I'll try to take a look at it 
on
> my next pass through this forum (as a true codehead, it is often 
easier
> for me to read code than your description).  Also see some code I 
helped
> with in this forum yesterday with the subject "DataGrid cell access
> question"

OK, thanks.  I actually tracked it down that the issue was I changed 
the data type of the data override function to my own custom object 
type.

The problem is not that I don't understand ActionScript, but that 
there are so many things to it that I can't keep them all in my head 
at once as I move forward.  And the points at which AS interfaces 
with MXML make it difficult to understand (as someone new to Flex) 
where the issue is.

To _you_ it might be obvious that your statement to 
invalidateproperties was self-explanatory, but to me the important 
part that you didn't mention was "you need to override the data 
getters and setters to incorporate the desired behaviors."  Since the 
getters and setters actually originated in the files you pointed me 
at, looking at them was only helpful to the extent that it let me 
know there _were_ getters and setters for data.  The compiler is 
actually what told me I needed to add the override keyword ;-).

So, while clearly this is somewhat an AS issue, it is also somewhat a 
communications issue, since I am guessing that even someone 
intimately familiar with AS who was not familiar with how renderers 
work in MXML and not familiar with the inheritance involved might not 
have followed you either.  Not to be critical, just pointing out how 
this looks from the perspective of someone just picking up this tool.

BTW, the stack overflow was caused by a circular reference I hadn't 
realized was in there.  It's somewhat possible my amateurish earlier 
efforts might have succeeded without that, and I'd never have learned 
the proper way to override the data methods.

Thanks!

Amy





[flexcoders] Flash CS3 Components - Tweens in Flex

2007-09-30 Thread byte.sensei
I have some Flash CS3 animations (characters walking/running) that I 
have exported as Flex 2 components (SWC files) using the Flex 
Component Kit for Flash CS3.

I create an instance of the component in Flex, then need to be able 
to have the character move to the mouse position when a user clicks. 
As an initial test, I used a PNG image and setup a move tween, which 
works great.  However, as soon as I try and use the Flex component, I 
get an "Error #1006" -- apparently the tween doesn't work on the Flex 
component object type.

Basically, what I'm trying to do when a user clicks is:

Put the Flex component into an "animated" walking state (from a 
static/standing position) then have the character move across the 
screen to where the mouse was clicked.

I've got the first part working great (the character starts 
the "walking" animation loop) but the Flex move tween is throwing the 
error.

Any ideas on how to accomplish this?

Note: I also need a simultaneous "zoom" tween to scale the character 
slightly for perspective -- again this works when I use a static 
image but throws the same Error #1006 when I try and apply it to the 
animation Flex component.




[flexcoders] LCDS Samples on a CF8 instalation

2007-09-30 Thread Adrian Preoteasa
Hello everybody,

I have CF8 installed with integrated LCDS but sadly this installation
doesn't  have the Samples installed like the stand alone LCDS.

I tried merging web.xml / remoting-config.xml / services-config.xml
(from both LCDS versions: CF8 integrated / stand-alone) to enable the
CF8 integrated version of LCDS to work with the different samples to
no result.

Anybody know how to adjust the CF8 integrated LCDS version
configuration to work with the samples provided with the stand-alone LCDS?



[flexcoders] compiler arguments to save action script code

2007-09-30 Thread essuark
Hello all,
  
I remember back in the day when I started using Flex, I read there 
was an argument available to the compiler that would save the temp 
actionscript code. I can't seem to find that anymore.

Anyone?


thanks
Ralph



Re: [flexcoders] Freeze Flex Application

2007-09-30 Thread Sheriff
why dont u just add Listernes then for a popUpevent and just stop them or 
cancel them or u can just remove the listener

- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 10:06:48 PM
Subject: Re: [flexcoders] Freeze Flex Application









  



the main problem I am having right now is that I have some popups 
that get created using the ObserveValue tags.  I would like to be able to 
prevent these popups, but the problem is that once the values come back from 
DataServices in the background, they are being called via the ObserveValue 
binding...


- kevin








On Sep 30, 2007, at 9:39 PM, Alex Harui wrote:



Therer is no one api.  What do you want to prevent?
 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Sent: Sunday, September 30, 2007 2:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Freeze Flex Application

 
Is there a way to freeze a flex application so that nothing can be 
executed both from a UI perspective and behind the scenes? I can 
create a modal Alert or PopUp to block user input, but I notice that 
code still get's executed behind the scenes and thus anything already 
initiated will get completed. I would like to be able halt all 
processes if possible.

- Kevin

















  
























  

Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, 
and more!
http://tv.yahoo.com/collections/3658 

Re: [flexcoders] Freeze Flex Application

2007-09-30 Thread Kevin
the main problem I am having right now is that I have some popups  
that get created using the ObserveValue tags.  I would like to be  
able to prevent these popups, but the problem is that once the values  
come back from DataServices in the background, they are being called  
via the ObserveValue binding...


- kevin





On Sep 30, 2007, at 9:39 PM, Alex Harui wrote:



Therer is no one api.  What do you want to prevent?



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

Sent: Sunday, September 30, 2007 2:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Freeze Flex Application



Is there a way to freeze a flex application so that nothing can be
executed both from a UI perspective and behind the scenes? I can
create a modal Alert or PopUp to block user input, but I notice that
code still get's executed behind the scenes and thus anything already
initiated will get completed. I would like to be able halt all
processes if possible.

- Kevin








[flexcoders] need ideas on what to do

2007-09-30 Thread Sheriff
so basically i want to learn more flex but there isnt any advanced stuff out 
there so i can understand more and i have no idea what type of projects to do, 
i read the flex manual and i get everything but i lack just knowing what is 
needed. For example, i am trying to duplicate the superTabNavigator but the 
only way i can do it is by lookin at doug's source. i want to be able to just 
duplicate it without looking. so how can i improve




   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

RE: [flexcoders] Runtime CSS problem with SWFLoader

2007-09-30 Thread Alex Harui
My bad, I was looking at the 3.0 api.  There is a separate issue that a
subswf won't see the style changes after it has created its components.
Both are fixed in 3.0

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason Y. Kwong
Sent: Sunday, September 30, 2007 9:09 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Runtime CSS problem with SWFLoader

 

Yes, I had originally thought that you meant to load the CSS swf into
the the current domain.  However, StyleManager.loadStyleDeclarations()
does not give the option of specifying a LoaderContext.  It has a
trustContent argument, but setting that to true fails when loading a
local SWF (I've not tried from the network yet). 

The thing is, I wonder if it really is about not being able to see
classes.  For instance, my CSS file has a selector like this:

.chickButton
{
up-skin: Embed('assets/chicklet_button_up.png'); 
}

When the subswf loads this CSS at runtime, the button's upskin does not
update on-screen (as before).  However, I can see the class in the
subswf.  I trace this inside the subswf:

   var decl: CSSStyleDeclaration =
StyleManager.getStyleDeclaration(".chickButton");
   trace(decl.getStyle("upSkin"));

and I get output like:

   [class newstyles__embed_css_assets_chicklet_button_up_png_1372914861]

And as stated in my last post, if I force a refresh of styles, the
upskin does then update on-screen.  It seems to me that the
SystemManager of the subswf is not being told to refresh its styles
after the CSS file is loaded. 



On 9/30/07, Alex Harui <[EMAIL PROTECTED]  >
wrote:

Uh, sorry, I wasn't clear.  You need to set the app domain in
loadStyleDeclaration, not in SWFLoader.  

 

Every SWF has a copy of ModuleManager in it.  That code is used to load
every module including CSS files.  Since that code says to make a child
appdom of the ModuleManager's app dom, when your app is the main app,
the style classes are loaded into a child domain and share common class
definitions.

 

When you load your app from a shell app, the ModuleManager is in the
shell.  Your sub-app gets a child app domain and so does the css file,
which means that your app and the css file have sibling appdoms, which
means the cannot share classes and that messes up your styling.  By
specifying the app domain in loadStyleDecl, you are telling it not to
load the css into a child domain, but rather, to load it into the
shell's appdom so it can be seen by other appdoms like your app.  You
can also specify your sub-apps app-dom or child of your sub-app's
appdom, but they key is to load the CSS into a place where its classes
share classes with your app.

 



From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com
 ] On Behalf Of Jason Y. Kwong
Sent: Saturday, September 29, 2007 9:34 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Runtime CSS problem with SWFLoader

 

Thank you for your reply, Alex.  I tried doing the following with the
SWFLoader:

   var lctx: LoaderContext = new LoaderContext();
   lctx.applicationDomain = ApplicationDomain.currentDomain;
   loader.loaderContext = lctx;
   loader.load("MyApp.swf");

However, when MyApp loads a runtime CSS SWF, its styles are still not
updating.  Both the loading SWF and the MyApp SWF are local files in the
same directory.

I poked around in the StyleManager code and saw that it calls the
styleDeclarationsChanged() method after a CSS SWF has been loaded.  It
looks like this:

public function styleDeclarationsChanged():void
{
  var sms:Array /* of SystemManager */ = 
SystemManagerGlobals.topLevelSystemManagers;
  var n:int = sms.length;
  for (var i:int = 0; i < n; i++)
  {
var sm:SystemManager = SystemManager(sms[i]);
sm.regenerateStyleCache(true);
sm.notifyStyleChangeInChildren(null, true);
  }
}

When I stepped through this, I saw that the sms array contains only the
SystemManager for the main application.  So I decided to have MyApp
explicitly update its own SystemManager after a CSS SWF is loaded:

   systemManager.mx_internal::regenerateStyleCache(true);
   systemManager.mx_internal::notifyStyleChangeInChildren (null, true);

This actually got all the styles to update on-screen.  So what's not
working right here?  Is it related to the application domain or is it
something else?

On 9/29/07, Alex Harui <[EMAIL PROTECTED]  >
wrote:

That's a common tripping point with runtime  CSS.  In a subswf config,
you have to specify the applicationDomain parameter to be
ApplicationDomain.currentDomain.  If you care why, see my modules
presentation on my blog (blogs.adobe.com/aharui
 )

 



From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com
 ] On Behalf Of Jason Y. Kwong
Sent: Saturday, September 29, 2007 1:05 PM
To: fl

RE: [flexcoders] radiobutton label and wordwrap

2007-09-30 Thread Alex Harui
Weird.  Shou;d work.  Are you using 2.0.1 hotfix 2?

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Sunday, September 30, 2007 1:04 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] radiobutton label and wordwrap

I tried this example and the Multiline RadioButton.as is giving me
1020: Method marked override must override another method.
3 times, one for each of the over rides.

Method marked override must override another method.

What does that mean ?

Alex Harui wrote:
>
> Word wrapping cannot be easily calculated in the flex sizing rules, so

> we don't implement it. Think about it, what should the measured width 
> and height of the radiobutton be if the label wordwraps?
>
> Measuring things with textflow only works when one dimension (usually 
> the width) is constrained. Flex components don't require that. Our 
> Text component just makes a guess and it is usually wrong until you 
> constrain its width.
>

> There's an example on my blog 
> (http://blogs.adobe.com/aharui/2007/04/multiline_buttons.html) of 
> wordwrapping buttons, but in order to use them you have to lock in a 
> width.
>
>

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

> *On Behalf Of [EMAIL PROTECTED]
> *Sent:* Saturday, September 29, 2007 10:38 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] radiobutton label and wordwrap
>
> I'm using text next to a radio button and the mx:controls for the
label
> of a radiobutton don't have wordwrap- the text just disappears stage 
> right.
> Why not allow the option to allow text to wrap ?
> Is my only solution to not use the radiobutton label and try to put a
> text control next to the label instead ?
>
> red
>
>  



--
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] Freeze Flex Application

2007-09-30 Thread Alex Harui
Therer is no one api.  What do you want to prevent?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Sunday, September 30, 2007 2:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Freeze Flex Application

 

Is there a way to freeze a flex application so that nothing can be 
executed both from a UI perspective and behind the scenes? I can 
create a modal Alert or PopUp to block user input, but I notice that 
code still get's executed behind the scenes and thus anything already 
initiated will get completed. I would like to be able halt all 
processes if possible.

- Kevin

 



RE: [flexcoders] Dynamically convert a String to a Class?

2007-09-30 Thread Alex Harui
You need to declare variables, you don't have to create instances.

 

There is also the unofficial [Mixin}

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of keith
Sent: Sunday, September 30, 2007 3:13 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Dynamically convert a String to a Class?

 

Thanks Dave,
For this code to work, a ComboBox must have already existed or been 
declared as a variable somewhere on the stage.
Does this mean I have declare instances of all the components I might 
ever use dynamically ahead of time for this to work?

//==
//So far this is what I got to work after reading the LiveDocs:
//Works only if an instance of ComboBox has already been 
declared.
//Does not work just by importing mx.controls.ComboBox alone.

/
var ClassReference:Class = 
flash.utils.getDefinitionByName("mx.controls.ComboBox") as Class;
var instance:Object = new ClassReference();
addChild(DisplayObject(instance)); 
//===

I'm open to more inside details or helpful gotchas on this.
-- Keith H --

Dave Carabetta wrote:
>
> Check out the LiveDocs for getDefinitionByName():
>
> http://livedocs.adobe.com/flex/201/langref/flash/utils/package.html
  
>  >
>
> Regards,
> Dave.
> Cynergy Systems
>
> On 9/30/07, *keith* <[EMAIL PROTECTED] 
 >> wrote:
>
> I want to convert something like the String "mx.controls.ComboBox"
> to a
> Class.
> I would use this to declare components or other classes at runtime.
> *Please don't laugh at me*
>
> //==
> //In areas where I CAN do this...
> //-
> var testA:* = new mx.controls.ComboBox();
> addChild(testA);
> //==
>
> //=
> //I want to DYNAMICALLY do the same...
> //
> var classname:Class = Class("mx.controls.ComboBox");
> var testB:* = new classname();
> addChild(testB);
> //=
>
> //But get a this type of error---> TypeError: Error #1034: Type
> Coercion
> failed: cannot convert "mx.controls.ComboBox" to Class.
>
> -- Keith H --
>
>
> 

 



Re: [flexcoders] Dynamically convert a String to a Class?

2007-09-30 Thread Daniel Freiman
check the bottom of this post:

http://nondocs.blogspot.com/2007/04/flexhowtoinstantiate-class-from-class.html

- Dan Freiman

On 9/30/07, keith <[EMAIL PROTECTED]> wrote:
>
>   Thanks Dave,
> For this code to work, a ComboBox must have already existed or been
> declared as a variable somewhere on the stage.
> Does this mean I have declare instances of all the components I might
> ever use dynamically ahead of time for this to work?
>
> //==
> //So far this is what I got to work after reading the LiveDocs:
> //Works only if an instance of ComboBox has already been
> declared.
> //Does not work just by importing mx.controls.ComboBox alone.
>
> /
> var ClassReference:Class =
> flash.utils.getDefinitionByName("mx.controls.ComboBox") as Class;
> var instance:Object = new ClassReference();
> addChild(DisplayObject(instance));
> //===
>
> I'm open to more inside details or helpful gotchas on this.
> -- Keith H --
>
> Dave Carabetta wrote:
> >
> > Check out the LiveDocs for getDefinitionByName():
> >
> > http://livedocs.adobe.com/flex/201/langref/flash/utils/package.html
> > 
> >
> > Regards,
> > Dave.
> > Cynergy Systems
> >
> > On 9/30/07, *keith* <[EMAIL PROTECTED]   [EMAIL PROTECTED] >> wrote:
> >
> > I want to convert something like the String "mx.controls.ComboBox"
> > to a
> > Class.
> > I would use this to declare components or other classes at runtime.
> > *Please don't laugh at me*
> >
> > //==
> > //In areas where I CAN do this...
> > //-
> > var testA:* = new mx.controls.ComboBox();
> > addChild(testA);
> > //==
> >
> > //=
> > //I want to DYNAMICALLY do the same...
> > //
> > var classname:Class = Class("mx.controls.ComboBox");
> > var testB:* = new classname();
> > addChild(testB);
> > //=
> >
> > //But get a this type of error---> TypeError: Error #1034: Type
> > Coercion
> > failed: cannot convert "mx.controls.ComboBox" to Class.
> >
> > -- Keith H --
> >
> >
> >
>
>  
>


Re: [flexcoders] Re: Flex code generator for webservice

2007-09-30 Thread Daniel Freiman
http://nondocs.blogspot.com/2007/05/mxrpcsoapwebserviceactionscriptexample.html


On 9/29/07, muratt_cim <[EMAIL PROTECTED]> wrote:
>
>   thank you for your answer we will take into consideration your
> suggestions
>
> --- In flexcoders@yahoogroups.com , "
> ben.clinkinbeard"
>
> <[EMAIL PROTECTED]> wrote:
> >
> > Should be something like this:
> >
> > var service:WebService = new WebService();
> > service.loadWSDL("http://some.wsdl.url";);
> > service.addEventListener(LoadEvent.LOAD, onWsdlLoad);
> >
> > and then onWsdlLoad could look something like this:
> >
> > var op:Operation = service.getOperation("GetDocument") as Operation;
> > op.resultFormat = "e4x";
> >
> > op.arguments.EnterpriseId = enterpriseID;
> > op.arguments.DocumentType = documentType;
> >
> > var call:AsyncToken = op.send();
> > call.addResponder(instanceThatImplementsIResponder);
> >
> >
> > I know the operation portion of that code is correct but the
> > definition part is off the top of my head.
> >
> > HTH,
> > Ben
> >
> >
> > --- In flexcoders@yahoogroups.com ,
> "Merrill, Jason"
> >  wrote:
> > >
> > > I'm going to check both of those out, but are there any
> Actionscript 3.0
> > > only examples of connecting and using a Webservice? I did this a
> lot in
> > > Actionscript 2.0, but I need an Actionscript 3.0 example. Everything I
> > > have seen online and in the docs is MXML, which won't work for my
> > > Actionscript-only project.
> > >
> > >
> > > Jason Merrill
> > > Bank of America
> > > GT&O Learning & Leadership Development
> > > eTools & Multimedia Team
> > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > > From: flexcoders@yahoogroups.com 
> > > [mailto:flexcoders@yahoogroups.com ] On
> Behalf Of Samuel R. Neff
> > > Sent: Thursday, September 27, 2007 6:30 PM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: RE: [flexcoders] Flex code generator for webservice
> > >
> > >
> > >
> > >
> > >
> > > FlexBuilder 3 beta 2 also has an AS3 code generator based on
> > > WSDL.
> > >
> > >
> > >
> http://www.onflex.org/ted/2007/09/flex-3beta-2-crud-wizard-for-aspnet-ph
> > > p.php
> > >
>  > > hp.php>
> > >
> > > Sam
> > >
> > >
> > > ---
> > > We're Hiring! Seeking a passionate developer to join our team
> > > building Flex based products. Position is in the Washington D.C. metro
> > > area. If interested contact careers@
> > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > > From: flexcoders@yahoogroups.com 
> > > [mailto:flexcoders@yahoogroups.com ] On
> Behalf Of muratt_cim
> > > Sent: Thursday, September 27, 2007 5:36 PM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] Flex code generator for webservice
> > >
> > >
> > > Hello,
> > >
> > > We developed an application named flextense and you can download
> > > freely.
> > > Flextense is an application for Flex Users which composes the
> > > automatic ActionScript proxy classes for accessing the web services.
> > >
> > > ...
> > > For more information: http://www.flextense.net
> > > 
> > >
> >
>
>  
>


Re: [flexcoders] Re: Automated UI Testing for FLEX (Help!)

2007-09-30 Thread Marvin Froeder
May be you can publish it on sf or google code?


VELO

On 9/29/07, twcrone70 <[EMAIL PROTECTED]> wrote:
>
>   This sounds pretty much what I am currently doing with my extension to
> Selenium for QA testing our Flex code. Where did you guys end up on
> this? I've made pretty decent progress this month working on
> extensions to test our current application but there is alot more to
> do and I'd love some help if my management will approve 'sharing'.
>
> - Todd
>
> --- In flexcoders@yahoogroups.com , "Arpit
> Mathur" <[EMAIL PROTECTED]> wrote:
> >
> > we were thinking some kind of integration with selenium (the
> > javascript testing suite) using the Flex AJAX bridge.
> >
> > -arpit
> >
> >
> > On 6/8/07, Karl Johnson <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Mercury Quick Test Pro (works with FDS's Automation API). Or you
> could write
> > > your own :-)
> > >
> > >
> > >
> > > FlexUnit is not really an automated UI testing solution, it unit
> tests the
> > > code.
> > >
> > >
> > >
> > > Karl
> > >
> > >
> > >
> > >
> > >
> > > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com ] On
> > > Behalf Of Persaud, Anthony
> > > Sent: Friday, June 08, 2007 2:53 PM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] Automated UI Testing for FLEX (Help!)
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Other than FlexUnit, are there any other methods to perform
> automated UI
> > > testing for Flash/Flex applications?
> > >
> > >
> > >
> > > Thanks,
> > >
> > >
> > >
> > > Anthony
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] Dynamically convert a String to a Class?

2007-09-30 Thread keith
Thanks Dave,
For this code to work, a ComboBox must have already existed or been 
declared as a variable somewhere on the stage.
Does this mean I have declare instances of all the components I might 
ever use dynamically ahead of time for this to work?

//==
//So far this is what I got to work after reading the LiveDocs:
//Works only if an instance of ComboBox has already been 
declared.
 //Does not work just by importing mx.controls.ComboBox alone.
/
var ClassReference:Class = 
flash.utils.getDefinitionByName("mx.controls.ComboBox") as Class;
var instance:Object = new ClassReference();
addChild(DisplayObject(instance));   
//===

I'm open to more inside details or helpful gotchas on this.
--  Keith H --



Dave Carabetta wrote:
>
> Check out the LiveDocs for getDefinitionByName():
>
> http://livedocs.adobe.com/flex/201/langref/flash/utils/package.html 
> 
>
> Regards,
> Dave.
> Cynergy Systems
>
> On 9/30/07, *keith* <[EMAIL PROTECTED] > wrote:
>
> I want to convert something like the String "mx.controls.ComboBox"
> to a
> Class.
> I would use this to declare components or other classes at runtime.
> *Please don't laugh at me*
>
> //==
> //In areas where I CAN do this...
> //-
> var testA:* = new mx.controls.ComboBox();
> addChild(testA);
> //==
>
> //=
> //I want to DYNAMICALLY do the same...
> //
> var classname:Class = Class("mx.controls.ComboBox");
> var testB:* = new classname();
> addChild(testB);
> //=
>
> //But get a this type of error---> TypeError: Error #1034: Type
> Coercion
> failed: cannot convert "mx.controls.ComboBox" to Class.
>
> -- Keith H --
>
>
>  



Re: [flexcoders] HTTPService Error event

2007-09-30 Thread George Georgiou
Hi Scott,

I have been through many Flex Tutorials but unfortunately our world lacks of
tutorials for connectivity with ColdFusion. I am an experianced CF developer
but unfortunately I cannot figure out how to proceed with data through Flex
and CF.

Indeed - your way is much easier to write and better to understand than the
one that I have posted. I will keep that one :-) Thanks!

But still... the 'fault' function in the HTTPService tag is always
triggered! Even with your own way.

How can I handle this? All I want is to be able to 'alert' the users that
there is some kind of error (I know how to get the exact error message
through the event handler) but I have no clue how to trigger this function
if and only if there is some kind of problem in my CFM file.

any ideas?

Thanks,
George



On 9/30/07, Scott - FastLane <[EMAIL PROTECTED]> wrote:
>
>   George -
>
> I have not seen this syntax for passing request params to an HTTPService.
> Of course that doesn't mean it is wrong :)  But, here is how I would do it.
>
> Change button definition to
> 
>
> then
>
> public function callServer():void
> {
> var params:Object = new Object();
> params.firstName = firstName.text;
> ...
> srv.send(params);
> }
>
> hth
> Scott
>
> George Georgiou wrote:
>
>  Hi,
>
> I have this code. It works perfect but I would like to get alerted only
> when I have some kind of error in my test.cfm file. Instead, the
> 'errorAlert()' function always is triggered :(
>
> Any idea's on how to make this work only when I have problems in my
> test.cfm file?
>
> 
>
> http://www.adobe.com/2006/mxml";
> layout="absolute">
>
>id="srv"
>   url="http://myserver.flex/test.cfm";
>   fault="errorAlert();"
>   method="POST">
>
> 
> {firstName.text}
> {lastName.text}
> {salary.text}
> {startDate.text}
> 
> 
>
>
>  
>   
>  
>
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
>
>
> 
>


[flexcoders] Freeze Flex Application

2007-09-30 Thread Kevin
Is there a way to freeze a flex application so that nothing can be  
executed both from a UI perspective and behind the scenes?  I can  
create a modal Alert or PopUp to block user input, but I notice that  
code still get's executed behind the scenes and thus anything already  
initiated will get completed.  I would like to be able halt all  
processes if possible.

- Kevin


Re: [flexcoders] HTTPService Error event

2007-09-30 Thread Scott - FastLane

George -

I figured maybe the way you were passing params was incorrect and thus 
causing the fault event that you are catching.  I don't use ColdFusion, 
I use Java Servlets on the back end.  But, should be very similar.  I 
get the fault event only when the servlet cannot be called at all.  I 
use result codes, error messages, embedded in my application XML 
returned from the back end to indicate application error information.  
So... from my experience, I would guess that your fault event that you 
are catching indicates that your back end is not getting called 
correctly.  Have you put a debugger or tracing in your cfm file and 
verified that it is actually getting called successfully?


hth
Scott

George Georgiou wrote:

Hi Scott,
 
I have been through many Flex Tutorials but unfortunately our world 
lacks of tutorials for connectivity with ColdFusion. I am an 
experianced CF developer but unfortunately I cannot figure out how to 
proceed with data through Flex and CF.
 
Indeed - your way is much easier to write and better to understand 
than the one that I have posted. I will keep that one :-) Thanks!
 
But still... the 'fault' function in the HTTPService tag is always 
triggered! Even with your own way.
 
How can I handle this? All I want is to be able to 'alert' the users 
that there is some kind of error (I know how to get the exact error 
message through the event handler) but I have no clue how to trigger 
this function if and only if there is some kind of problem in my CFM 
file.
 
any ideas?
 
Thanks,

George


 
On 9/30/07, *Scott - FastLane* <[EMAIL PROTECTED] 
> wrote:


George -

I have not seen this syntax for passing request params to an
HTTPService.  Of course that doesn't mean it is wrong :)  But,
here is how I would do it.

Change button definition to

 
then


public function callServer():void
{
var params:Object = new Object();
params.firstName = firstName.text;
...
srv.send(params);
}

hth
Scott



George Georgiou wrote:

Hi,
 
I have this code. It works perfect but I would like to get

alerted only when I have some kind of error in my test.cfm file.
Instead, the 'errorAlert()' function always is triggered :(
 
Any idea's on how to make this work only when I have problems in

my test.cfm file?
 



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

http://myserver.flex/test.cfm
"
  fault="errorAlert();"
  method="POST">
   


{firstName.text}
{ lastName.text}
{salary.text}
{startDate.text}




 
  
 

























 




Re: [flexcoders] HTTPService Error event

2007-09-30 Thread Sheriff
why not just use a webService, and then only show an error if something is 
wrong.?

- Original Message 
From: George Georgiou <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 3:43:55 PM
Subject: Re: [flexcoders] HTTPService Error event









  




Hi Scott,

 

I have been through many Flex Tutorials but unfortunately our world lacks of 
tutorials for connectivity with ColdFusion. I am an experianced CF developer 
but unfortunately I cannot figure out how to proceed with data through Flex and 
CF.


 

Indeed - your way is much easier to write and better to understand than the one 
that I have posted. I will keep that one :-) Thanks!

 

But still... the 'fault' function in the HTTPService tag is always triggered! 
Even with your own way.

 

How can I handle this? All I want is to be able to 'alert' the users that there 
is some kind of error (I know how to get the exact error message through the 
event handler) but I have no clue how to trigger this function if and only if 
there is some kind of problem in my CFM file.


 

any ideas?

 

Thanks,

George



 

On 9/30/07, Scott - FastLane <[EMAIL PROTECTED] com> wrote:





George -

I have not seen this syntax for passing request params to an HTTPService.  Of 
course that doesn't mean it is wrong :)  But, here is how I would do it.

Change button definition to


  
then

public function callServer() :void
{
var params:Object = new Object();
params.firstName = firstName.text;
...
srv.send(params) ;
}

hth
Scott 



George Georgiou wrote: 


Hi,

 

I have this code. It works perfect but I would like to get alerted only when I 
have some kind of error in my test.cfm file. Instead, the 'errorAlert()' 
function always is triggered :(

 

Any idea's on how to make this work only when I have problems in my test.cfm 
file?

 



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


http://myserver. flex/test. cfm"

  fault="errorAlert() ;"
  method="POST"> 


{firstName.text}
{
lastName.text}
{salary.text} 
{startDate.text}





 
  
 






 





 
















 







  
























  

Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

Re: [flexcoders] HTTPService Error event

2007-09-30 Thread Scott - FastLane

George -

I have not seen this syntax for passing request params to an 
HTTPService.  Of course that doesn't mean it is wrong :)  But, here is 
how I would do it.


Change button definition to


then

public function callServer():void
{
   var params:Object = new Object();
   params.firstName = firstName.text;
   ...
   srv.send(params);
}

hth
Scott

George Georgiou wrote:

Hi,
 
I have this code. It works perfect but I would like to get alerted 
only when I have some kind of error in my test.cfm file. Instead, the 
'errorAlert()' function always is triggered :(
 
Any idea's on how to make this work only when I have problems in my 
test.cfm file?
 



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


http://myserver.flex/test.cfm "
  fault="errorAlert();"
  method="POST">
   


{firstName.text}
{lastName.text}
{salary.text}
{startDate.text}




 
  
 






















 




[flexcoders] HTTPService Error event

2007-09-30 Thread George Georgiou
Hi,

I have this code. It works perfect but I would like to get alerted only when
I have some kind of error in my test.cfm file. Instead, the 'errorAlert()'
function always is triggered :(

Any idea's on how to make this work only when I have problems in my
test.cfmfile?



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

http://myserver.flex/test.cfm";
  fault="errorAlert();"
  method="POST">


{firstName.text}
{lastName.text}
{salary.text}
{startDate.text}




 
  
 























Re: [flexcoders] Dynamically convert a String to a Class?

2007-09-30 Thread Dave Carabetta
Check out the LiveDocs for getDefinitionByName():

http://livedocs.adobe.com/flex/201/langref/flash/utils/package.html

Regards,
Dave.
Cynergy Systems

On 9/30/07, keith <[EMAIL PROTECTED]> wrote:
>
>   I want to convert something like the String "mx.controls.ComboBox" to a
> Class.
> I would use this to declare components or other classes at runtime.
> *Please don't laugh at me*
>
> //==
> //In areas where I CAN do this...
> //-
> var testA:* = new mx.controls.ComboBox();
> addChild(testA);
> //==
>
> //=
> //I want to DYNAMICALLY do the same...
> //
> var classname:Class = Class("mx.controls.ComboBox");
> var testB:* = new classname();
> addChild(testB);
> //=
>
> //But get a this type of error---> TypeError: Error #1034: Type Coercion
> failed: cannot convert "mx.controls.ComboBox" to Class.
>
> -- Keith H --
>
>  
>


Re: [flexcoders] Image manipulation tutorials

2007-09-30 Thread Jon Bradley

On Sep 29, 2007, at 12:53 AM, mailtoanzer wrote:

Hi,
I want to do some image manipulations like crop, resize, blur etc in
my current Flex project. Can some one please point me to some open
source project or tutorials for this.

Thanks and Best Regards,
Anz



All of this is just actionscript programming with BitmapData objects  
(aside from UI controls). It depends on how complex you want to get.  
You would be much better off searching for specific tutorials for  
manipulation of bitmap images with BitmapData.


A few thoughts to get you started:

Crop :  Use "copyPixels" and create a new BitmapData object from an  
existing one, passing in a custom rectangle for the crop area.


Resize : Depends on what you want to do here. If you want a user- 
definable resize, you need to implement some type of resize  
controller, say Senocular's Transform Tool - available for Flex  
through sephiroth.it. Premier Express (maybe), Fauxto (definitely),  
and even FotoFlexer (maybe) use this library.


If you just want to resize the bitmap, create a custom matrix and  
scale it by some amount and then use the "draw" method, passing in  
the bitmap to modify and the matrix to scale it by. Look up  
BitmapData for more details on the draw method.


Blur : Again, depends on what you want. You can use an actual blur  
filter or use a custom convolution filter, which can be used to blur,  
edge detect, or perform any other generalized operation. Some  
operations may need to be done on a pixel-by-pixel basis, so  
convolution filters do not help in this case.


As far as implementing them in Flex it's pretty much a UI issue at  
that point. You can get as simple as using a Sprite that holds a  
Bitmap (which is the visual rep. of a BitmapData class object) and  
apply all these effects to it to creating a custom UIComponent that  
allows resize, etc.


good luck with it,

jon

Re: [flexcoders] Bind 'enabled' properties of ButtonBar to model

2007-09-30 Thread Kevin
thanks.  Yes, that is an option... I guess I was looking (hoping) for  
a simpler approach... I'll keep exploring.


- Kevin


On Sep 30, 2007, at 1:08 PM, Sheriff wrote:



all right, i am not an expert but i think you are going to need to  
extend the ButtonBar, override the createNav and create it so it  
looks for that variable and acts accordingly. the labels in the  
button bars are objects so u can disable them. sorry


- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 11:50:08 AM
Subject: Re: [flexcoders] Bind 'enabled' properties of ButtonBar to  
model


I think I am missing something... not sure why this helps me to  
pass it as 'data' instead of 'enabled'. I still can't find a what  
to bind it automatically so that the change in the model with  
update the ButtonBar.



Here is a sample app.  Possibly you can show me what I am doing  
wrong.  Thanks!  - Kevin




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









On Sep 30, 2007, at 12:23 PM, Sheriff wrote:



if u do this instead that works ({label:button1, data:false} , 
{label:button2, data:true} ) and then u can scan the data to see  
if u need to enable or not


- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 11:15:41 AM
Subject: [flexcoders] Bind 'enabled' properties of ButtonBar to model

To expand on a previous post, I am trying to find a elegant way to do
this: (I am thinking there must be a simple solution to this.)

I have a Button bar who's DataProvider is bound to an ArrayCollection
of objects on the model:

({label:button1, enabled:false} ,{label:button2, enabled:true} )

Since the ButtonBar doesn't not read the 'enabled' property by
default, I would like to bind the 'enabled' property of each button
to this data provider as well so that making an update to the
DataProvider will toggle the enabled/disabled of individual buttons
based on the users interaction in the application. Unfortunately, I
can't seem to find a way get this binding to work so that all I need
to do is update the enabled property in each object on the model.

Thanks for the help.

- Kevin



Pinpoint customers who are looking for what you sell.





Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search.






[flexcoders] Dynamically convert a String to a Class?

2007-09-30 Thread keith
I want to convert something like the String "mx.controls.ComboBox" to a 
Class.
I would use this to declare components or other classes at runtime.
*Please don't laugh at me*

//==
//In areas where I CAN do this...
//-
var testA:* = new mx.controls.ComboBox();
addChild(testA);
//==

//=
//I want to DYNAMICALLY do the same...
//
var classname:Class = Class("mx.controls.ComboBox");
var testB:* = new classname();
addChild(testB);
//=

//But get a this type of error---> TypeError: Error #1034: Type Coercion 
failed: cannot convert "mx.controls.ComboBox" to Class.


-- Keith H --



Re: [flexcoders] Bind 'enabled' properties of ButtonBar to model

2007-09-30 Thread Sheriff
all right, i am not an expert but i think you are going to need to extend the 
ButtonBar, override the createNav and create it so it looks for that variable 
and acts accordingly. the labels in the button bars are objects so u can 
disable them. sorry

- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 11:50:08 AM
Subject: Re: [flexcoders] Bind 'enabled' properties of ButtonBar to model









  



I think I am missing something... not sure why this helps me to 
pass it as 'data' instead of 'enabled'. I still can't find a what to bind it 
automatically so that the change in the model with update the ButtonBar.


Here is a sample app.  Possibly you can show me what I am doing wrong.  Thanks! 
 - Kevin





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










On Sep 30, 2007, at 12:23 PM, Sheriff wrote:



if u do this instead that works ({label:button1, data:false} ,{label:button2, 
data:true} ) and then u can scan the data to see if u need to enable or not

- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 11:15:41 AM
Subject: [flexcoders] Bind 'enabled' properties of ButtonBar to model

To expand on a previous post, I am trying to find a elegant way to do
this: (I am thinking there must be a simple solution to this.)

I have a Button bar who's DataProvider is bound to an ArrayCollection 
of objects on the model:

({label:button1, enabled:false} ,{label:button2, enabled:true} )

Since the ButtonBar doesn't not read the 'enabled' property by 
default, I would like to bind the 'enabled' property of each button 
to this data provider as well so that making an update to the 
DataProvider will toggle the enabled/disabled of individual buttons 
based on the users interaction in the application. Unfortunately, I 
can't seem to find a way get this binding to work so that all I need 
to do is update the enabled property in each object on the model.

Thanks for the help.

- Kevin







Pinpoint customers who are looking for what you sell.












  
























   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

Re: [flexcoders] Bind 'enabled' properties of ButtonBar to model

2007-09-30 Thread Kevin
I think I am missing something... not sure why this helps me to pass  
it as 'data' instead of 'enabled'. I still can't find a what to bind  
it automatically so that the change in the model with update the  
ButtonBar.


Here is a sample app.  Possibly you can show me what I am doing  
wrong.  Thanks!  - Kevin




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









On Sep 30, 2007, at 12:23 PM, Sheriff wrote:



if u do this instead that works ({label:button1, data:false} , 
{label:button2, data:true} ) and then u can scan the data to see if  
u need to enable or not


- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 11:15:41 AM
Subject: [flexcoders] Bind 'enabled' properties of ButtonBar to model

To expand on a previous post, I am trying to find a elegant way to do
this: (I am thinking there must be a simple solution to this.)

I have a Button bar who's DataProvider is bound to an ArrayCollection
of objects on the model:

({label:button1, enabled:false} ,{label:button2, enabled:true} )

Since the ButtonBar doesn't not read the 'enabled' property by
default, I would like to bind the 'enabled' property of each button
to this data provider as well so that making an update to the
DataProvider will toggle the enabled/disabled of individual buttons
based on the users interaction in the application. Unfortunately, I
can't seem to find a way get this binding to work so that all I need
to do is update the enabled property in each object on the model.

Thanks for the help.

- Kevin



Pinpoint customers who are looking for what you sell.






Re: [flexcoders] Bind 'enabled' properties of ButtonBar to model

2007-09-30 Thread Sheriff
if u do this instead that works 
({label:button1, data:false} ,{label:button2, data:true} ) and then u can scan 
the data to see if u need to enable or not

- Original Message 
From: Kevin <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 30, 2007 11:15:41 AM
Subject: [flexcoders] Bind 'enabled' properties of ButtonBar to model









  



To expand on a previous post, I am trying to find a elegant way to 
do  

this: (I am thinking there must be a simple solution to this.)



I have a Button bar who's DataProvider is bound to an ArrayCollection  

of objects on the model:



({label:button1, enabled:false} ,{label:button2, enabled:true} )



Since the ButtonBar doesn't not read the 'enabled' property by  

default, I would like to bind the 'enabled' property of each button  

to this data provider as well so that making an update to the  

DataProvider will toggle the enabled/disabled of individual buttons  

based on the users interaction in the application.  Unfortunately, I  

can't seem to find a way get this binding to work so that all I need  

to do is update the enabled property in each object on the model.



Thanks for the help.



- Kevin




  
























   

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

[flexcoders] Bind 'enabled' properties of ButtonBar to model

2007-09-30 Thread Kevin
To expand on a previous post, I am trying to find a elegant way to do  
this: (I am thinking there must be a simple solution to this.)

I have a Button bar who's DataProvider is bound to an ArrayCollection  
of objects on the model:

({label:button1,enabled:false},{label:button2,enabled:true})

Since the ButtonBar doesn't not read the 'enabled' property by  
default, I would like to bind the 'enabled' property of each button  
to this data provider as well so that making an update to the  
DataProvider will toggle the enabled/disabled of individual buttons  
based on the users interaction in the application.  Unfortunately, I  
can't seem to find a way get this binding to work so that all I need  
to do is update the enabled property in each object on the model.

Thanks for the help.

- Kevin


Re: [flexcoders] Runtime CSS problem with SWFLoader

2007-09-30 Thread Jason Y. Kwong
Yes, I had originally thought that you meant to load the CSS swf into the
the current domain.  However, StyleManager.loadStyleDeclarations() does not
give the option of specifying a LoaderContext.  It has a trustContent
argument, but setting that to true fails when loading a local SWF (I've not
tried from the network yet).

The thing is, I wonder if it really is about not being able to see classes.
For instance, my CSS file has a selector like this:

.chickButton
{
up-skin: Embed('assets/chicklet_button_up.png');
}

When the subswf loads this CSS at runtime, the button's upskin does not
update on-screen (as before).  However, I can see the class in the subswf.
I trace this inside the subswf:

   var decl: CSSStyleDeclaration = StyleManager.getStyleDeclaration
(".chickButton");
   trace(decl.getStyle("upSkin"));

and I get output like:

   [class newstyles__embed_css_assets_chicklet_button_up_png_1372914861]

And as stated in my last post, if I force a refresh of styles, the upskin
does then update on-screen.  It seems to me that the SystemManager of the
subswf is not being told to refresh its styles after the CSS file is loaded.


On 9/30/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>Uh, sorry, I wasn't clear.  You need to set the app domain in
> loadStyleDeclaration, not in SWFLoader.
>
>
>
> Every SWF has a copy of ModuleManager in it.  That code is used to load
> every module including CSS files.  Since that code says to make a child
> appdom of the ModuleManager's app dom, when your app is the main app, the
> style classes are loaded into a child domain and share common class
> definitions.
>
>
>
> When you load your app from a shell app, the ModuleManager is in the
> shell.  Your sub-app gets a child app domain and so does the css file, which
> means that your app and the css file have sibling appdoms, which means the
> cannot share classes and that messes up your styling.  By specifying the app
> domain in loadStyleDecl, you are telling it not to load the css into a child
> domain, but rather, to load it into the shell's appdom so it can be seen by
> other appdoms like your app.  You can also specify your sub-apps app-dom or
> child of your sub-app's appdom, but they key is to load the CSS into a place
> where its classes share classes with your app.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Jason Y. Kwong
> *Sent:* Saturday, September 29, 2007 9:34 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Runtime CSS problem with SWFLoader
>
>
>
> Thank you for your reply, Alex.  I tried doing the following with the
> SWFLoader:
>
>var lctx: LoaderContext = new LoaderContext();
>lctx.applicationDomain = ApplicationDomain.currentDomain;
>loader.loaderContext = lctx;
>loader.load("MyApp.swf");
>
> However, when MyApp loads a runtime CSS SWF, its styles are still not
> updating.  Both the loading SWF and the MyApp SWF are local files in the
> same directory.
>
> I poked around in the StyleManager code and saw that it calls the
> styleDeclarationsChanged() method after a CSS SWF has been loaded.  It looks
> like this:
>
> public function styleDeclarationsChanged():void
> {
>   var sms:Array /* of SystemManager */ =
> SystemManagerGlobals.topLevelSystemManagers;
>   var n:int = sms.length;
>   for (var i:int = 0; i < n; i++)
>   {
> var sm:SystemManager = SystemManager(sms[i]);
> sm.regenerateStyleCache(true);
> sm.notifyStyleChangeInChildren(null, true);
>   }
> }
>
> When I stepped through this, I saw that the sms array contains only the
> SystemManager for the main application.  So I decided to have MyApp
> explicitly update its own SystemManager after a CSS SWF is loaded:
>
>systemManager.mx_internal::regenerateStyleCache(true);
>systemManager.mx_internal::notifyStyleChangeInChildren (null, true);
>
> This actually got all the styles to update on-screen.  So what's not
> working right here?  Is it related to the application domain or is it
> something else?
>
>  On 9/29/07, *Alex Harui* <[EMAIL PROTECTED]> wrote:
>
> That's a common tripping point with runtime  CSS.  In a subswf config, you
> have to specify the applicationDomain parameter to be
> ApplicationDomain.currentDomain.  If you care why, see my modules
> presentation on my blog (blogs.adobe.com/aharui)
>
>
>  --
>
> *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] *On
> Behalf Of *Jason Y. Kwong
> *Sent:* Saturday, September 29, 2007 1:05 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Runtime CSS problem with SWFLoader
>
>
>
> I've got an app which loads different runtime CSS SWFs to change its
> appearance at runtime.  Everything works fine.  However, if I load this app
> inside another app using SWFLoader, the style changes don't happen.  At
> best, some of the new styles are applied, but never all.  I can confirm that
> the C

Re: [flexcoders] Form in Dynamic State

2007-09-30 Thread [EMAIL PROTECTED]
This application basically now works.
It creates forms with labels and any kind of input fields based on the 
given XML file. When you submit one form, the nex form is given untill 
the last form, which then POSTS the collected date to results.php. Each 
form eases off to the right while the next form eases in from the left.

This example is set up with an XML file that creates an example of each 
type of input. Since my last post, I added the ability to create 
radiobuttons., but the labels for the radiobuttons and checkboxes will 
not linewrap if they are too long. They just don't show the end of the 
line, because I haven't been able to get the multiline radiobuttons to 
work yet.

Turns out the custom form objects were static and I had to recreate them 
every time I wanted to access them.
I had to recreate the custom form object for every form so I could add 
values from the grid, and then again at the end so I could access the 
values.
So "CustomForm" is a little misleading because the CustomForm objects 
are is really just static collections of arrays, and the forms are 
actually grids created from those arrays.
In other words, this application does not use any MX: form objects at all.

I couldn't figure out how to access the  input components using their 
ids, so I just had each item in the form correspond to the same item by 
sequential order in the array it was created from. Now how I wanted to 
do it but it seems to work. . In PHP, that would be risky


[EMAIL PROTECTED] wrote:
>
> Another full day trying to get this to work. I'm trying to figure out
> how to access the value of the form elements.
>
> http://www.geotonics.com/examples/DynamicStates/DynamicStates.html 
> 
> I got this from Programming Flex 2, page 221, but I had to fix some
> mistakes and I submitted the errata to the authors.
> I've added a debug window and view source.
>
> The customForm object has functions for accessing the name and values of
> the form elements. When you first start it up, it shows the "name" value
> for the first items in each of the 4 customForm objects.I can also
> access the values in the same way.
>
> Which means if I can access the CustomForm objects I can access the name
> and values in those forms
>
> When you hit the next button, the getforms() function accesses the
> contents of the present state. Unfortunately, that doesn't seem to
> include any customForm objects, only items in a grid, so I am showing
> the textInput.text, of the first child, which is what I am calling the
> value of the form element. That's fine, but when I try textInput.name,
> it shows "TextInput99" which is worthless to me. I think that name is
> generated automatically. I can't figure out how to create the form
> elements with the proper names, as listed when you first start it up.
>
> Please if anyone knows how to access the proper names in the getforms()
> function, help me out.
>
> [EMAIL PROTECTED]  wrote:
> >
> > I put a break point where the next button is pushed and I went thru the
> > list of variable but I could not find anything that is in a form
> > variable. It might be in there somewhere but therea re so many its hard
> > to fathom.
> > Is there any way to pay people to answer my questions ? I've been trying
> > to fugure out how to make a simple multiple choice test for 2 months and
> > I'm having a nervous breakdown.
> >
> > [EMAIL PROTECTED]  
>  wrote:
> > >
> > > I seem to remember some way to access all the variables in a debugging
> > > environment, but I can't figure out how to do that anymore. How can I
> > > see the variables as they are present at runtime ?
> > >
> > > [EMAIL PROTECTED]  
> 
> >  wrote:
> > > >
> > > >
> > > > I got this example from "Programming Flex 2"
> > > >
> > > > 
> http://www.geotonics.com/examples/DynamicStates/DynamicStates.html 
> 
> >  >
> > > 
>  
> >  >>
> > > >
> >  
> >  >
> > > 
>  

[flexcoders] Observe Tag Problem

2007-09-30 Thread Kevin
I am trying to use the Observe tag to update the 'enabled' status of  
individual buttons in a button bar.

The problem I am having is that the "Observe" functionality gets  
called before the ButtonBar is created.  I am guessing the way around  
this is to check to make sure the ButtonBar is present before I try  
to access it, however, this could get a little cumbersome if I have  
more than a couple different UI containers that need to be modified.

Is there a way to prevent the Observe tag from firing until the UI is  
fully loaded initialized?

has anyone else run into this?

- Kevin


Re: [flexcoders] Passing a property of repeater item

2007-09-30 Thread Ralf Bokelberg
That is because the click is executed long after the repeater has done its
work.
You need to pass in a property of the button itself to displayHelpTopic, eg.
the label.
Cheers
Ralf.


On 9/30/07, Paul Steven <[EMAIL PROTECTED]> wrote:
>
>   I can't figure out how to pass a property of a repeater item to a
> function
>
> This is what I am trying but it is not working
>
> 
>
>  click="displayHelpTopic(linkrep.currentItem.title)" color="#ff"/>
>
> 
>
> Basically I want to pass the value linkrep.currentItem.title but what I
> have
> tried above does not work.
>
> Anyone suggest how I can do this.
>
> The label is displaying correctly.
>
> Thanks in advance
>
> Paul
>
>  
>



-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35


[flexcoders] Passing a property of repeater item

2007-09-30 Thread Paul Steven
I can't figure out how to pass a property of a repeater item to a function

This is what I am trying but it is not working

  

   

 

Basically I want to pass the value linkrep.currentItem.title but what I have
tried above does not work.

Anyone suggest how I can do this.

The label is displaying correctly.

Thanks in advance

Paul



Re: [flexcoders] actionscript class in Flex project

2007-09-30 Thread [EMAIL PROTECTED]
Your suggestion worked fine, thanks.
I double checked my version and there are no errors.
Here is my version which has AnimatedBall , an extention of sprite being 
used as a child of the Application, but has no errors, with the source 
code, if anyone's interested
http://www.geotonics.com/examples/Animation/Animation.html.


Alex Harui wrote:
>
> I’m surprised there is no error (I didn’t try it though). Sprites 
> can’t be children of Applications. The rules in Flex are:
>
> Navigator children must be Containers
>
> Container children must be IUIComponents
>
> UIComponent children can be anything.
>
> There are also component lifecycle behaviors you have to know about to 
> be a good flex component, such as which methods to override when, and 
> that you are sized by your parent.
>
> When you compile AnimatedBall as its own project, you get a small swf 
> with the Ball as the main class at a default size of 500x375.
>
> When you make it a child of Application, you should normally get an 
> error, but if you subclass UIComponent you’ll get further, but you’ll 
> also need to specify a size for it.
>
> So, change “extends Sprite” to “extends UIComponent” and size the tag 
> something like 
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of [EMAIL PROTECTED]
> *Sent:* Saturday, September 29, 2007 5:50 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] actionscript class in Flex project
>
> I made a mistake in the last post (I didn't intend to call init() in the
> application tag)
> corrected version :
>
> I have an action script file of an animated ball. 20 is added to x on
> every frame. If I create an actionscript project and run it, it works
> fine. Now how do I include this class in a flex project ?
>
> If I create a mxml file like this I thought it would have the ball in
> it. It runs, but there is not ball, no errors no nothing. The code for
> the ball is below
>
> 
> 8"?>
> http://www.adobe.com/2006/mxml 
> 
> >"
> layout="absolute" xmlns:com="com.*">
> 
> 
> 
> 
>
> 
>
> package com {
> import flash.display.Sprite;
> import flash.events.Event;
>
> public class AnimatedBall extends Sprite {
> private var ball:Sprite;
>
> public function AnimatedBall() {
> init();
> }
> private function init():void {
> ball = new Sprite();
> addChild(ball);
> ball.graphics.beginFill(0xff);
> ball.graphics.drawCircle(0, 0, 40);
> ball.x = 20;
>
> ball.addEventListener(Event.ENTER_FRAME,
> onEnterFrame);
> }
> private function onEnterFrame(event:Event):void {
> ball.x++;
> }
> }
> }
>
>  



--
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] radiobutton label and wordwrap

2007-09-30 Thread [EMAIL PROTECTED]
I tried this example and the Multiline RadioButton.as is giving me
1020: Method marked override must override another method.
3 times, one for each of the over rides.

Method marked override must override another method.

What does that mean ?

Alex Harui wrote:
>
> Word wrapping cannot be easily calculated in the flex sizing rules, so 
> we don’t implement it. Think about it, what should the measured width 
> and height of the radiobutton be if the label wordwraps?
>
> Measuring things with textflow only works when one dimension (usually 
> the width) is constrained. Flex components don’t require that. Our 
> Text component just makes a guess and it is usually wrong until you 
> constrain its width.
>

> There’s an example on my blog 
> (http://blogs.adobe.com/aharui/2007/04/multiline_buttons.html) of 
> wordwrapping buttons, but in order to use them you have to lock in a 
> width.
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of [EMAIL PROTECTED]
> *Sent:* Saturday, September 29, 2007 10:38 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] radiobutton label and wordwrap
>
> I'm using text next to a radio button and the mx:controls for the label
> of a radiobutton don't have wordwrap- the text just disappears stage 
> right.
> Why not allow the option to allow text to wrap ?
> Is my only solution to not use the radiobutton label and try to put a
> text control next to the label instead ?
>
> red
>
>  



--
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]: Flex site not loading in Internet Explorer 6 (IE6)

2007-09-30 Thread Arpit Mathur
Do you have real player installed? Real Player sometimes ends up breaking
Flex applications.



On 9/28/07, devenhariyani <[EMAIL PROTECTED]> wrote:
>
>   Hi guys,
>
> thanks for the feedback so far, I've been trying to debug this issue
> for the last 4 days but I still haven't had any luck. I'm new to
> flex, so I'm not sure what "rsls dependencies" are, but I do have a
> Ruby on Rails with MySQL on the backend. Here is some more info on
> my client environment:
>
> The Client_Machine_A that does not load the flex site has IE 6, and
> this is also my development machine, so loading the flex sites on
> localhost works without any problems
> (http://localhost:3000/bin/myFlexApp.html). I'm using
> Client_Machine_A to build and debug the flex application. However,
> the same site does not work once I deploy to the hosted environment.
>
> The user account I'm using has full Administrator permissions on
> Client_Machine_A, and I also checked that I have Flash player 9.0.47
> installed.
>
> Thanks in advance,
> Deven Hariyani
>
> --- In flexcoders@yahoogroups.com , Sheriff
> <[EMAIL PROTECTED]> wrote:
> >
> >
> > what u need to do is run IE as admin other wise it wont work and
> neither will flash. IE6 and forward
> > - Original Message 
> > From: EECOLOR <[EMAIL PROTECTED]>
> > To: flexcoders@yahoogroups.com 
> > Sent: Friday, September 28, 2007 3:24:35 PM
> > Subject: Re: [Flexcoders]: Flex site not loading in Internet
> Explorer 6 (IE6)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > We have had strange problems in IE 6 and Flash
> players below 9.0.28.
> >
> >
> > Greetz Erik
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 
> >
> >
> >
> > 
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> __
> ___
> > Be a better Heartthrob. Get better relationship answers from
> someone who knows. Yahoo! Answers - Check it out.
> > http://answers.yahoo.com/dir/?link=list&sid=396545433
> >
>
>  
>



-- 
Arpit Mathur
Lead Software Engineer,
Comcast Interactive Media
---
post your flex tips on
http://flextips.corank.com


[flexcoders] using dataservice with air and lcds

2007-09-30 Thread Joe
Hello all,

I want to convert my Apollo application to AIR version. And I am using 
dataservice in apollo. It works fine.
However, when I cannot compile the application under AIR. The flex builder 
always told me that, unable to resolve a class for ResourceBundle:data.
How can I solve this problem? Thanks in advance.

Regards,
Li Wen