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.

name of the singlelineedit

5 posts in Objects Last posting was on 2007-09-03 16:08:21.0Z
happy pig Posted on 2007-09-03 14:24:38.0Z
Sender: 42a6.46dc1064.1804289383@sybase.com
From: happy pig
Newsgroups: sybase.public.powerbuilder.objects
Subject: name of the singlelineedit
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46dc1925.4396.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Sep 2007 07:24:38 -0700
X-Trace: forums-1-dub 1188829478 10.22.241.41 (3 Sep 2007 07:24:38 -0700)
X-Original-Trace: 3 Sep 2007 07:24:38 -0700, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9435
Article PK: 736594

There are many singlineedit in a window. I would like to
check if the name of the singlelineedit is pre-specify name,
then check it .text value. How can I do this? Thanks for
your help.

something like
if the name of singlineedit = 'sle_office' then
if the text of singlineedit = '' return -1
end if


Chris Werner Posted on 2007-09-03 14:48:58.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.objects
References: <46dc1925.4396.1681692777@sybase.com>
Subject: Re: name of the singlelineedit
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: 62.8.156.42
X-Original-NNTP-Posting-Host: 62.8.156.42
Message-ID: <46dc1eda@forums-1-dub>
Date: 3 Sep 2007 07:48:58 -0700
X-Trace: forums-1-dub 1188830938 62.8.156.42 (3 Sep 2007 07:48:58 -0700)
X-Original-Trace: 3 Sep 2007 07:48:58 -0700, 62.8.156.42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9436
Article PK: 736595

Have you considered using the className function?

if sle_1.className() = 'sle_office' then
if sle_1.text = "" or isNull(sle_1.text) then
return -1
end if
end if

HTH

Chris Werner
f+s software gmbh

<happy pig> schrieb im Newsbeitrag
news:46dc1925.4396.1681692777@sybase.com...

> There are many singlineedit in a window. I would like to
> check if the name of the singlelineedit is pre-specify name,
> then check it .text value. How can I do this? Thanks for
> your help.
>
> something like
> if the name of singlineedit = 'sle_office' then
> if the text of singlineedit = '' return -1
> end if


Chris Werner Posted on 2007-09-03 16:08:21.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.objects
References: <46dc1eda@forums-1-dub> <46dc29a1.4519.1681692777@sybase.com>
Subject: Re: name of the singlelineedit
Lines: 75
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: 62.8.156.42
X-Original-NNTP-Posting-Host: 62.8.156.42
Message-ID: <46dc3175$1@forums-1-dub>
Date: 3 Sep 2007 09:08:21 -0700
X-Trace: forums-1-dub 1188835701 62.8.156.42 (3 Sep 2007 09:08:21 -0700)
X-Original-Trace: 3 Sep 2007 09:08:21 -0700, 62.8.156.42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9439
Article PK: 736596

Hy,

even though poor design it should be possible. I'm
not sure what you get exactly as result of control[i].className()
so you should change the code as follows:

string ls_className
FOR i = 1 to Upperbound(control[])
ls_className = control[i].className()
// correct the following line if necessary:
IF ls_className = 'sle_office' then
IF control[i].text = "" or isNull(control[i].text) then
return -1
END IF
END IF
NEXT

Debug this one time to see if ls_className is something
like 'sle_office' or 'w_whatever`sle_office'. In the latter
case chenge the line to

IF right(ls_className, 10) = 'sle_office' then

Good luck!

Chris Werner
f+s software gmbh


<happy pig> schrieb im Newsbeitrag
news:46dc29a1.4519.1681692777@sybase.com...

> Thanks for your help!
>
> But there are many objects (static text or singlelineedit)
> in the window, how can i search one by one? I have search
> from the old reply and have the following idea, please
> advise if this is possible?
> FOR i = 1 to Upperbound(control[])
> IF control[i].className() = 'sle_office' then
> IF control[i].text = "" or isNull(control[i].text) then
> return -1
> END IF
> END IF
> NEXT
>
>
>
>> Have you considered using the className function?
>>
>> if sle_1.className() = 'sle_office' then
>> if sle_1.text = "" or isNull(sle_1.text) then
>> return -1
>> end if
>> end if
>>
>> HTH
>>
>> Chris Werner
>> f+s software gmbh
>>
>> <happy pig> schrieb im Newsbeitrag
>> news:46dc1925.4396.1681692777@sybase.com...
>> > There are many singlineedit in a window. I would like
>> > to check if the name of the singlelineedit is
>> > pre-specify name, then check it .text value. How can I
>> > do this? Thanks for your help.
>> >
>> > something like
>> > if the name of singlineedit = 'sle_office' then
>> > if the text of singlineedit = '' return -1
>> > end if
>>
>>


fisher <fisher_NO Posted on 2007-09-03 16:03:33.0Z
From: fisher <fisher_NO@SPAM_wckp.lodz.pl_PLEASE>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: name of the singlelineedit
References: <46dc1eda@forums-1-dub> <46dc29a1.4519.1681692777@sybase.com>
In-Reply-To: <46dc29a1.4519.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: staticline10520.toya.net.pl
X-Original-NNTP-Posting-Host: staticline10520.toya.net.pl
Message-ID: <46dc3055$1@forums-1-dub>
Date: 3 Sep 2007 09:03:33 -0700
X-Trace: forums-1-dub 1188835413 85.89.162.13 (3 Sep 2007 09:03:33 -0700)
X-Original-Trace: 3 Sep 2007 09:03:33 -0700, staticline10520.toya.net.pl
Lines: 61
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9438
Article PK: 736597

You should check typeof method.
from help :

integer n

FOR n = 1 to 5
IF w_dept.Control[n].TypeOf() = CheckBox! THEN
... // Some processing
END IF
NEXT


So using typeof you can check if it's singlelineedit, and then verify
control's name and text property.

Regards



happy pig pisze:

> Thanks for your help!
>
> But there are many objects (static text or singlelineedit)
> in the window, how can i search one by one? I have search
> from the old reply and have the following idea, please
> advise if this is possible?
> FOR i = 1 to Upperbound(control[])
> IF control[i].className() = 'sle_office' then
> IF control[i].text = "" or isNull(control[i].text) then
> return -1
> END IF
> END IF
> NEXT
>
>
>
>> Have you considered using the className function?
>>
>> if sle_1.className() = 'sle_office' then
>> if sle_1.text = "" or isNull(sle_1.text) then
>> return -1
>> end if
>> end if
>>
>> HTH
>>
>> Chris Werner
>> f+s software gmbh
>>
>> <happy pig> schrieb im Newsbeitrag
>> news:46dc1925.4396.1681692777@sybase.com...
>>> There are many singlineedit in a window. I would like
>>> to check if the name of the singlelineedit is
>>> pre-specify name, then check it .text value. How can I
>>> do this? Thanks for your help.
>>>
>>> something like
>>> if the name of singlineedit = 'sle_office' then
>>> if the text of singlineedit = '' return -1
>>> end if
>>