Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.10.01;
Скачать: CL | DM;

Вниз

Что не так с default ???   Найти похожие ветки 

 
mr. Den   (2006-02-17 15:21) [0]

Есть published свойства в компоненте, наследнике TPanel :

published
 property Offset : integer read FOffset write SetOffset default 15;
 property Opened : boolean read FOpened write SetOpened default True;


Компилирую пакет, помещаю компонент на форму -
Offset = 0 {default 15};
Opened = False {default True}


При запуске - то же самое.

Если свойства выставлять в конструкторе - все исправляется. НО ! В чем тогда смысл default ???


 
Mikhail   (2006-02-17 15:58) [1]

Note

Property values are not automatically initialized to the default value. That is, the default directive controls only when property values are saved to the form file, but not the initial value of the property on a newly created instance.


 
Reindeer Moss Eater ©   (2006-02-17 15:58) [2]

Смысл описан в документации


 
Reindeer Moss Eater ©   (2006-02-17 15:59) [3]

>В чем тогда смысл default ???

В том, чтобы не записывать значение в dfm, если значение равно дефолтному.


 
mr. Den   (2006-02-17 16:15) [4]

Оть оно как... Ясненько...

Сенькс...

:)



Страницы: 1 вся ветка

Текущий архив: 2006.10.01;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.059 c
1-1155860315
DDDeN
2006-08-18 04:18
2006.10.01
Сделать снимок раб. стола


15-1158120543
vajo
2006-09-13 08:09
2006.10.01
Проблема с почтой


4-1148486061
Raptoridzevv
2006-05-24 19:54
2006.10.01
хндл => path


15-1157899637
Translater
2006-09-10 18:47
2006.10.01
Lingo и словари


1-1156235494
BronOS
2006-08-22 12:31
2006.10.01
Метод DeleteRow