[glom/glom-1-20] Add comments



commit cab2ff7404f90282d92543039ecb62e782f5441f
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Dec 21 21:33:22 2011 +0100

    Add comments

 glom/base_db_table_data_readonly.h |    4 ++++
 glom/mode_data/box_data_details.cc |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/glom/base_db_table_data_readonly.h b/glom/base_db_table_data_readonly.h
index d1cbb9a..61ba65a 100644
--- a/glom/base_db_table_data_readonly.h
+++ b/glom/base_db_table_data_readonly.h
@@ -44,6 +44,10 @@ protected:
 
   //TODO: Move these to Base_DB_Table_Data too?
   virtual sharedptr<Field> get_field_primary_key() const = 0;
+
+  //TODO: Document whether these get the primary key in an existing record,
+  //or the primary key value as it is entered in the UI, even before a record exists,
+  //or both.
   virtual Gnome::Gda::Value get_primary_key_value_selected() const = 0;
   virtual Gnome::Gda::Value get_primary_key_value(const Gtk::TreeModel::iterator& row) const = 0;
 
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index 0b509be..de7f361 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -711,7 +711,7 @@ void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutIte
 
   Gnome::Gda::Value primary_key_value = get_primary_key_value_selected();
   //std::cout << "debug: " << G_STRFUNC << ": primary_key_value=" << primary_key_value.to_string() << std::endl;
-  if(!Conversions::value_is_empty(primary_key_value)) //If there is not a primary key value:
+  if(!Conversions::value_is_empty(primary_key_value)) //If there is not a stored primary key value yet:
   {
     Glib::ustring table_name;
     sharedptr<Field> primary_key_field;
@@ -840,7 +840,7 @@ void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutIte
   }
   else
   {
-    //There is no current primary key value:
+    //There is no current stored primary key value yet:
 
     if(m_field_primary_key && m_field_primary_key->get_auto_increment()) //If the primary key is an auto-increment:
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]