Re: XForms: How to determine group membership?

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 3 Jun 97 10:38:47 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I wonder if there is a way to determine if a given object is
> a member of a particular group. ...

Other than searching the group, I don't think so.

You could write your own function:

boolean fl_is_group_member(FL_OBJECT *group, FL_OBJECT *obj)

{

boolean in_group = False;

if ( group->objclass == FL_BEGIN_GROUP ) {

FL_OBJECT *test_obj = group;

while ( ( test_obj = test_obj->next )->objclass != FL_END_GROUP )
if ( in_group = obj == test_obj )
break;

}

return in_group;

}

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/