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 - How do I preserve flags/width in a printf-formatted NSString used as a key for NSLocalizedString? -


i use genstrings generate .strings files source code files in project. though project technically cappuccino app, question should apply equally project uses .strings files.

i have format string i'd localized: @"%d:%02d %@". displaying time values. if osx/ios app, i'd use built-in datetime formatting, since it's cappuccino have roll own. when run genstrings produces value key: "%1$d:%2$d %3$@".

this appears in localizable.strings file:

 /* shortlocaltimeformat */ "%d:%02d %@" = "%1$d:%2$d %3$@"; 

by running command: genstrings -o resources/en.lproj -s cplocalizedstring *.j */*.j

again, ignore i'm using cplocalizedstring instead of nslocalizedstrings , *.j instead of *.m, these values appropriate cappuccino. notice 02 in %02d discarded in resulting format string. if run again -nopositionalparameters option, leaves string is: genstrings -o resources/en.lproj -nopositionalparameters -s cplocalizedstring *.j */*.j.

 /* shortlocaltimeformat */ "%d:%02d %@" = "%d:%02d %@"; 

is bug in genstrings, or not possible use flags/width in format strings while keeping positional parameters?

if objective-c project, shorten format strings "%1$@ %2$@" , use nsdateformatter generate time string. if class not available, generate intermediate time string myself , use string parameter localized format string rather passing hours/minutes localized format string directly.


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 -