Clarion 11.1.13729 PreRelease AnyScreen Problem with Sheet Wizard

The following test having wizard tabs runs as expected as a desktop app but shows different results as an AnyScreen app. Code is as follows:

PROGRAM
MAP
  AnyTabProc PROCEDURE   
END

INCLUDE('AnyScreen.inc')
INCLUDE('KeyCodes.clw')

CODE
AnyTabProc 

  AnyTabProc PROCEDURE
  L:Choice LONG

  WizardWindow WINDOW('Wizard Window'),AT(,,252,150),CENTER,GRAY,FONT('Tahoma',10)
          BOX,AT(1,1,250,108),USE(?BOX),COLOR(COLOR:Black),LINEWIDTH(1)
          SHEET,AT(1,110,250,12),USE(?SHEET:Wizard),SPREAD,NOSHEET,BELOW,IMM
               TAB('1'),USE(?TAB:1)
               END
               TAB('2'),USE(?TAB:2)
               END
               TAB('3'),USE(?TAB:3)
               END
               TAB('4'),USE(?TAB:4)
               END
          END
          PROMPT('Tab Choice:'),AT(10,24),USE(?PROMPT:Choice)
          ENTRY(@n2),AT(50,24,,10),USE(L:Choice),FLAT
          BUTTON('&Back'),AT(1,127,60,20),USE(?BTN:Back),DEFAULT,IMM,LEFT
          BUTTON('&Next'),AT(62,127,60,20),USE(?BTN:Next),IMM,LEFT
          BUTTON('&OK'),AT(130,127,60,20),USE(?BTN:Ok),LEFT
          BUTTON('&Cancel'),AT(191,127,60,20),USE(?BTN:Cancel),LEFT
  END
    
CODE 
AnyScreen:Init()
OPEN(WizardWindow)
?SHEET:Wizard{PROP:Wizard} = True 
DO SetControlProperties
ACCEPT
  CASE EVENT()
  OF EVENT:Accepted
    CASE ACCEPTED()
    OF ?BTN:Ok OROF ?BTN:Cancel
      BREAK
    OF ?BTN:Next 
      IF CHOICE(?SHEET:Wizard) < ?SHEET:Wizard{PROP:NumTabs}
        SELECT(?SHEET:Wizard{PROP:Child,CHOICE(?SHEET:Wizard)+1})     
      END  
    OF ?BTN:Back
      IF CHOICE(?SHEET:Wizard) > 1
        SELECT(?SHEET:Wizard{PROP:Child,CHOICE(?SHEET:Wizard)-1})     
      END  
    END  
  END  
  DO SetControlProperties
END 
CLOSE(WizardWindow)
AnyScreen:Kill()  
RETURN
  
SetControlProperties ROUTINE 
  L:Choice = CHOICE(?SHEET:Wizard)
  ?BTN:Next{PROP:Disable} = CHOOSE(CHOICE(?SHEET:Wizard)=? SHEET:Wizard{PROP:NumTabs})
  ?BTN:Back{PROP:Disable} = CHOOSE(CHOICE(?SHEET:Wizard)=1)
  DISPLAY
  EXIT

Carl - Maybe better now, but still not perfect. I apologize. I’m usually just in a hurry and do not notice all the details for ClarionHub.

As an admin I set the code markdown for you.
Note: I just highlight the code, and click on the </> button
then pay attention to the preview on the right
Sometimes I have to click it again (as the first click toggles the code attribute off)

Appreciated. Window code much better, but the routine code is still not indented. That is something I could not get to stay.

This example is posted as a PTSS. I did upload a project zip.

Can you explain what goes wrong? Screen capture.

This SELECT(?SHEET:Wizard{PROP:Child,CHOICE(?SHEET:Wizard)+1}) could be the simpler
SELECT(?SHEET:Wizard, CHOICE(?SHEET:Wizard)+1 )

