Accessing a widget from a thread

I’m a novice in QNX Dev.

I use the PhAB and when I create a thread from the Window Create Event (A
thread used to read data from a socket port) I would like to display
received text in the ListBox used in my app (the Window contain the ListBox)
My Application is simple but I was believing that all vars were shared by
threads in the same process…
When I try to write the text in the list Box It crashes (but the writing
method is correct) …
Please let me know how to make accessible widgets in read/write from threads
or let me know where is my error…

(I’ve started QNX since 1 week and I’m very surprised by it’s power and
versatile purpose )
Thanks for all

CALVET JC <zefinder@yahoo.fr> wrote:
: I’m a novice in QNX Dev.

: I use the PhAB and when I create a thread from the Window Create Event (A
: thread used to read data from a socket port) I would like to display
: received text in the ListBox used in my app (the Window contain the ListBox)
: My Application is simple but I was believing that all vars were shared by
: threads in the same process…
: When I try to write the text in the list Box It crashes (but the writing
: method is correct) …
: Please let me know how to make accessible widgets in read/write from threads
: or let me know where is my error…

: (I’ve started QNX since 1 week and I’m very surprised by it’s power and
: versatile purpose )
: Thanks for all

You’ve posted in several groups – are you using QNX 4 with Photon 1.14, or
QNX 6?

If you’re using QNX 6, look for “threads” in the Keyword Index of the Photon
Programmer’s Guide.

If you’re using QNX 4 with Photon 1.14, all your Photon calls have to be
made from the same thread because the Photon 1.14 libraries aren’t
thread-safe.


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

Sorry I haven’t noticed the section about PtEnter & PtLeave methods
I will try this :astonished:)
Sorry for disturbing
(I use QNX TRP 6: I’ve made a mistake when posting my question sorry again)

Calvet JC <zefinder@yahoo.fr> wrote:
: Sorry I haven’t noticed the section about PtEnter & PtLeave methods
: I will try this :astonished:)
: Sorry for disturbing

No problem. It was a good opportunity to point out that most of our docs
have an online index. :slight_smile:


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

“Steve Reid” <stever@qnx.com> a écrit dans le message news:
a34624$2fl$1@nntp.qnx.com

Calvet JC <> zefinder@yahoo.fr> > wrote:
: Sorry I haven’t noticed the section about PtEnter & PtLeave methods
: I will try this > :astonished:> )
: Sorry for disturbing

No problem. It was a good opportunity to point out that most of our docs
have an online index. > :slight_smile:


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

Yeah that was the solution :astonished:)
Thank you
(It’s very interesting to see how fast I got a reply to my post (a really
good News Group)

JC – France