[flexcoders] Mouse DOUBLE_CLICK not fired in Browser but in AIR

2008-07-27 Thread Vijay Ganesan
I have the same code running in an AIR app and in a browser app - the
only difference being the containing mx:WindowedApplication versus
mx:Application. See code below for both. Double clicking on the button
in the AIR app works fine (MouseEvent.DOUBLE_CLICK gets fired) but the
same does not fire in the browser version. Can someone tell me what is
going on here?

Thanks
Vijay

AIR version:
?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=creationCompleteHandler()
  mx:Script
![CDATA[
import mx.managers.DragManager;
import mx.core.DragSource;

private function creationCompleteHandler():void
{
  cvs.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
  but.doubleClickEnabled = true;
  but.addEventListener(MouseEvent.DOUBLE_CLICK, onMouseDblClick);
}

private function onMouseDown(event:MouseEvent):void 
{
  trace(onMouseDown);
  var ds:DragSource = new DragSource(); 
  DragManager.doDrag(this, ds, event);  
}

private function onMouseDblClick(event:MouseEvent):void 
{
  trace(onMouseDblClick); // gets called as expected
}
 ]]
  /mx:Script

  mx:Canvas id=cvs width=300 height=200
mx:Button id=but width=100 height=75 label=Hello/ 
  /mx:Canvas  

/mx:WindowedApplication

Browser version:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=creationCompleteHandler()
  mx:Script
![CDATA[
import mx.managers.DragManager;
import mx.core.DragSource;

private function creationCompleteHandler():void
{
  cvs.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
  but.doubleClickEnabled = true;
  but.addEventListener(MouseEvent.DOUBLE_CLICK, onMouseDblClick);
}

private function onMouseDown(event:MouseEvent):void 
{
  trace(onMouseDown);
  var ds:DragSource = new DragSource(); 
  DragManager.doDrag(this, ds, event);  
}

private function onMouseDblClick(event:MouseEvent):void 
{
  trace(onMouseDblClick); // does not get called!!!
}
 ]]
  /mx:Script

  mx:Canvas id=cvs width=300 height=200
mx:Button id=but width=100 height=75 label=Hello/ 
  /mx:Canvas  

/mx:Application




[flexcoders] Re: Flex overlay over HTML

2008-07-27 Thread Tim Hoff

Sorry Easow,

With this kind of communication, comes disconnects concerning meaning;
from time to time, or region to region.  I thought that I had a handle
on what you were looking for.  But, alass, my specific interpretation
failed to grasp the requirement.  Perhaps more detail will get us closer
to helping you,

Best Wishes.

-TH

--- In flexcoders@yahoogroups.com, Easow Jacob [EMAIL PROTECTED] wrote:

 Tim,

 It is not about rendering of HTML page.

 Here is my exact issue..
 I have a PopupButton..When i click the popUpButton a TitleWindow is
 appearing.But here is my problem.I embeded
 this swf in an HTML but when I click the Popup,titleWindow is not
 appearing,because it was not able to overlay above the HTML...
 How can I achive the tilte window to appear above he HTML.

 Thanks

 On Sat, Jul 26, 2008 at 9:51 PM, Tim Hoff [EMAIL PROTECTED] wrote:

 
  Hi Easow,
 
  You could just use an IFrame.
 
  -TH
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Easow
  Jacob easowj@ wrote:
  
   Hi,
  
   I have a *HTML* page with a small *flex* app embedded into it.
  
   When you click on the *flex* app, I want an *overlay* to come
*over*
  page
   showing my app.
  
  
   Just wondering how I would go about that.
  
   Or if there is a way to have the original small map SWF resize to
show
  the
   app.
  
   Cheers
   Mathew
  
  
   --
   Mathew Easow Jacob,
   Bangalore.
   +91-9886979038
  
 
 
 



 --
 Mathew Easow Jacob,
 Bangalore.
 +91-9886979038






[flexcoders] list allowMultipleSelection without key pressed ?

2008-07-27 Thread brett.coffin
Is there a way to have the buttons in the list behave like toggle
buttons without the ctrl key press... Can i trick the list to believe
that the ctrl key is press at all times ? any suggestion would be
appreciated. ;) Good Flex Coding  



[flexcoders] Re: Passing parameter to component

2008-07-27 Thread Cathal
I've tried to just display the contents of this variable to test it,
but nothing gets printed to the screen.

code inside the component:
mx:Script
![CDATA[   
public var strProjectName:String;
]]
/mx:Script
mx:Label text={strProjectName} /

If I replace the selectedItem code with a string Hello, this prints
to the screen correctly.


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 It might get assigned to null at startup and then to something else
 later as the binding expression becomes valid
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Cathal
 Sent: Saturday, July 26, 2008 3:36 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Passing parameter to component
 
  
 
 Hi,
 
 I'm trying to pass the selected item on a combo box in one component
 to another component.
 
 If i bind it to a label it works fine,
 
 code: 
 mx:Label text={headerComp.cbProject.selectedItem.projectname} /
 
 but passing it into another component it doesn't work.
 
 code:
 
 comp:home
 strProjectName={headerComp.cbProject.selectedItem.projectname} /
 
 While in debugging mode strProjectName seems to be null, so it doesn't
 see to be assigned anything.
 
 Any suggestions?





[flexcoders] Re: Centering Bar Chart labels vertically

2008-07-27 Thread Amy
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote:

 
 Hi Amy,
 
 I guess that everyone has their own perspective.  Like you, I used to
 complain that the flex styles weren't as comprehensive as the .net
 controls that I was used to at the time.  However, looking at it from 
an
 80-20 point of view, the basics are there; especially for charts.  The
 point is that I'll gladly sacrifice some built-in properties, if the
 framework supports rolling my own components and/or extending; to
 customize properties.  Sometimes, it takes more time and effort to
 complain about something, than it does to just create it yourself. 
 Here's a solution that took very little time to create:

Thanks, and I do appreciate it--I don't mean to sound ungrateful.  But 
the point of my question was not to complain.

Literally every time I have gone to roll my own solution to something 
that at first seemed to be missing from Charts, I discovered that it 
was already covered by the charting FW.  And this is nice--really nice--
since I have never had a week where I literally did not have to recode 
_anything_, it just worked as advertised.

While exploring charting, the majority of examples I have found have 
used a hack to solve a problem that doesn't exist in charting:

http://www.rphelan.com/2008/05/23/taking-control-of-flex-charting-
styles/
uses a tick mark the same color as the background instead of labelgap

http://blogs.adobe.com/flexdoc/2008/07/customized_legend_layout.html
rewrites the Legend control rather than just set a width on the Legend

and on and on...

The problem, as I see it, is that when people run up against a 
percieved limitation like this, they immediately run out and write 
something to fix it.  This robs the Adobe team of the motivation to 
provide nice, user-friendly components like charting if they know 
people aren't going to use the in-built functionality if they can't 
find the feature in the 3 seconds they spend with the docs.  After all, 
if it takes 20 hours to write a feature, 20 hours to qa it, and 20 
hours to document it, if nobody ever uses it because they are so used 
to running out an building their own at the first hint of trouble, why 
would Adobe invest the time?

I've been as guilty of it as anyone, but I intent to do my absolute 
darnedest to make sure I'm leveraging what's in the features before I 
go off and write something custom.  I come from a history of developing 
in a product Adobe doesn't make anymore--Authorware.  Most Authorware 
developers say there's a double learning curve with that product.  
First, you learn the icons and flow line (analagous to MXML) and then 
you learn the code.  Most developers stop there, but a very few take 
the third curve--going back and _really_ learning the icons and _not_ 
coding features that were already beautifully, elegantly implemented in 
the icons.

Because I've been through all three curves with another product  that 
is similar in some ways to Flex, I know that I can save myself a lot of 
effort if I try to integrate the third curve with the first and second 
curves.  

I sincerely believe there _is_ a simple solution to this problem that 
already exists in the charting framework.  And that is the answer I'm 
asking for.  It's a question, not a complaint.

Thanks :-)

-Amy



[flexcoders] Re: Preventing Change in Focus Using Mouse

2008-07-27 Thread edlueze
Thanks!

I think what you are saying is that I need to trap any MOUSE_DOWN
event in the parent's panel/canvas/application layout container during
the event capture phase, check if is ok to change focus, then
stopPropagation. Is that right?

That could get a little ugly - there is no telling how deep down the
component is from it's panel/canvas container. Would you suggest
walking the tree up until a panel/canvas/application is found and then
registering the MOUSE_DOWN event at that level?

The advantage of this approach would be that you could control the
scope of the mouse control - for example, the user wouldn't be allowed
to change focus *within* the same panel, but would be allowed to
switch focus to a different panel.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 FocusManager moves focus on MOUSE_DOWN.  It isn't cancelable so you may
 need to use stopPropagation.
 
  
 
 It might be better to simply restore focus via callLater though
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of edlueze
 Sent: Saturday, July 26, 2008 3:37 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Preventing Change in Focus Using Mouse
 
  
 
 Hi Folks:
 
 I'm trying to prevent the user from prematurely changing focus away
 from a control. I can use event.preventDefault() successfully when
 using the keyboard, but not when using a mouse.
 
 This is what I've got:
 
 private function creationCompleteListener(event:Event):void {
 target.addEventListener(FocusEvent.KEY_FOCUS_CHANGE,
 target_keyFocusChange);
 target.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,
 target_mouseFocusChange);
 target.addEventListener(FocusEvent.FOCUS_IN, target_focusIn);
 target.addEventListener(FocusEvent.FOCUS_OUT, target_focusOut);
 }
 
 private function target_focusChange(event:Event):void {
 trace(target +  target_focusChange);
 if (!okToLoseFocus) {
 event.preventDefault();
 }
 }
 
 And this is the trace I'm getting when I try when I try and toggle
 between a TextInput and a Button (okToLoseFocus = false):
 
 1. Main0.myTextInput target_focusIn
 2. Main0.myTextInput target_keyFocusChange
 3. Main0.myTextInput target_mouseFocusChange
 4. Main0.myTextInput target_focusOut
 5. Main0.myButton target_focusIn
 6. Main0.myButton target_keyFocusChange
 7. Main0.myButton target_mouseFocusChange
 8. Main0.myButton target_focusOut
 9. Main0.myTextInput target_focusIn
 
 When the user attempts to change focus using a tab on the keyboard
 (step2 and step6) they are prevented. But when they try to *click* on
 another control (step3 and step7) they are successful??!
 
 How can I stop the user clicking to another focus?





[flexcoders] Re: Centering Bar Chart labels vertically

2008-07-27 Thread Tim Hoff

Cool, and I totally understand where you're coming from.  Believe me,
there have been many occasions that I've run into the same brick walls;
where there isn't a built-in property for what I need to do.  And yes,
from time to time, the phrase what the heck? comes out of my mouth. 
You know, even for little things, like having a global way to use the
hand cursor on buttons, and all controls that extend from it.  I also
don't want to come off like I'm jumping down your throat for speaking
up.  Obviously, mine is just a single voice in a big croud.  My take on
it however, is that Flex isn't quite a mature product just yet.  There
is still room to improve and I do think that the people at Adobe have
done an exceptional job getting to this point.  Hopefully, threads like
this, logging wish-list features and continued patience will help make
the product much more robust in the future.

Cheers,
-TH

--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Hi Amy,
 
  I guess that everyone has their own perspective. Like you, I used to
  complain that the flex styles weren't as comprehensive as the .net
  controls that I was used to at the time. However, looking at it from
 an
  80-20 point of view, the basics are there; especially for charts.
The
  point is that I'll gladly sacrifice some built-in properties, if the
  framework supports rolling my own components and/or extending; to
  customize properties. Sometimes, it takes more time and effort to
  complain about something, than it does to just create it yourself.
  Here's a solution that took very little time to create:

 Thanks, and I do appreciate it--I don't mean to sound ungrateful. But
 the point of my question was not to complain.

 Literally every time I have gone to roll my own solution to
something
 that at first seemed to be missing from Charts, I discovered that it
 was already covered by the charting FW. And this is nice--really
nice--
 since I have never had a week where I literally did not have to recode
 _anything_, it just worked as advertised.

 While exploring charting, the majority of examples I have found have
 used a hack to solve a problem that doesn't exist in charting:

 http://www.rphelan.com/2008/05/23/taking-control-of-flex-charting-
 styles/
 uses a tick mark the same color as the background instead of labelgap

 http://blogs.adobe.com/flexdoc/2008/07/customized_legend_layout.html
 rewrites the Legend control rather than just set a width on the Legend

 and on and on...

 The problem, as I see it, is that when people run up against a
 percieved limitation like this, they immediately run out and write
 something to fix it. This robs the Adobe team of the motivation to
 provide nice, user-friendly components like charting if they know
 people aren't going to use the in-built functionality if they can't
 find the feature in the 3 seconds they spend with the docs. After all,
 if it takes 20 hours to write a feature, 20 hours to qa it, and 20
 hours to document it, if nobody ever uses it because they are so used
 to running out an building their own at the first hint of trouble, why
 would Adobe invest the time?

 I've been as guilty of it as anyone, but I intent to do my absolute
 darnedest to make sure I'm leveraging what's in the features before I
 go off and write something custom. I come from a history of developing
 in a product Adobe doesn't make anymore--Authorware. Most Authorware
 developers say there's a double learning curve with that product.
 First, you learn the icons and flow line (analagous to MXML) and then
 you learn the code. Most developers stop there, but a very few take
 the third curve--going back and _really_ learning the icons and _not_
 coding features that were already beautifully, elegantly implemented
in
 the icons.

 Because I've been through all three curves with another product that
 is similar in some ways to Flex, I know that I can save myself a lot
of
 effort if I try to integrate the third curve with the first and second
 curves.

 I sincerely believe there _is_ a simple solution to this problem that
 already exists in the charting framework. And that is the answer I'm
 asking for. It's a question, not a complaint.

 Thanks :-)

 -Amy






[flexcoders] CF remote object return struct and singletons

2008-07-27 Thread Scott
I was returning type query from my remote object but needed to add in
some other processed data along with the query so I changed the type to
struct.  I am processing the data into a singleton class to track the
user's login.  Previously I had the following line to set the data in
the singleton:

 

GlobalVars.instance.acUser.source =
ArrayCollection(event.result).source;

 

Which worked great and tripped the event in the singleton to process the
array.

 

Now I'm trying to process the struct instead of the query so I changed
the line to:

 

GlobalVars.instance.acUser.source = Object(event.result).source;

 

That line doesn't seem to set the variables within the
event.result.source to the singleton class (nor does the change variable
event fire which is a pretty good indication that it's not working).

 

I assumed coldfusion structs are type object in flex but I must be
mistaken.  Do any of you know what I am doing wrong?

 

 TIA!

 



RE:[flexcoders] Re: Passing parameter to component

2008-07-27 Thread Scott
Nevermind, I misread your question.  Sorry.

 

Try mx:Label text={strProjectName.text} /

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Cathal
Sent: Sunday, July 27, 2008 7:01 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: Passing parameter to component

 

I've tried to just display the contents of this variable to test it,
but nothing gets printed to the screen.

code inside the component:
mx:Script
![CDATA[ 
public var strProjectName:String;
]]
/mx:Script
mx:Label text={strProjectName} /

If I replace the selectedItem code with a string Hello, this prints
to the screen correctly.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 It might get assigned to null at startup and then to something else
 later as the binding expression becomes valid
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Cathal
 Sent: Saturday, July 26, 2008 3:36 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Passing parameter to component
 
 
 
 Hi,
 
 I'm trying to pass the selected item on a combo box in one component
 to another component.
 
 If i bind it to a label it works fine,
 
 code: 
 mx:Label text={headerComp.cbProject.selectedItem.projectname} /
 
 but passing it into another component it doesn't work.
 
 code:
 
 comp:home
 strProjectName={headerComp.cbProject.selectedItem.projectname} /
 
 While in debugging mode strProjectName seems to be null, so it doesn't
 see to be assigned anything.
 
 Any suggestions?


 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


RE:[flexcoders] Re: Passing parameter to component

2008-07-27 Thread Scott
It doesn't look like you're including the component...

 

The component in your function needs to be defined something like:

 

mx:Script

  ![CDATA[

Import com.myapp.mycomponent;



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Cathal
Sent: Sunday, July 27, 2008 7:01 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: Passing parameter to component

 

I've tried to just display the contents of this variable to test it,
but nothing gets printed to the screen.

code inside the component:
mx:Script
![CDATA[ 
public var strProjectName:String;
]]
/mx:Script
mx:Label text={strProjectName} /

If I replace the selectedItem code with a string Hello, this prints
to the screen correctly.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 It might get assigned to null at startup and then to something else
 later as the binding expression becomes valid
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Cathal
 Sent: Saturday, July 26, 2008 3:36 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Passing parameter to component
 
 
 
 Hi,
 
 I'm trying to pass the selected item on a combo box in one component
 to another component.
 
 If i bind it to a label it works fine,
 
 code: 
 mx:Label text={headerComp.cbProject.selectedItem.projectname} /
 
 but passing it into another component it doesn't work.
 
 code:
 
 comp:home
 strProjectName={headerComp.cbProject.selectedItem.projectname} /
 
 While in debugging mode strProjectName seems to be null, so it doesn't
 see to be assigned anything.
 
 Any suggestions?


 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


[flexcoders] Value of AS variable dissapearing

2008-07-27 Thread Scott
I've got a weird issue that I'm trying to track down... It's all part of
the life of a class instance that I posted before (I've got an update on
that one coming soon).

 

In my user registration validation class, I check to see if the email
address already exists in the DB.  I created a CFC function called
val_email( string:strEMail):Boolean

 

My remote object is defined as:

mx:RemoteObject 

id=authManager 

destination=ColdFusion 

source=FT.components.cfgenerated.managers.Auth

result=remote_result(event)

   mx:method name=register result=register_result(event)
fault=serverFault(event) /

/mx:RemoteObject

 

In my AS script I have the following config:

mx:Script

  ![CDATA[

Import ...

 

private var bEMail:Boolean;

 

So that declares the variable that I'll be watching.

 

I basically do the following during validation:

If ( ValidEmailAddress )

authManager.val_email( this.email.text );

 

if (this.bEMail == true )

{

  ... give error message/handing duplicate...

Etc...

 

 

The function:

 

private function remote_result(event:ResultEvent):void

{

  this.bEMail = event.result;

}

 

 

Fires off ok and sets the variable this.bEMail to true just fine.  I
have a watch set on the variable and see that it gets set.

 

Now, when it returns to the above if statement bEMail is back to false.
I've tried to run line by line in the debugger and can't find anything
that is causing a reset.  I can also see the watched variable went from
true to false.  Anyone have any suggestions?



[flexcoders] Flex MDI and View States Error

2008-07-27 Thread Faisal Abid
I have an application where the FlexMDI windows are being created
dynamicly via actionscript however the MDICanvas is being created on
inital application creation. When i make the state go to another state
other then the default and try to add an mdiwindow, it adds fine
however when you click on it it gives errors about titlebar being
pressed and bringtofrontproxy . here is the basic code.

btw im using the latest flexlib build (downloaded it today) , i tried
this with the old flexmdi build also , same problem. 

// on second state call create widgetfunction
private function createWidgets():void{
this.mdic.effects = new MDIVistaEffects
 var widgetWindow:MDIWindow = new MDIWindow();
 widgetWindow.title = Your Live Widgets;
widgetWindow.width = 400;
widgetWindow.height = 400;
this.mdic.addChild(widgetWindow);
}

when i do that the window creates, but when i click on the window i
get this error

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
flexmdi.containers::MDIWindow/onTitleBarPress()[/_projects/flexmdi/src/flexmdi/containers/MDIWindow.as:1406]

and then this error right after

ypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
flexmdi.containers::MDIWindow/bringToFrontProxy()[/_projects/flexmdi/src/flexmdi/containers/MDIWindow.as:1316]





[flexcoders] Re: Flex MDI and View States Error

2008-07-27 Thread ben.clinkinbeard
Hi Faisal,

I think the problem is in the way you are adding the window. Since you
are just using addChild(), the window is never assigned a
windowManager and I think that is what is null. If you say
mdic.windowManager.add( window ), it will addChild() for you and also
set the windowManager property correctly. Try that and I think you
will be all set.

That said, I think its completely reasonable to expect things to work
the way you had them coded. I am going to look at overriding
addChild() in MDICanvas to support that workflow so look for that in a
future release.

Thanks,
Ben



--- In flexcoders@yahoogroups.com, Faisal Abid [EMAIL PROTECTED] wrote:

 I have an application where the FlexMDI windows are being created
 dynamicly via actionscript however the MDICanvas is being created on
 inital application creation. When i make the state go to another state
 other then the default and try to add an mdiwindow, it adds fine
 however when you click on it it gives errors about titlebar being
 pressed and bringtofrontproxy . here is the basic code.
 
 btw im using the latest flexlib build (downloaded it today) , i tried
 this with the old flexmdi build also , same problem. 
 
 // on second state call create widgetfunction
 private function createWidgets():void{
   this.mdic.effects = new MDIVistaEffects
  var widgetWindow:MDIWindow = new MDIWindow();
  widgetWindow.title = Your Live Widgets;
   widgetWindow.width = 400;
   widgetWindow.height = 400;
   this.mdic.addChild(widgetWindow);
   }
 
 when i do that the window creates, but when i click on the window i
 get this error
 
 TypeError: Error #1009: Cannot access a property or method of a null
 object reference.
   at

flexmdi.containers::MDIWindow/onTitleBarPress()[/_projects/flexmdi/src/flexmdi/containers/MDIWindow.as:1406]
 
 and then this error right after
 
 ypeError: Error #1009: Cannot access a property or method of a null
 object reference.
   at

flexmdi.containers::MDIWindow/bringToFrontProxy()[/_projects/flexmdi/src/flexmdi/containers/MDIWindow.as:1316]





[flexcoders] Re: Icon Click and iconFunction on ListItemRenderer

2008-07-27 Thread Vijay Anand Mareddy
Figured out the answer to my question. You dont need to extend 
ListeItemRenderer. The 
default one is good enough.
The currentTarget property of the ListEvent.Click (Not ListEvent.ItemClick) 
will tell you 
whether you clicked on the icon (if it exists) or the textfield.

--- In flexcoders@yahoogroups.com, Vijay Anand Mareddy [EMAIL PROTECTED] 
wrote:

 I am using a simple List with icons and labelText using the iconFunction and 
 labelfunction respectively ...is there a way to tell on mylist.itemClick  if 
 the user has 
 clicked on the icon or the labelText ? 
 
 Both ListEvent.target and ListEvent.currentTarget are mx.controls.List  ...is 
 there any 
other 
 property i can look at ? 
 
 I even tried my own simple MyListItemRenderer but myClickHandler is not 
 invoked!
 
 public class MyListItemRenderer extends ListItemRenderer {
 
 private function myClickHandler(e:MouseEvent):void{
trace('myClickHandler invoked');
  }
 
 override protected function commitProperties():void{
  super.commitProperties();
  if(icon){
   trace('icon is NOT null');
icon.addEventListener(MouseEvent.CLICK,myClickHandler);
 
  } else {
   trace(' icon is null');
  }
 }
 }




[flexcoders] Eclipse (Flex plugin) Editor Won't Start

2008-07-27 Thread ntman12001
Hello,
I have just installed Eclipse with the Flex plugin and am getting an
error at the point when the editor should begin creating a new
document. Any help in determining what might be causing this, or
whether I should reinstall would be appreciated.

Here are the details that it shows:

org.eclipse.jface.util.Assert$AssertionFailedException: Assertion failed: 
at org.eclipse.jface.util.Assert.isTrue(Assert.java:185)
at org.eclipse.jface.util.Assert.isTrue(Assert.java:170)
at
com.adobe.flexbuilder.editors.derived.editor.FlexMultiPageEditorPart.setActivePage(FlexMultiPageEditorPart.java:569)
at
com.adobe.flexbuilder.editors.common.editor.CodeAndDesignEditor.setActivePage(CodeAndDesignEditor.java:643)
at
com.adobe.flexbuilder.editors.mxml.MXMLEditor.setActivePage(MXMLEditor.java:483)
at
com.adobe.flexbuilder.editors.derived.editor.FlexMultiPageEditorPart.createPartControl(FlexMultiPageEditorPart.java:235)
at
com.adobe.flexbuilder.editors.common.editor.CodeAndDesignEditor.createPartControl(CodeAndDesignEditor.java:162)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:779)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:678)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:639)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2817)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729)
at
org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2643)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605)
at 
org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99)
at
org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99)
at
org.eclipse.ui.views.navigator.OpenActionGroup.runDefaultAction(OpenActionGroup.java:125)
at
org.eclipse.ui.views.navigator.MainActionGroup.runDefaultAction(MainActionGroup.java:329)
at
org.eclipse.ui.views.navigator.ResourceNavigator.handleOpen(ResourceNavigator.java:716)
at
org.eclipse.ui.views.navigator.ResourceNavigator$6.open(ResourceNavigator.java:443)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183)
  

