Xojo Conferences

ListBox.Change do not fires: drag and drop, load datas from files (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: O'Reilly Mac OS X Conference
Next thread: Selecting OS X Apps

Re: Pigmy 2.0   -   Jan Erik Moström <
  ListBox.Change do not fires: drag and drop, load datas from files   -   Emile Schwarz

ListBox.Change do not fires: drag and drop, load datas from files
Date: 29.05.02 17:02 (Wed, 29 May 2002 18:02:24 +0200)
From: Emile Schwarz
Hi all,

REALbasic 4.0.2
MacOS FU1-9.1 (PPC, not OS X)
PowerMacintosh 8100/80 AV

Clearly, I found some solutions, but I think it could be abnormal that ListBox.Change do not fires when a change occured (adding Row
for example).

Here I go (the original message).

Running in the IDE:

I just wanted to add a ListBox Size report string and put some code to do that in the ListBox1.Change Event.

The problem arise when I add Rows (and fill the Cells) from “drag & drop”. Nothing was reported (this was the fastest way to test
the code I added).

After some minutes, I copy/paste my code from ListBox1.Change into ListBox1.DropObject and all went right.

I wrote too fast this report; fortunately, I do not send it, yet !

I have a FileOpen MenuItem; the ListBox.Change Event is not fired too in that case :(.

[after some research]:
a. A simple click in Row #1 (but I suppose that a click anywhere in the ListBox could have the same result) shows me the number of
entries (fires the ListBox.Event).
A click in the ListBox (but not in a Row) after the last Row fires the ListBox.Event.
But a click (anywhere) in the ScrollBar (vertical) do nothing; going to another application and back to the running application does
nothing too.

b. I have a solution: copy/paste the code that is already in the ListBox.Change and ListBox1.DropObject Events to the end of the
“load datas” method !

BTW: I have a method (loads the datas) that clears the previous contents (under Boolean condition) or adds to the previous contents.
Adding to the current contents do not fires the ListBox.Event.

The question (at 0.02 euro) is:

Is it standard behavior that the ListBox.Change Event is not fired when a drop is issued and after you fill a ListBox from a text
file ?



PS: The ListBox Class have 28 entries (events) in the Left Pane of the Code Editor. Now I have to read them all carefully before
asking here “How can I do this or that !”

Subscribe to the digest:
<mailto:<email address removed>>
<mailto:<email address removed>>