How To : Adding an Adapter

Page Status: Beta
Jump to: navigation, search

Back to Concepts and HOW TOs

Contents

[edit] Description

This document describes how to add an adapter to a class, either directly, or by binding a control.

[edit] Prerequisites

Understanding Adapters
Understanding Interfaces

[edit] Procedures

[edit] Adding an Adapter Directly to a Class

To add an adapter to your class:

  1. Right-click on the class and select Add Adapter.
  2. In the dialog box that's displayed, choose the adapter interface whose interface you want your adapter to implement by selecting the Dependencies tab, then chooseing  BungeeRuntime > ControlInterface, then selecting the desired AdapterInterface
  3. Click OK.
  4. The adapter is added to the class, selected, and displayed in the Solution Detail.

[edit] Adding an Adapter by Binding a Control

To add an adapter by binding a control to your class:

  1. In the Design Eidtor, select the control you want to bind.
  2. On the upper right of the control, click the green arrow, then click one of the Bind options, if any are available. Not all controls use adapters.
  3. When the adapter opens in the Design Editor, you can edit the adapter by assigning a value from your model to a field of the adapter, or you can add Model or View code to the adapter by clicking the M or V and then adding any Bungee Logic you need.

[edit] Deleting an Adapter

To delete an adapter from your class:

  1. Select the adapter.
  2. Click the Delete icon (red X) at the top of the Solution Detail.

[edit] Error Handling


[edit] Examples

 

[edit] Next Steps


[edit] Tags

    Copyright © 2005 - 2008 Bungee Labs. All rights reserved.