I would code SELECT(?SHEET:Wizard
with a 0+ so SELECT(0 + ?SHEET:Wizard that way its obvious this in not selecting the ?Sheet

As a desktop app, the next & back buttons will move thru each tab as expected (1-4 or 4-1). The current tab choice shows each time a button is clicked. With AnyScreen the current tab choice looks to hang at 2.

Works fine for me in AnyScreen mode using Build 13729 and the IDE
Runs through the tabs 1-4 with the buttons enabled/disabled as appropriate.

@totalhip - BTW email are out for clarion 11.1.13733
So just saying the pre-release is no longer sufficient to describe which version of CW you’re using to test your program

a) Deleted anything with the word cache attached.
b) Using v13729
c) Has failed every time with AnyScreen.

Not enough hair left to pull out.

Will download. Maybe SV should consider including v11.1 as a product plus these build numbers in PTSS. Latest in the drop list is 13684.

Graham maybe you can test the below window in Any Screen to see it works the same as the Win 32 exe. The order of the Button and Region matters. Button 2 can be clicked, but Button 1 cannot be clicked … except where it is not covered by the Region.

Is that how AS works? – Graham answers that Regions do NOT work with AS.

RegionDesignerBug   PROCEDURE

Window WINDOW('Region Test Order Runtime vs Designer'),AT(,,273,147),CENTER,GRAY,IMM,SYSTEM,FONT('Segoe UI',9),RESIZE
        BUTTON('Button 3'),AT(223,126),USE(?Button3)

        PROMPT('Below has REGION then BUTTON 1'),AT(6,5),USE(?PROMPT1)
        REGION,AT(5,20,100,50),CURSOR(CURSOR:Hand),USE(?region1),BEVEL(2)
        BUTTON('Button 1<13,10>After Region'),AT(31,30,80,25),USE(?Button1),TIP('Button 1 - Try to Click me where I am u' & |
                'nder Region')

        PROMPT('Below has BUTTON 2 then REGION'),AT(140,5),USE(?PROMPT2)
        BUTTON('Button 2<13,10>Before Region'),AT(167,30,80,25),USE(?Button2),TIP('Button 2 - You can click me anywhere ' & |
                'and I WORK')
        REGION,AT(140,20,100,50),CURSOR(CURSOR:Hand),USE(?region2),BEVEL(-2)

        PROMPT('Button 1 does NOT Work<13,10,13,10>Bug is BUTTON is on top of REGION in Designer'),AT(6,80,105,35), |
                USE(?PROMPT1:fyi)
        PROMPT('Button 2 DOES Work<13,10,13,10>Bug is BUTTON is under REGION in Designer'),AT(140,80,105,35),USE(?PROMPT2:fyi)
        PROMPT('Open this Window in Designer to see Left button 1 shows and Right button 2 does NOT show. The opposite o' & |
                'f runtime.'),AT(6,122,203,18),USE(?PROMPT:Designer:fyi)
    END

    CODE
    OPEN(WINDOW)
    0{PROP:text}=clip(0{PROP:text}) &' - Library ' & system{PROP:LibVersion,2} &'.'& system{PROP:LibVersion,3}
    ACCEPT
        CASE ACCEPTED()
        OF ?Button1 ; ?{PROP:Text}='Button 1 <13,10>Time: ' & CLOCK()
        OF ?Button2 ; ?{PROP:Text}='Button 2 <13,10>Time: ' & CLOCK()
        END
    END
    CLOSE(WINDOW)

I sent this as a bug to SV because in Designed it works opposite where Button 2 appears covered but Button 1 shows.

Carl - looks to me as if both buttons work in AnyScreen. Button 1 does not in desktop.

Interestingly enough, using my AnyTabProc code posted above, I see different results in a desktop app when the entry control is moved from after the sheet to before. This is clearly a problem in the v13729 version.

Carl region controls don’t work with AnyScreen.
We used regions over the top of images to create fancy 'fake button’s and have had to change them for AnyScreen.
You get no events from them.