[flexcoders] Plug-in Based application like Eclipse RCP in Flex/AIR

2009-04-22 Thread Parjan Arjan




Hello All,

 I am java developer I
mostly work on Eclipse RCP (Rich Client Platform Application) using SWT.



I am not an experienced Flex/AIR developer. I just wanted to create
Plug-in based application Like eclipse RCP in Flex/AIR so can anyone guide me 
does
Flex/AIR support Plug-in based applications like Eclipse RCP does support 
flex/AIR
“Extensions points” etc? Or is there any alternative solution in Flex/AIR to
create Plug-in based application.


Please do help me related to this issue I will be thankful
to all of you if you send me some useful links or tutorials.

 

Thanks in Advance.

Parkash.

 

 




  

Re: [flexcoders] Re: Memory Issue in Internet Explorer

2008-11-19 Thread Parjan Arjan
Thanks a lot dear for your reply but can you tell me what  extra task are you  
doing for cleaning up the code .it  will very useful for me if you can send me 
these task so that i can do the same.

--- On Wed, 11/19/08, t_varada [EMAIL PROTECTED] wrote:
From: t_varada [EMAIL PROTECTED]
Subject: [flexcoders] Re: Memory Issue in Internet Explorer
To: flexcoders@yahoogroups.com
Date: Wednesday, November 19, 2008, 8:45 PM











Hi Parkash



We had a similar issue and we are doing some extra task to clean up

the code when you load/unload a feature inside our application.



One good thing we find Flash Player 10 has better memory management,

since that is officially out you try our memory test case on it to see

some improvements.



--- In [EMAIL PROTECTED] ups.com, Parkash [EMAIL PROTECTED] wrote:



 Hi Everyone,

 

  

 

 I am facing a memory problem in internet Explorer , when I run my flex

 application in I.E 7  the task manager show memory usage of 106MB

and memory

 increases as I run my application more and more it seems that garbage

 collector in not working  properly but when I run the same

application on

 Fire Fox task manager shows max memory 65MB and it also releases and

task

 manager show memory usage 5Mb  in simple words on fir fox memory

remains in

 the bracket of 5 Mb to 65 MB not more than that, but when I run the

 application on IE 7 results are very different , I am using flash player

 9.0.124.0 ,Can any tell me what cud be the issue.

 

  

 

 Thanks in advance

 

  

 

 Parkash ARjan.






  




 

















  

Re: [flexcoders] Objects are not Garbage Collected

2008-11-06 Thread Parjan Arjan
10X a lot now things are working fine .


--- On Thu, 11/6/08, Fotis Chatzinikos [EMAIL PROTECTED] wrote:

 From: Fotis Chatzinikos [EMAIL PROTECTED]
 Subject: Re: [flexcoders] Objects are not Garbage Collected
 To: flexcoders@yahoogroups.com
 Date: Thursday, November 6, 2008, 12:03 AM
 very quickly, *objArrCollModelsVO* seems like an
 arraycollection...
 
 are you sure that your for loop removes all references?
 
 if item 0 is removed, item 1 becomes 0, so next time when
 you remove 1 you
 are in reality removing 2 and so on...
 
 try:
 *
 for( var** k:int = **model.objArrCollModelsVO.length **; k
 = 0 ;k-- ) *
 
 *{*
 
 
 On Wed, Nov 5, 2008 at 3:04 PM, Parkash
 [EMAIL PROTECTED] wrote:
 
 Hi all i have written a simple flex applcation and
 i am using a
  Caringorm framework.
  In my command class i am parsing a xml response and
 cretating about 100
  value object  and iam adding these object in a
 ArrayCollection which is bind
  to some gird . when i enters in execute method i
 explicitly remove each
  object from collection like this
 
 
  *for( var** k:int = 0 ; k 
 model.objArrCollModelsVO.length ;k++ ) *
 
  *{*
 
  *var** obj:Object =
 model.objArrCollModelsVO.removeItemAt( k );*
 
  *trace( GOing to Remove ** + obj.name
 );*
 
  *obj = **null** ;*
 
  *}*
 
 
 
  but these are objects are not garbage collected and
 remians in memory can
  any one tell how to resolve this problem b/c  my
 application is getting very
  slow if  my commnd class runs more than 6 times  Or
 any one can send some
  good tutorial about Garbage collection in Flex
 
 
 
  Thanks in Advance
 
  Parkash ARjan...
 
 
 
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],


  



Re: [flexcoders] Objects are not Garbage Collected

2008-11-05 Thread parjan
Thank you  Pual for your reply but my Value Objects don't have any listeners 
attached to them and no other variable  reference's to them i have double 
checked every thing after your reply and  i still don't have any clue what is 
going on ,my task mangers shows me increase of 2MB whenever my command class 
runs  , moreover my view object is singleton and forcefully call refresh method 
when i add my view to display this refresh method actually dispatches Caringorm 
event.

- Original Message -
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wed, 5 Nov 2008 13:17:47 -
Subject: Re: [flexcoders] Objects are not Garbage Collected

 In order to be garbage collected there must not be any references to the 
 object at all. If you have assigned another variable to the object and not 
 set that to null, it won't be collected. If you have an event handler 
 associated with an object, it won't be collected. When nothing at all is 
 referencing the object it becomes eligible for collection. Sometimes that's 
 easier said than done.
 
 BTW if you have references to children of the object, they won't be available 
 for garbage collection until no references to them exist.
 
 Paul
   - Original Message - 
   From: Parkash 
   To: flexcoders@yahoogroups.com 
   Sent: Wednesday, November 05, 2008 1:04 PM
   Subject: [flexcoders] Objects are not Garbage Collected
 
 
   Hi all i have written a simple flex applcation and i am using a Caringorm 
 framework. 
   In my command class i am parsing a xml response and cretating about 100 
 value object  and iam adding these object in a ArrayCollection which is bind 
 to some gird . when i enters in execute method i explicitly remove each 
 object from collection like this
 
   for( var k:int = 0 ; k  model.objArrCollModelsVO.length ;k++ ) 
 
   {
 
   var obj:Object = model.objArrCollModelsVO.removeItemAt( k );
 
   trace( GOing to Remove  + obj.name );
 
   obj = null ;
 
   }
 
 
 
   but these are objects are not garbage collected and remians in memory can 
 any one tell how to resolve this problem b/c  my application is getting very 
 slow if  my commnd class runs more than 6 times  Or any one can send some 
 good tutorial about Garbage collection in Flex
 
 
 
   Thanks in Advance
 
   Parkash ARjan...
 
 
 
 
 



[flexcoders] DataGrid Selection and Overing.

2008-10-22 Thread Parjan Arjan
Hi every one , i am facing a little problem please help me.
I have DataGrid with  following styles
  alternatingItemColors: #FF, #ECF1F7
  selectionColor: #D9DE74
  roll-over-color:#D3E0FE
Now on of my grid need the follwing requirement
Allow hover color only but user cannot select any row ,i tried to set grid 
selectable property false but this removes hovering also .
Can any any tell me how to resolve this problem , 

Thanks in Advance.






  



[flexcoders] UIComponenet errorString Question

2008-07-05 Thread parjan
setting the someComponent.errorString = ; also makes the border turn black 
and solid.  It loses it's inset style, even when the css reads: TextInput 
{borderStyle:inset}

can one tell me how to resolve this problem. i want my TextInput to its 
original state to black border around it
thanks in advance


[flexcoders] Caringorm Event

2008-07-02 Thread parjan
hi every i facing problem while re-dispatching Caringorm event. i have override 
clone method in my Event class can any tell me what cud be the problem 
here is code for my event class..
package com.softpak.events.mm
{
import com.adobe.cairngorm.control.CairngormEvent;
import com.softpak.control.mm.MMControler;
import com.softpak.view.mm.IServiceErrorValidation;
import flash.events.Event;  
public class VerifyModelNameEvent extends CairngormEvent 
{
private  var srvValdErr:IServiceErrorValidation
public function VerifyModelNameEvent( 
psrvValdErr:IServiceErrorValidation  ) 
{
super(  MMControler.EVENT_VERIFY_MODEL_NAME );
srvValdErr = psrvValdErr ;
}   

public function get serviceValidator():IServiceErrorValidation
{
return srvValdErr;
}



 override public function clone():Event
 {

return new VerifyModelNameEvent( serviceValidator  );
 }  


}
}



[flexcoders] Fw: Radio Button Binding Binding Question

2008-07-01 Thread parjan
Hi i have two radio button in group g1 like this 

 mx:RadioButtonGroup id=g1/
 mx:RadioButton groupName=g1 selected=true name=X  label=XYZ  
