function call for menue items

hi all,
thats my problem:

i got a Menue item named ex: “File”

then i got the menue items: save file, exit

on this exit submenue i want to call a function (function name is “exitApp”) in my code.cc (cause i got all the source in one file), so i click on the exit menu item and write in the

field Callback: exitApp@code.cc

but that doesnt work =(

i think i have to create a callback first for the menu item, but i dont know how, cause it doesnt work like buttons where u do it like this

[code]void my_func()
{
PtCallback_t cb;
PtArg_t args[1];

cb.event_f = my_cb;
cb.data = NULL; // unless you want to pass data to your callback func

PtSetArg(&args[0], Pt_CB_WHATEVER_CB, &cb, 1 );
PtSetResources(your_widget, 1, args );
} [/code]
any idea how this works?

other question:
someone got a programmed “save as” code what i could use? would be great

greetz
brosis[code]

[/code]

As replied in chat, you just have to press the “done” button in PhAB to set your callback. This will destroy your parent container and terminate the application

Cheers,
Julius