Replace "= Nothing" with "is Nothing".

-----Original Message-----
From: Styve, Arne [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 5:42 AM
To: sven biebaut; roseforum
Subject: RE: (ROSE) REI checking for existance



Hi 

Try:

    Dim someStateMachine As StateMachine

    Set someStateMachine = aClass.StateMachine

    If someStateMachine = Nothing Then

......

Does this work ?

Regards

Arne


> -----Original Message-----
> From: sven biebaut [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 2:00 PM
> To: roseforum
> Subject: (ROSE) REI checking for existance
> 
> 
> 
> hello all,
> 
> Can anyone tell me how to check for the validity of a property in a
> script, f.i. when a REI method returns a class and that class is not
> necessarily there in the model, how do i check this ?
> 
> Example :
> 
>     Sub ProcessStateMachine (aStateMachine As StateMachine)
>     End Sub
> 
>     Sub ProcessClass(aClass As Class)
>        ProcessStateMachine aClass.StateMachine
>     End Sub
> 
>     Sub Main
>        For i% = 1 To RoseApp.CurrentModel.GetAllClasses().Count
>         ProcessClass RoseApp.CurrentModel.GetAllClasses().GetAt(i%)
>        Next i%
>     End Sub
> 
> Here i ask for the statemachine of a class, but not all classes have
> one. How can i check that i only call processStateMachine on 
> an existing
> StateMachine.
> 
> I tried the other way round, but there is no such thing as a
> 'getallstatemachines' on a rosemodel.
> 
> Thanks in advance,
> 
> Sven Biebaut
> 
> **************************************************************
> **********
> * 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
> *
> **************************************************************
> ***********
> 
This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
TANDBERG Television. If received in error please notify the sender and
destroy the original message and attachments.
************************************************************************
* 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