But this works only when they type and press enter right. I want to
restrict this as they type. I tried this but it won't work for my
scenario. I should try using change watcher.
Pavan Bhogala. 814-431-0669(C)
On Feb 2, 2011, at 1:54 AM, Vikas Madan <[email protected]> wrote:
Hi Pavan,
Not sure if I understood your question properly, but I guess this is
what you are looking for --
make the "op" a public bindable variable variable and use
Changewatcher or BindingUtils class to apply some logic on the
textinput.
If you are not too bothered by a properly strucutured code, make a
public function in the FilterWindow.mxml and call that function
after generating the popup. In this function write the logic to
restrict the textinput based on the conditions you want to apply.
textWindow=FilterWindow(PopUpManager.createPopUp(this, FilterWindow,
true));
PopUpManager.centerPopUp(textWindow as IFlexDisplayObject);
textWindow.applyRestrictions(int)
Hope this helps.
-Vikas
On Tue, Feb 1, 2011 at 8:02 PM, 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]
.
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
.
--
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.