[flexcoders] Flex Builder Speed-ups?

2008-07-27 Thread tudsy
My Flex Builder can run extremely slow, almost every keypress sends
javaw.exe CPU usage over 50% and this causes an unacceptable lag for
even simple editing.  Any tips?

I'm running Vista SP1 on an AMD X2 3600 (1.8 Ghz each core) with 2 GB
RAM.  I've tried tweaking the memory settings from the command line,
switching my JVM, and even reinstalling to XP but none of it helped.
Kept getting the CPU spikes.

I wont even mention how long it takes to do anything in 'Design' view.

Thanks



[flexcoders] Re: Passing parameter to component

2008-07-27 Thread Cathal
Actually you are correct, it is not assigned untill later. The reason
my little test with the label didn't work was because I forgot the
[Bindable] tag in the actionscript.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 It might get assigned to null at startup and then to something else
 later as the binding expression becomes valid
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Cathal
 Sent: Saturday, July 26, 2008 3:36 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Passing parameter to component
 
  
 
 Hi,
 
 I'm trying to pass the selected item on a combo box in one component
 to another component.
 
 If i bind it to a label it works fine,
 
 code: 
 mx:Label text={headerComp.cbProject.selectedItem.projectname} /
 
 but passing it into another component it doesn't work.
 
 code:
 
 comp:home
 strProjectName={headerComp.cbProject.selectedItem.projectname} /
 
 While in debugging mode strProjectName seems to be null, so it doesn't
 see to be assigned anything.
 
 Any suggestions?





Re: [flexcoders] Eclipse (Flex plugin) Editor Won't Start

2008-07-27 Thread Sherif Abdou
If i had to guess, you are using Eclipse 3.4 which is not supported thus u have 
to uninstall Flex plugin, download Eclipse 3.3 and it shopuld work.



- Original Message 
From: ntman12001 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, July 27, 2008 1:05:48 PM
Subject: [flexcoders] Eclipse (Flex plugin) Editor Won't Start


Hello,
I have just installed Eclipse with the Flex plugin and am getting an
error at the point when the editor should begin creating a new
document. Any help in determining what might be causing this, or
whether I should reinstall would be appreciated.

Here are the details that it shows:

org.eclipse. jface.util. Assert$Assertion FailedException: Assertion failed: 
at org.eclipse. jface.util. Assert.isTrue( Assert.java: 185)
at org.eclipse. jface.util. Assert.isTrue( Assert.java: 170)
at
com.adobe.flexbuild er.editors. derived.editor. FlexMultiPageEdi 
torPart.setActiv ePage(FlexMultiP ageEditorPart. java:569)
at
com.adobe.flexbuild er.editors. common.editor. CodeAndDesignEdi 
tor.setActivePag e(CodeAndDesignE ditor.java: 643)
at
com.adobe.flexbuild er.editors. mxml.MXMLEditor. setActivePage( MXMLEditor. 
java:483)
at
com.adobe.flexbuild er.editors. derived.editor. FlexMultiPageEdi 
torPart.createPa rtControl( FlexMultiPageEdi torPart.java: 235)
at
com.adobe.flexbuild er.editors. common.editor. CodeAndDesignEdi 
tor.createPartCo ntrol(CodeAndDes ignEditor. java:162)
at
org.eclipse. ui.internal. EditorReference. createPartHelper (EditorReference 
.java:661)
at
org.eclipse. ui.internal. EditorReference. createPart( EditorReference. 
java:428)
at
org.eclipse. ui.internal. WorkbenchPartRef erence.getPart( WorkbenchPartRef 
erence.java: 594)
at org.eclipse. ui.internal. PartPane. setVisible( PartPane. java:306)
at
org.eclipse. ui.internal. presentations. PresentablePart. setVisible( 
PresentablePart. java:180)
at
org.eclipse. ui.internal. presentations. util.Presentable PartFolder. 
select(Presentab lePartFolder. java:270)
at
org.eclipse. ui.internal. presentations. util.LeftToRight TabOrder. 
select(LeftToRig htTabOrder. java:65)
at
org.eclipse. ui.internal. presentations. util.TabbedStack Presentation. 
selectPart( TabbedStackPrese ntation.java: 473)
at
org.eclipse. ui.internal. PartStack. refreshPresentat ionSelection( PartStack. 
java:1256)
at org.eclipse. ui.internal. PartStack. setSelection( PartStack. java:1209)
at org.eclipse. ui.internal. PartStack. showPart( PartStack. java:1608)
at org.eclipse. ui.internal. PartStack. add(PartStack. java:499)
at org.eclipse. ui.internal. EditorStack. add(EditorStack. java:103)
at org.eclipse. ui.internal. PartStack. add(PartStack. java:485)
at org.eclipse. ui.internal. EditorStack. add(EditorStack. java:112)
at
org.eclipse. ui.internal. EditorSashContai ner.addEditor( EditorSashContai 
ner.java: 63)
at
org.eclipse. ui.internal. EditorAreaHelper .addToLayout( EditorAreaHelper 
.java:217)
at
org.eclipse. ui.internal. EditorAreaHelper .addEditor( EditorAreaHelper 
.java:207)
at
org.eclipse. ui.internal. EditorManager. createEditorTab( EditorManager. 
java:779)
at
org.eclipse. ui.internal. EditorManager. openEditorFromDe scriptor( 
EditorManager. java:678)
at
org.eclipse. ui.internal. EditorManager. openEditor( EditorManager. java:639)
at
org.eclipse. ui.internal. WorkbenchPage. busyOpenEditorBa tched(WorkbenchP 
age.java: 2817)
at
org.eclipse. ui.internal. WorkbenchPage. busyOpenEditor( WorkbenchPage. 
java:2729)
at
org.eclipse. ui.internal. WorkbenchPage. access$11( WorkbenchPage. java:2721)
at org.eclipse. ui.internal. WorkbenchPage$ 10.run(Workbench Page.java: 2673)
at org.eclipse. swt.custom. BusyIndicator. showWhile( BusyIndicator. java:70)
at
org.eclipse. ui.internal. WorkbenchPage. openEditor( WorkbenchPage. java:2668)
at
org.eclipse. ui.internal. WorkbenchPage. openEditor( WorkbenchPage. java:2652)
at
org.eclipse. ui.internal. WorkbenchPage. openEditor( WorkbenchPage. java:2643)
at org.eclipse. ui.ide.IDE. openEditor( IDE.java: 646)
at org.eclipse. ui.ide.IDE. openEditor( IDE.java: 605)
at org.eclipse. ui.actions. OpenFileAction. openFile( OpenFileAction. java:99)
at
org.eclipse. ui.actions. OpenSystemEditor Action.run( OpenSystemEditor 
Action.java: 99)
at
org.eclipse. ui.views. navigator. OpenActionGroup. runDefaultAction 
(OpenActionGroup .java:125)
at
org.eclipse. ui.views. navigator. MainActionGroup. runDefaultAction 
(MainActionGroup .java:329)
at
org.eclipse. ui.views. navigator. ResourceNavigato r.handleOpen( 
ResourceNavigato r.java:716)
at
org.eclipse. ui.views. navigator. ResourceNavigato r$6.open( ResourceNavigato 
r.java:443)
at
org.eclipse. jface.viewers. StructuredViewer $2.run(Structure dViewer.java: 820)
at org.eclipse. core.runtime. SafeRunner. run(SafeRunner. java:37)
at org.eclipse. core.runtime. Platform. run(Platform. java:880)
at org.eclipse. ui.internal. JFaceUtil$ 1.run(JFaceUtil. java:48)
at org.eclipse. jface.util. SafeRunnable. run(SafeRunnable .java:175)
at
org.eclipse. jface.viewers. 

[flexcoders] Re: Eclipse (Flex plugin) Editor Won't Start

2008-07-27 Thread ntman12001
You are correct, Sherif. That is exactly what I did. Everything is
working A-OK now. 

--- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote:

 If i had to guess, you are using Eclipse 3.4 which is not supported
thus u have to uninstall Flex plugin, download Eclipse 3.3 and it
shopuld work.
 
 
 
 - Original Message 
 From: ntman12001 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Sunday, July 27, 2008 1:05:48 PM
 Subject: [flexcoders] Eclipse (Flex plugin) Editor Won't Start
 
 
 Hello,
 I have just installed Eclipse with the Flex plugin and am getting an
 error at the point when the editor should begin creating a new
 document. Any help in determining what might be causing this, or
 whether I should reinstall would be appreciated.
 
 Here are the details that it shows:
 
 org.eclipse. jface.util. Assert$Assertion FailedException: Assertion
failed: 
 at org.eclipse. jface.util. Assert.isTrue( Assert.java: 185)
 at org.eclipse. jface.util. Assert.isTrue( Assert.java: 170)
 at
 com.adobe.flexbuild er.editors. derived.editor. FlexMultiPageEdi
torPart.setActiv ePage(FlexMultiP ageEditorPart. java:569)
 at
 com.adobe.flexbuild er.editors. common.editor. CodeAndDesignEdi
tor.setActivePag e(CodeAndDesignE ditor.java: 643)
 at
 com.adobe.flexbuild er.editors. mxml.MXMLEditor. setActivePage(
MXMLEditor. java:483)
 at
 com.adobe.flexbuild er.editors. derived.editor. FlexMultiPageEdi
torPart.createPa rtControl( FlexMultiPageEdi torPart.java: 235)
 at
 com.adobe.flexbuild er.editors. common.editor. CodeAndDesignEdi
tor.createPartCo ntrol(CodeAndDes ignEditor. java:162)
 at
 org.eclipse. ui.internal. EditorReference. createPartHelper
(EditorReference .java:661)
 at
 org.eclipse. ui.internal. EditorReference. createPart(
EditorReference. java:428)
 at
 org.eclipse. ui.internal. WorkbenchPartRef erence.getPart(
WorkbenchPartRef erence.java: 594)
 at org.eclipse. ui.internal. PartPane. setVisible( PartPane. java:306)
 at
 org.eclipse. ui.internal. presentations. PresentablePart.
