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.

How to get the check box item label?

2 posts in General Discussion Last posting was on 2013-02-14 16:53:14.0Z
Silve Posted on 2012-12-18 16:24:06.0Z
Sender: 3129.50d096c3.1804289383@sybase.com
From: Silve
Newsgroups: sybase.public.powerdesigner.general
Subject: How to get the check box item label?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50d098a5.31ac.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 18 Dec 2012 08:24:06 -0800
X-Trace: forums-1-dub 1355847846 172.20.134.41 (18 Dec 2012 08:24:06 -0800)
X-Original-Trace: 18 Dec 2012 08:24:06 -0800, 172.20.134.41
Lines: 43
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30966
Article PK: 1158441

Hi!
I wrote a method in the extended model definition for .PDM
to get the label of a check box item created in a form. I
get the status of the check (checked or not: yes or no), but
I didn't get the label. How can I do that? It follows the
code I wrote:

Sub %Method%(obj)

Dim dlg, valor

Set dlg =
obj.CreateCustomDialog("%CurrentTargetCode%.defaultComments")

If not dlg is Nothing Then

' Show dialog
If dlg.ShowDialog() Then

If dlg.GetValue("BeginComment") = "Yes" Then
' ??? how to get the label. When I created the
form,
' for the check box item "BeginComment" I put
the
' label "You cannot begin the comment with
'Has/have'"
End If

If dlg.GetValue("BetterComment") = "Yes" Then
' ???
End If

End If

' Free dialog object
dlg.Delete
Set dlg = Nothing

End If

End Sub

Thank you all!


Elisangela Henriques Posted on 2013-02-14 16:53:14.0Z
Sender: 63f0.511d11c8.1804289383@sybase.com
From: Elisangela Henriques
Newsgroups: sybase.public.powerdesigner.general
Subject: Re: How to get the check box item label?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <511d167a.65f2.1681692777@sybase.com>
References: <50d098a5.31ac.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 14 Feb 2013 08:53:14 -0800
X-Trace: forums-1-dub 1360860794 172.20.134.41 (14 Feb 2013 08:53:14 -0800)
X-Original-Trace: 14 Feb 2013 08:53:14 -0800, 172.20.134.41
Lines: 100
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:31006
Article PK: 1307653

This example I created on object Form, of type Dialog Box,
and return the values of caption and Method for calling the
Form_Test.

This is a xml definition form:
<Form >
<Edit Name="Sugestao1" Caption="LabelSugestao1"
SizeInChars="1" HorizontalResize="Yes" ReadOnly="No"
/>
<CheckBox Name="ck1" Caption="Não iniciar com "
LeftText="No" ReadOnly="No" />
</Form>



Sub %Method%(obj)
' Implement your method on <obj> here

' Show custom dialog for advanced extended attributes
Dim dlg , objXML, Root, x
Set dlg =
obj.CreateCustomDialog("%CurrentTargetCode%.Form_Test")

If not dlg is Nothing Then
dlg.ShowDialog()

Output " Sugestão 1 " & dlg.GetValue("Sugestao1") '
retorna o valor preenchido no campo

'Output " form Definition.Label " &
dlg.FormDefinition.Label ' retorna o nome - labela da
janela
'Output " form Value xml " & dlg.FormDefinition.Value
' retorna o xml com a descrição do formulário

set objXML = CreateObject("Microsoft.XMLDOM")
objXML.async = "false"
objXML.loadXML ( dlg.FormDefinition.Value ) ' return
definition in xml of form
Set Root = objXML.documentElement
Output " -----------------------------"

For Each x In Root.childNodes ' leitura do documento
xml com a descrição do formulário
' Name corresponde ao nome do campo definido e o
caption o label
Output " name " &
x.Attributes.GetNamedItem("Name").text & " caption " &
x.Attributes.GetNamedItem("Caption").text
Next

End If ' se a janela dialog está aberta

> Hi!
> I wrote a method in the extended model definition for .PDM
> to get the label of a check box item created in a form. I
> get the status of the check (checked or not: yes or no),
> but I didn't get the label. How can I do that? It follows
> the code I wrote:
>
> Sub %Method%(obj)
>
> Dim dlg, valor
>
> Set dlg =
> obj.CreateCustomDialog("%CurrentTargetCode%.defaultComment
> s")
>
> If not dlg is Nothing Then
>
> ' Show dialog
> If dlg.ShowDialog() Then
>
> If dlg.GetValue("BeginComment") = "Yes" Then
> ' ??? how to get the label. When I created the
> form,
> ' for the check box item "BeginComment" I
> put the
> ' label "You cannot begin the comment with
> 'Has/have'"
> End If
>
> If dlg.GetValue("BetterComment") = "Yes" Then
> ' ???
> End If
>
> End If
>
> ' Free dialog object
> dlg.Delete
> Set dlg = Nothing
>
> End If
>
> End Sub
>
> Thank you all!