[Lazarus] Very strange errors when editing programs using Frames
Donald Ziesig
donald at ziesig.org
Wed Apr 8 15:58:32 CEST 2015
Hi All!
I'm not sure if the following is a new bug or whether it only occurs in
Lazarus for Windows
1.4RC2 or RC3.
I have been testing Lazarus 1.4RC2 and now Lazarus 1.4RC3 on Windows 7
and have encountered
strange behavior with frames. I have simplified the code down to an app
that displays
a very simple frame after a button push. There is only one *unusual*
factor in this app
(but it is common to many programs I wrote in Delphi and Lazarus for
Linux). That is,
I subclass TFrame to add functionality to all descendent frames, for
example:
TFrameX = class(TFrame)
public Print; virtual; // Now the main program can call Print
on a framex and
// the frame-specific printing
occurs.
constructor Create; override;
end;
the remainder of the frames in the apps are subclassed from TFrameX.
TFrame1 = class(TFrameX) ...
The issue is that when editing the MAIN program's appearance using the
Object Inspector,
(specifically changing *Position*), the .lfm file for the FRAME
/occasionally/ gets an entry
for*Position*! (sometimes *TabOrder*, too.). I can't pinpoint exactly
the time at which
this extraneous data appears, but it doing a series of normal editing
operations such as
moving the windows, changing the properties of the MAIN or FRAME for a
few minutes
(but not changing the code) will definitely cause it to happen. Once it
does, the object
inspector for Frame1 has an entry for *Position* (and sometimes
*TabOrder*) which is not
present when a frame is first created. After this appears, reloading
the Frame form
will /sometimes/ raise an exception in the IDE complaining about the
unknown property
for the Frame.
The intermittent (apparently) nature of this is puzzling.
Subsequently, when I attempt to run the program, one of two possible
situations occur:
1. Clicking on the button that displays the frame calls the code but
does not display
the frame, or,
2. Clicking on the button raises an exception describing the
extraneous entry in the
.lfm file.
I haven't been able to figure out why one or the other happens, but for
any given
compilation the error remains the same.
I have a simple app that demonstrates this problem if anyone would like
to try to
replicate my troubles ;-) .
Thanks,
Don Ziesig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150408/4ad0dce9/attachment-0002.html>
More information about the Lazarus
mailing list