Login
Username:

Password:

Remember me



Lost Password?

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

Members: 1
Guests: 17

aha, more...

Browsing this Thread:   1 Anonymous Users





Zune Filerequester ?

Joined:
2005/11/18 22:57
Group:
Member
Posts: 435
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: 458
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: 435
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
3647
2 nikolaos
nikolaos
3452
3 phoenixkonsole
phoenixkonsole
3006
4 magorium
magorium
2927
5 deadwood
deadwood
2328
6 mazze
mazze
2065
7 clusteruk
clusteruk
2050
8 ncafferkey
ncafferkey
2047
9 damocles
damocles
1769
10 Kalamatee
Kalamatee
1708
© 2004-2014 AROS Exec