On Wed, Feb 2, 2011 at 12:10 PM, 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]> 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].
>> 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.
>>
>
>
>
> --
> 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]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>



--
hi Pavan,
If you are following any frame work in your development you can assign value
to a variable in model(or a singleton class)
and bind the uicomponent in popup to it.
 _model.myValue = "value to be passed"
textWindow=FilterWindow(PopUpManager.createPopUp(this, FilterWindow, true));
PopUpManager.centerPopUp(textWindow as IFlexDisplayObject);
and in popup window comp
<mx:TextInput text="{_model.myValue }"/>


 still  vikas has provided a good solution.

  <[email protected]>

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

Reply via email to