Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch ([document currentTool]) {
- case DrawLine:
- NSBezierPath * testPath = [[NSBezierPath alloc]init];
- //...rest of code that uses testPath....
- switch( ... ) {
- case A:
- MyClass obj( constructor stuff );
- // more stuff
- // fall through to next case
- case B:
- // what is the value of obj here? The constructor was never called
- ...
- }
- switch( ... ) {
- case A: {
- MyClass obj( constructor stuff );
- // more stuff
- // fall through to next case
- }
- case B:
- // obj does not exist here
- ...
- }
Add Comment
Please, Sign In to add comment