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.

rich text - InputFieldLocate function

6 posts in Objects Last posting was on 2008-09-26 17:27:48.0Z
Anbazhagan Posted on 2008-09-24 19:54:35.0Z
Sender: 143d.48d7bf2f.1804289383@sybase.com
From: Anbazhagan
Newsgroups: sybase.public.powerbuilder.objects
Subject: rich text - InputFieldLocate function
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48da9afb.260.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Sep 2008 12:54:35 -0700
X-Trace: forums-1-dub 1222286075 10.22.241.41 (24 Sep 2008 12:54:35 -0700)
X-Original-Trace: 24 Sep 2008 12:54:35 -0700, 10.22.241.41
Lines: 58
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9782
Article PK: 736913

Hi,

I am trying to locate the input fields with specific name
(which may or may not be there) in the rich text edit
control.

The input field may exist multiple times also.

When I try to test the return value of InputFieldLocate
function, the application get killed.

Code:
======
rte_my.selecttextall()
rte_my.clear()
rte_my.pastertf(dw_my_rte.copyrtf(false,detail!))

ls_ret = rte_my.InputFieldLocate(first!, "myfield")
messagebox("first","start " + ls_ret + " end")
if isnull(ls_ret) then
messagebox("first", "null")
ls_ret=''
end if
if ls_ret="" then messagebox("A", "not match")

ls_ret = rte_my.InputFieldLocate(next!, "myfield")
messagebox("next",ls_ret)
if isnull(ls_ret) then
messagebox("next", "null")
ls_ret=''
end if
if ls_ret="" then messagebox("next", "not match")


with the above code, if input field found then message
appears with input field and without input field name if
input field is not there.

when I try to check whether the input filed is found or not
using the below code, by which I am not able to decide
whether field is there or not, the application goes without
kill.

if isnull(ls_ret) then


but if i change the code as below

if isnull(ls_ret) or trim(ls_ret)="" then

if the filed is not found, the application get killed.

Please help me!

if it is cross-posting sorry, I am not sure where to post.

Regards,
Anbazhagan


Anbazhagan Posted on 2008-09-24 20:40:04.0Z
Sender: 143d.48d7bf2f.1804289383@sybase.com
From: Anbazhagan
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: rich text - InputFieldLocate function
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48daa5a4.33b.1681692777@sybase.com>
References: <48da9afb.260.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Sep 2008 13:40:04 -0700
X-Trace: forums-1-dub 1222288804 10.22.241.41 (24 Sep 2008 13:40:04 -0700)
X-Original-Trace: 24 Sep 2008 13:40:04 -0700, 10.22.241.41
Lines: 63
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9783
Article PK: 736915

Env:

PB 11.2
Vista

> Hi,
>
> I am trying to locate the input fields with specific name
> (which may or may not be there) in the rich text edit
> control.
>
> The input field may exist multiple times also.
>
> When I try to test the return value of InputFieldLocate
> function, the application get killed.
>
> Code:
> ======
> rte_my.selecttextall()
> rte_my.clear()
> rte_my.pastertf(dw_my_rte.copyrtf(false,detail!))
>
> ls_ret = rte_my.InputFieldLocate(first!, "myfield")
> messagebox("first","start " + ls_ret + " end")
> if isnull(ls_ret) then
> messagebox("first", "null")
> ls_ret=''
> end if
> if ls_ret="" then messagebox("A", "not match")
>
> ls_ret = rte_my.InputFieldLocate(next!, "myfield")
> messagebox("next",ls_ret)
> if isnull(ls_ret) then
> messagebox("next", "null")
> ls_ret=''
> end if
> if ls_ret="" then messagebox("next", "not match")
>
>
> with the above code, if input field found then message
> appears with input field and without input field name if
> input field is not there.
>
> when I try to check whether the input filed is found or
> not using the below code, by which I am not able to decide
> whether field is there or not, the application goes
> without kill.
>
> if isnull(ls_ret) then
>
>
> but if i change the code as below
>
> if isnull(ls_ret) or trim(ls_ret)="" then
>
> if the filed is not found, the application get killed.
>
> Please help me!
>
> if it is cross-posting sorry, I am not sure where to post.
>
> Regards,
> Anbazhagan


KM Posted on 2008-09-25 16:33:03.0Z
Sender: 7b48.48da755d.1804289383@sybase.com
From: KM
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: rich text - InputFieldLocate function
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48dbbd3f.2f1c.1681692777@sybase.com>
References: <48da9afb.260.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Sep 2008 09:33:03 -0700
X-Trace: forums-1-dub 1222360383 10.22.241.41 (25 Sep 2008 09:33:03 -0700)
X-Original-Trace: 25 Sep 2008 09:33:03 -0700, 10.22.241.41
Lines: 80
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9784
Article PK: 736916

Post to rte newsgroup.
Make sure you have newsest/correct rte dll.
This was fixed in a EBF of PB 10.2 or 10.5

Note: This works in PB 10.5.2, Build 7662:

