Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Get datawindow object width

5 posts in DataWindow Last posting was on 2009-01-19 10:47:47.0Z
O. Steine Posted on 2009-01-14 12:58:13.0Z
From: "O. Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Get datawindow object width
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496de165$1@forums-1-dub>
Date: 14 Jan 2009 04:58:13 -0800
X-Trace: forums-1-dub 1231937893 10.22.241.152 (14 Jan 2009 04:58:13 -0800)
X-Original-Trace: 14 Jan 2009 04:58:13 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88598
Article PK: 417852

I have an array of all objects in a datawindow, and I loop this in order to
get the width of all columns.
I can't the the property to return anything but 0 (zero), though the
dataobject column is NOT zero.

FOR i = 1 TO max
IF this.describe(ls_objects[i] + ".type") = "column" THEN
ll_width = ll_width + LONG(this.describe(ls_objects[i] +
".width"))
END IF
NEXT

I've also tried this notation (with same result)
ll_width = LONG(dw_1.object.ls_objects[i].width)

The reason why I need the width is to adjust so that datawindow width equals
dataobject width.
Or is there any autosize function for this?


Chris Werner Posted on 2009-01-14 13:39:36.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496de165$1@forums-1-dub>
Subject: Re: Get datawindow object width
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496deb18$1@forums-1-dub>
Date: 14 Jan 2009 05:39:36 -0800
X-Trace: forums-1-dub 1231940376 10.22.241.152 (14 Jan 2009 05:39:36 -0800)
X-Original-Trace: 14 Jan 2009 05:39:36 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88600
Article PK: 417853

Hi,

have a look on the expression ls_expr and the immediate result
ls_rslt after changing the code into:

string ls_expr, ls_rslt
...
ls_expr = ls_objects[i] + ".width"
ls_rslt = this.describe(ls_expr)
ll_width += long(ls_rslt)

That may show you why the result is 0 or whats wrong with your
expression. Otherwise post the values here.

BTW I'm in doubt that

ll_width = LONG(dw_1.object.ls_objects[i].width)

will compile because you cant't use danymic object names in this
type of dot notation.

HTH

Chris Werner
f+s software gmbh


"O. Steine" <osteine@gmail.com> schrieb im Newsbeitrag
news:496de165$1@forums-1-dub...

>I have an array of all objects in a datawindow, and I loop this in order to
>get the width of all columns.
> I can't the the property to return anything but 0 (zero), though the
> dataobject column is NOT zero.
>
> FOR i = 1 TO max
> IF this.describe(ls_objects[i] + ".type") = "column" THEN
> ll_width = ll_width + LONG(this.describe(ls_objects[i] +
> ".width"))
> END IF
> NEXT
>
> I've also tried this notation (with same result)
> ll_width = LONG(dw_1.object.ls_objects[i].width)
>
> The reason why I need the width is to adjust so that datawindow width
> equals dataobject width.
> Or is there any autosize function for this?
>


O. Steine Posted on 2009-01-14 14:52:31.0Z
From: "O. Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496de165$1@forums-1-dub> <496deb18$1@forums-1-dub>
Subject: Re: Get datawindow object width
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496dfc2f@forums-1-dub>
Date: 14 Jan 2009 06:52:31 -0800
X-Trace: forums-1-dub 1231944751 10.22.241.152 (14 Jan 2009 06:52:31 -0800)
X-Original-Trace: 14 Jan 2009 06:52:31 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88601
Article PK: 417855

Thank you :)
It gave me the information I needed to figure it out..

"Chris Werner" <cwAT{PleaseNoSpam}f-s.de> skrev i melding
news:496deb18$1@forums-1-dub...

> Hi,
>
> have a look on the expression ls_expr and the immediate result
> ls_rslt after changing the code into:
>
> string ls_expr, ls_rslt
> ...
> ls_expr = ls_objects[i] + ".width"
> ls_rslt = this.describe(ls_expr)
> ll_width += long(ls_rslt)
>
> That may show you why the result is 0 or whats wrong with your
> expression. Otherwise post the values here.
>
> BTW I'm in doubt that
>
> ll_width = LONG(dw_1.object.ls_objects[i].width)
>
> will compile because you cant't use danymic object names in this
> type of dot notation.
>
> HTH
>
> Chris Werner
> f+s software gmbh
>
>
> "O. Steine" <osteine@gmail.com> schrieb im Newsbeitrag
> news:496de165$1@forums-1-dub...
>>I have an array of all objects in a datawindow, and I loop this in order
>>to get the width of all columns.
>> I can't the the property to return anything but 0 (zero), though the
>> dataobject column is NOT zero.
>>
>> FOR i = 1 TO max
>> IF this.describe(ls_objects[i] + ".type") = "column" THEN
>> ll_width = ll_width + LONG(this.describe(ls_objects[i] +
>> ".width"))
>> END IF
>> NEXT
>>
>> I've also tried this notation (with same result)
>> ll_width = LONG(dw_1.object.ls_objects[i].width)
>>
>> The reason why I need the width is to adjust so that datawindow width
>> equals dataobject width.
>> Or is there any autosize function for this?
>>
>
>


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2009-01-15 15:18:17.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Get datawindow object width
References: <496de165$1@forums-1-dub> <496deb18$1@forums-1-dub> <496dfc2f@forums-1-dub>
In-Reply-To: <496dfc2f@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496f53b9$1@forums-1-dub>
Date: 15 Jan 2009 07:18:17 -0800
X-Trace: forums-1-dub 1232032697 10.22.241.152 (15 Jan 2009 07:18:17 -0800)
X-Original-Trace: 15 Jan 2009 07:18:17 -0800, vip152.sybase.com
Lines: 69
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88609
Article PK: 417863

For the sake of educating others that might have the same problem, can
you share what that information was?


My personal suspicion is that the width property had an expression tied
to it. That would cause your Describe() to return something like
"150~tif(a=b,150,0)" and of course, that entire string can't be cast to
a long variable. Is this what you were seeing? If not, can you share
what you did see?

O. Steine wrote:
> Thank you :)
> It gave me the information I needed to figure it out..
>
> "Chris Werner" <cwAT{PleaseNoSpam}f-s.de> skrev i melding
> news:496deb18$1@forums-1-dub...
>> Hi,
>>
>> have a look on the expression ls_expr and the immediate result
>> ls_rslt after changing the code into:
>>
>> string ls_expr, ls_rslt
>> ...
>> ls_expr = ls_objects[i] + ".width"
>> ls_rslt = this.describe(ls_expr)
>> ll_width += long(ls_rslt)
>>
>> That may show you why the result is 0 or whats wrong with your
>> expression. Otherwise post the values here.
>>
>> BTW I'm in doubt that
>>
>> ll_width = LONG(dw_1.object.ls_objects[i].width)
>>
>> will compile because you cant't use danymic object names in this
>> type of dot notation.
>>
>> HTH
>>
>> Chris Werner
>> f+s software gmbh
>>
>>
>> "O. Steine" <osteine@gmail.com> schrieb im Newsbeitrag
>> news:496de165$1@forums-1-dub...
>>> I have an array of all objects in a datawindow, and I loop this in order
>>> to get the width of all columns.
>>> I can't the the property to return anything but 0 (zero), though the
>>> dataobject column is NOT zero.
>>>
>>> FOR i = 1 TO max
>>> IF this.describe(ls_objects[i] + ".type") = "column" THEN
>>> ll_width = ll_width + LONG(this.describe(ls_objects[i] +
>>> ".width"))
>>> END IF
>>> NEXT
>>>
>>> I've also tried this notation (with same result)
>>> ll_width = LONG(dw_1.object.ls_objects[i].width)
>>>
>>> The reason why I need the width is to adjust so that datawindow width
>>> equals dataobject width.
>>> Or is there any autosize function for this?
>>>
>>
>
>


O. Steine Posted on 2009-01-19 10:47:47.0Z
From: "O. Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <496de165$1@forums-1-dub> <496deb18$1@forums-1-dub> <496dfc2f@forums-1-dub> <496f53b9$1@forums-1-dub>
Subject: Re: Get datawindow object width
Lines: 74
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49745a53$1@forums-1-dub>
Date: 19 Jan 2009 02:47:47 -0800
X-Trace: forums-1-dub 1232362067 10.22.241.152 (19 Jan 2009 02:47:47 -0800)
X-Original-Trace: 19 Jan 2009 02:47:47 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88640
Article PK: 417893

It was a typing error :o|

"Jason 'Bug' Fenter [TeamSybase]"
<NO_SPAMMING_jason.fenter_@_teamsybase.com> skrev i melding
news:496f53b9$1@forums-1-dub...

> For the sake of educating others that might have the same problem, can you
> share what that information was?
>
>
> My personal suspicion is that the width property had an expression tied to
> it. That would cause your Describe() to return something like
> "150~tif(a=b,150,0)" and of course, that entire string can't be cast to a
> long variable. Is this what you were seeing? If not, can you share what
> you did see?
>
>
>
> O. Steine wrote:
>> Thank you :)
>> It gave me the information I needed to figure it out..
>>
>> "Chris Werner" <cwAT{PleaseNoSpam}f-s.de> skrev i melding
>> news:496deb18$1@forums-1-dub...
>>> Hi,
>>>
>>> have a look on the expression ls_expr and the immediate result
>>> ls_rslt after changing the code into:
>>>
>>> string ls_expr, ls_rslt
>>> ...
>>> ls_expr = ls_objects[i] + ".width"
>>> ls_rslt = this.describe(ls_expr)
>>> ll_width += long(ls_rslt)
>>>
>>> That may show you why the result is 0 or whats wrong with your
>>> expression. Otherwise post the values here.
>>>
>>> BTW I'm in doubt that
>>>
>>> ll_width = LONG(dw_1.object.ls_objects[i].width)
>>>
>>> will compile because you cant't use danymic object names in this
>>> type of dot notation.
>>>
>>> HTH
>>>
>>> Chris Werner
>>> f+s software gmbh
>>>
>>>
>>> "O. Steine" <osteine@gmail.com> schrieb im Newsbeitrag
>>> news:496de165$1@forums-1-dub...
>>>> I have an array of all objects in a datawindow, and I loop this in
>>>> order to get the width of all columns.
>>>> I can't the the property to return anything but 0 (zero), though the
>>>> dataobject column is NOT zero.
>>>>
>>>> FOR i = 1 TO max
>>>> IF this.describe(ls_objects[i] + ".type") = "column" THEN
>>>> ll_width = ll_width + LONG(this.describe(ls_objects[i] +
>>>> ".width"))
>>>> END IF
>>>> NEXT
>>>>
>>>> I've also tried this notation (with same result)
>>>> ll_width = LONG(dw_1.object.ls_objects[i].width)
>>>>
>>>> The reason why I need the width is to adjust so that datawindow width
>>>> equals dataobject width.
>>>> Or is there any autosize function for this?
>>>>
>>>
>>