Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
3 user(s) are online (3 user(s) are browsing Forum)

Members: 2
Guests: 1

amiga, lubomyr33, more...

Browsing this Thread:   1 Anonymous Users





Zune Filerequester ?

Joined:
2005/11/18 22:57
Group:
Member
Posts: 439
Offline
Hello,

I am trying to open a Open File and Save File Dialog in a Aros Zune Program.

Could someone tell me what is the easiest way to do this , and how to make this ?

I only need a file requester, that returns a string with filename and path.

Posted on: 2006/4/25 3:03
Transfer the post to other applications Transfer


Re: Zune Filerequester ?

Joined:
2005/6/16 11:11
Group:
Member
Posts: 492
Offline
this should help:

struct FileRequester *req;

if ((req=MUI_AllocAslRequestTags(ASL_FileRequest,
ASLFR_Window,win ,
ASLFR_TitleText, "A requester for AmiDevCpp",
ASLFR_InitialDrawer , "T:",
ASLFR_InitialFile, "foo.txt",
ASLFR_InitialPattern , "#?.txt",
ASLFR_DoPatterns , TRUE,
ASLFR_RejectIcons , TRUE,
TAG_DONE))) {

if (MUI_AslRequestTags(req,TAG_DONE)) {
/* you can find the drawer in req->fr_Drawer
and the file in req->fr_File
*/
}
}

Posted on: 2006/4/25 3:49
Transfer the post to other applications Transfer


Re: Zune Filerequester ?

Joined:
2005/11/18 22:57
Group:
Member
Posts: 439
Offline
@o1i

That helped a lot !
Thank you.

I had to make a cast because I am using g++ and I first assumed that ASLFR_Window,win , you should be a handle to my Applications window but after Aros freezes when doing this, I finally realised that ASLFR_Window need an own Object*.

Here is the working code:


case IDB_SAVE:
//dat_aus.open("test.txt");
//MUI_Request(app, wnd, 0L, "broad hint", "_OK", "Function not implemented.", NULL);

if ((req=(FileRequester*)MUI_AllocAslRequestTags(ASL_FileRequest,
ASLFR_Window,*requester ,
ASLFR_TitleText, "A requester for AmiDevCpp",
ASLFR_InitialDrawer , "ram:",
ASLFR_InitialFile, "foo.txt",
ASLFR_InitialPattern , "#?.txt",
ASLFR_DoPatterns , TRUE,
ASLFR_RejectIcons , TRUE,
TAG_DONE)))
{

if (MUI_AslRequestTags(req,TAG_DONE))
{
/* you can find the drawer in req->fr_Drawer
and the file in req->fr_File
*/
textbuffer = req->fr_File;
}
}
break;

Posted on: 2006/4/25 4:48
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
3890
2 magorium
magorium
3709
3 nikolaos
nikolaos
3501
4 phoenixkonsole
phoenixkonsole
3430
5 deadwood
deadwood
2514
6 ncafferkey
ncafferkey
2324
7 mazze
mazze
2133
8 clusteruk
clusteruk
2052
9 Kalamatee
Kalamatee
1838
10 damocles
damocles
1778
© 2004-2014 AROS Exec