MACROMEDIA FLEX-CREATING ADVANCED COMPONENTS Instrukcja Użytkownika Strona 44

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 52
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 43
12.2.2 Spreadsheet to component bindings
If you use spreadsheet to component bindings, the property value is updated when the spreadsheet
changes. Known as an output from the spreadsheet to the user (or in this case the component property).
Note:
The component property needs to have a setter function for this to work.
[Bindable]
public function set value(val:Number):void
{
...
}
1.
Bind a single value property.
For example:
proxy.bind(propertyName, null, bindingId, BindingDirection.OUTPUT,"", OutputBindings.SINGLETON);
2.
Bind an array as a 2D array.
For example:
proxy.bind(propertyName, null, bindingId, BindingDirection.OUTPUT, "", OutputBindings.ARRAY2D);
3.
Bind an array as a 1D array.
For example:
proxy.bind(propertyName, null, bindingId, BindingDirection.OUTPUT, "", OutputBindings.ARRAY);
12.2.3 Component to spreadsheet bindings
If you use component to spreadsheet bindings, the spreadsheet is updated when the component property
value changes. Known as an input from the user (or in this case the component property) to the
spreadsheet.
Note:
The component property needs to have a getter function. By default, a getter function cannot be marked
Bindable on its own. You need to specify the propertyChange event. Use the dispatchEvent
call to dispatch a propertyChange event.
[Bindable("propertyChange")]
public function get value():Number
{
...
}
/**
* Example of how to notify when the
"value" property changes.
*/
public function notifyValueChanged():void
2013-05-0644
Appendix B: Custom Property Sheet API Reference
Przeglądanie stron 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 50 51 52

Komentarze do niniejszej Instrukcji

Brak uwag