Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > Flex

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 09.06.2008, 11:40
moron вне форума Посмотреть профиль Отправить личное сообщение для moron Найти все сообщения от moron
  № 3  
Ответить с цитированием
moron
 
Аватар для moron

Регистрация: 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>
As seen in the above example, you can define various categories inside the <categories> tag and later define components within <components> tag and map these components to their appropriate categories. You would do that simply by adding an attribute called category inside the <component> tag. The <namespace> defined here would be the same as the namespace that is created when you add the component to the application (drag and drop the component in design mode and you could find the namespace created for you in source mode).

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>
The component tag defines the package name where in the class is defined.

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>
The above lines would create a textfield and a combo box displayed as Title: and Title Bar: respectively in the Standard Properties view. You can also add default values to this property simply by including

Код:
<defaultAttribute name=”showTitleBar” value=”false”/>
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.
Создать новую тему   Часовой пояс GMT +4, время: 06:05.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 06:05.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.