On 12 Oct 2006, Artur r-tea wrote:

> Hi, All
> 
> Do anyone of you have an experianece with reading multiselected items of
> Dirlist object?
> I can't find any example regarding this. All I've found concern only
> regular List or NList.

DirList is subclass of List class.

> I've tried to apply one of them to Dirlist:
> 
> /////////////////
> long pos;
> 
> for(pos = MUIV_List_NextSelected_Start; pos != MUIV_List_NextSelected_End;
> DoMethod(mydirlist, MUIM_List_NextSelected, &pos) )
> {
> /* 'pos' variable shoud contain the number of another item. here I process
> it. */
> }
> //////////////////
> 
> but this loop execute only ones (regardless of number of selected items in
> Dirlist) and then "pos" variable is set to -1.
> On the other hand if I try to obtain the number of selected entries (via
> MUIM_List_Selected method) it work superb.

Try something like this:

        pos = MUIV_List_NextSelected_Start;
        DoMethod(data->list, MUIM_List_NextSelected, &pos);
        while (pos != MUIV_List_NextSelected_End)
        {
                DoMethod(data->list, MUIM_List_GetEntry, pos, (ULONG 
*)&selentry);

                /* process entry here */

                DoMethod(data->list, MUIM_List_NextSelected, &pos);
        }


  Ilkka



Visit http://www.amiga.dk/tumult for MUI-related
information, especially about MUI custom classes. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MUI/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/MUI/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to