Forum > Editor

Message Windows Hints showing incorrect information

(1/1)

Josh:
Just downloaded latest SVN 54316, and just noticed some odd messages in appearing in message window.

It is reporting various variables are defined but not used in various functions and procedures; even thought they are being defined and used.

Example

In a function I have defined ok:boolean;

then within  $ifdef

ie
{$ifdef darwin}
ok:=UpdateMacControls(-1);
{$else}
ok:=UpdateControls(-1);
{$endif}

In IDE the 'enabled text' is for the ok:=UpdateControls in the else clause;

zeljko:
And where is ok := UpdateControls;  in your example ?

Josh:

--- Code: ---
Procedure xxxxxxx;
var ok:boolean=falase;

begin
  .....

  ......
  {$ifdef darwin}                     // Note this is not nested anywhere or within any other begin end block
  ok:=UpdateMacControls(-1);
  {$else}
  ok:=UpdateControls(-1);
  {$endif}
End;


--- End code ---

I also noticed a warning
Symbol "RT_RCDATA" is deprecated: "Use Windows.RT_RCDATA instead".

As I cant use windows unit on mac; do I now need to add in ifdef around all rt_rcdata one for darwin one for windows etc.

Bart:
You seem to assigne a value to OK and the immediately exit the function, so the assigned value is never used (I guess that is what the message is telling you).

Bart

Josh:
Hi

My error, I should have added some more of the code

Later on
in procedure I Have

--- Code: ---If Not Ok then
Begin
  // Show message in Message Bar; regarding No Control found matching Control Information;
  // Application can Still continue; probably data file error; so report message only
  My_Message_Bar(My_Message,ClWhite,CLRed,1500); // display message WHite Font, Red Background, for 1.5 seconds);
End;

--- End code ---

I should have put more of the proc code in; but it has so many of own functions etc; tthat do not relate to the error or the ok variable

Navigation

[0] Message Index

Go to full version