^ Yes, but they established in the dialogue that the equipment in the science lab was really nothing more than a complex series of mirrors that reflected the waves in a certain manner. Not exactly advanced scientific equipment like a tricorder.
TNG and later series did establish that holodecks use a combination of both holographic images and replicators. But the level of complexity in devices those replicators can produce is up for debate. We know, for example, that a person can eat or drink something on the holodeck because it's replicated, not a hologram. But can it make a phaser? A tricorder? Heck, a warp core? That we don't know.