hi james ...

i'm just starting to use the rational rose. so i'll ask a stupid question
like where can i run this codes?

and what i really wanted to do is to add a new tab in the package
specification dialog box(the one that pops up when you right clicked the use
case view). i wanted to add a tab containing an editable textbox, so my new
tab will looks like that of the general tab.

i used the codes below and successfully created a new tab where you can put
values on the variables defined and this is not the way i want my tab to
look like. 

can somebody enlighten me with this one?

thanks again.

(list Attribute_Set

        (object Attribute
        tool            "TEST"
        name            "propertyId"
        value           "8091359661")
        (object Attribute
                  tool          "TEST"
                  name          "default__Category"
                  value         (list Attribute_Set
                    (object Attribute
                             tool               "TEST"
                             name               "precondition"
                             value              (value Text "")
                        )
                                        )
        )
        (object Attribute
                  tool          "TEST"
                  name          "default__UseCase"
                  value         (list Attribute_Set
                    (object Attribute
                             tool               "TEST"
                             name               "precondition"
                             value              (value Text "")
                        )
                                                )
        )
)

-----Original Message-----
From: James J. Wagner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 11:59 PM
To: 'Esperanza de Leon'; [EMAIL PROTECTED]
Subject: RE: (ROSE) Customizing Model Properties



The following lets you pop-up your own dialog box to edit the documentation.
It would be very similar to edit a property. (You'd have to get the property
value and then set it rather than setting the Documentation). This is a
little more involved then just adding a property to a .pty file, but it is
still pretty straight-forward.

To get and set property values, if you were using an operation, you'd use
something like:

        value = operation.GetPropertyValue("toolName", "propertyName")
        result = operation.OverrideProperty("toolName", "propertyName",
"value")

        Hope this helps,

                James.

' A simple dialog box with a text box and
' an OK and Cancel button
Begin Dialog UserDialog ,,324,232,"Untitled"
        OKButton 104,212,40,14
        CancelButton 164,212,40,14
        TextBox 8,4,300,200,.TextBox,1,"Courier New",10
End Dialog


Sub Main
        ' get the selected item... assuming only one
        Dim ritem As RoseItem
        Set ritem = RoseApp.CurrentModel.GetSelectedItems().GetAt(1)

        ' if there wasn't a selected item, then give a warning
        ' and exit
        If ritem Is Nothing Then
                MsgBox "No item selected"
                Exit Sub
        End If

        ' declare the dialog and set the contents of the
        ' text box to the documentation
        Dim dlog As UserDialog
        dlog.TextBox = ritem.Documentation

        ' now display it
        Dim result As Integer
        result = Dialog(dlog)

        ' if the user pushed OK, then reset the Documentation to
        ' the contents of the dialog box
        If result = -1 Then
                ritem.Documentation = dlog.TextBox
        End If
End Sub




> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Esperanza de Leon
> Sent: Wednesday, December 13, 2000 4:05 AM
> To: '[EMAIL PROTECTED]'
> Subject: (ROSE) Customizing Model Properties
>
>
>
> hi!
>
> i want to customize my model properties. i tried creating my
> property file
> (pty file) and successfully created a new tab containing the toolname,
> property name and the default value. but here's my problem, i
> wanted to
> customize it in such a way that it would contain an editable
> textbox, like
> the one that appears under documentation of the general tab.
> is it feasible?
> does anybody know how to do it?
>
> thanks in advance.
>
> =)
>
>
> **************************************************************
> **********
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
> http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> **************************************************************
> ***********
>

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to