Re: Convenience functions



On Friday, July 6, 2001, at 09:29  PM, Havoc Pennington wrote:

Owen Taylor <otaylor redhat com> writes:
      g_object_weak_pointer()
      g_object_weak_pointer_remove()

   are appreciated.

      g_object_setup_weak_pointer()
      g_object_remove_weak_pointer()

   are clearer and nicely verb/noun, but long for a common operation.


I vote for:

 g_object_add_weak_pointer()
 g_object_remove_weak_pointer()

We're hardly in
nautilus_perform_operation_with_frobation_and_foobar_ensuring_precondition_xyz(
)
territory there. ;-) I don't think this is really common enough to
warrant a lame name, and anything is shorter than the old
gtk_signal_connect(gtk_widget_destroyed) rigmarole.

Not that you guys care, but the eel functions for this are named:

    eel_nullify_when_destroyed
    eel_nullify_cancel

I like Havoc's names best so far.

    -- Darin




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