X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da19c58b6085f590b912b56e81cfdb8ff244cdb7..b3cec67186d678d2c3985923bdb8c787455cf369:/src/cocoa/textctrl.mm diff --git a/src/cocoa/textctrl.mm b/src/cocoa/textctrl.mm index 8945f90161..d33626cd18 100644 --- a/src/cocoa/textctrl.mm +++ b/src/cocoa/textctrl.mm @@ -24,6 +24,7 @@ #import #import +#import #import #include @@ -45,7 +46,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID winid, if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; m_cocoaNSView = NULL; - SetNSTextField([[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]); + SetNSTextField([(style & wxTE_PASSWORD)?[NSSecureTextField alloc]:[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]); [m_cocoaNSView release]; [GetNSTextField() setStringValue:wxNSStringWithWxString(value)]; @@ -101,7 +102,7 @@ void wxTextCtrl::CocoaTarget_action(void) //event.SetString(GetValue()); event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); + HandleWindowEvent(event); } void wxTextCtrl::AppendText(wxString const&)