I have a legacy site I’m moving to Lucee that tests for the existence of a cfc called “Page”. I was checking the syntax and saw that IsDefined() is deprecated.
What should I use instead of If (IsDefined(“Page”) is false ) …?
Thank you [cfmitrah] those are of interest, but still dont give me an answer. I’m testing for the existence of a cfc. “Page” is an object so if i try to use structKeyExists, it will throw an error because it’s not a struct and there wont be any key.
In fact i think isDefined() is exactly the right function for that. However it’s deprecated i need to find a replacement for it.
Re: “the existence of a cfc” do you mean whether an object named Page has been instantiated from Page.cfc? If so, objects are in the Variables scope, so this should work: