News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Objective-C

Started by Birdeeoh, January 28, 2006, 10:51:11 PM

Previous topic - Next topic

Birdeeoh

Adding syntax highlighting for Objective-C is a simple addition to the current lexer_cpp.xml file and thats great - but what about "full" support for Objective C, namely having Code Blocks realize that a *.m file is a "source" file, not an "other" file?

As it is now I can manually tell codeblocks to compile and link my .m "other" files, one by one.  Since the GCC compiler handles both regular C and Obj-C it would simply be a matter of convincing CodeBlocks that .m is a c source file.  If there is any easy way to do this, I've missed it...  thanks for your help!


Der Meister

Quote from: Birdeeoh on January 28, 2006, 10:51:11 PM
If there is any easy way to do this, I've missed it...
Yes, you missed it. ;)
Just do a 'right-click' in the 'Management'-window and select 'Edit file types & categories...'. There you can add *.m to the file-endings for source files. ;)
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Birdeeoh

Yup, that sure was easy.

Out of curiosity, is/was there a menu option I missed?

I was checking menus and right-clicking on text to try to find an option - never thought to right-click in open space  :)

Thanks for your quick help!

duncanka

Quote from: Birdeeoh on January 29, 2006, 03:49:47 AM
Out of curiosity, is/was there a menu option I missed?

I was checking menus and right-clicking on text to try to find an option - never thought to right-click in open space  :)
Well, there's Project-->Project tree-->Edit filetypes & categories.  "Project tree" is the same here as it is in the "Management" right-click menu.

Birdeeoh

Welp, the problem was kinda fixed, but not really.  Whether I use the rightclick menu or the project-> menu, I can get *.m classified as source.  Great!  However, when I add a new *.m to my project it still does not automatically have "compile" and "link" checked.  It gets classified as a source file, but is greyed out and not included in my build until I manually check those boxes!

Sorry if I'm asking questions I should be able to figure out...  it's just that this is the first "real" IDE I've ever used.  I'm from the vi + console windows developer ilk and am just foraying into this full-blown deal so I don't know where I should look.  Where I think I should be looking obviously isn't  right  ;)

Thanks again for the help!

duncanka

Quote from: Birdeeoh on January 29, 2006, 08:50:58 PM
Welp, the problem was kinda fixed, but not really.  Whether I use the rightclick menu or the project-> menu, I can get *.m classified as source.  Great!  However, when I add a new *.m to my project it still does not automatically have "compile" and "link" checked.  It gets classified as a source file, but is greyed out and not included in my build until I manually check those boxes!
This is actually an issue that has been raised before, although I'm not sure it was really brought to the attention of any of the devs.  See, for example, http://forums.next.codeblocks.org/index.php?topic=1786.msg13399#msg13399 and http://forums.next.codeblocks.org/index.php?topic=2023.0.  I agree with you strongly that the filetypes that default to compileable and linkable should be user-configurable, possibly even from that same "Edit file types & categories" dialog that you just discovered.
Anyone looking for a little project to take on?  :lol:  (I would try this myself, but my machine runs the compiler so slowly, it's frightening.)