Requester with (scrolling) list to chose from

AmigaOS users can make feature requests in this forum.

Requester with (scrolling) list to chose from

Postby JosDuchIt » Wed Dec 10, 2014 11:43 am

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)
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Requester with (scrolling) list to chose from

Postby thomasrapp » Thu Dec 11, 2014 3:12 pm

See attachment.
Attachments
RequestList.lha
(5.26 KiB) Downloaded 162 times
User avatar
thomasrapp
 
Posts: 256
Joined: Sun Jun 19, 2011 12:22 am

Re: Requester with (scrolling) list to chose from

Postby JosDuchIt » Fri Dec 12, 2014 2:39 pm

@thomasrapp

splendid!

Thanks so much
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Requester with (scrolling) list to chose from

Postby JosDuchIt » Sun Dec 14, 2014 5:13 pm

@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.
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Requester with (scrolling) list to chose from

Postby LyleHaze » Sun Dec 14, 2014 5:47 pm

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,
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 511
Joined: Sat Jun 18, 2011 5:06 pm
Location: Georgia, USA, just North of the Florida border

Re: Requester with (scrolling) list to chose from

Postby JosDuchIt » Sun Dec 14, 2014 8:45 pm

@Lylehaze

thanks
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Requester with (scrolling) list to chose from

Postby LyleHaze » Sun Dec 14, 2014 11:48 pm

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. :)
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 511
Joined: Sat Jun 18, 2011 5:06 pm
Location: Georgia, USA, just North of the Florida border

Re: Requester with (scrolling) list to chose from

Postby JosDuchIt » Thu Dec 18, 2014 12:54 pm

@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
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Requester with (scrolling) list to chose from

Postby Belxjander » Thu Dec 18, 2014 5:30 pm

@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
Belxjander
 
Posts: 276
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan

Re: Requester with (scrolling) list to chose from

Postby JosDuchIt » Mon Mar 09, 2015 9:12 pm

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
Image
(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?
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm


Return to AmigaOS Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest