PtList Help

I’m quite new to Photon.

I want to create a list of data that shows changing values. I’ve managed to
populate the list, but all my efforts to get it to update without removing
and redrawing the list have failed.

What am I not doing?

Can you be more specific? What function/resource did you use to update the
list? Where do you update the list (in a callback?)
Markus

“Simon Platten” <simon.platten@brisco-eng.co.uk> wrote in message
news:9ede5k$s28$1@inn.qnx.com

I’m quite new to Photon.

I want to create a list of data that shows changing values. I’ve managed
to
populate the list, but all my efforts to get it to update without removing
and redrawing the list have failed.

What am I not doing?

I have a thread which receives messages containing the actual data from
another process. The same thread also updates the PtList widget:

int dFlags = PtEnter(Pt_EVENT_PROCESS_PREVENT);
PtListReplaceItemPos(pWidget, (const char**)pszListData, 3, 0);
PtLeave(dFlags);

I’ve updated other widgets from within this thread and they update fine.

“Markus Loffler” <loffler@ces.clemson.edu> wrote in message
news:9edrob$74s$1@inn.qnx.com

Can you be more specific? What function/resource did you use to update the
list? Where do you update the list (in a callback?)
Markus

“Simon Platten” <> simon.platten@brisco-eng.co.uk> > wrote in message
news:9ede5k$s28$> 1@inn.qnx.com> …
I’m quite new to Photon.

I want to create a list of data that shows changing values. I’ve
managed
to
populate the list, but all my efforts to get it to update without
removing
and redrawing the list have failed.

What am I not doing?
\

I think position numbering starts at 1. You replace the item at position
zero which might cause an error.
Markus


“Simon Platten” <simon.platten@brisco-eng.co.uk> wrote in message
news:9edv6a$99r$1@inn.qnx.com

I have a thread which receives messages containing the actual data from
another process. The same thread also updates the PtList widget:

int dFlags = PtEnter(Pt_EVENT_PROCESS_PREVENT);
PtListReplaceItemPos(pWidget, (const char**)pszListData, 3, 0);
PtLeave(dFlags);

I’ve updated other widgets from within this thread and they update fine.

“Markus Loffler” <> loffler@ces.clemson.edu> > wrote in message
news:9edrob$74s$> 1@inn.qnx.com> …
Can you be more specific? What function/resource did you use to update
the
list? Where do you update the list (in a callback?)
Markus

“Simon Platten” <> simon.platten@brisco-eng.co.uk> > wrote in message
news:9ede5k$s28$> 1@inn.qnx.com> …
I’m quite new to Photon.

I want to create a list of data that shows changing values. I’ve
managed
to
populate the list, but all my efforts to get it to update without
removing
and redrawing the list have failed.

What am I not doing?


\

Thank you very much, this was the final 1% of the project. Your were spot
on, changing the position to base 1 fixed the problem!

If only the help was a little more helpful. Generally I’ve found the help
quite useful, however it lacks continuity, some functions have detailed help
and examples others have virtual no help at all. In this case the help for
PtListReplaceItemPos() states nothing about the parameters other than a
prototype.

I spent quite a long time looking for instances of this on the net and
newsgroups, thanks again !

“Markus Loffler” <loffler@ces.clemson.edu> wrote in message
news:9ee73m$dso$1@inn.qnx.com

I think position numbering starts at 1. You replace the item at position
zero which might cause an error.
Markus


“Simon Platten” <> simon.platten@brisco-eng.co.uk> > wrote in message
news:9edv6a$99r$> 1@inn.qnx.com> …
I have a thread which receives messages containing the actual data from
another process. The same thread also updates the PtList widget:

int dFlags = PtEnter(Pt_EVENT_PROCESS_PREVENT);
PtListReplaceItemPos(pWidget, (const char**)pszListData, 3, 0);
PtLeave(dFlags);

I’ve updated other widgets from within this thread and they update fine.

“Markus Loffler” <> loffler@ces.clemson.edu> > wrote in message
news:9edrob$74s$> 1@inn.qnx.com> …
Can you be more specific? What function/resource did you use to update
the
list? Where do you update the list (in a callback?)
Markus

“Simon Platten” <> simon.platten@brisco-eng.co.uk> > wrote in message
news:9ede5k$s28$> 1@inn.qnx.com> …
I’m quite new to Photon.

I want to create a list of data that shows changing values. I’ve
managed
to
populate the list, but all my efforts to get it to update without
removing
and redrawing the list have failed.

What am I not doing?




\

Simon Platten <simon.platten@brisco-eng.co.uk> wrote:
: Thank you very much, this was the final 1% of the project. Your were spot
: on, changing the position to base 1 fixed the problem!

: If only the help was a little more helpful. Generally I’ve found the help
: quite useful, however it lacks continuity, some functions have detailed help
: and examples others have virtual no help at all. In this case the help for
: PtListReplaceItemPos() states nothing about the parameters other than a
: prototype.

: I spent quite a long time looking for instances of this on the net and
: newsgroups, thanks again !

I’ll fix up the docs. Thanks for the feedback.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems