Hi all,
This has got to be the strangest thing I've ever seen.
I have a small drawing app for creating business forms. I'm using code like
this in the drag event of a canvas to draw a marquee for selections and for
dragging of objects:
Select Case Tool
Case 0, 3, 5 // selector, Box, Text
me.RefreshRect Min(X, InitX)-4, Min(Y, InitY)-4, Abs(X-InitX)+8,
Abs(Y-InitY)+8
g.ForeColor=&ccccccc
If Abs(X-InitX)>2 and Abs(Y-InitY)>2 then
g.DrawRect Min(X, InitX), Min(Y, InitY), Abs(X-InitX), Abs(Y-InitY)
End If
Case 1 // Vertical line
The RefreshRect code draws from a picture buffer to the canvas.Graphics. X
and Y are the parameters passed to the drag event, InitX and InitY are
properties of the Window and were set in mouse down. (I'm sure there are some
optimizations possilbe but read on...)
This works great in the IDE.
If I build the app, it works great.
If I quit the REALBasic program and then relaunch the app, it is unbelievably
sluggish. The drawn marquee lags a half a second or more behind the mouse
cursor. If I open the project in RB, the built app will work great again. If
I open any other project in RB, it doesn't work.
This is 100% consistent. The app only works correctly if the IDE was launched
with this project before the built app was launched.
Since I mostly test by running in the IDE and not by building the app, I'm not
sure when it started, but it may coincide with this. I made a duplicate of
the entire project folder and renamed the project in the new folder. I have
since deleted the original, but the problem persists.
I've done a few obvious things like reboot the computer and trash what temp
files I could find. Watching in 'Top' Memory usage never goes above about 5%
and CPU usage for the app and for RB never go above 30%. CPU for Xorg will go
to 60% when the app is acting sluggish, but only to about 15% when it is
working right.
This was built with 2006r4 and I've tested with 2007r1
Mepis Linux (based on Ubuntu) 2.4GHz Pentium and 1.5GB RAM.
I would be very greatful for any ideas. I don't know where to start looking.
Don Jungk
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>