Alastair, in addition to Dennis' suggestion, you may want to add a DEFAULT block before the ENDSW to catch the rare instance when vNameTitle is not 'Name' or 'Title'.

PROPERTY VID_vSelName   ENABLED 'FALSE'

IF vTitleType = 'TrackTitle' THEN

  PROPERTY RBID_SortTitle ENABLED 'FALSE'

ELSE

  PROPERTY RBID_SortTitle ENABLED 'TRUE'

ENDIF

BREAK

DEFAULT
  --error message or action if vNameTitle is not Name or Title
BREAK

ENDSW

Doug


Dennis McGrath wrote:
----------------------------

Before pressing F10 on the switch line, try to add a watch on vNameTitle.

I venture to say it is not there or is misspelled or is not a text variable.

 

Dennis McGrath

 


From: [email protected] [mailto:[email protected]] On Behalf Of Alastair Burr
Sent: Friday, June 11, 2010 7:24 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - EEP Switch/Endsw problem (v9.0_32)

 

I have an EEP which used to work in v7.6 but is giving me an error in v9.

 

I have Traced and R:Styled endlessly this morning but to no avail - there just doesn't seem to be anything wrong and I have run out of ideas of what else to look for.

 

The first error message is the usual Endwhile, Endsw or Endif missing in input file (462)

After clearing that I get what seems contradictory: No While, Switch or If blocks are open on current input source (466)

 

This is the relevant block of code:

 

 

  -- ---------------------------------------------------------------------------

  -- Return the parameters back to the form to build the menu:

  -- ---------------------------------------------------------------------------

  PROPERTY IDGB_EnterChoices VISIBLE 'FALSE'

  PROPERTY IDGB_ChoiceMade   VISIBLE 'TRUE'

 

  SWITCH (.vNameTitle)  -- fails on pressing [F10] on this line?

    CASE 'Name'

      PROPERTY RBID_NameTitle ENABLED 'FALSE'

      PROPERTY RBID_NameType  ENABLED 'FALSE'

      PROPERTY RBID_TitleType ENABLED 'FALSE'

      PROPERTY RBID_SortName  ENABLED 'TRUE'

      PROPERTY RBID_SortTitle ENABLED 'FALSE'

      PROPERTY VID_vSelName   ENABLED 'TRUE'

      BREAK

    CASE 'Title'

      PROPERTY RBID_NameTitle ENABLED 'FALSE'

      PROPERTY RBID_NameType  ENABLED 'FALSE'

      PROPERTY RBID_TitleType ENABLED 'FALSE'

      PROPERTY RBID_SortName  ENABLED 'FALSE'

      PROPERTY VID_vSelName   ENABLED 'FALSE'

      IF vTitleType = 'TrackTitle' THEN

        PROPERTY RBID_SortTitle ENABLED 'FALSE'

          ELSE

        PROPERTY RBID_SortTitle ENABLED 'TRUE'

      ENDIF

      BREAK

  ENDSW

 

  PROPERTY TABLE Temp_MCM_Table   'REFRESH'

  PROPERTY CID_vSelId ENABLED     'TRUE'

  PROPERTY CID_vSelId SET_FOCUS   'TRUE'

  PROPERTY CID_vSelId REFRESHLIST 'TRUE'

  PROPERTY CID_vSelId LISTOPEN    'TRUE'

  PROPERTY IDI_Image  SET_FOCUS   'TRUE'

  RETURN

 

 

Anybody got any ideas whatmay be going on? 

Regards,

Alastair

 

----------------------------

Alastair Burr

St. Albans, UK.

[email protected]

-----------------------------

 

Reply via email to