Forum > Designer

Designer Does Not See Datamodule

(1/2) > >>

mcwbr:
So far as I know, the only thing to do in order to get the designer to see a datamodule, such that datasources become available to the data aware controls and can be assigned via the Object Inspector, is to add the data module to the uses clause of the form's interface.

But when I do this, the datamodule does not appear in the Object Inspector's drop-down list for the datasource of a control and I cannot simply type-in: DataModuleX.SomeDatasource without causing an error.

The project compiles. I can assign the datasource to a dbEdit control at run time. I have tried closing and reloading the project. What have I failed to do? Is something else necessary for the designer to see the datamodule?

marcov:
Add the module to the project.

mcwbr:
Thanks for the quick reply, but the datamodule is part of the project.

wp:
The datamodule must be loaded into the IDE in order to see it in the DataSource dropdown of the data-aware components (after loading, you may have to press F12 to activate it in the designer).

mcwbr:
Aha! The problem is you don't want the datamodule's unit in either uses clause, interface or implementation. The dm's instance variable is global.

I removed the reference to the datamodule from the form's uses clause and the problem is solved.

Navigation

[0] Message Index

[#] Next page

Go to full version