Priest of the Order of the Butterfly
Posts: 874 from 2007/4/9
From: Kingston upon ...
I'm now playing around creating a simple GUI. It's not tied into the functionality (yet), just playing around with the GUI elements initially. (Thanks to Krashan for the endless hours of hard work creating documentation in the library. scimark is an excellent example to learn from.)
I've created an MUI GUI with two child goups: 1) a text box 2) a row of 3 buttons.
I'd like to add a file requester as a 3rd child group (eventually this will pass filename as arguement, but I just want it to appear in the GUI for now).
Currently I'm trying to use:
MUIA_Group_Child, MUI_NewObject(MUIC_Group,
MUIA_Group_Child, create_aslpopup(),
TAG_END),
in the build_gui loop, with:
Object* create_aslpopup(void)
{
Object *obj;
obj = MUI_NewObject(MUIC_Popasl,
MUIA_Popasl_Active, TRUE,
MUIA_Popasl_Type, ASL_FileRequest,
ASLFR_InitialShowVolumes, TRUE,
TAG_END);
return obj;
}
as a subclass in the same source file.
(I have also included <proto/asl.h>)
As I understand from the autodocs (Scribble rules!), there should be no need to specify starthook/stophook for a filerequest.
When I add this into the code, it compiles with no errors/warnings, but the UI fails to build upon execution.
Guidance would be helpful wrt:
What am I missing? Am I misunderstanding/oversimplifying the use of Popasl class? Is there a better way to accomplish this (allowing user to select file from GUI).
Thanks for any help
Rich
www.hullchimneyservices.co.uk
UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)
Windows free since 2011!