setVisible( PresentablePart. java:180)
 at
 org.eclipse. ui.internal. presentations. util.Presentable
PartFolder. select(Presentab lePartFolder. java:270)
 at
 org.eclipse. ui.internal. presentations. util.LeftToRight TabOrder.
select(LeftToRig htTabOrder. java:65)
 at
 org.eclipse. ui.internal. presentations. util.TabbedStack
Presentation. selectPart( TabbedStackPrese ntation.java: 473)
 at
 org.eclipse. ui.internal. PartStack. refreshPresentat ionSelection(
PartStack. java:1256)
 at org.eclipse. ui.internal. PartStack. setSelection( PartStack.
java:1209)
 at org.eclipse. ui.internal. PartStack. showPart( PartStack. java:1608)
 at org.eclipse. ui.internal. PartStack. add(PartStack. java:499)
 at org.eclipse. ui.internal. EditorStack. add(EditorStack. java:103)
 at org.eclipse. ui.internal. PartStack. add(PartStack. java:485)
 at org.eclipse. ui.internal. EditorStack. add(EditorStack. java:112)
 at
 org.eclipse. ui.internal. EditorSashContai ner.addEditor(
EditorSashContai ner.java: 63)
 at
 org.eclipse. ui.internal. EditorAreaHelper .addToLayout(
EditorAreaHelper .java:217)
 at
 org.eclipse. ui.internal. EditorAreaHelper .addEditor(
EditorAreaHelper .java:207)
 at
 org.eclipse. ui.internal. EditorManager. createEditorTab(
EditorManager. java:779)
 at
 org.eclipse. ui.internal. EditorManager. openEditorFromDe scriptor(
EditorManager. java:678)
 at
 org.eclipse. ui.internal. EditorManager. openEditor( EditorManager.
java:639)
 at
 org.eclipse. ui.internal. WorkbenchPage. busyOpenEditorBa
tched(WorkbenchP age.java: 2817)
 at
 org.eclipse. ui.internal. WorkbenchPage. busyOpenEditor(
WorkbenchPage. java:2729)
 at
 org.eclipse. ui.internal. WorkbenchPage. access$11( WorkbenchPage.
java:2721)
 at org.eclipse. ui.internal. WorkbenchPage$ 10.run(Workbench
Page.java: 2673)
 at org.eclipse. swt.custom. BusyIndicator. showWhile( BusyIndicator.
java:70)
 at
 org.eclipse. ui.internal. WorkbenchPage. openEditor( WorkbenchPage.
java:2668)
 at
 org.eclipse. ui.internal. WorkbenchPage. openEditor( WorkbenchPage.
java:2652)
 at
 org.eclipse. ui.internal. WorkbenchPage. openEditor( WorkbenchPage.
java:2643)
 at org.eclipse. ui.ide.IDE. openEditor( IDE.java: 646)
 at org.eclipse. ui.ide.IDE. openEditor( IDE.java: 605)
 at org.eclipse. ui.actions. OpenFileAction. openFile(
OpenFileAction. java:99)
 at
 org.eclipse. ui.actions. OpenSystemEditor Action.run(
OpenSystemEditor Action.java: 99)
 at
 org.eclipse. ui.views. navigator. OpenActionGroup. runDefaultAction
(OpenActionGroup .java:125)
 at
 org.eclipse. ui.views. navigator. MainActionGroup. runDefaultAction
(MainActionGroup .java:329)
 at
 org.eclipse. ui.views. navigator. ResourceNavigato r.handleOpen(
ResourceNavigato r.java:716)
 at
 org.eclipse. ui.views. navigator. ResourceNavigato r$6.open(
ResourceNavigato r.java:443)
 at
 org.eclipse. jface.viewers. StructuredViewer $2.run(Structure
dViewer.java: 820)
 at org.eclipse. core.runtime. SafeRunner. run(SafeRunner. java:37)
 

Re: [flexcoders] Re: Icon Click and iconFunction on ListItemRenderer

2008-07-27 Thread anand kumar
Hi Vijay Anand,
 
My name is Anand, I have one friend in WiproTechnologies, He is last name 
Mareddy, just wondering. He is Mareddy Srinivas Reddy.
 
Regards
-Anand

--- On Mon, 7/28/08, Vijay Anand Mareddy [EMAIL PROTECTED] wrote:

From: Vijay Anand Mareddy [EMAIL PROTECTED]
Subject: [flexcoders] Re: Icon Click and iconFunction on ListItemRenderer
To: flexcoders@yahoogroups.com
Date: Monday, July 28, 2008, 3:31 AM






Figured out the answer to my question. You dont need to extend 
ListeItemRenderer. The 
default one is good enough.
The currentTarget property of the ListEvent.Click (Not ListEvent.ItemClick ) 
will tell you 
whether you clicked on the icon (if it exists) or the textfield.

--- In [EMAIL PROTECTED] ups.com, Vijay Anand Mareddy [EMAIL PROTECTED] 
wrote:

 I am using a simple List with icons and labelText using the iconFunction and 
 labelfunction respectively ...is there a way to tell on mylist.itemClick if 
 the user has 
 clicked on the icon or the labelText ? 
 
 Both ListEvent.target and ListEvent.currentTa rget are mx.controls. List 
 ...is there any 
other 
 property i can look at ? 
 
 I even tried my own simple MyListItemRenderer but myClickHandler is not 
 invoked!
 
 public class MyListItemRenderer extends ListItemRenderer {
 
 private function myClickHandler( e:MouseEvent) :void{
 trace('myClickHandl er invoked');
 }
 
 override protected function commitProperties( ):void{
 super.commitPropert ies();
 if(icon){
 trace('icon is NOT null');
 icon.addEventListen er(MouseEvent. CLICK,myClickHan dler); 
 } else {
 trace(' icon is null');
 }
 }
 }


 














  

RE:[flexcoders] Value of AS variable dissapearing

2008-07-27 Thread Scott
Ok, I'm really not fully understanding what is happening here...

 

I decided to move on and come back to this issue.  So I started with
more validations on the form entries.  While testing the form fields I
started to get the email validation to show 'true' for finding a
duplicate email address in the remote DB. Why would this field not work
on the first form validation but the 2nd or on works just fine?

 

When I run the debug and set a breakpoint on the result function I see
that it's getting set to true.  When I continue to the if() statement in
another function in the same class instance it changes back to false.

 

Any ideas out there?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Sunday, July 27, 2008 4:15 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Value of AS variable dissapearing

 

I've got a weird issue that I'm trying to track down... It's all part of
the life of a class instance that I posted before (I've got an update on
that one coming soon).

 

In my user registration validation class, I check to see if the email
address already exists in the DB.  I created a CFC function called
val_email( string:strEMail):Boolean

 

My remote object is defined as:

mx:RemoteObject 

id=authManager 

destination=ColdFusion 

source=FT.components.cfgenerated.managers.Auth

result=remote_result(event)

   mx:method name=register result=register_result(event)
fault=serverFault(event) /

/mx:RemoteObject

 

In my AS script I have the following config:

