I want to use a PtTimer without any widget displayed on the screen. However,
I can’t set the parent to NO_PARENT, it crashes. How do I do it? Can I
create a window that is not visible?
Markus
If you want to create a widget without a parent, use first the function
PtSetParentWidget with NULL and
call the PtCreateWidget with a parent of NULL. I also try the NO_PARENT
stuff and
it did not work.
You can create a window that is not visible.
- offset (-32767, -32767)
- playing with flags
Markus Loffler <loffler@ces.clemson.edu> schrieb in im Newsbeitrag:
9bj6hi$cot$1@inn.qnx.com…
I want to use a PtTimer without any widget displayed on the screen.
However,
I can’t set the parent to NO_PARENT, it crashes. How do I do it? Can I
create a window that is not visible?
Markus
“Sascha Morgenstern” <sascha@bitctrl.de> wrote in message
news:9bjb5u$fcq$1@inn.qnx.com…
If you want to create a widget without a parent, use first the function
PtSetParentWidget with NULL and
call the PtCreateWidget with a parent of NULL.
Thanks… can you explain the reasoning behind this?
It doesn’t seem very intuitve. According to the docs PtSetParentWidget(0) +
PtCreateWidget(Pt_DEFAULT_PARENT) should be the same as
PtCreateWidget(NO_PARENT)
Markus
This was the way how did work before Photon2.0.
If you pass PtCreateWidget a parent of NULL, the function would use
the last know parent which depends on the type what you create … .
At this point you are not be able to get parent of NULL. This is
the reason to set before you create the Widget the parent to NULL.
–
Bye Sascha( sascha@bitctrl.de )
Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: sascha@bitctrl.de
WWW: http://www.bitctrl.de
Markus Loffler <loffler@ces.clemson.edu> schrieb in im Newsbeitrag:
9bke93$8ik$1@inn.qnx.com…
“Sascha Morgenstern” <> sascha@bitctrl.de> > wrote in message
news:9bjb5u$fcq$> 1@inn.qnx.com> …
If you want to create a widget without a parent, use first the function
PtSetParentWidget with NULL and
call the PtCreateWidget with a parent of NULL.Thanks… can you explain the reasoning behind this?
It doesn’t seem very intuitve. According to the docs PtSetParentWidget(0)
+
PtCreateWidget(Pt_DEFAULT_PARENT) should be the same as
PtCreateWidget(NO_PARENT)
Markus
Yes, but I’m not suggesting passing a parent of NULL, I’m suggesting passing
Pt_NO_PARENT, which is defined as “(PtWidget_t *) 1”.
According to docs, this should be the same as PtSetParentWidget(0) and
PtCreateWidget(Pt_DEFAULT_PARENT), with Pt_DEFAULT_PARENT defined as
“(PTWidget_t *) 0”
Markus
“Sascha Morgenstern” <sascha@bitctrl.de> wrote in message
news:9bm2kp$anp$1@inn.qnx.com…
This was the way how did work before Photon2.0.
If you pass PtCreateWidget a parent of NULL, the function would use
the last know parent which depends on the type what you create … .
At this point you are not be able to get parent of NULL. This is
the reason to set before you create the Widget the parent to NULL.–
Bye Sascha( > sascha@bitctrl.de > )Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: > sascha@bitctrl.de
WWW: > http://www.bitctrl.de
Markus Loffler <> loffler@ces.clemson.edu> > schrieb in im Newsbeitrag:
9bke93$8ik$> 1@inn.qnx.com> …
“Sascha Morgenstern” <> sascha@bitctrl.de> > wrote in message
news:9bjb5u$fcq$> 1@inn.qnx.com> …
If you want to create a widget without a parent, use first the
function
PtSetParentWidget with NULL and
call the PtCreateWidget with a parent of NULL.Thanks… can you explain the reasoning behind this?
It doesn’t seem very intuitve. According to the docs
PtSetParentWidget(0)
+
PtCreateWidget(Pt_DEFAULT_PARENT) should be the same as
PtCreateWidget(NO_PARENT)
Markus
\
The docs are saying it, but I tried it at home and it crash inside
PtCreateWidget.
After changing the parent to NULL and call PtSetParent before it worked
fine.
This is the reason why I point you to this. Just to do it there put in the
trick
with Pt_NO_PARENT.
Does your stuff work now?
–
Bye Sascha( sascha@bitctrl.de )
Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: sascha@bitctrl.de
WWW: http://www.bitctrl.de
“Markus Loffler” <loffler@ces.clemson.edu> schrieb im Newsbeitrag
news:9bn38j$295$1@inn.qnx.com…
Yes, but I’m not suggesting passing a parent of NULL, I’m suggesting
passing
Pt_NO_PARENT, which is defined as “(PtWidget_t *) 1”.
According to docs, this should be the same as PtSetParentWidget(0) and
PtCreateWidget(Pt_DEFAULT_PARENT), with Pt_DEFAULT_PARENT defined as
“(PTWidget_t *) 0”
Markus
“Sascha Morgenstern” <> sascha@bitctrl.de> > wrote in message
news:9bm2kp$anp$> 1@inn.qnx.com> …
This was the way how did work before Photon2.0.If you pass PtCreateWidget a parent of NULL, the function would use
the last know parent which depends on the type what you create … .
At this point you are not be able to get parent of NULL. This is
the reason to set before you create the Widget the parent to NULL.–
Bye Sascha( > sascha@bitctrl.de > )Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: > sascha@bitctrl.de
WWW: > http://www.bitctrl.de
Markus Loffler <> loffler@ces.clemson.edu> > schrieb in im Newsbeitrag:
9bke93$8ik$> 1@inn.qnx.com> …
“Sascha Morgenstern” <> sascha@bitctrl.de> > wrote in message
news:9bjb5u$fcq$> 1@inn.qnx.com> …
If you want to create a widget without a parent, use first the
function
PtSetParentWidget with NULL and
call the PtCreateWidget with a parent of NULL.Thanks… can you explain the reasoning behind this?
It doesn’t seem very intuitve. According to the docs
PtSetParentWidget(0)
+
PtCreateWidget(Pt_DEFAULT_PARENT) should be the same as
PtCreateWidget(NO_PARENT)
Markus
\
Markus Loffler <loffler@ces.clemson.edu> wrote:
Yes, but I’m not suggesting passing a parent of NULL, I’m suggesting passing
Pt_NO_PARENT, which is defined as “(PtWidget_t *) 1”.
According to docs, this should be the same as PtSetParentWidget(0) and
PtCreateWidget(Pt_DEFAULT_PARENT), with Pt_DEFAULT_PARENT defined as
“(PTWidget_t *) 0”
Only disjoint widgets can be created without a parent.
\
Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.
So why does it work for Sascha? (I haven’t got time to try it out, sorry!)
Wojtek, could you give a list of disjoint widgets? Are those only windows?
Thanks
Markus
“Wojtek Lerch” <wojtek@qnx.com> wrote in message
news:9c1ds4$ggj$1@nntp.qnx.com…
Markus Loffler <> loffler@ces.clemson.edu> > wrote:
Yes, but I’m not suggesting passing a parent of NULL, I’m suggesting
passing
Pt_NO_PARENT, which is defined as “(PtWidget_t *) 1”.
According to docs, this should be the same as PtSetParentWidget(0) and
PtCreateWidget(Pt_DEFAULT_PARENT), with Pt_DEFAULT_PARENT defined as
“(PTWidget_t *) 0”Only disjoint widgets can be created without a parent.
\Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.
So why is a PtTimer not a disjoint widget? It doesn’t show up, what’s the
point that it must have a parent?
Thanks
Markus
“Wojtek Lerch” <wojtek@qnx.com> wrote in message
news:9c1ds4$ggj$1@nntp.qnx.com…
Markus Loffler <> loffler@ces.clemson.edu> > wrote:
Yes, but I’m not suggesting passing a parent of NULL, I’m suggesting
passing
Pt_NO_PARENT, which is defined as “(PtWidget_t *) 1”.
According to docs, this should be the same as PtSetParentWidget(0) and
PtCreateWidget(Pt_DEFAULT_PARENT), with Pt_DEFAULT_PARENT defined as
“(PTWidget_t *) 0”Only disjoint widgets can be created without a parent.
\Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.
Markus Loffler <loffler@ces.clemson.edu> wrote:
So why does it work for Sascha? (I haven’t got time to try it out, sorry!)
I haven’t tried it, either…
But if the library lets you create a non-disjoint widget without a
parent, it’s a bug in the library. Not that it’s wise to try, anyway…
Wojtek, could you give a list of disjoint widgets? Are those only windows?
PtMenu
PtWindow
PtRegion
PtServer
and the new PtDisjoint.
\
Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.
Markus Loffler <loffler@ces.clemson.edu> wrote:
So why is a PtTimer not a disjoint widget? It doesn’t show up, what’s the
point that it must have a parent?
Because then it would have to have a region. The purpose of PtTimer is
to have a cheap method of timing. If you don’t care about using a
little bit more system resources, just use the RtTimer functions…
–
Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.
I never tried it. I am just saying the way how you can create a widget
without a parent.
Sorry.
–
Bye Sascha( sascha@bitctrl.de )
Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: sascha@bitctrl.de
WWW: http://www.bitctrl.de
“Markus Loffler” <loffler@ces.clemson.edu> schrieb im Newsbeitrag
news:9c1m85$lj4$1@inn.qnx.com…
So why does it work for Sascha? (I haven’t got time to try it out, sorry!)
Wojtek, could you give a list of disjoint widgets? Are those only windows?
Thanks
Markus
“Wojtek Lerch” <> wojtek@qnx.com> > wrote in message
news:9c1ds4$ggj$> 1@nntp.qnx.com> …
Markus Loffler <> loffler@ces.clemson.edu> > wrote:
Yes, but I’m not suggesting passing a parent of NULL, I’m suggesting
passing
Pt_NO_PARENT, which is defined as “(PtWidget_t *) 1”.
According to docs, this should be the same as PtSetParentWidget(0) and
PtCreateWidget(Pt_DEFAULT_PARENT), with Pt_DEFAULT_PARENT defined as
“(PTWidget_t *) 0”Only disjoint widgets can be created without a parent.
\Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.
Can you not put the timer in the base window and have it as the
parent?
Markus Loffler wrote:
I want to use a PtTimer without any widget displayed on the screen. However,
I can’t set the parent to NO_PARENT, it crashes. How do I do it? Can I
create a window that is not visible?
Markus