Recent

Author Topic: [SOLVED]New Package-New class name other than T+NAME  (Read 5793 times)

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
[SOLVED]New Package-New class name other than T+NAME
« on: September 16, 2014, 11:47:11 am »
Is it possible for any one  to confirm that
if following the steps of the wiki
[ http://wiki.freepascal.org/How_to_Write_a_Lazarus_Component ]
if you edit the field [ New class name : ] and set anything that do not start with the letter [T]
when you press install
lazarus first reports that the file is modified and provide option to reload from disk or not
and after the rebuild ends
lazarus reports error 202 and refuse to start

[OS:Win7 64bit / Lazarus 1.2.4]

*make a back up of lazarus first if you try this
« Last Edit: September 16, 2014, 02:27:14 pm by Never »
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: New Package-New class name other than T+NAME
« Reply #1 on: September 16, 2014, 12:43:46 pm »
in order for lazarus to report a modification there should be at least two open projects that use the same file. Try to find where you duplicated what and will see from there.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: New Package-New class name other than T+NAME
« Reply #2 on: September 16, 2014, 12:55:49 pm »
no other instance of lazarus
no other file editor open
 one thing i just came up is that  i didn't save the default project added when lazarus starts...
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: New Package-New class name other than T+NAME
« Reply #3 on: September 16, 2014, 01:44:16 pm »
I never save that one and I never get the reload message either. The only thing left to check is that the file was change from an outside source like a text editor or something else.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: New Package-New class name other than T+NAME
« Reply #4 on: September 16, 2014, 02:04:09 pm »
just now i repeat the process
new package
save as testp.lpk in folder testp
hit add
go new component
choose anchestor type
remove the [T] from the  [ New class name : ]
hit create new component
hit save
hit install
==========
response is lazarus cant compile remove it from the list?
==============
i didn't change or add anything else
===================================
yesterday i was changing the  [ New class name : ] and file name and failed as mentioned
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: New Package-New class name other than T+NAME
« Reply #5 on: September 16, 2014, 02:11:51 pm »
Something like the attached image? If yes have noticed that the component name and unitname are the same? Make sure that the Unit name differs from the component name and see if that fixes the problem
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: New Package-New class name other than T+NAME
« Reply #6 on: September 16, 2014, 02:25:08 pm »
@ taazz thank you very much
your advice solved the issue

setting field [unit file name :] [ unit name ] the same
and field [new class name :] not to much them works fine
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: [SOLVED]New Package-New class name other than T+NAME
« Reply #7 on: September 16, 2014, 03:04:15 pm »
@Taazz - nice work solving this one. 
Do you know if this a known limitation in fpc/Lazarus, or just an issue with that wizard? (classname cannot = unitname)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: [SOLVED]New Package-New class name other than T+NAME
« Reply #8 on: September 16, 2014, 04:43:39 pm »
it is a known issue with the designer I think ee you can't name your form with the same name as the unit it is in, I don't know if the compiler has any problems with it but I would guess no since the first problem risen after the lazarus IDE was build.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: [SOLVED]New Package-New class name other than T+NAME
« Reply #9 on: September 16, 2014, 05:24:58 pm »
it is a known issue with the designer I think ee you can't name your form with the same name as the unit it is in, I don't know if the compiler has any problems with it but I would guess no since the first problem risen after the lazarus IDE was build.
Many thanks
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

 

TinyPortal © 2005-2018