[tomboy-list] Notebook bug when applying current note to notebook

Sandy Armstrong sanfordarmstrong at gmail.com
Thu Jan 3 04:27:59 PST 2008


Thanks!  Commited in revision 1720.

Sandy

On Jan 2, 2008 8:05 PM, Arief Bayu Purwanto <ariefbayu at gmail.com> wrote:
>
> On 1/3/08, Arief Bayu Purwanto <ariefbayu at gmail.com> wrote:
> > Hi all, Happy new year!!!
> > greeting from Indonesia.
> >
> > I'm just doing fresh check-out and compile it. When doing make run, I
> encounter an exception when applaying a note to notebook via "place in
> notebook" menu.
> >
> > Here's the exception:
> >
> > Exception in Gtk# callback delegate
> > Note: Applications can use GLib.ExceptionManager.UnhandledException to
> handle the exception.
> > System.NullReferenceException: A null value was found where an object
> instance was required.
> > at Tomboy.Notebooks.NotebookManager.MoveNoteToNotebook (Tomboy.Note note,
> Tomboy.Notebooks.Notebook notebook) [0x00019] in
> /home/silent/tmp/tomboy/trunk/Tomboy/Notebooks/NotebookManager.cs:371
> > at Tomboy.Notebooks.NotebookMenuItem.OnActivated (System.Object sender,
> System.EventArgs args) [0x0000d] in
> /home/silent/tmp/tomboy/trunk/Tomboy/Notebooks/NotebookMenuItem.cs:39
> > at (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_object_EventArgs (object,
> System.EventArgs)
> > at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000]
> >
> > at GLib.ExceptionManager.RaiseUnhandledException ()
> > at GLib.Signal.voidObjectCallback ()
> > at GLib.Signal.voidObjectCallback ()
> > at Gtk.Application.gtk_main ()
> > at Gtk.Application.gtk_main ()
> > at Gtk.Application.Run ()
> > at Gnome.Program.Run ()
> > at Tomboy.Application.StartMainLoop () in
> /home/silent/tmp/tomboy/trunk/Tomboy/Utils.cs:line 1005
> > at Tomboy.Tomboy.StartTrayIcon () in
> /home/silent/tmp/tomboy/trunk/Tomboy/Tomboy.cs:line 119
> > at Tomboy.Tomboy.Main () in
> /home/silent/tmp/tomboy/trunk/Tomboy/Tomboy.cs:line 81
> > make: *** [run] Error 1
> >
> > Note, I'm using the latest SVN repo.
> >
> > I'm trying to investigate it and found that currentNotebook is null
> because the note has no notebook associated at the moment.
> > I don't know if this is the best solution, but this one work for me.
> > Here's the diff:
>
> Woops, sorry, should be :if (currentNotebook != null)
> >
> > Index: NotebookManager.cs
> > ===================================================================
> > --- NotebookManager.cs (revision 1719)
> > +++ NotebookManager.cs (working copy)
> > @@ -367,11 +367,13 @@
> > Notebook currentNotebook = GetNotebookFromNote (note);
> > if (currentNotebook == notebook)
> > return true; // It's already there.
> > + if (currentNotebook != null)
> >
> > + {
> > + note.RemoveTag (currentNotebook.Tag);
> > + if (NoteRemovedFromNotebook != null)
> > + NoteRemovedFromNotebook (note, currentNotebook);
> > + }
> > - note.RemoveTag (currentNotebook.Tag);
> > - if (NoteRemovedFromNotebook != null)
> > - NoteRemovedFromNotebook (note, currentNotebook);
> > -
> > // Only attempt to add the notebook tag when this
> > // menu item is not the "No notebook" menu item.
> > if (notebook != null && (notebook is AllNotesNotebook) == false) {
> >
> > thank you for reading my message.
> >
> > --
> > Daiguren Hyōrinmaru
>
>
>
> --
> <a
> href="http://en.wikipedia.org/wiki/Toshiro_Hitsugaya#Hy.C5.8Drinmaru">Daiguren
> Hyōrinmaru</a>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>
>


More information about the Tomboy-list mailing list