Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Track 'to be done' coding tasks in Xcode Apps
When coding, I use comments to help keep track of the tasks I still need to do. I enter these using this format:
// TODO: refactor this method
// TODO: non-empty textfields are allowed
Well, today I realized that Xcode's editor shows you these type of TODO: marks in the symbols list (the one where methods are listed, just below the toolbar), making it really easy to get an overall look at your "to be done" tasks. Note that you have to be careful when typing, since this feature is case sensitive, and very strict with the comment mark. It must be TODO:, with the colon at the end, a space, and then the to-do-task, as shown above. I'm not sure if this feature is present in older Xcode versions, as I'm using the last 3.1Beta.

By the way, comments like next one are allowed, too:
// Something, TODO: more text
[robg adds: I haven't tested this one.]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[9,241 views]  

Track 'to be done' coding tasks in Xcode | 7 comments | Create New Account
Click here to return to the 'Track 'to be done' coding tasks in Xcode' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Track 'to be done' coding tasks in Xcode
Authored by: PizzaCake on Jun 09, '08 08:33:09AM

Excellent hint! Is it in the Xcode documentation? Any more like this?

XCode 3's spotlight importer only selectively indexes the contents of source files so for example comments are not indexed as well as these TODO: 's. Does anyone know how to put comment text in a source file so it is indexed?



[ Reply to This | # ]
Track 'to be done' coding tasks in Xcode
Authored by: PizzaCake on Jul 09, '08 11:08:17AM

Pragma marks also show up in the function menu and have the additional benefit of being indexed by Xcode 3's spotlight importer.

#pragma mark YOURTEXTHERE



[ Reply to This | # ]
Not only TODO:
Authored by: costique on Jun 09, '08 08:54:49AM

FIXME: works too, I'm not sure about the whole list.



[ Reply to This | # ]
Not only TODO:
Authored by: krusty76 on Jun 09, '08 09:15:02AM

TODO, FIXME, and MARK.

MARK is useful for delineating sections of a large file.

There are also ??? and !!! but I'm not sure what they are for.

More info to be had here.



[ Reply to This | # ]
Track 'to be done' coding tasks in Xcode
Authored by: ogott on Jun 10, '08 05:37:36AM

To be precise, you just broke your NDA, which includes Xcode 3.1 because it is part of the iPhone SDK.

Apart from that: // TODO: worked in Xcode 3.0 already, I don't know about 2.x versions.



[ Reply to This | # ]
Track 'to be done' coding tasks in Xcode
Authored by: thinkyhead on Jun 11, '08 12:44:09AM

I discovered this early on, because I use "TODO:" habitually. What's interesting about this is that I remember hearing some time ago that Microsoft had at least attempted to patent this behavior. I'm not sure if they succeeded, but if so maybe this is an example of the shared patent agreement between Microsoft and Apple.

...or maybe not!

---
|
| slur was here
|



[ Reply to This | # ]
Track 'to be done' coding tasks in Xcode
Authored by: Thaiseo on Sep 05, '08 12:49:02PM

Thanks for the excellent tutorial! I am new to Xcode and don't really know how.



[ Reply to This | # ]