Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

cocoa - NSOpenPanel from C++ boost thread -


i'm invoking nsopenpanel thread created boost c++.

the panel behaves erratically , doesn't respond mouse, clicking on objects nothing sometime when clicking on top level combo box improve response.

do i've run separate runloop i'm doing runmodalfordirectory should take care of running own loop.

i've created separate objc class performselectoronmainthread show panel in main thread still behavior same.

[ps performselectoronmainthread:@selector(showopenpanel) withobject:nil                        waituntildone:yes                       modes:[nsarray arraywithobject:nsrunloopcommonmodes]]; 

i've tried waituntildone:no , running cfrunloopruninmode isn't helping either.

- (bool) showopenpanel {     nsopenpanel *op = [nsopenpanel openpanel];     [op setallowsmultipleselection:yes];     [op settitle:@"choose file"];     [op setmessage:@"choose file importing."];     [op setfloatingpanel:true];      bool result =[op runmodalfordirectory:nshomedirectory() file:nil types:self.filetypes];     if (result == nsokbutton) {         [self setselectedfiles:[op filenames]];         [self setlastshowresult:true];     }     else {         [self setlastshowresult:false];     }      [self setpanelisdone:true];      return self.lastshowresult; } 

nsopenpanel part of appkit. appkit functions , classes can safely used on main thread.

show code used performselectoronmainthread can figure out why might still seeing problems. suspect you're calling individual methods it--don't; won't work way expect. call main thread totality of interaction nsopenpanel.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -