Welcome, Guest. Please login or register.

Author Topic: file requestor? file list?  (Read 2740 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show only replies by yakumo9275
    • http://mega-tokyo.com/blog
file requestor? file list?
« on: February 08, 2012, 04:59:18 PM »
I need to add a fille requestor to my app, and I'm going through the intuition manual, it glosses over requestors, googling amiga file requestor does not bring up much at all.

is there an easy way to pop up a box that gives basic file open/request info? I see the same stock type things in any amiga app that does a menu file open type action.

maybe I am not looking in the correct places.

maybe a requestor is not what I want....
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline Leffmann

  • Full Member
  • ***
  • Join Date: Feb 2011
  • Posts: 119
    • Show only replies by Leffmann
Re: file requestor? file list?
« Reply #1 on: February 08, 2012, 05:16:07 PM »
No handy features in either Kick 1 or WB 1, you have to build the whole requester yourself, but in Kick 2 you have the gadtools.library to make that task easier, and as part of WB 2 you have asl.library which can open a complete file requester for you.

There's also the good old reqtools.library on Aminet which can open requesters for you, and should work fine on all Amigas IIRC.
 

Offline Thomas

Re: file requestor? file list?
« Reply #2 on: February 08, 2012, 06:28:47 PM »
arp.library offers a file requester for kick 1.x along with a lot of other useful functions.

Offline eb15

  • Jr. Member
  • **
  • Join Date: Feb 2010
  • Posts: 61
    • Show only replies by eb15
Re: file requestor? file list?
« Reply #3 on: February 08, 2012, 06:47:28 PM »
asl file requesters are standard part of AmigaOS 2.x and above.  Before that people used reqtools or otherwise rolled their own file requesters.
 

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show only replies by yakumo9275
    • http://mega-tokyo.com/blog
Re: file requestor? file list?
« Reply #4 on: February 09, 2012, 02:26:57 AM »
I'll be using wb3.1. I'm testing with uae with kick2 on a 'a2000' esque bare bones wb3.1 and an a1200 kick3 wb3.1 style with supped up install.

might have to see if I can find some public domain code or something that close to what I  need... time to dig into fred fish disks...
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline Leffmann

  • Full Member
  • ***
  • Join Date: Feb 2011
  • Posts: 119
    • Show only replies by Leffmann
Re: file requestor? file list?
« Reply #5 on: February 09, 2012, 01:43:28 PM »
Here's a very basic example for ASL, you can find all the details in the RKRM Libraries 3rd edition:

Code: [Select]

#include <stdio.h>
#include <libraries/asl.h>
#include <proto/exec.h>
#include <proto/asl.h>

struct Library* AslBase;

int main()
{
  AslBase = OldOpenLibrary(&quot;asl.library&quot;);

  if(AslBase != NULL)
  {
    struct FileRequester* req = AllocAslRequest(ASL_FileRequest, NULL);

    if(req != NULL)
    {
      AslRequest(req, NULL);
      printf(&quot;%s/%s\n&quot;, req->fr_Drawer, req->fr_File);
      FreeAslRequest(req);
    }

    CloseLibrary(AslBase);
  }

  return 0;
}
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: file requestor? file list?
« Reply #6 on: February 09, 2012, 02:44:45 PM »
Quote from: Leffmann;679956
Here's a very basic example for ASL, you can find all the details in the RKRM Libraries 3rd edition:

Code: [Select]

  AslBase = OldOpenLibrary(&quot;asl.library&quot;);

I know this is irrelevant for this requester usage, but OldOpenLibrary has been obsolete for some time now, and even fails with the latest OS versions. You should use OpenLibrary("asl.library", 0) instead.
 

Offline bbond007

  • Hero Member
  • *****
  • Join Date: Mar 2009
  • Posts: 1517
    • Show only replies by bbond007
Re: file requestor? file list?
« Reply #7 on: February 27, 2012, 11:57:57 PM »
Quote from: yakumo9275;679837
I need to add a fille requestor to my app, and I'm going through the intuition manual, it glosses over requestors, googling amiga file requestor does not bring up much at all.

is there an easy way to pop up a box that gives basic file open/request info? I see the same stock type things in any amiga app that does a menu file open type action.

maybe I am not looking in the correct places.

maybe a requestor is not what I want....


I don't know if this is something you are still looking for or not, but I ran across this example and for a file window and I used it in an application I'm working on. It works perfectly for my app. I'm trying to keep it simple and small for my Minimig 1.1 and my application runs in LORES.... so you may hate the requester and making it "pretty" it may be more trouble than its worth...

I added a BOOL option to disable the SAVE/DELETE option and to accomplish that I just altered the NextGadget property of the LOAD gadget. Very simple.

http://aminet.net/package/dev/c/ACM