It will help if you cast it to TNoteCas as you are probably are running your code in mode objfpc. Try adding {$mode delphi} after the unit name; this way, you probably will not need a cast.
What DonAlfredo said is the best practice, especially if you want to keep compatibility with Delphi.