Главная страница
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.033 c
15-1158159660
vain
2006-09-13 19:01
2006.10.01
TTB


1-1156140355
5serg
2006-08-21 10:05
2006.10.01
Как зарегистрировать сервис в реестре Windows


5-1139491280
Awex
2006-02-09 16:21
2006.10.01
TEditControl


2-1158161232
greengeneral
2006-09-13 19:27
2006.10.01
нажатие Buton


15-1157880735
ArtemESC
2006-09-10 13:32
2006.10.01
VISA