x=135 y=3/
 mx:RadioButton groupName=g1  name=A label=ABC x=135 y=25/


and my objmodel's  property 'ptype' is bound with current radio button like this
BindingUtils.bindProperty( objModel , ptype , g1.selection , name 
);

but its seems binding is not working properly when i change the radio selection 
can anyone tell me what cud be the problem




[flexcoders] synchronous events in flex

2008-06-28 Thread parjan
Hi 
Can anyone tell me how to write synchronous events in flex application?
I am calling an Httpservice on focus out event of text field this service 
checks name duplication.  I want my application to wait for service to finish 
and then do some processing  
Thanks in advance 



[flexcoders] Custom Event Not Dispatched

2008-06-28 Thread parjan
HI can any one tell me what is wrong with this code.

I wrote a custom event and dispatched this event from my entity class and am 
listening for this event on main application but the listener is not listening 
for event. Please help me.


here is my Event class
public class MyEvent extends Event
{ 
public static  var MY_EVENT:String = MY_EVENT ;   

public function MyEvent()
{
super ( MY_EVENT  ); 
}
}

This class dispatches an event of type MyEvent from setter method 
public class MyObject extends EventDispatcher
{
[Bindable(event=MyEvent)]
private var _name:String;

public function set name( _pname:String ):void
{
_name = _pname ;
trace( Dispatching Event );
dispatchEvent( new MyEvent() );

}
}



and here is code for my main application .
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
creationComplete={init()}  

mx:Script 
![CDATA[
import com.MyEvent;
import com.MyObject; 

private var obj:MyObject ;

public function init():void
{
obj = new MyObject();
this.addEventListener(MyEvent.MY_EVENT , propertyChangeListener 
) ; 

}

public function propertyChangeListener( evt:MyEvent ):void
{
// This Function never gets called  
trace( 'Listining for  MyEvent..' );
}
public function btnClickHandler():void
{
obj.name = 'Changing Value' ;
trace( obj.name );
}

 ]]
/mx:Script
mx:Button click={btnClickHandler()}/
/mx:Application



Re: [flexcoders] Custom Event Not Dispatched

2008-06-28 Thread parjan
Ok dear i chanaged MyEvent Class with this
public class MyEvent extends Event
{ 
public static  var MY_EVENT:String = MY_EVENT ;   

public function MyEvent()
{
super ( MY_EVENT  , true  ); 
}
}

but what about  dispatchEvent( new MyEvent(), true ); 
dispatchEvent does not accept second argument , it only accepts one argument of 
Type Event

