Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-11

Component palette woes - corrupting some resource?

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro
to Tony Maro: I've created a ESD Sound component that you can drop on a form for sound support. It…
Tony Maro wrote
resource that's causing the problem maybe... Also, I know the control works fine, because if you just create it at runtime without ever dropping it on the main form it works just fine.

I take that back... It USED to work that way. I just found that if I create it once at runtime by adding it to the uses clause and creating it within a variable it dies. And even removing it back out of the app and recompiling won't fix it.

That's just plain weird.

-Tony

Reply by email

Tony Maro

I've created a ESD Sound component that you can drop on a form for sound support.

It works great on a simple application, however when used on CheckBook Tracker, weird stuff happens.

After dropping on the form and recompiling the app, the FrmMain variable is undefined when FrmMain.OnCreate is called. As you might imagine, this causes many woes for me.

If you delete the TESDSound from the form, remove the uses reference and recompile, the application STILL fails. It's like something gets corrupted inside the form resource.

Here's a link to sample code:
http://members.telocity.com/~tonymaro/cbbad.tgz Download size is about 360k - all source, I removed the exe, graphics and temp files.

Install the TESDSound component into Lazarus then compile cbtracker as is, and run the app. Should work fine...

Drop the sound control on the main form (FrmMain) and then just recompile and try to run.

The sound component to install into Lazarus is in cbtracker/esdsound

The sound control works just fine on a simple application. If you create a new blank app, drop it in and use it there's no problems. I'm thinking there's something about shoving too many controls into a form resource that's causing the problem maybe... Also, I know the control works fine, because if you just create it at runtime without ever dropping it on the main form it works just fine. I've tested it both with and without the icon resource, and it corrupts the app either way.

Tony Maro http://tony.maro.net/ ERROR ! A serious problem has been detected in your Windows operating system! Please insert Linux-Mandrake Installation CD and click REBOOT to resolve this problem.

Reply by email