Pavan,
If possible share your code, what you are doing so that we all can look at
it and might be able to help you better --
In any case following should do it for you, even though it is not a good
practice, but it will give you the direction --
FilterWindow.mxml:
<mx:TitleWindow>
<mx:Script>
public function applyRestrictions(dataType:String){
if(dataType == int){
// Apply the logic to restrict the textinput here for int case.
}
else if (dataType == String){
// Apply the logic to restrict the textInput here for String case.
}
}*
*
</mx:Script>
<mx:TextInput id="ti"/>
</mx:TitleWindow>
How to call the apply restrictions function is given below --
textWindow=FilterWindow(PopUpManager.createPopUp(this, FilterWindow, true));
PopUpManager.centerPopUp(textWindow as IFlexDisplayObject);
textWindow.applyRestrictions(int);
On Wed, Feb 2, 2011 at 6:25 AM, Pavan Bhogala <[email protected]>wrote:
> I need to restrict depending on datatype of input value coming from other
> components
>
>
> Pavan Bhogala. 814-431-0669(C)
>
> On Feb 2, 2011, at 1:40 AM, elan pras <[email protected]> wrote:
>
> For Restricting your textInput which is inside a popUp-Title Window, Why do
> you want to restrict it from outside the
> PopUp you can do the validation part inside the Title window itself right?
>
> On Wed, Feb 2, 2011 at 9:32 AM, Pavan B < <[email protected]>
> [email protected]> wrote:
>
>> Hi,
>> How to assign a value to a variable in a titlewindow while
>> initializing the titlewindow.
>>
>> e.g.,
>> FilterWindow.mxml:
>>
>> <mx:TitleWindow>
>> <mx:Script>
>> private var op:String;
>> </mx:Script>
>> <mx:TextInput id="ti"/>
>> </mx:TitleWindow>
>>
>> and when we create it as a popup
>>
>> textWindow=FilterWindow(PopUpManager.createPopUp(this, FilterWindow,
>> true));
>> PopUpManager.centerPopUp(textWindow as IFlexDisplayObject);
>>
>>
>> i need to restrict the textinput depending on the value of op (not on
>> pressing ENTER , it should restrict as they type);
>>
>> if the op value is "int", i should only allow 0-9, or if that is "string",
>> then i shouldn't allow some characters like /,\,{,}
>>
>> This won't work if i do like this
>> textWindow=FilterWindow(PopUpManager.createPopUp(this, FilterWindow,
>> true));
>> PopUpManager.centerPopUp(textWindow as IFlexDisplayObject);
>> textWindow.op = "int";
>>
>> That "int" value should be assigned to op while initializing or in
>> creationcomplete of FilterWindow.
>>
>>
>> --
>> Thanks
>> Pavan
>> 814-431-0669
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Flex India Community" group.
>> To post to this group, send email to <[email protected]>
>> [email protected].
>> To unsubscribe from this group, send email to
>> <flex_india%[email protected]>
>> [email protected].
>> For more options, visit this group at
>> <http://groups.google.com/group/flex_india?hl=en>
>> http://groups.google.com/group/flex_india?hl=en.
>>
>
>
>
> --
> Regards,
> Prasanth
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.