Recent

Author Topic: [SOLVED] MsgBox on 4th Form Appears While Loading Main Form - Huh?  (Read 8910 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: [SOLVED] MsgBox on 4th Form Appears While Loading Main Form - Huh?
« Reply #30 on: July 19, 2017, 05:55:23 pm »
RAW's code is a good example on how to get yourself familiar with how LCL does things in what order.

It get's even more complicated when using unit initialization/finalization sections, not to mention using static class members.

Personally i prefer to use writeln's (on Windows platform you need to turn of the projects checkbox "win32 gui application", otherwise you get errors because output channel is not assigned properly), and/or use the debugger (in your specific case, from a breakpoint inside your project's .lpr file) and step through your code to see what is actually happening.

There are also other (logging) options available for Lazarus programs.

It might perhaps sound tiresome to do but, you can learn a lot from doing these kind of (relatively simple) things.

I still find myself doing so when looking at code from others and that is too mind-boggling to follow from source alone. For example: with the additions of helpers and overloading operators, things can become complicated pretty fast.

Also, as you might have noticed: it is usually much easier for those helping that you show some code, however trivial things perhaps might look/be for you. In this particular case it actually was trivial but, you simply did not know where to look.

As you said so yourself, you have a VB mindset (nothing wrong with that), so that might cause confusion on used terminology here and there but also with regards to how you look at certain things (it simply comes with the territory of having used/using another, windows oriented, programming language).

... even people with a similar background that used TP/Delphi/FPC/Lazarus all their lives can cause conflicting situations because of different views and/or believes either by their experience or lack thereof.

All i can say is, to have patience and not get too frustrated (been there, done that). Everything you can accomplish with VB can be accomplished with Lazarus/FPC. Even if that means we have to jump through hoops to get there  :D

I appreciate the input!
 ;)
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

 

TinyPortal © 2005-2018