Hello,
I need to open a dialog from a string that is comming from a database. The
only tink that is stored in the database is the name of the widget…my
problem is how to know the value of the ABM_Window1 variable in runtime.
A simple example would be an input text where the user writes Window1 and a
button with a callback that would call the ApCreateModule(ABM_Window1)
My first solution is to create an array with the strings and the ABM_
variables but this is not very automatic to program since I have to maintain
this array for every new Window I create.
Thanks
David
I do prefer your way of doing things, because I think it will catch some
errors if you have windows removed or renamed, but you can try this way too:
- Create just one empty dialog (window), let’s say ABM_dialog.
- Create a picture module, that will contain all of your dialogs.
- In the picture module – create all your widgets – please make sure that
all of them have a PtContainer or PtPane in the root. Let’s say you create a
PtPane with a warning message in it – Warning_PIC, and another one with an
error in it – Error_PIC.
- By using ApOpenDBase*() open your picture module.
- When time comes, open your ABM_dialog – in the setup function create the
required contents based on the name you need, use the
ApCreateDBWidgetFamily(). You will have to pass ‘Warning_PIC’ or
‘Error_PIC’.
Regards,
-Misha.
“David Porta” <DavidPorta@NoSpam.es> wrote in message
news:eergj0$gb3$1@inn.qnx.com…
Hello,
I need to open a dialog from a string that is comming from a database. The
only tink that is stored in the database is the name of the widget…my
problem is how to know the value of the ABM_Window1 variable in runtime.
A simple example would be an input text where the user writes Window1 and
a button with a callback that would call the ApCreateModule(ABM_Window1)
My first solution is to create an array with the strings and the ABM_
variables but this is not very automatic to program since I have to
maintain this array for every new Window I create.
Thanks
David