From: | Sensei |
Date: | 30 Aug 2001 at 21:03:11 |
Subject: | [amiga-c] Re: MUI Listview position |
Czesc Donald!
Dnia 29-Aug-01, Donald W Millican napisa�:
> char *item;
> int choices_setting = 0;
>
> get(list,MUIA_List_Active,&item);
> choices_setting = atoi(*item); // I'm not sure about this line
>
> Can anyone help?
MUIA_List_Active return the number of active entry, not the pointer to item!
If you used MUIA_List_ConstructHook, MUIV_List_ConstructHook_String in
MUI_NewObjectA(), to obtain string with active entry you can write f.e.:
ULONG entry = xget( list, MUIA_List_Active );
STRPTR string = NULL;
DoMethod( list, MUIM_List_GetEntry, entry, &string );
or (simpler and faster):
DoMethod( list, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, &string );
Regards!
Przemyslaw 'SENSEI' Gruchala
code/gfx2d/gfx3d/webmaster
Amiga 1200
Apollo 1240/33 MHz, 18 MB RAM, BTC 33.6 bps
HDD 3.2 GB, HDD 520 MB, CD x12
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Speak up and rate leading IT and computer Web sites
Get a $10 AMAZON.COM Gift Certificate
http://us.click.yahoo.com/bCMp8B/Fd6CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/