GSList Class

The GSList class is the class for instantiating singly linked lists. Theses list are used to support the creation of radio button groups.

This class subclasses the Object REXX Object class so all of its methods are also available to this class.

You should not use this class to create your own linked lists. It should only be used when creating a set radio buttons.

The class heirarchy


   Object
      +---GSList

The methods for the GSList class are documented below.

GSList Method Table of Contents

new - Create and initialize the widget
append - Append an object to the end of the list
head - Get the head of the list
head = - Set the head of the list
insert - Insert a new object in the list
prepend - Prepend an object to the beginning of the list


Method: new

This method creates and initializes the list.

Example

This is a example of how to create a new list.


myslist = .GSList~new()

Method Parameters

None.

Method Results

The new GSList object.




Method: append

This method appends an object to the end of the list.

Example

This is a example of how to append an object to the end of the list.


myslist~append(myobject)

Method Parameters

myobject
The widget object to be appended.

Method Results

None.




Method: head

This method retrieve the head of the list.

Example

This is a example of how to retrieve the head of the list.


head = myslist~head()

Method Parameters

None.

Method Results

The list head pointer.




Method: head =

This method sets the head of the list.

Example

This is a example of how to set the head of the list.


myslist~head = myobject

Method Parameters

myobject
The widget object to be set as the list head.

Method Results

None.




Method: insert

This method inserts an object into the the list.

Example

This is a example of how to insert an object into the list.


position = 2
myslist~append(myobject, position)

Method Parameters

myobject
The widget object to be inserted.
position
The position in the list for the object.

Method Results

None.




Method: prepend

This method prepends an object to the beginning of the list.

Example

This is a example of how to prepend an object to the beginning of the list.


myslist~prepend(myobject)

Method Parameters

myobject
The widget object to be prepended.

Method Results

None.




Valid XHTML 1.0!