Programming Guide


Sends data to a bundle item

int sm_append_bundle_data(char *bundle_name, int item_no, char *data);

The name of the bundle to get data. Supply NULL or an empty string to specify the unnamed bundle.

The bundle offset of the item to get data. You add data items to a bundle through successive calls to sm_append_bundle_item; each data item is identified by its offset in the bundle, where the first data item has an offset value of 1. If item_no already contains data, Panther appends data as the item's latest occurrence.

A single occurrence of data to append to item_no.



sm_append_bundle_data sends a single occurrence of data to the specified data item in bundle_name. A bundle contains sequentially numbered data items, where each data item can hold one or more occurrences of send data for later access by sm_get_bundle_data. If the source data contains multiple occurrences, Panther ends each occurrence with a null string terminator.

This function assumes the existence of the specified bundle and item. Before calling this function, create the target bundle and its items with calls to sm_create_bundle and sm_append_bundle_item, respectively.


/* Iterate over all fields on current screen and
* send data to bundle
void sendScreenDataToBundle(int numFields)
int ret, i, item;
ret = sm_create_bundle("myBundle");
if (ret == 0)
item = sm_bundle_item_count("myBundle");
for (i = 1; i <= numFields; i++)
item, sm_i_fptr("mySend", i));
return 0;

See Also