mx:Script

  ![CDATA[

Import ...

 

private var bEMail:Boolean;

 

So that declares the variable that I'll be watching.

 

I basically do the following during validation:

If ( ValidEmailAddress )

authManager.val_email( this.email.text );

 

if (this.bEMail == true )

{

  ... give error message/handing duplicate...

Etc...

 

 

The function:

 

private function remote_result(event:ResultEvent):void

{

  this.bEMail = event.result;

}

 

 

Fires off ok and sets the variable this.bEMail to true just fine.  I
have a watch set on the variable and see that it gets set.

 

Now, when it returns to the above if statement bEMail is back to false.
I've tried to run line by line in the debugger and can't find anything
that is causing a reset.  I can also see the watched variable went from
true to false.  Anyone have any suggestions?

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


Re: [flexcoders] Re: Zoom Tile Container

2008-07-27 Thread [EMAIL PROTECTED]

Here is an example of tile containers with zoom
http://reenie.org/test/tilezoom/zoomtest.html

This example uses a canvas for each tile but the canvas only goes to 
200% of its original size.
How would I do this  effect to get  a 100% of the application percentage 
width ?

In the following Effect, toValue=100% is not allowed

mx:Parallel id=tileScaleUp 
mx:AnimateProperty property=scaleX  toValue=2 
duration=1000  /
mx:AnimateProperty property=scaleY  toValue=2 
duration=1000  /
/mx:Parallel



Nate Pearson wrote:
 So if I have 4 boxes I want to set one to width=100% and height=100%
 and the others to width=0, height=0.

 I'd put an effect on it so that it looked like one of them would grow
 and the others would shrink to nothing.

 This is pretty easy to do in code, but I want to make a component that
 can have a variable amount of boxes.  Not sure how to do that.

 --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:
   
 What exactly do you mean by zoom?

 Tracy

  

 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Nate Pearson
 Sent: Friday, July 25, 2008 4:00 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Zoom Tile Container

  


 Bump. Any ideas?

 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Nate Pearson napearson99@ wrote:
 
 I want to make a custom component and I think I can extend the tile
 container to do it.

 Here's what I want to do:
 Have four boxes fill up the screen. If I click on one of the boxes
 that box zooms to fill the whole screen and the other three boxes
 shrink to nothing. 

 Inside of that box I want another set of boxes, lets say 6. If I
 click on that box it zooms and does the same thing as above. 

 Can anyone point me in the right direction? I'm pretty good at making
 custom components so if someone could just kinda nudge me in the right
 direction that would be great.

 Thanks!

 Nate

   



 

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




 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com 
 Version: 8.0.138 / Virus Database: 270.5.5/1571 - Release Date: 7/24/2008 
 5:42 PM



   



RE: [flexcoders] Value of AS variable dissapearing

2008-07-27 Thread Alex Harui
It's hard to say w/o seeing what code is in what methods.  If you make a
RemoteObject request, there's no way it will return before the if
statement if all the code you showed is in one method.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Sunday, July 27, 2008 9:36 PM
To: flexcoders@yahoogroups.com
Subject: RE:[flexcoders] Value of AS variable dissapearing

 

Ok, I'm really not fully understanding what is happening here...

 

I decided to move on and come back to this issue.  So I started with
more validations on the form entries.  While testing the form fields I
started to get the email validation to show 'true' for finding a
duplicate email address in the remote DB. Why would this field not work
on the first form validation but the 2nd or on works just fine?

 

When I run the debug and set a breakpoint on the result function I see
that it's getting set to true.  When I continue to the if() statement in
another function in the same class instance it changes back to false.

 

Any ideas out there?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Sunday, July 27, 2008 4:15 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Value of AS variable dissapearing

 

I've got a weird issue that I'm trying to track down... It's all part of
the life of a class instance that I posted before (I've got an update on
that one coming soon).

 

In my user registration validation class, I check to see if the email
address already exists in the DB.  I created a CFC function called
val_email( string:strEMail):Boolean

 

My remote object is defined as:

mx:RemoteObject 

id=authManager 

destination=ColdFusion 

source=FT.components.cfgenerated.managers.Auth

result=remote_result(event)

   mx:method name=register result=register_result(event)
fault=serverFault(event) /

/mx:RemoteObject

 

In my AS script I have the following config:

mx:Script

  ![CDATA[

Import ...

 

private var bEMail:Boolean;

 

So that declares the variable that I'll be watching.

 

I basically do the following during validation:

If ( ValidEmailAddress )

authManager.val_email( this.email.text );

 

if (this.bEMail == true )

{

  ... give error message/handing duplicate...

Etc...

 

 

The function:

 

private function remote_result(event:ResultEvent):void

{

  this.bEMail = event.result;

}

 

 

Fires off ok and sets the variable this.bEMail to true just fine.  I
have a watch set on the variable and see that it gets set.

 

Now, when it returns to the above if statement bEMail is back to false.
I've tried to run line by line in the debugger and can't find anything
that is causing a reset.  I can also see the watched variable went from
true to false.  Anyone have any suggestions?


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 

 



RE: [flexcoders] Re: Preventing Change in Focus Using Mouse

2008-07-27 Thread Alex Harui
Yeah, something like that, but I'd worry that the button won't get the
mouseDown and not behave correctly.  I still think you will probably
have to restore focus afterwards.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of edlueze
Sent: Sunday, July 27, 2008 12:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Preventing Change in Focus Using Mouse

 

Thanks!

I think what you are saying is that I need to trap any MOUSE_DOWN
event in the parent's panel/canvas/application layout container during
the event capture phase, check if is ok to change focus, then
stopPropagation. Is that right?

That could get a little ugly - there is no telling how deep down the
component is from it's panel/canvas container. Would you suggest
walking the tree up until a panel/canvas/application is found and then
registering the MOUSE_DOWN event at that level?

The advantage of this approach would be that you could control the
scope of the mouse control - for example, the user wouldn't be allowed
to change focus *within* the same panel, but would be allowed to
switch focus to a different panel.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 FocusManager moves focus on MOUSE_DOWN. It isn't cancelable so you may
 need to use stopPropagation.
 
 
 
 It might be better to simply restore focus via callLater though
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of edlueze
 Sent: Saturday, July 26, 2008 3:37 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Preventing Change in Focus Using Mouse
 
 
 
 Hi Folks:
 
 I'm trying to prevent the user from prematurely changing focus away
 from a control. I can use event.preventDefault() successfully when
 using the keyboard, but not when using a mouse.
 
 This is what I've got:
 
 private function creationCompleteListener(event:Event):void {
 target.addEventListener(FocusEvent.KEY_FOCUS_CHANGE,
 target_keyFocusChange);
 target.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,
 target_mouseFocusChange);
 target.addEventListener(FocusEvent.FOCUS_IN, target_focusIn);
 target.addEventListener(FocusEvent.FOCUS_OUT, target_focusOut);
 }
 
 private function target_focusChange(event:Event):void {
 trace(target +  target_focusChange);
 if (!okToLoseFocus) {
 event.preventDefault();
 }
 }
 
 And this is the trace I'm getting when I try when I try and toggle
 between a TextInput and a Button (okToLoseFocus = false):
 
 1. Main0.myTextInput target_focusIn
 2. Main0.myTextInput target_keyFocusChange
 3. Main0.myTextInput target_mouseFocusChange
 4. Main0.myTextInput target_focusOut
 5. Main0.myButton target_focusIn
 6. Main0.myButton target_keyFocusChange
 7. Main0.myButton target_mouseFocusChange
 8. Main0.myButton target_focusOut
 9. Main0.myTextInput target_focusIn
 
 When the user attempts to change focus using a tab on the keyboard
 (step2 and step6) they are prevented. But when they try to *click* on
 another control (step3 and step7) they are successful??!
 
 How can I stop the user clicking to another focus?


 



RE: [flexcoders] list allowMultipleSelection without key pressed ?

2008-07-27 Thread Alex Harui
Override selectItems

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of brett.coffin
Sent: Sunday, July 27, 2008 6:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] list allowMultipleSelection without key pressed ?

 

Is there a way to have the buttons in the list behave like toggle
buttons without the ctrl key press... Can i trick the list to believe
that the ctrl key is press at all times ? any suggestion would be
appreciated. ;) Good Flex Coding 

 



Re: [flexcoders] Re: Zoom Tile Container

2008-07-27 Thread [EMAIL PROTECTED]
Here is an example of a tile container zoom that does zoom to %100 of 
the application,
but it doesn't use an effect, it uses states and transitions.
http://reenie.org/test/zoom/zoomtest.html

I like this better, but I'm not sure you can generate  dynamic 
components with this method.


[EMAIL PROTECTED] wrote:
 Here is an example of tile containers with zoom
 http://reenie.org/test/tilezoom/zoomtest.html

 This example uses a canvas for each tile but the canvas only goes to 
 200% of its original size.
 How would I do this  effect to get  a 100% of the application percentage 
 width ?

 In the following Effect, toValue=100% is not allowed

 mx:Parallel id=tileScaleUp 
 mx:AnimateProperty property=scaleX  toValue=2 
 duration=1000  /
 mx:AnimateProperty property=scaleY  toValue=2 
 duration=1000  /
 /mx:Parallel



 Nate Pearson wrote:
   
 So if I have 4 boxes I want to set one to width=100% and height=100%
 and the others to width=0, height=0.

 I'd put an effect on it so that it looked like one of them would grow
 and the others would shrink to nothing.

 This is pretty easy to do in code, but I want to make a component that
 can have a variable amount of boxes.  Not sure how to do that.

 --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:
   
 
 What exactly do you mean by zoom?

 Tracy

  

 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Nate Pearson
 Sent: Friday, July 25, 2008 4:00 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Zoom Tile Container

  


 Bump. Any ideas?

 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Nate Pearson napearson99@ wrote:
 
   
 I want to make a custom component and I think I can extend the tile
 container to do it.

 Here's what I want to do:
 Have four boxes fill up the screen. If I click on one of the boxes
 that box zooms to fill the whole screen and the other three boxes
 shrink to nothing. 

 Inside of that box I want another set of boxes, lets say 6. If I
 click on that box it zooms and does the same thing as above. 

 Can anyone point me in the right direction? I'm pretty good at making
 custom components so if someone could just kinda nudge me in the right
 direction that would be great.

 Thanks!

 Nate

   
 

 

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




 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com 
 Version: 8.0.138 / Virus Database: 270.5.5/1571 - Release Date: 7/24/2008 
 5:42 PM



   
 


 

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




 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com 
 Version: 8.0.138 / Virus Database: 270.5.6/1576 - Release Date: 7/27/2008 
 4:16 PM



   



Re: [flexcoders] Flex Builder Speed-ups?

2008-07-27 Thread Mike Chabot
You can turn off the Build Automatically option under the project menu.

-Mike Chabot

On Sun, Jul 27, 2008 at 10:21 AM, tudsy [EMAIL PROTECTED] wrote:
 My Flex Builder can run extremely slow, almost every keypress sends
 javaw.exe CPU usage over 50% and this causes an unacceptable lag for
 even simple editing. Any tips?

 I'm running Vista SP1 on an AMD X2 3600 (1.8 Ghz each core) with 2 GB
 RAM. I've tried tweaking the memory settings from the command line,
 switching my JVM, and even reinstalling to XP but none of it helped.
 Kept getting the CPU spikes.

 I wont even mention how long it takes to do anything in 'Design' view.

 Thanks



Re: [flexcoders] Flex Builder Speed-ups?

2008-07-27 Thread Shiva Kumar
use  -incremental option in flex compiler.

--- On Mon, 7/28/08, Mike Chabot [EMAIL PROTECTED] wrote:
From: Mike Chabot [EMAIL PROTECTED]
Subject: Re: [flexcoders] Flex Builder Speed-ups?
To: flexcoders@yahoogroups.com
Date: Monday, July 28, 2008, 5:09 AM











You can turn off the Build Automatically option under the project 
menu.



-Mike Chabot



On Sun, Jul 27, 2008 at 10:21 AM, tudsy [EMAIL PROTECTED] com wrote:

 My Flex Builder can run extremely slow, almost every keypress sends

 javaw.exe CPU usage over 50% and this causes an unacceptable lag for

 even simple editing. Any tips?



 I'm running Vista SP1 on an AMD X2 3600 (1.8 Ghz each core) with 2 GB

 RAM. I've tried tweaking the memory settings from the command line,

 switching my JVM, and even reinstalling to XP but none of it helped.

 Kept getting the CPU spikes.



 I wont even mention how long it takes to do anything in 'Design' view.



 Thanks




  




 

















  

[flexcoders] Re: HttpService Fault Response Body Decoding

2008-07-27 Thread ron_mori
The fault handler is being call.  (server 500 status)  The good news
is that my research points me towards the BlazeDS proxy server which I
have successfully set up to make my remote server calls.

Now the trick is to get the proxy to grab the remote error msg and
return a status 200 good msg back to the client so I can process the
body of the error msg.

thanks.



Re: [flexcoders] Flex Builder Speed-ups?

2008-07-27 Thread Sherif Abdou
I made a post on this a couple of days ago, I seriously thing it has to do with 
SP1 for Vista. Even ColdFusion takes up to 600,000K on startup and eclipse 
takes up to 350,000 K. I have my own server with windows 2008 and I have never 
seen coldfusion take more than 400,000K. so no idea what is happening. Running 
Eclipse+ColdFusion =99% ram used.



- Original Message 
From: Mike Chabot [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, July 28, 2008 12:09:07 AM
Subject: Re: [flexcoders] Flex Builder Speed-ups?


You can turn off the Build Automatically option under the project menu.

-Mike Chabot

On Sun, Jul 27, 2008 at 10:21 AM, tudsy [EMAIL PROTECTED] com wrote:
 My Flex Builder can run extremely slow, almost every keypress sends
 javaw.exe CPU usage over 50% and this causes an unacceptable lag for
 even simple editing. Any tips?

 I'm running Vista SP1 on an AMD X2 3600 (1.8 Ghz each core) with 2 GB
 RAM. I've tried tweaking the memory settings from the command line,
 switching my JVM, and even reinstalling to XP but none of it helped.
 Kept getting the CPU spikes.

 I wont even mention how long it takes to do anything in 'Design' view.

 Thanks