View topic - ApCreateModule Question
ApCreateModule Question
3 posts
• Page 1 of 1
ApCreateModule Question
When I call ApCreateModule(), the window displays, but it is empty, none of the widgets display (buttons, text boxes, etc...)
The main window is "base"
The second window is "WndLogon"
I want this window to display as soon as the app starts, so I added a callback for the base window opening event (Pt_CB_WINDOW_OPENING). The callback calls:
ApCreateModule(ABM_WndLogon, widget, 0);
I have also tried
ApCreateModule(ABM_WndLogon, widget, cbinfo);
The window displays, but not the button or text box.
I am very new to QNX (1 week) and I have looked through the online help, but to no avail.
I appreciate any help.
Thanks,
Kendall
The main window is "base"
The second window is "WndLogon"
I want this window to display as soon as the app starts, so I added a callback for the base window opening event (Pt_CB_WINDOW_OPENING). The callback calls:
ApCreateModule(ABM_WndLogon, widget, 0);
I have also tried
ApCreateModule(ABM_WndLogon, widget, cbinfo);
The window displays, but not the button or text box.
I am very new to QNX (1 week) and I have looked through the online help, but to no avail.
I appreciate any help.
Thanks,
Kendall
- kenrus
- New Member
- Posts: 9
- Joined: Wed Apr 27, 2011 5:38 pm
RE: ApCreateModule Question
I have solved the problem, but I do not understand why nor what the difference is between the current, working version and the previous, non-working version.
Using PhAB...
For the non-working version, I basically followed these steps:
1. Selected "Project->Add Window..." and built the window with widgets.
2. Selected "Project->Internal Links..." and made the module link with the previously built window.
3. Called ApCreateModule() from the callback() function.
Result: Window appeared, but the widges on the window were absent.
For the current, working version I swapped steps 1 and 2, in other words:
1. Selected "Project->Internal Links..." and made the module link with a non-existent window
2. I was prompted to create the window at this point.
3. Called ApCreateModule() from the callback() function.
Result: Window appeared correctly (all widgets present)
I looked over the Resources for both windows, I looked over the *.wgtw files for both windows, but I do not see any difference at all.
Am I missing something. I would really like to know why my first attempt failed.
Thanks again!
Using PhAB...
For the non-working version, I basically followed these steps:
1. Selected "Project->Add Window..." and built the window with widgets.
2. Selected "Project->Internal Links..." and made the module link with the previously built window.
3. Called ApCreateModule() from the callback() function.
Result: Window appeared, but the widges on the window were absent.
For the current, working version I swapped steps 1 and 2, in other words:
1. Selected "Project->Internal Links..." and made the module link with a non-existent window
2. I was prompted to create the window at this point.
3. Called ApCreateModule() from the callback() function.
Result: Window appeared correctly (all widgets present)
I looked over the Resources for both windows, I looked over the *.wgtw files for both windows, but I do not see any difference at all.
Am I missing something. I would really like to know why my first attempt failed.
Thanks again!
- kenrus
- New Member
- Posts: 9
- Joined: Wed Apr 27, 2011 5:38 pm
RE: ApCreateModule Question
I think I now have an understanding of the problem.
I was attempting to call ApCreateModule() in the Pt_CB_WINDOW_OPENING callback. It seems like this was a little too early in the process so I moved the ApCreateModule() call to the Pt_CB_REALIZED callback function and everything seems to be working correctly now.
I was attempting to call ApCreateModule() in the Pt_CB_WINDOW_OPENING callback. It seems like this was a little too early in the process so I moved the ApCreateModule() call to the Pt_CB_REALIZED callback function and everything seems to be working correctly now.
- kenrus
- New Member
- Posts: 9
- Joined: Wed Apr 27, 2011 5:38 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest