On Thu, Aug 11, 2005 at 10:58:48AM +0300, Alexander Todorov wrote:
> > So, how can I accomplish renaming (automatic or manual) under Lazarus?
> > Or is that not (yet) possible?
> 
> Are you doing something like:
> 
> Form := TMyForm.Create(Owner);
> Form.Name := 'Form1';
> 
> that gets called every time when the form is created ????
> Try not assigning names and it should work. 
> 
> NOTE: I have not tested this with Lazarus but in Delphi its possible
> to Create a control without assigning any name to it. In this
> particular case "auto naming" comes in the game, I think.

The second invocation of

        VMyForm := TMyForm.Create(...);

causes the exception.  The program does not even get the opportunity to
set a name.  My program currently in fact does NOT set the name after
creation.  It has been set manually in the Object Inspector, and this is
the base name for the type/variable in the form's unit.  Changing that
name in the OI, changes the type/variable names throughout the source.

The form must have a name.  But I would think it is only needed at
design time (the Lazarus IDE uses it), not at runtime.

        Tom
-- 
E-MAIL: T.Verhoeff @ TUE.NL     | Fac. of Math. & Computing Science
PHONE:  +31 40 247 41 25        | Eindhoven University of Technology
FAX:    +31 40 247 54 04        | PO Box 513, NL-5600 MB Eindhoven
http://www.win.tue.nl/~wstomv/  | The Netherlands

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to