Drupal 7 Block View include File I have a rather newbie question, I am following a Drupal 7 module examples, specifically an ajax wizard form. All form creation / manipulation is included in ajax_example_graceful_degradation.inc which when is called in file attribute:

// A classic multi-step wizard, but with no page reloads.
  // See ajax_example_graceful_degradation.inc.
  $items['examples/ajax_example/wizard'] = array(
    'title' =&gt; 'Wizard (with graceful degradation)',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('ajax_example_wizard'),
    'access callback' =&gt; TRUE,
    **'file' =&gt; 'ajax_example_graceful_degradation.inc',**
    'weight' =&gt; 7,
  );


Next i would like to create a block which will be included in my template. It seems that i cant include a file attribute in block_view function. How can I do that?
Note: If I include all fuctions of ajax_example_graceful_degradation.inc in .module file then my block works ok.
There is no such an attribute in block_view function, but you can always use something like that (assuming that you have already implemented hook_block_info() and you have defined your own MYBLOCKDELTA):

function MYMODULENAME_block_view($delta = '') {
  switch ($delta) {
    case 'MYBLOCKDELTA':
      $block['subject'] = t('This is my block');
      module_load_include('inc', 'MYMODULENAME', 'my_inc_file');
      $block['content'] = myblock_contents($delta);
      break;
  }
  return $block;
}


Then define function myblock_contents($delta) in your my_inc_file.inc in MYMODULENAME module folder.