- Original Message -
From: Daniel Gold [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sat, 28 Jun 2008 10:16:29 -0500
Subject: Re: [flexcoders] Custom Event Not Dispatched

 If you're not listening for the event directly on the component that will be
 dispatching it, you need to toggle the 'bubbles' property so that the event
 will will trigger handlers up the display list from where it was dispatched.
 
 So in your case change your dispatch line to:
 dispatchEvent( new MyEvent(), true );
 
 On Sat, Jun 28, 2008 at 10:11 AM, [EMAIL PROTECTED] wrote:
 
HI can any one tell me what is wrong with this code.
 
  I wrote a custom event and dispatched this event from my entity class and
  am listening for this event on main application but the listener is not
  listening for event. Please help me.
 
  here is my Event class
  public class MyEvent extends Event
  {
  public static var MY_EVENT:String = MY_EVENT ;
 
  public function MyEvent()
  {
  super ( MY_EVENT );
  }
  }
 
  This class dispatches an event of type MyEvent from setter method
  public class MyObject extends EventDispatcher
  {
  [Bindable(event=MyEvent)]
  private var _name:String;
 
  public function set name( _pname:String ):void
  {
  _name = _pname ;
  trace( Dispatching Event );
  dispatchEvent( new MyEvent() );
 
  }
  }
 
  and here is code for my main application .
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=vertical creationComplete={init()} 
 
  mx:Script
  ![CDATA[
  import com.MyEvent;
  import com.MyObject;
 
  private var obj:MyObject ;
 
  public function init():void
  {
  obj = new MyObject();
  this.addEventListener(MyEvent.MY_EVENT , propertyChangeListener ) ;
 
  }
 
  public function propertyChangeListener( evt:MyEvent ):void
  {
  // This Function never gets called
  trace( 'Listining for MyEvent..' );
  }
  public function btnClickHandler():void
  {
  obj.name = 'Changing Value' ;
  trace( obj.name );
  }
 
  ]]
  /mx:Script
  mx:Button click={btnClickHandler()}/
  /mx:Application
 
   
 


Re: [flexcoders] Custom Event Not Dispatched

2008-06-28 Thread parjan
But dear event is still not dispatching after making all this changes,
- Original Message -
From: Daniel Gold [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sat, 28 Jun 2008 10:47:50 -0500
Subject: Re: [flexcoders] Custom Event Not Dispatched

 right, I'm only half awake on Saturday monring
 
 The bubbles property is the second parameter on the Event constructor, so
 your MyEvent changes should have done the trick. Sorry about the slip up
 there, a lot of times if I'm writing something quick and dirty I would do it
 like
 
 displatchEvent(new Event(MY_EVENT,true));
 
 your custom Event class is definitely the best practice as you get the const
 for the event name to ensure listener's register for the correct event.
 
 On Sat, Jun 28, 2008 at 10:37 AM, [EMAIL PROTECTED] wrote:
 
Ok dear i chanaged MyEvent Class with this
 
  public class MyEvent extends Event
  {
  public static var MY_EVENT:String = MY_EVENT ;
 
  public function MyEvent()
  {
  super ( MY_EVENT , true );
  }
  }
 
  but what about  dispatchEvent( new MyEvent(), true ); 
  dispatchEvent does not accept second argument , it only accepts one
  argument of Type Event
 
 
  - Original Message -
  From: Daniel Gold [EMAIL PROTECTED] danielggold%40gmail.com
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Sent: Sat, 28 Jun 2008 10:16:29 -0500
  Subject: Re: [flexcoders] Custom Event Not Dispatched
 
   If you're not listening for the event directly on the component that will
  be
   dispatching it, you need to toggle the 'bubbles' property so that the
  event
   will will trigger handlers up the display list from where it was
  dispatched.
  
   So in your case change your dispatch line to:
   dispatchEvent( new MyEvent(), true );
  
   On Sat, Jun 28, 2008 at 10:11 AM, [EMAIL 
   PROTECTED]parjan%40softpak.com
  wrote:
  
HI can any one tell me what is wrong with this code.
   
I wrote a custom event and dispatched this event from my entity class
  and
am listening for this event on main application but the listener is not
listening for event. Please help me.
   
here is my Event class
public class MyEvent extends Event
{
public static var MY_EVENT:String = MY_EVENT ;
   
public function MyEvent()
{
super ( MY_EVENT );
}
}
   
This class dispatches an event of type MyEvent from setter method
public class MyObject extends EventDispatcher
{
[Bindable(event=MyEvent)]
private var _name:String;
   
public function set name( _pname:String ):void
{
_name = _pname ;
trace( Dispatching Event );
dispatchEvent( new MyEvent() );
   
}
}
   
and here is code for my main application .
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical creationComplete={init()} 
   
mx:Script
![CDATA[
import com.MyEvent;
import com.MyObject;
   
private var obj:MyObject ;
   
public function init():void
{
obj = new MyObject();
this.addEventListener(MyEvent.MY_EVENT , propertyChangeListener ) ;
   
}
   
public function propertyChangeListener( evt:MyEvent ):void
{
// This Function never gets called
trace( 'Listining for MyEvent..' );
}
public function btnClickHandler():void
{
obj.name = 'Changing Value' ;
trace( obj.name );
}
   
]]
/mx:Script
mx:Button click={btnClickHandler()}/
/mx:Application
   
   
   
   
 


Re: [flexcoders] synchronous events in flex

2008-06-28 Thread parjan
You mean if i have to display an alert message 'Customer name already exists' 
them i have to put this code in result method as follows, Basically this is 
Command class which implements IResponder .

public function result( event : Object ) : void
{   
 // Some processing   
 Alert.show( 'Name XYZ Already Exists'  ) ;  
 CursorManager.removeBusyCursor();
 Application.application.enabled =true ;
}
If you meant this then don't you think it is not good design , now suppose if 
instead of Alert message i am going to display inline error message on the view 
then i have to access view in my command class to display error message.
,
- Original Message -
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sat, 28 Jun 2008 19:00:07 +0100
Subject: Re: [flexcoders] synchronous events in flex

 - Original Message - 
 From: [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Saturday, June 28, 2008 2:54 PM
 Subject: [flexcoders] synchronous events in flex
 
 
  Hi
  Can anyone tell me how to write synchronous events in flex application?
 
 There are no synchronous events.
 
  I am calling an Httpservice on focus out event of text field this service 
  checks name duplication.  I want my application to wait for service to 
  finish and then do some processing
 
 Supply a result handler for the httpservice and put your code in that. It 
 will be called asynchronously when the result is ready.
 
 Flex doesn't do waiting, except through event handlers.
 
  Thanks in advance
 
 Paul 


Re: [flexcoders] Custom Event Not Dispatched

2008-06-28 Thread parjan
Once again Thanks Alex for your usual help. Now my application is working fine 
with this one line change
obj.addEventListener(MyEvent.MY_EVENT , propertyChangeListener  ) ;  
- Original Message -
From: Alex Harui [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sat, 28 Jun 2008 11:40:00 -0700
Subject: RE: [flexcoders] Custom Event Not Dispatched

 MyObject is not a DisplayObject so the event will not bubble.  The
 application should be explicitly adding a listener to MyObject
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Saturday, June 28, 2008 8:56 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Custom Event Not Dispatched
 
  
 
 But dear event is still not dispatching after making all this changes,
 - Original Message -
 From: Daniel Gold [EMAIL PROTECTED]
 mailto:danielggold%40gmail.com 
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Sent: Sat, 28 Jun 2008 10:47:50 -0500
 Subject: Re: [flexcoders] Custom Event Not Dispatched
 
  right, I'm only half awake on Saturday monring
  
  The bubbles property is the second parameter on the Event constructor,
 so
  your MyEvent changes should have done the trick. Sorry about the slip
 up
  there, a lot of times if I'm writing something quick and dirty I would
 do it
  like
  
  displatchEvent(new Event(MY_EVENT,true));
  
  your custom Event class is definitely the best practice as you get the
 const
  for the event name to ensure listener's register for the correct
 event.
  
  On Sat, Jun 28, 2008 at 10:37 AM, [EMAIL PROTECTED]
 mailto:parjan%40softpak.com  wrote:
  
   Ok dear i chanaged MyEvent Class with this
  
   public class MyEvent extends Event
   {
   public static var MY_EVENT:String = MY_EVENT ;
  
   public function MyEvent()
   {
   super ( MY_EVENT , true );
   }
   }
  
   but what about  dispatchEvent( new MyEvent(), true ); 
   dispatchEvent does not accept second argument , it only accepts one
   argument of Type Event
  
  
   - Original Message -
   From: Daniel Gold [EMAIL PROTECTED]
 mailto:danielggold%40gmail.com  danielggold%40gmail.com
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.com
   Sent: Sat, 28 Jun 2008 10:16:29 -0500
   Subject: Re: [flexcoders] Custom Event Not Dispatched
  
If you're not listening for the event directly on the component
 that will
   be
dispatching it, you need to toggle the 'bubbles' property so that
 the
   event
will will trigger handlers up the display list from where it was
   dispatched.
   
So in your case change your dispatch line to:
dispatchEvent( new MyEvent(), true );
   
On Sat, Jun 28, 2008 at 10:11 AM, [EMAIL PROTECTED]
 mailto:parjan%40softpak.com parjan%40softpak.com
   wrote:
   
 HI can any one tell me what is wrong with this code.

 I wrote a custom event and dispatched this event from my entity
 class
   and
 am listening for this event on main application but the listener
 is not
 listening for event. Please help me.

 here is my Event class
 public class MyEvent extends Event
 {
 public static var MY_EVENT:String = MY_EVENT ;

 public function MyEvent()
 {
 super ( MY_EVENT );
 }
 }

 This class dispatches an event of type MyEvent from setter
 method
 public class MyObject extends EventDispatcher
 {
 [Bindable(event=MyEvent)]
 private var _name:String;

 public function set name( _pname:String ):void
 {
 _name = _pname ;
 trace( Dispatching Event );
 dispatchEvent( new MyEvent() );

 }
 }

 and here is code for my main application .
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
 layout=vertical creationComplete={init()} 

 mx:Script
 ![CDATA[
 import com.MyEvent;
 import com.MyObject;

 private var obj:MyObject ;

 public function init():void
 {
 obj = new MyObject();
 this.addEventListener(MyEvent.MY_EVENT , propertyChangeListener
 ) ;

 }

 public function propertyChangeListener( evt:MyEvent ):void
 {
 // This Function never gets called
 trace( 'Listining for MyEvent..' );
 }
 public function btnClickHandler():void
 {
 obj.name = 'Changing Value' ;
 trace( obj.name );
 }

 ]]
 /mx:Script
 mx:Button click={btnClickHandler()}/
 /mx:Application



   
  
 
  


[flexcoders] Problem While Downcasting Flex Modules

2008-06-21 Thread parjan
HI everyone,
I am facing a problem while down casting the flex module.

I have created two flex modules called FlexModule1.mxml and FlexModule2.mxml.
 
These both modules contain the same code.

I have placed FlexModule1.mxml under modules folder and FlexModule2.mxlm @ 
application root.
Here is code for FlexModul1.mxlml (and FlexModule2.mxml as both modules have 
identical code)

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300

mx:Script
![CDATA[ 
public function Foo( pstr:String ):String
{
trace( In Method Foo );
return Foo + pstr ;
}
 ]]
/mx:Script 

mx:Panel width=100% height=100%
mx:Label id=MY_LABEL text=I AM MODULE-1 fontSize=20 
color=green/
/mx:Panel

/mx:Module

And here is  Main class code.


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
creationComplete={loadModule()}

mx:Script
![CDATA[
import mx.modules.ModuleManager;
import mx.modules.IModuleInfo;
import modules.FlexModule1;
import mx.events.FlexEvent;
import mx.events.ModuleEvent;
import mx.modules.ModuleLoader;

public var moduleLoader:ModuleLoader;
public var moduleInfo:IModuleInfo;

public function loadModule(  ):void
{
moduleLoader = new ModuleLoader();
moduleLoader.addEventListener( ModuleEvent.READY , 
moduleReadyEventHandler );
//moduleLoader.url = FlexModule2.swf; //This is fine 
module loaded   
moduleLoader.url = modules\\FlexModule1.swf; //this 
fine too  
moduleLoader.loadModule();
}


public function moduleReadyEventHandler( evt:ModuleEvent ):void
{
trace( Module Ready Event Handler );
this.addChild( moduleLoader );  

(moduleLoader.child as FlexModule2).Foo( '' ) ; // this 
if fine method Foo() called
(moduleLoader.child as FlexModule1).Foo( '' ) ; // Null 
pointer Exception
}
 ]]
 
/mx:Script

/mx:Application

Both modules are loading without any problem but the error occurs when I try to 
downcast  FlexModule1.mxml. There is no down casting  problem with 
FLexModule2.mxlm.
I think the problem is with different folder i have used for FlexModule1.mxml , 
 may b i am wrong. 
Please let me know where  is the problem.





[flexcoders] Problem While Downcasting Flex Modules

2008-06-21 Thread parjan
HI everyone,
I am facing a problem while down casting the flex module.

I have created two flex modules called FlexModule1.mxml and FlexModule2.mxml.
 
These both modules contain the same code.

I have placed FlexModule1.mxml under modules folder(modules/FlexModule1.mxml) 
and FlexModule2.mxlm @ application root.
Here is code for FlexModul1.mxlml (and FlexModule2.mxml as both modules have 
identical code)

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300

mx:Script
![CDATA[ 
public function Foo( pstr:String ):String
{
trace( In Method Foo );
return Foo + pstr ;
}
 ]]
/mx:Script 

mx:Panel width=100% height=100%
mx:Label id=MY_LABEL text=I AM MODULE-1 fontSize=20 
color=green/
/mx:Panel

/mx:Module

And here is  Main class code.


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
creationComplete={loadModule()}

mx:Script
![CDATA[
import mx.modules.ModuleManager;
import mx.modules.IModuleInfo;
import modules.FlexModule1;
import mx.events.FlexEvent;
import mx.events.ModuleEvent;
import mx.modules.ModuleLoader;

public var moduleLoader:ModuleLoader;
public var moduleInfo:IModuleInfo;

public function loadModule(  ):void
{
moduleLoader = new ModuleLoader();
moduleLoader.addEventListener( ModuleEvent.READY , 
moduleReadyEventHandler );
//moduleLoader.url = FlexModule2.swf; //This is fine 
module loaded   
moduleLoader.url = modules\\FlexModule1.swf; //this 
fine too  
moduleLoader.loadModule();
}


public function moduleReadyEventHandler( evt:ModuleEvent ):void
{
trace( Module Ready Event Handler );
this.addChild( moduleLoader );  

//(moduleLoader.child as FlexModule2).Foo( '' ) ; // 
this if fine method Foo() called
(moduleLoader.child as FlexModule1).Foo( '' ) ; // Null 
pointer Exception
}
 ]]
 
/mx:Script

/mx:Application

Both modules are loading without any problem but the error occurs when I try to 
downcast  FlexModule1.mxml. There is no down casting  problem with 
FLexModule2.mxlm.
I think the problem is with different folder i have used for FlexModule1.mxml , 
 may b i am wrong. 
Please let me know where  is the problem.


[flexcoders] Event Not Dispatched From TileWindow

2008-05-18 Thread parjan
Dear All
I am trying to dispatch an event from tile window and i am capturing this event 
on parent container but event is not dispatching for some reason .Here is my 
code can u point out what is wrong here thanks in advance..
Parkash Arjan
// This is my Event Class Code
public class CloseMyTileWindowEvent  extends Event
{
 public static var CLICK:String = MY_TILE_WINDOW_CLICK_EVENT;
   
public var str:Object;   
   
public function CloseMyTileWindowEvent( str:Object )
{
super (CLICK, true, true);
this.str = str;   
}

}

//This Is my Application Container
?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
creationComplete={init()}  
mx:Script
![CDATA[
import mx.managers.PopUpManager;
public function init():void
{   
addEventListener( CloseMyTileWindowEvent.CLICK, 
closeTileWindowEventHandler );   
}
   
public function closeTileWindowEventHandler():void
{
trace( TileWindowEventHandlede );
}
   
 public function showMtTileWindow():void
 {
 PopUpManager.createPopUp( this , MyTileWindow , true );
 }   
]]
/mx:Script
mx:Button  label=Click-Me click={ showMtTileWindow() }/
/mx:Application

//And This is my tile window which is dispatching event
?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
width=400 height=300
mx:Script
![CDATA[
import mx.managers.PopUpManager;
public function tileWindowButtonHandler():void
{
var evt:CloseMyTileWindowEvent = new CloseMyTileWindowEvent( 
null )
dispatchEvent( evt );
PopUpManager.removePopUp( this );   
}
   
]]
/mx:Script   
mx:Button click={ tileWindowButtonHandler() }/   
/mx:TitleWindow





[flexcoders] Label As Combobox Itemrenderer not working properly

2008-04-27 Thread parjan
Hello Friends can any tell me what is wrong with this code. I am trying to 
disable the labels but they are not disabled even visible = false not working 
can u tell me why..
here is complete code.
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
creationComplete={init()}


mx:Script
 ![CDATA[
import mx.collections.ArrayCollection; 
import mx.controls.Alert;   
 [Bindable] 
 public var arrayCollection:ArrayCollection;
 public function init():void
 {
arrayCollection = new ArrayCollection();
var a:Object = new Object();
a.name = 'A1';
arrayCollection.addItem( a );


var b:Object = new Object();
b.name = 'B1';
arrayCollection.addItem( b );


var c:Object = new Object();
c.name = 'C1';
arrayCollection.addItem( c );   


 }

  ]]
/mx:Script


mx:ComboBox dataProvider={arrayCollection} labelField=name width=200
mx:itemRenderer
mx:Component
mx:Label click={mx.controls.Alert.show( data.name  )} 
text={data.name } visible=false enabled=false   mouseEnabled=false /
/mx:Component
/mx:itemRenderer 
/mx:ComboBox



mx:Label text=Iam Disable enabled=false mouseEnabled=false 
click={Alert.show('asdsa')}/   
/mx:Application




[flexcoders] Combobox And Datagrid

2008-04-27 Thread parjan
Hi Friends .. 

I am writting a simple code in which i have one datagrid with two coloumns . in 
first coloumn iam using combobox as itemrenderer.
but this combobox is working abnormally when more and more item are added to 
the grid or when scroll bar appears .
some one told me that this problem is solved in flex 3 but it is not .
i have compiled and run this code on three version of flex i.e Flex 2.0.1 ,Flex 
2.0.1(Hot Fix Three),
and Flex Three.
But the application is behaving in different ways in both version . plz help me 
to find the problem.
i am sharing my code with u plz run it and help me

!-- Application.mxml --
?xml version=1.0?
!-- dpcontrols/DataGridSpecifyColumns.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
creationComplete={init()}  

 
mx:Script
![CDATA[
import mx.collections.ArrayCollection;  
[Bindable]
public var gridDataProvider:ArrayCollection;
public function init():void
{
gridDataProvider = new ArrayCollection();
var del:Object = new Object();
del.name = '';
del.price = '';
gridDataProvider.addItem( del );
}
]]
/mx:Script
mx:DataGrid id=grid selectable=false dataProvider={gridDataProvider} 
mx:columns
mx:DataGridColumn dataField=name 
itemRenderer=ComboBoxRend/
mx:DataGridColumn dataField=price /

/mx:columns
/mx:DataGrid

/mx:Application

!-- ComboBoxRend.mxml--
?xml version=1.0 encoding=utf-8?
mx:ComboBox dataProvider={autoCompProvider} labelField=name 
creationComplete={init()} xmlns:mx=http://www.adobe.com/2006/mxml; 
width=50 paddingRight=5 paddingLeft=5 xmlns:fc=* 
close={closeEventHandler()} 
mx:Script
  ![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;   
public function closeEventHandler():void
{
data.name = this.selectedLabel ;
data.price = this.selectedItem.price;
var emptyRow:Object = new Object();
emptyRow.name = '';
emptyRow.price = '';
ComboboxTest(this.parentApplication).gridDataProvider.addItem( 
emptyRow );
}
[Bindable]
public var autoCompProvider:ArrayCollection;
public function init():void
{
autoCompProvider = new ArrayCollection();

var emptyRow:Object = new Object();
emptyRow.name = '';
emptyRow.price = '';
autoCompProvider.addItem( emptyRow );


var del:Object = new Object();
del.name = 'DELL';
del.price = 100;
autoCompProvider.addItem( del );

var msft:Object = new Object();
msft.name = 'MSFT';
msft.price = 200;
autoCompProvider.addItem( msft );

var mot:Object = new Object();
mot.name = 'MOT';
mot.price = 300;
autoCompProvider.addItem( mot );



var yahoo:Object = new Object();
yahoo.name = 'Yahoo';
yahoo.price = 400;
autoCompProvider.addItem( yahoo );




}   

]]
/mx:Script
/mx:ComboBox


Thanks Parkash Arjan..





[flexcoders] NUmeric Only Textfield

2008-03-22 Thread parjan
I have a text field which accepts only real data that is number and decimal 
point (.) i have set
restrict propety as restrict=0-9\.  for text input but it accepts more than 
one decimal point can u teel me how to
solve this problem with minimum code thanks in advance
Parkash Arjan




[flexcoders] SuperTabNavigator Question

2007-12-24 Thread Parjan Arjan
Hi 
Iam using Supertabnavigator form FlexLib i have two questions about this tab
Q1) can u tell me how i can change the  icon of cross buton i want to use other 
 image instead of defaul icon
Q2) i wrote  follwing css
..myTabs
{
fillColors: #a1bbe4, #a1bbe4;
}

but when i apply this to Super tAB

tabStyleName=myTabs

the  cross image changes to circle can u tell me why..
thanks in advance and merry XMAss to every one


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


[flexcoders] Button White Background..

2007-12-20 Thread Parjan Arjan
I wnat to change the background color of button to white but its not changing 
the color plz help me and let me know what is problm here is my code thanks in 
advance and 
Happy Eid to all group members...
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 
mx:Style
Button {
fill-colors: #ff, #ff;
}
 
/mx:Style
mx:Button label=i am not changing background why/
/mx:Application


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: [flexcoders] What type of applications i can build using flex?

2007-12-16 Thread Parjan Arjan
Hello Fahd u can write any kind of application in flex. 
Flex is not just for multimedia kind of application.
our team  in pakistan is   using flex/j2ee to make pure bussines application.
currently we r making portfolio rebalancing application(pure bussines 
application). and its fun working with flex and J2ee.


- Original Message 
From: fahd [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, December 16, 2007 2:44:40 PM
Subject: [flexcoders] What type of applications i can build using flex?

Hello everyone ,

I am a .NET developer and i read about flex as a fast application
development environment. i chack the showcases in the adobe site and i
find that all that applications that build using flex are a multimedia
applications.
my question is : 
can i use flex to develope a non-multimedia app. like finance or
planning applications? and is it faster ( for develop ) than visual
studio .net ?

Thanks for your help





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs