![]() |
|
||||||||||
|
|||||||
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | Опции просмотра |
|
![]() |
![]() |
|
|||||
|
Регистрация: Feb 2008
Адрес: Russia
Сообщений: 19
|
(Flex Builder 3 --> панель Components)
По умолчанию, Flex Builder все собственные(не встроенные) компоненты помещает в папку "Custom". Хочу сделать так, чтобы мой компонент помещался в какую-нибудь другую папку, например "MyProjectComponents". Можно ли это сделать и как? ... Перекопал хелпы по свик-библиотекам, метадате и манифест-файлам для compc -- узнал много чего интересного, но то что надо не нашёл ![]()
__________________
lida -- dyra (c) lida Последний раз редактировалось moron; 05.06.2008 в 14:46. |
|
|||||
|
Если найдешь отпишись плиз )) тоже исчу
__________________
Бубен - волшебный инструмент программирования. |
|
|||||
|
Регистрация: Feb 2008
Адрес: Russia
Сообщений: 19
|
Наконец-то выкопал
![]() Ресурс: http://sudhahariharan.wordpress.com/...lex-builder-3/ When my team lead first told me about this, I had no idea what I had to do about it. Ofcourse, the first step was to depend on good old Google, but this time Google ditched me. I hardly found any good results nor did I get good replies from the various forums we have dedicated to Flex. All I could find was this bug in the bug database. After a lot of help from various people, this is the information that I could gather about the files manifest.xml and design.xml. To customize the Design view of Flex Builder for specific components we essentially need the above two files. As an example, if you want to have components to be listed under specific categories instead of the default behavior of Flex Builder that puts them under the custom tag, you could do the following. Have an XML file called design.xml that has a structure similar to <?xml version=”1.0″ ?> <design> <namespaces> <namespace prefix=”myExample” uri=”http://demo.sap.com” /> </namespaces> <categories> <category id=”TestComponents” label=”TestComponents” defaultExpand=”true” /> </categories> <components> <component name=”TestButton” namespace=”demo” category=”TestComponents” displayName=”Test Button”> <mxmlProperties> </mxmlProperties> </component> </components> </design> The manifest file basically defines what components would be present in the swc you are creating. For example, if I have only one component called TestButton in my library I would write a manifest.xml file <?xml version=”1.0″ encoding=”UTF-8″ ?> <componentPackage> <component class=”com.test.components.TestButton” id=”TestButton” /> </componentPackage> By doing the above, I was able to have a customized component view. One thing worth a mention is the tag called <mxmlProperties> within the design.xml file. This is useful if you want to show certain properties in the Flex Builder Standard Properties view. For example, <mxmlProperties> <textfield id=”title” name=”Title:” /> <combo id=”showTitleBar” name=”Title Bar:”/> </mxmlProperties> This line would give the default value as false for the combo box displaying as TitleBar. Certainly, this is only very little of what one could do with these two files and Customizing Flex Builder without having to build any additional plugins. I wish there were many more blogs and some documentation that could throw some light onto this area.
__________________
lida -- dyra (c) lida Последний раз редактировалось moron; 09.06.2008 в 11:43. |
|
|||||
|
Регистрация: Feb 2008
Адрес: Russia
Сообщений: 19
|
Library Projects and Customization in Flex Builder 3.
Для того, чтобы переделать Design View во Flex Builder 3 под собственный компонент/библиотеку нужны следующие файлы: manifest.xml и design.xml. К примеру, если вы хотите, чтобы компоненты отображались в отдельных категориях, а не в папке "Custom", в которую билдер помещает компоненты по дефолту: Нужен XML-файл с именем design.xml с примерно следующей структурой: <?xml version=”1.0″ ?>
<design>
<namespaces>
<namespace prefix=”myExample” uri=”http://demo.sap.com” />
</namespaces>
<categories>
<category id=”TestComponents” label=”TestComponents” defaultExpand=”true” />
</categories>
<components>
<component name=”TestButton” namespace=”demo” category=”TestComponents” displayName=”Test Button”>
<mxmlProperties>
</mxmlProperties>
</component>
</components>
</design>
Файл manifest.xml по существу определяет какие компоненты будут представлены в создаваемом вами swc-файле. К примеру, если у меня в библиотеке есть только один компонент с именем "TestButton", файл manifest.xml будет следующим: <?xml version=”1.0″ encoding=”UTF-8″ ?>
<componentPackage>
<component class=”com.test.components.TestButton” id=”TestButton” />
</componentPackage>
Ещё одна вещь, о которой следует сказать, это тег <mxmlProperties> в файле design.xml. Он нужен для того, чтобы в панели Flex Builder Standard Properties view отображались особенные свойства. К примеру: <mxmlProperties>
<textfield id=”title” name=”Title:” />
<combo id=”showTitleBar” name=”Title Bar:”/>
</mxmlProperties>
Эта строка задаст начальное значение "false" для комбо-бокса с надписью "Title Bar:". На данный момент более подробной информации найти не получилось, будем надеяться что компания "Adobe" в скором времени осветит эти вопросы более подробно.
__________________
lida -- dyra (c) lida |
![]() |
![]() |
Часовой пояс GMT +4, время: 02:33. |
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | |
| Опции просмотра | |
|
|