Login
Username:

Password:

Remember me



Lost Password?

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

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users





Zune Filerequester ?

Joined:
2005/11/18 22:57
Group:
Member
Posts: 438
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: 490
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: 438
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
3873
2 magorium
magorium
3492
3 nikolaos
nikolaos
3481
4 phoenixkonsole
phoenixkonsole
3336
5 deadwood
deadwood
2451
6 ncafferkey
ncafferkey
2255
7 mazze
mazze
2121
8 clusteruk
clusteruk
2051
9 Kalamatee
Kalamatee
1823
10 damocles
damocles
1777
© 2004-2014 AROS Exec