Page 1 of 1
Requester with (scrolling) list to chose from
Posted: Wed Dec 10, 2014 10:43 am
by JosDuchIt
Often i want to be able to chose between a large list of alternatives (filepaths, options) , Requestchoice rapidly becomes an ugly looking thing.
Here is how it can be done now:
- Creating small files in some directory with the given alternatives as name
- (multi)select the alternatives with a filerequester
The small files may contain additional info . eg as in Appdir: the filepaths for files (not only tools) identified by their name only
Of course the unneeded gadgets (Parent, Volume, Textin for path & file) may confuse the user, and generate errors
It would be much nicer to have a generic CLI command" (and easy programming of such a requester)
>RequestFromList listtobeshown Title choicebuttons"
with possibility to multiselect in the listview and have some alternative actions to propose (eg view, edit, delete)
Re: Requester with (scrolling) list to chose from
Posted: Thu Dec 11, 2014 2:12 pm
by thomasrapp
See attachment.
Re: Requester with (scrolling) list to chose from
Posted: Fri Dec 12, 2014 1:39 pm
by JosDuchIt
@thomasrapp
splendid!
Thanks so much
Re: Requester with (scrolling) list to chose from
Posted: Sun Dec 14, 2014 4:13 pm
by JosDuchIt
@ThomasRapp
Trying to make some variations in the code of RequestList?c
What gcc options should i use to compile ?
gcc RequestList.c -lauto -N -o ram:RequestList still shows a lot of warnings & undefined references.
Re: Requester with (scrolling) list to chose from
Posted: Sun Dec 14, 2014 4:47 pm
by LyleHaze
You might add
#define __USE_INLINE__
At the beginning of System Includes.
Then add "Intuition" to the
BASEDEF, OPENLIB, and CLOSELIB groups, or use libauto
AllocVec() needs to be updated to AllocVecTags()
// if (list = AllocVec (sizeof(struct List), MEMF_CLEAR))
if ((list = AllocVecTags (sizeof(struct List), AVT_ClearWithValue, 0, TAG_END)))
Most of the rest are just warnings about using double paren around evaluating assignments,
Re: Requester with (scrolling) list to chose from
Posted: Sun Dec 14, 2014 7:45 pm
by JosDuchIt
@Lylehaze
thanks
Re: Requester with (scrolling) list to chose from
Posted: Sun Dec 14, 2014 10:48 pm
by LyleHaze
JosDuchIt wrote:@Lylehaze
thanks
Happy to help.
When it comes to compiler errors I have WAY too much experience, and that's not a particularly good thing.
Here's a cute trick that will get you no respect at all.. I do NOT use this in my normal projects, but it
can be really handy when you put all the code into one ?#?.c file, for an example like this one..
;/* RequestList.c - Execute me to compile me with GCC
gcc RequestList.c -lauto -N -o ram:RequestList
quit ;
*/
Normal projects are much better off with a real makefile, which gives more control over errors, warnings, optimization, a debug executable etc..
But if you paste this at the VERY TOP of RequestList.c, then you can compile it without a makefile, just by typing
execute RequestList.c
into a shell.
Back to learning about programming errors for me.

Re: Requester with (scrolling) list to chose from
Posted: Thu Dec 18, 2014 11:54 am
by JosDuchIt
@Lylehaze, that's a cool trick
I have been studying Reaction to enhance the code provided by Thomas.
I want to add some buttons such as Select ALL select NONe (which i think are easier) and INVERSE selection.
I was expecting the latter could be handled in the same way, so this is maybe a new "Feature request"
The way i figured out to do it with present ListBrowser possibilities (inspired by SDK's Listbrowserexample.c)
is to create a numbered list (string column and linenumbercolumn.)
I add corresponding arrays that are directly accessible mapping the list which are created in the make_listbrowserlist function
edit: Found out where the freeze came from & am progressing.
Edit2:
Salass00 gave me the simple solution i looked for in the OS4 coding site.. No need for a new feature request i guess
Re: Requester with (scrolling) list to chose from
Posted: Thu Dec 18, 2014 4:30 pm
by Belxjander
@LyleHaze: I recall the same trick in the Lattice (later SAS) C compiler and C= examples for Kickstart 2 and later...
never relied on it myself... too many things to go wrong with possible pebkac after distribution
Re: Requester with (scrolling) list to chose from
Posted: Mon Mar 09, 2015 8:12 pm
by JosDuchIt
I uploaded ReqList archive here
http://users.online.be/AD/ReqList.lha
Thanks for all help.
Joerg van de Loo , not me, did most of the work to finish it in its present state,.
He showed me a much more colored view than the one the ReqList.aos68k or ReqList.aosppc do provide

(in my gcc AOS4 compile the background even is not coloured (standard grey)
i guess he tried to achieve the same under aos4
He did run into trouble but tried to solve it using
http://users.online.be/AD/Gradient.lha
He asked me:
By the way, does OS4 contain a preferences panel where the user can
deactivate window BackFill -- or set a general one?
Reply:
Only thing i see is the GUI preferences
i don't see any deactivation button
The tabs Controls, Effects Options??
Having done the tests he asked for he replied
As the BackFill hook is in both versions established, I think that the
issue is related to the OS4 GUI preferences. Under m68k it works, under
PPC it is ignored.
I am off here. :-{
Comments or suggestions?