I've got the neatest thing that happens. When I try to create all my controls in the…
Show quoted text 9 lines
Plz don't send me an example or else the cool little bug will die.
Mattias

Mailing lists / lazarus / 2002-10
5 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I've got the neatest thing that happens. When I try to create all my controls in the…
Plz don't send me an example or else the cool little bug will die.
Mattias
I've got the neatest thing that happens. When I try to create all my controls in the…
Oh no. I warned you.
Rest in peace little bug. Tony will never forget you ... or at least the cvs ...
I have also repaired Ellipse.
Mattias
I've got the neatest thing that happens. When I try to create all my controls in the…
Hadn't planned on it <<BG>>.
Seriously though, if you WANT the source I've posted it. I'm not sure if it happens every time or not but I've definitely seen it. That's why I was kind of wondering if anybody else had seen that happen... It didn't do this on mine until I was creating a lot of components at runtime.
http://members.telocity.com/~tonymaro/cbtracker.bad.tar.gz
Look in the oncreate and onshow events of the FrmMain (unitmain.pas). I commented out code from it's usual location in the onshow event and pasted it into the end of the oncreate event. Even though it probably SHOULD work the net result is quite complex...
If you compile and run this as is, it will crash with tons of errors about invalid parents and the like. I just realized that.
If however you put the code back to normal, run it once, create a new checkbook file and exit (so it will auto-load it next time) THEN you run the above posted code, it will run (throwing tons of GTK warnings) and scrambles things.
Simply moving the same code from OnCreate to OnShow fixes the issue.
OR...
After painful testing I found that changing the order and creating the menus BEFORE the LblAboutTransactions component while in the OnCreate event also seems to fix it. If I create the menus AFTER I create that label, the menus are trashed and throw GTK errors everywhere, UNLESS it's done in the OnShow event.
Go figure.
Like I said, it's pretty complex and I'm not positive there's not some aspect of my code interfering, but I don't think so.
I've seen almost identical problems with placing all the controls on the form at design time - that's why I switched to
" Plz don't send me an example or else the cool little bug will die."
Good one! :-)
Shane
I've got the neatest thing that happens.
When I try to create all my controls in the OnCreate event of my form, half of them won't display, half display wrong, and the runtime generated menus are completely scrambled with huge spaces between entries and the order all wrong. The same code placed in the OnShow event of the same form works just fine.
Anyone else ever see this?