ls_merge_field_name = rte_1.InputFieldLocate(First!,
"somefield")
DO WHILE len(trim(ls_merge_field_name)) > 0 and (not
isnull(ls_merge_field_name))
loopcount = loopcount + 1
ls_merge_field_name = rte_1.InputFieldLocate(Next!,
"somefield")
If loopcount > 500 Then // Just because I am parinoid!
Exit
End If
LOOP


HTH

KM

> Hi,
>
> I am trying to locate the input fields with specific name
> (which may or may not be there) in the rich text edit
> control.
>
> The input field may exist multiple times also.
>
> When I try to test the return value of InputFieldLocate
> function, the application get killed.
>
> Code:
> ======
> rte_my.selecttextall()
> rte_my.clear()
> rte_my.pastertf(dw_my_rte.copyrtf(false,detail!))
>
> ls_ret = rte_my.InputFieldLocate(first!, "myfield")
> messagebox("first","start " + ls_ret + " end")
> if isnull(ls_ret) then
> messagebox("first", "null")
> ls_ret=''
> end if
> if ls_ret="" then messagebox("A", "not match")
>
> ls_ret = rte_my.InputFieldLocate(next!, "myfield")
> messagebox("next",ls_ret)
> if isnull(ls_ret) then
> messagebox("next", "null")
> ls_ret=''
> end if
> if ls_ret="" then messagebox("next", "not match")
>
>
> with the above code, if input field found then message
> appears with input field and without input field name if
> input field is not there.
>
> when I try to check whether the input filed is found or
> not using the below code, by which I am not able to decide
> whether field is there or not, the application goes
> without kill.
>
> if isnull(ls_ret) then
>
>
> but if i change the code as below
>
> if isnull(ls_ret) or trim(ls_ret)="" then
>
> if the filed is not found, the application get killed.
>
> Please help me!
>
> if it is cross-posting sorry, I am not sure where to post.
>
> Regards,
> Anbazhagan


Anbazhagan Posted on 2008-09-26 10:42:34.0Z
Sender: 143d.48d7bf2f.1804289383@sybase.com
From: Anbazhagan
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: rich text - InputFieldLocate function
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48dcbc9a.4b47.1681692777@sybase.com>
References: <48dbbd3f.2f1c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Sep 2008 03:42:34 -0700
X-Trace: forums-1-dub 1222425754 10.22.241.41 (26 Sep 2008 03:42:34 -0700)
X-Original-Trace: 26 Sep 2008 03:42:34 -0700, 10.22.241.41
Lines: 93
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9785
Article PK: 736918

Thanks a lot.

But for me the same logic is getting killed.

Ver: 11.2 Build 8407.
OS: Vista Home Premium

What is dll name I need to check to ensure that I have
correct dll?

Thanks & Regards,
Anbazhagan

> Post to rte newsgroup.
> Make sure you have newsest/correct rte dll.
> This was fixed in a EBF of PB 10.2 or 10.5
>
> Note: This works in PB 10.5.2, Build 7662:
>
> ls_merge_field_name = rte_1.InputFieldLocate(First!,
> "somefield")
> DO WHILE len(trim(ls_merge_field_name)) > 0 and (not
> isnull(ls_merge_field_name))
> loopcount = loopcount + 1
> ls_merge_field_name = rte_1.InputFieldLocate(Next!,
> "somefield")
> If loopcount > 500 Then // Just because I am parinoid!
> Exit
> End If
> LOOP
>
>
> HTH
>
> KM
> > Hi,
> >
> > I am trying to locate the input fields with specific
> > name (which may or may not be there) in the rich text
> > edit control.
> >
> > The input field may exist multiple times also.
> >
> > When I try to test the return value of InputFieldLocate
> > function, the application get killed.
> >
> > Code:
> > ======
> > rte_my.selecttextall()
> > rte_my.clear()
> > rte_my.pastertf(dw_my_rte.copyrtf(false,detail!))
> >
> > ls_ret = rte_my.InputFieldLocate(first!, "myfield")
> > messagebox("first","start " + ls_ret + " end")
> > if isnull(ls_ret) then
> > messagebox("first", "null")
> > ls_ret=''
> > end if
> > if ls_ret="" then messagebox("A", "not match")
> >
> > ls_ret = rte_my.InputFieldLocate(next!, "myfield")
> > messagebox("next",ls_ret)
> > if isnull(ls_ret) then
> > messagebox("next", "null")
> > ls_ret=''
> > end if
> > if ls_ret="" then messagebox("next", "not match")
> >
> >
> > with the above code, if input field found then message
> > appears with input field and without input field name if
> > input field is not there.
> >
> > when I try to check whether the input filed is found or
> > not using the below code, by which I am not able to
> > decide whether field is there or not, the application
> > goes without kill.
> >
> > if isnull(ls_ret) then
> >
> >
> > but if i change the code as below
> >
> > if isnull(ls_ret) or trim(ls_ret)="" then
> >
> > if the filed is not found, the application get killed.
> >
> > Please help me!
> >
> > if it is cross-posting sorry, I am not sure where to
> post. >
> > Regards,
> > Anbazhagan