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.

emacs public/protected/private label indentation of C++ header file not working for zero offset -


i cannot 0 offset things c++ header files in emacs if have defined in .emacs file.

the header file below shows class definition inside 2 namespaces , importantly public keyword have 0 offset below.

namespace n1 { namespace n2 // no offset {  class someclass // no offset namespace open curly { public: // line 0 offset     someclass(); // offset 4     ... };  inline someclass::someclass() // no offset { }  } // n2 } // n2 

in .emacs file have added label this:

(c-set-offset 'label 0) 

i used ctrl-c ctrl-s find out modify. other offsets have defined in .emacs file working fine , values other 0 work label.

when set offset 0 label turns out 1 when hitting tab line. strange , looks else overriding or adding minimum of 1.

can explain how can achieve want , maybe explanation happening currently?

phew, first question here. :)

update:

thanks answers have been able bit farther, still no solution overall, because changing things necessary total offset 0 accessors result in other things don't want. thsi i'm currently:

(c-set-offset 'access-label 0) 

i needed .h file understoor c++, added:

(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) 

this alone not removing 1 offset seeing, seems there inclass accessor. setting 0 results in total 0 offset.

(c-set-offset 'inclass 0) 

problem other things such members total of 0 below:

class foo { public: foo(); ~foo(); 

to remedy changed topmost-intro offset 4

(c-set-offset 'topmost-intro 4) 

which in turn resulted in other changes e.g. inline function declarations in same file. in all, i'm not sure how tweak way want it.

update2:

added inline declaration of someclass ctor no offset.

i believe want access-label instead of label. see here.


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 -