When running your code, view.buffer_id == 0 and buffer.size == 0. My guess is that the compilation buffer is treated differently but only Allen can answer this (I would be interested to know).
You can access the compilation buffer by name, there is an example in 4coder_default_bindings.cpp in the switch_to_compilation function.
| char name[] = "*compilation*";
int name_size = sizeof(name)-1;
Buffer_Summary buffer = app->get_buffer_by_name(app, name, name_size);
|
In case you didn't know, you can attach the visual studio debugger to 4coder and open you source file to debug it. (Debug > attach to process...).
One last thing, you need to put the "bind( context, key_f9, MDFR_NONE, next_error );" in the "begin_map(context, mapid_global); ... end_map( context );" block, not in the "begin_map(context, my_code_map);" because if the buffer is not treated as code (.h, .cpp, .hpp, .c by default) the key will not be bound (this got me several times).