Re: [FTC b15pv11] DrawBackground
- From: Bob Keeney <bobk@xxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Fri, 14 Mar 2008 16:02:05 -0500
On Mar 12, 2008, at 7:08 PM, Brendan Murphy wrote:
Bob Keeney wrote:
I'm not entirely sure what's going on. I'm updating an application
that hasn't been updated since b15pv9 and I also just switched to
RB 2008 r1.
I'm getting a nil object exception in pv11 when simply replacing
the older components with the new one. The exact error is
happening in FormattedText.drawBackground and g is nil after
calling g=display.graphics. The stack shows that it's getting
called from the FormattedText.Open event on the window.
Like I said, I'm simply updating from an older project. Any ideas
on what the issue is?
Have you added custom code such as a subclass? This may be the
source of the problem in the order in which things are done.
No, this is a straight FormattedText object, no subclass.
Here's the stack.

The actual error is here in FormattedText.AdjustDisplayPicture:

Just above this you see if display is nil, but in this case display is
fine, but display.graphics is nil.
Anyway, it looks like you invoking the drawing code somehow
during initialization when updates have been inhibited. I put into
preview 12 a check to prevent such a backdoor invocation which
should solve your problem. Please test it out and tell me the
results.
Essentially I'm still in the same boat as before. pv9 is what I was
using before with no problems.
Thanks,
Bob Keeney
BKeeney Software Inc.
Other related posts: