PtMultiText line limitation

I am trying to use PtMultiText as a non-editable, scrollable display
window for announcements. The desired properties are to present all
incoming lines and when the visible limit (N) is reached, to shift
older lines “off the top” so the last N are seen and the vertical
scroll bar is available to see earlier text. (I admit being naive
about how the “system” will manage a message store of uncertain size
but I would be glad to specify a maximum number of lines.)

Although I’ve scanned the online documentation, tried a trick using
Pt_ARG_MULTITEXT_BOTTOM_LINE (etc.) and searched here, I can’t find
the magic set of resource settings to make this happen. Maybe there
is no such capability. If not, is there another widget that would
enable this?

Thanks, in advance…

Solution:
The PhAB resource “Max Length” isn’t number-of-chars-per-line (as I
incorrectly assumed). It is the value of the total number of
characters in the text widget (Pt_ARG_MAX_LENGTH) and defaults to the
maximum value of a short integer (SHRT_MAX = 32,767).

When Max Length is set to a large number, widget behavior is as I had
expected. :blush:

Unless I’m reading the docs incorrectly, the absolute maximum number
of characters in the PtMultiText widget is 32767 (the default) and
cannot be be increased (Pt_ARG_MAX_LENGTH is of type ‘short’)?

Is there a “trick” to increase the widget capacity beyond the default
32,767?

We’d really like to be able to display a very-long log of events, far
beyond 32K bytes.

Jeff


“rlb” <robert.bottemiller@fmcti-dot-com.no-spam.invalid> wrote in message
news:d84mp0$c77$1@inn.qnx.com

Solution:
The PhAB resource “Max Length” isn’t number-of-chars-per-line (as I
incorrectly assumed). It is the value of the total number of
characters in the text widget (Pt_ARG_MAX_LENGTH) and defaults to the
maximum value of a short integer (SHRT_MAX = 32,767).

When Max Length is set to a large number, widget behavior is as I had
expected. > :blush:

It is an int initialized with SHRT_MAX. You can set it to a bigger number if
you wish.
-Misha.
“Jeff Maass” <jmaass@columbus.rr.com> wrote in message
news:dgdke1$flr$1@inn.qnx.com

Unless I’m reading the docs incorrectly, the absolute maximum number
of characters in the PtMultiText widget is 32767 (the default) and
cannot be be increased (Pt_ARG_MAX_LENGTH is of type ‘short’)?

Is there a “trick” to increase the widget capacity beyond the default
32,767?

We’d really like to be able to display a very-long log of events, far
beyond 32K bytes.

Jeff


“rlb” <> robert.bottemiller@fmcti-dot-com.no-spam.invalid> > wrote in message
news:d84mp0$c77$> 1@inn.qnx.com> …
Solution:
The PhAB resource “Max Length” isn’t number-of-chars-per-line (as I
incorrectly assumed). It is the value of the total number of
characters in the text widget (Pt_ARG_MAX_LENGTH) and defaults to the
maximum value of a short integer (SHRT_MAX = 32,767).

When Max Length is set to a large number, widget behavior is as I had
expected. > :blush:

Misha:

Isn’t the maximum value of an integer (= INT_MAX) the same as the maximum
value of a short (= SHRT_MAX), that is ‘32767’?

In /usr/include/limits.h, INT_MAX is set to the value of ‘SHRT_MAX’.

How can an integer resource be set larger than the maximum value
held in an integer repreentation!

Jeff


“Misha Nefedov” <mnefedov@qnx.com> wrote in message
news:dgee28$4ml$1@inn.qnx.com

It is an int initialized with SHRT_MAX. You can set it to a bigger number
if
you wish.
-Misha.
“Jeff Maass” <> jmaass@columbus.rr.com> > wrote in message
news:dgdke1$flr$> 1@inn.qnx.com> …
Unless I’m reading the docs incorrectly, the absolute maximum number
of characters in the PtMultiText widget is 32767 (the default) and
cannot be be increased (Pt_ARG_MAX_LENGTH is of type ‘short’)?

Is there a “trick” to increase the widget capacity beyond the default
32,767?

We’d really like to be able to display a very-long log of events, far
beyond 32K bytes.

Jeff


“rlb” <> robert.bottemiller@fmcti-dot-com.no-spam.invalid> > wrote in
message
news:d84mp0$c77$> 1@inn.qnx.com> …
Solution:
The PhAB resource “Max Length” isn’t number-of-chars-per-line (as I
incorrectly assumed). It is the value of the total number of
characters in the text widget (Pt_ARG_MAX_LENGTH) and defaults to the
maximum value of a short integer (SHRT_MAX = 32,767).

When Max Length is set to a large number, widget behavior is as I had
expected. > :blush:

\

It is SHRT_MAX, if the size of an int is 16 bits. In qnx6 it is at least 32
bits.
-Misha.

“Jeff Maass” <jmaass@columbus.rr.com> wrote in message
news:dgf4mi$ke0$1@inn.qnx.com

Misha:

Isn’t the maximum value of an integer (= INT_MAX) the same as the maximum
value of a short (= SHRT_MAX), that is ‘32767’?

In /usr/include/limits.h, INT_MAX is set to the value of ‘SHRT_MAX’.

How can an integer resource be set larger than the maximum value
held in an integer repreentation!

Jeff


“Misha Nefedov” <> mnefedov@qnx.com> > wrote in message
news:dgee28$4ml$> 1@inn.qnx.com> …
It is an int initialized with SHRT_MAX. You can set it to a bigger number
if
you wish.
-Misha.
“Jeff Maass” <> jmaass@columbus.rr.com> > wrote in message
news:dgdke1$flr$> 1@inn.qnx.com> …
Unless I’m reading the docs incorrectly, the absolute maximum number
of characters in the PtMultiText widget is 32767 (the default) and
cannot be be increased (Pt_ARG_MAX_LENGTH is of type ‘short’)?

Is there a “trick” to increase the widget capacity beyond the default
32,767?

We’d really like to be able to display a very-long log of events, far
beyond 32K bytes.

Jeff


“rlb” <> robert.bottemiller@fmcti-dot-com.no-spam.invalid> > wrote in
message
news:d84mp0$c77$> 1@inn.qnx.com> …
Solution:
The PhAB resource “Max Length” isn’t number-of-chars-per-line (as I
incorrectly assumed). It is the value of the total number of
characters in the text widget (Pt_ARG_MAX_LENGTH) and defaults to the
maximum value of a short integer (SHRT_MAX = 32,767).

When Max Length is set to a large number, widget behavior is as I had
expected. > :blush:



\