class - Delphi 'private' clause (directive) does not work -


i'm trying check if private procedures private. works way shouldn't.

please me, maybe missed how incapsulation should work.

this code should not work. guess. works.

unit unit1;  interface  uses   windows, messages, sysutils, variants, classes, graphics, controls, forms,   dialogs, stdctrls;  type     tmyclass = class     private       procedure one;     end;    tform1 = class(tform)     button1: tbutton;     procedure button1click(sender: tobject);   private   public   end;  var   form1: tform1;  implementation  {$r *.dfm}  procedure tmyclass.one; begin   showmessage('1'); end;  procedure tform1.button1click(sender: tobject); var myclass:tmyclass; begin   myclass.one; end;  end. 

thank you. (delphi-7, win7 x64).

private unit.

with more recent version of delphi, can use strict private expected behavior.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -