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)
Requester with (scrolling) list to chose from
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: Requester with (scrolling) list to chose from
See attachment.
- Attachments
-
- RequestList.lha
- (5.26 KiB) Downloaded 455 times
Re: Requester with (scrolling) list to chose from
@thomasrapp
splendid!
Thanks so much
splendid!
Thanks so much
Re: Requester with (scrolling) list to chose from
@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.
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.
- LyleHaze
- AmigaOS Core Developer
- Posts: 525
- Joined: Sat Jun 18, 2011 4:06 pm
- Location: North Florida, near the Big Bend
Re: Requester with (scrolling) list to chose from
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,
#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
@Lylehaze
thanks
thanks
- LyleHaze
- AmigaOS Core Developer
- Posts: 525
- Joined: Sat Jun 18, 2011 4:06 pm
- Location: North Florida, near the Big Bend
Re: Requester with (scrolling) list to chose from
Happy to help.JosDuchIt wrote:@Lylehaze
thanks
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
@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
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
-
- Posts: 314
- Joined: Mon May 14, 2012 10:26 pm
- Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
- Contact:
Re: Requester with (scrolling) list to chose from
@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
never relied on it myself... too many things to go wrong with possible pebkac after distribution
Re: Requester with (scrolling) list to chose from
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:
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:
Reply:By the way, does OS4 contain a preferences panel where the user can
deactivate window BackFill -- or set a general one?
Having done the tests he asked for he repliedOnly thing i see is the GUI preferences
i don't see any deactivation button
The tabs Controls, Effects Options??
Comments or suggestions?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. :-{