“Steve Reid” <stever@qnx.com> wrote in message
news:9323p9$lsa$1@nntp.qnx.com…
Marc Lupien <> marclupien@hotmail.com> > wrote:
: I have a function in library that was based on the source
: /qnx4/phtk/src/examples/PtAskQuestion.c (photon 1.13 and earlier I
think).
: I recently upgraded my development computer to Photon 1.14 and I get a
: compile error saying that there’s no prototype for PtBuildWidget().
: I also noticed that /qnx4/phtk/src/examples/PtAskQuestion.c is no longer
: supplied with photon 1.14.
: Can someone please tell me which direction to go in upgrading my
function ?
: what is the official way now that PtAskQuestion seems to be something
from
: the past ?
PtAskQuestion() has been in the Photon libraries since the beginning (as
far
as I can tell), so you don’t really need the C code for it at all. I’d
suggest you try to compile and link your application without
PtAskQuestion.c.
As someone else mentioned, PtAskQuestion() has been deprecated in Photon
2.0,
but is still in the libraries.
Ok, my mistake, I misled you (and myself ). I had a macro that
transformed calls to PtAskQuestion into calls to PuAskQuestion (notice the
Pu which stands for my Photon User library of functions). PuAskQuestion is
something I made based on the old PtAskQuestion source that used to be
supplied with Photon 1.13 and earlier. So I was never refering to the real
PtAskQuestion … sorry again for this mistake.
PuAskQuestion on the other hand still had a compile error because it used
PtBuildWidget (which needs to be changed to PtCreateWidget) and also a
run-time error…
PuAskQuestion creates a PtMessage widget and and invokes it in a ‘modal’
way. It then waits for the user to select a button and then it tried to
PtDestroyWidget() the PtMessage widget just created and this gave me a
SIGSEGV !!!
After a while, I figured out, even though the doc doesn’t mention this
that the PtMessage widget destroys itself automatically when the user
presses one of the buttons. So I was really trying to destroy the PtMessage
widget twice…
Thanks for you help anyway and again, sorry for posting a message before
having done my own homework…
Marc.