gettingstarted
[Top] [All Lists]

Re: lb change on delete rows

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: lb change on delete rows
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Mon, 29 Nov 2004 14:29:14 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <15c dot 4494c3d0 dot 2edcdeef at aol dot com>
At 3:22 PM -0500 11/29/04, GAmoore at aol dot com wrote:

It seems that deleting all rows in a listbox fires the change event.

If there was previously a selection, yes, since now there is no selection -- hence the selection has changed.

This is a bit of a problem for me, because I assumed that if there is a change event with the listindex not > -1 then that means no selection.

Right.

How can tell if the change event is fired by a selection made by the user or the delete all rows?

Well, the user can't cause a DeleteAllRows to happen directly -- only your code can do that. So, your code can also do other things, like set a flag letting other bits of your code know what it's up to.

Best,
- Joe

--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>