Skip navigation.
Home
The QNX Community Portal

View topic - ApCreateModule Question

ApCreateModule Question

Isn't the name clear?

ApCreateModule Question

Postby kenrus » Wed Apr 27, 2011 6:17 pm

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
kenrus
New Member
 
Posts: 9
Joined: Wed Apr 27, 2011 5:38 pm

RE: ApCreateModule Question

Postby kenrus » Wed Apr 27, 2011 7:37 pm

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!
kenrus
New Member
 
Posts: 9
Joined: Wed Apr 27, 2011 5:38 pm

RE: ApCreateModule Question

Postby kenrus » Thu Apr 28, 2011 6:49 pm

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.
kenrus
New Member
 
Posts: 9
Joined: Wed Apr 27, 2011 5:38 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests