From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Sun, 7 Jul 2002 13:41:23 +0000 (+0000)
Subject: * lily/score-engraver.cc (one_time_step): warn for grobs created
X-Git-Tag: release/1.5.66~5
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fb2cb5e32d671334270e101a7a286ee80d5ade00;p=lilypond.git

* lily/score-engraver.cc (one_time_step): warn for grobs created
during stop_translation_timestep().

* lily/a2-engraver.cc: restrict acknowledged grob types.

* lily/chord-name-engraver.cc: remove acknowledge_grob().
---

diff --git a/ChangeLog b/ChangeLog
index 0411b9a120..7b19ddf855 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2002-07-07  Han-Wen  <hanwen@cs.uu.nl>
 
+	* lily/score-engraver.cc (one_time_step): warn for grobs created
+	during stop_translation_timestep().
+
+	* lily/a2-engraver.cc: restrict acknowledged grob types.
+
+	* lily/chord-name-engraver.cc: remove acknowledge_grob().
+
 	* Documentation/user/tutorial.itely: doc carnage.
 
 2002-07-06  Rune Zedeler  <rune@zedeler.dk>
diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely
index 4b54732768..f469c28c17 100644
--- a/Documentation/regression-test.tely
+++ b/Documentation/regression-test.tely
@@ -230,9 +230,6 @@ Grace note do weird things with timing. Fragile.
 
 @section Miscellaneous
 
-@lilypondfile[printfilename]{generic-property-override.ly}
-
-
 @lilypondfile[printfilename]{rhythmic-staff.ly}
 
 
diff --git a/VERSION b/VERSION
index b9f0174e81..1643917c3a 100644
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=65
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=u1
 
 # Use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc
index 027f4342f1..b005a9950d 100644
--- a/lily/a2-engraver.cc
+++ b/lily/a2-engraver.cc
@@ -206,6 +206,7 @@ up for the musicexpr called @code{one}, down for the musicexpr called
 
 ",
 /* creats*/       "TextScript",
-/* acks  */       "grob-interface tie-interface note-head-interface ",
-/* reads */       "combineParts noDirection soloADue soloText soloIIText aDueText split-interval unison solo unisilence unirhythm",
+/* acks  */       "multi-measure-rest-interface
+slur-interface stem-interface tie-interface note-head-interface"
+,/* reads */       "combineParts noDirection soloADue soloText soloIIText aDueText split-interval unison solo unisilence unirhythm",
 /* write */       "");
diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc
index 2b4c510dad..ee8ea34361 100644
--- a/lily/break-align-engraver.cc
+++ b/lily/break-align-engraver.cc
@@ -140,6 +140,6 @@ Break_align_engraver::add_to_group(SCM align_name, Item*item_l)
 ENTER_DESCRIPTION(Break_align_engraver,
 /* descr */       "Align grobs with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder",
 /* creats*/       "BreakAlignment BreakAlignGroup LeftEdge",
-/* acks  */       "grob-interface", // break-aligned-interface ?
-/* reads */       "breakAlignOrder",
+/* acks  */       "break-aligned-interface"
+,/* reads */       "breakAlignOrder",
 /* write */       "");
diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc
index 5ecf45194e..005f7ff30f 100644
--- a/lily/chord-name-engraver.cc
+++ b/lily/chord-name-engraver.cc
@@ -21,13 +21,10 @@
 
 class Chord_name_engraver : public Engraver 
 {
-
   TRANSLATOR_DECLARATIONS( Chord_name_engraver);
-
 protected:
   virtual void stop_translation_timestep ();
-  virtual void acknowledge_grob (Grob_info i);
-  virtual void process_acknowledged_grobs ();
+  virtual void process_music ();
   virtual bool try_music (Music *);
 
 private:
@@ -78,16 +75,9 @@ Chord_name_engraver::try_music (Music* m)
 }
 
 void
-Chord_name_engraver::acknowledge_grob (Grob_info i)
+Chord_name_engraver::process_music ()
 {
-  if (Note_req* n = dynamic_cast<Note_req*> (i.music_cause ()))
-    add_note (n);
-}
-
-void
-Chord_name_engraver::process_acknowledged_grobs ()
-{
-  if (!chord_name_p_ && ly_car (chord_) != SCM_EOL)
+  if (ly_car (chord_) != SCM_EOL)
     {
       chord_name_p_ = new Item (get_property ("ChordName"));
       chord_name_p_->set_grob_property ("chord", chord_);
@@ -117,6 +107,6 @@ ENTER_DESCRIPTION(Chord_name_engraver,
 /* descr */       "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
 and generate the appropriate chordname.",
 /* creats*/       "ChordName",
-/* acks  */       "grob-interface",
+/* acks  */       "",
 /* reads */       "chordChanges",
 /* write */       "");
diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc
index 49b490ea63..7df4fd80cc 100644
--- a/lily/engraver-group-engraver.cc
+++ b/lily/engraver-group-engraver.cc
@@ -20,6 +20,11 @@ Engraver_group_engraver::announce_grob (Grob_info info)
   Engraver::announce_grob (info);
 }
 
+void
+Engraver_group_engraver::start_translation_timestep ()
+{
+  Translator_group::start_translation_timestep();
+}
 
 void
 Engraver_group_engraver::process_acknowledged_grobs_in_simple_children ()
diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh
index ab0f38543c..1f0b738f48 100644
--- a/lily/include/engraver-group-engraver.hh
+++ b/lily/include/engraver-group-engraver.hh
@@ -33,6 +33,7 @@ protected:
 public:
   TRANSLATOR_DECLARATIONS(Engraver_group_engraver);
 
+  virtual void start_translation_timestep ();
   virtual void initialize ();
   virtual void do_announces ();
   virtual void announce_grob (Grob_info);
diff --git a/lily/include/translator.hh b/lily/include/translator.hh
index ff707e9218..230fcba3d6 100644
--- a/lily/include/translator.hh
+++ b/lily/include/translator.hh
@@ -46,8 +46,6 @@ public:
 
   
   Translator_group * daddy_trans_l_ ;
-  void announces ();
-
   void removal_processing ();
   /**
     ask daddy for a feature
diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc
index e589bdd90c..a592fad6f7 100644
--- a/lily/score-engraver.cc
+++ b/lily/score-engraver.cc
@@ -46,14 +46,6 @@ Score_engraver::make_columns ()
   
       command_column_l_->set_grob_property ("breakable", SCM_BOOL_T);
 
-      Grob_info i1 (command_column_l_);
-      i1.origin_trans_l_ = this;
-
-      Grob_info i2 (musical_column_l_);
-      i2.origin_trans_l_ = this;
-
-      announce_grob (i1);
-      announce_grob (i2);
     }
 }
 
@@ -67,7 +59,17 @@ Score_engraver::prepare (Moment w)
   command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
   musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
   
-  start_translation_timestep ();
+  Grob_info i1 (command_column_l_);
+  i1.origin_trans_l_ = this;
+  
+  Grob_info i2 (musical_column_l_);
+  i2.origin_trans_l_ = this;
+
+  
+  announce_grob (i1);
+  announce_grob (i2);
+
+  Translator_group::start_translation_timestep();
 }
 
 void
@@ -126,11 +128,22 @@ Score_engraver::one_time_step ()
   if (!to_boolean (get_property ("skipTypesetting")))
     {
       process_music ();
-      announces ();
+      do_announces ();
     }
   
   stop_translation_timestep ();
   check_removal ();
+
+
+  for (int i = announce_info_arr_.size(); i--;)
+    {
+      Grob *g = announce_info_arr_[i].grob_l_;
+      String msg= "Grob "
+	+ g->name()
+	+ " was created too late!";
+      g->programming_error (msg);
+    }
+  announce_info_arr_.clear ();
 }
 
 void
diff --git a/lily/score-performer.cc b/lily/score-performer.cc
index aee7deaf24..a8d2dd7218 100644
--- a/lily/score-performer.cc
+++ b/lily/score-performer.cc
@@ -76,7 +76,7 @@ Score_performer::one_time_step ()
 {
   // fixme: put this back.
   // process_music ();
-  announces ();
+  do_announces ();
   stop_translation_timestep ();
   check_removal ();
 }
diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc
index c1f84e774f..29c393fb67 100644
--- a/lily/separating-line-group-engraver.cc
+++ b/lily/separating-line-group-engraver.cc
@@ -206,6 +206,6 @@ Separating_line_group_engraver::stop_translation_timestep ()
 ENTER_DESCRIPTION(Separating_line_group_engraver,
 /* descr */       "Generates objects for computing spacing parameters.",
 /* creats*/       "SeparationItem SeparatingGroupSpanner",
-/* acks  */       "grob-interface",
+/* acks  */       "item-interface",
 /* reads */       "",
 /* write */       "");
diff --git a/lily/translator-group.cc b/lily/translator-group.cc
index 0e5e9cb533..bac3a47db0 100644
--- a/lily/translator-group.cc
+++ b/lily/translator-group.cc
@@ -393,7 +393,7 @@ Translator_group::start_translation_timestep ()
 void
 Translator_group::do_announces ()
 {
-  each (&Translator::announces);
+  each (&Translator::do_announces);
 }
 
 void
diff --git a/lily/translator.cc b/lily/translator.cc
index 66dde042a5..1e89cb3d27 100644
--- a/lily/translator.cc
+++ b/lily/translator.cc
@@ -78,9 +78,8 @@ Translator::removal_processing ()
 }
 
 void
-Translator::announces ()
+Translator::do_announces ()
 {
-  do_announces ();
 }
 
 Music_output_def *
@@ -105,11 +104,6 @@ Translator::start_translation_timestep ()
 {
 }
 
-void
-Translator::do_announces ()
-{
-}
-
 void
 Translator::initialize ()
 {
diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm
index c979b32af1..aaaf427981 100644
--- a/scm/translator-property-description.scm
+++ b/scm/translator-property-description.scm
@@ -248,7 +248,8 @@ signature before a key signature change.")
 (translator-property-description 'localKeySignature list? "the key
 signature at this point in the measure.  The format is the same as for keySignature. Is reset at every bar line."
 ) 
-
+(translator-property-description 'localKeySignatureChanges list? "??
+ [DOCME]")
 (translator-property-description 'measureLength moment? "Length of one
 measure in the current time signature last?")
 (translator-property-description 'measurePosition moment? " How much