I'm experiencing some mysterious crashes and I suspect I'm banging up
against limitations of my design (highly probable) and/or limitations of the
REALbasic listbox.  I'll describe what I'm doing, and perhaps someone can
point out a flaw in my thinking or make a suggestion.  I'm frustrated...

My application is centered around import/creation/display/export of
automobile advertising.  Within my app, each ad listing is represented by an
instance of a "listingObject" class.  This class has grown fairly big, with
about a hundred properties (including a couple of thumbnail picture
objects), and a bunch of methods and constants.  The main window of my app
contains a listbox, which stores and displays the current list of
listingObjects.  I store a listingObject in the CellTag of one cell in each
row; all of the cells in that row (including a thumbnail image in the last
cell of each row) draw their data from that row's listingObject.
Double-clicking on a row calls a method which extracts the listingObject
from that row and feeds it to a new "Listing Edit" window, which displays
all of the detailed data for that listingObject (including a larger preview
of the image), and allows the user to edit the info.  Once they've made
their changes in the editing window, they can click a button to Save the
data, and a new listingObject is created with all of the updated info, and
sent back to the main window listbox.  The existing listingObject in the row
is replaced by the updated one.

All of this seemed to work fine until recently.  Suddenly, with recent
versions of RB for Windows, my app is crashing if the user opens and edits
too many listings (numbers vary, but it seems to happen consistently after
editing 40 listings or so).  I included some code to check the
Runtime.MemoryUsed and .ObjectCount values before the Listing Edit window
opens and after it closes, and found some weird things.  First, if I've got
a small number of items in the main window listbox (say 50-60), the
.ObjectCount doesn't vary much before/after the Edit window.  BUT... if I
have 200 items or so in the listbox, the .ObjectCount will increase by 100's
or 1000's every time I open/close one of the Edit windows!  Very strange.
After a few Edits, the app dies (shuts down spontaneously), with no warning
or message.

Any ideas?  Should I investigate one of Einhugur's grids as a replacement?
Should I re-think my design?

Eagerly awaiting your suggestions...

Jason P. Toews
Production Systems Analyst
Trader Publications
907 IS-Seattle
Office: 425-487-2237 x3066
Cell: 425-891-3051


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

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

Reply via email to