[TS] Re: Delete Button


Subject: [TS] Re: Delete Button
From: Ben Darnell (bgdarnel@unity.ncsu.edu)
Date: Fri Mar 10 2000 - 12:59:57 EST


On Fri, Mar 10, 2000 at 09:31:14AM -0800, jackpark@verticalnet.com wrote:
> As a new user of both Thoughtstream and Palm IIIxe, I made what may be
> a classic faux pas: I clicked delete when there was nothing to delete.
> Got no confirmation request, just locked up the whole computer. Had to
> find a needle to reset everything.
>
> Looking at the source for ItemDelete(), I noticed there is no assert or
> other test for db. Would it be a stretch of the desire to keep the
> code compact to add a test for null where this kind of faux pas can
> happen?

Which delete button are you referring to? I get a crash when I hit
"Delete" on the form titled "New/Open Mind" (now fixed in CVS). The
"Del" button on the main form is the button that calls ItemDelete(), but
the bounds on this are checked by the caller (MainFormHandleEvent()), so
I'm pretty sure this function never gets called with bogus arguments.
There's a lot of code in ThoughtStream that breaks if given NULL as a
parameter, but since it's difficult to gracefully handle errors in
PalmOS, I'm currently relying on the fact that it's difficult to get
things into a confused state (i.e. a null db parameter), and when they
are, things are so badly broken that it's probably safer to just crash.

-Ben

-- 
Ben Darnell              bgdarnel@unity.ncsu.edu
http://thoughtstream.org
Finger bgdarnel@debian.org for PGP/GPG key 1024D/1F06E509

------------------------------------------------------------------------ DON'T HATE YOUR RATE! Get a NextCard Visa, in 30 seconds! Get rates as low as 0.0% Intro or 9.9% Fixed APR and no hidden fees. Apply NOW! http://click.egroups.com/1/2127/3/_/6321/_/952711318/

eGroups.com Home: http://www.egroups.com/group/thoughtstream/ http://www.egroups.com - Simplifying group communications



This archive was generated by hypermail 2b25 : Wed Aug 30 2000 - 22:01:00 EDT