[5.31 x64 x86] IDE indentation

Post bugs related to the IDE here
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

[5.31 x64 x86] IDE indentation

Post by breeze4me »

It seems that some string influences the code indentation.

Code: Select all

Procedure VirtualLVProc(hWnd, Message, wParam, lParam)
  
  If Message = #WM_NOTIFY
    Select *NMLV\hdr\code
      Case #NM_CUSTOMDRAW
        *LVCD = lParam
        Select *LVCD\nmcd\dwDrawStage
          Case #CDDS_ITEMPREPAINT | #CDDS_SUBITEM
            If *Wnd\pFilesArr(Idx)\State = #App_FileState_Done
              
            ElseIf *Wnd\pFilesArr(Idx)\State = #App_FileState_CannotOpen
              ItemText$ + "열기 오류" + #CR$
            ElseIf *Wnd\pFilesArr(Idx)\State = #App_FileState_NotTested
              ItemText$ + "작업 안 함" + #CR$
            Else
              ItemText$ + "기타 오류" + #CR$
            EndIf
            
            ProcedureReturn #CDRF_SKIPDEFAULT
        EndSelect
        
    EndSelect
  EndIf
  
  ProcedureReturn Result
EndProcedure
Select all code, then press ctrl + i (format indentation).
The result is

Code: Select all

Procedure VirtualLVProc(hWnd, Message, wParam, lParam)
  
  If Message = #WM_NOTIFY
    Select *NMLV\hdr\code
      Case #NM_CUSTOMDRAW
        *LVCD = lParam
        Select *LVCD\nmcd\dwDrawStage
          Case #CDDS_ITEMPREPAINT | #CDDS_SUBITEM
            If *Wnd\pFilesArr(Idx)\State = #App_FileState_Done
              
            ElseIf *Wnd\pFilesArr(Idx)\State = #App_FileState_CannotOpen
            ItemText$ + "열기 오류" + #CR$
ElseIf *Wnd\pFilesArr(Idx)\State = #App_FileState_NotTested
            ItemText$ + "작업 안 함" + #CR$
Else
            ItemText$ + "기타 오류" + #CR$
EndIf
            
            ProcedureReturn #CDRF_SKIPDEFAULT
        EndSelect
        
    EndSelect
  EndIf
  
  ProcedureReturn Result
EndProcedure

But the next code is no problem.

Code: Select all

Procedure VirtualLVProc(hWnd, Message, wParam, lParam)
  
  If Message = #WM_NOTIFY
    Select *NMLV\hdr\code
      Case #NM_CUSTOMDRAW
        *LVCD = lParam
        Select *LVCD\nmcd\dwDrawStage
          Case #CDDS_ITEMPREPAINT | #CDDS_SUBITEM
            If *Wnd\pFilesArr(Idx)\State = #App_FileState_Done
              
            ElseIf *Wnd\pFilesArr(Idx)\State = #App_FileState_CannotOpen
              ItemText$ + "abcd" + #CR$
            ElseIf *Wnd\pFilesArr(Idx)\State = #App_FileState_NotTested
              ItemText$ + "abcd" + #CR$
            Else
              ItemText$ + "abcd" + #CR$
            EndIf
            
            ProcedureReturn #CDRF_SKIPDEFAULT
        EndSelect
        
    EndSelect
  EndIf
  
  ProcedureReturn Result
EndProcedure
User_Russian
Addict
Addict
Posts: 1584
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: [5.31 x64 x86] IDE indentation

Post by User_Russian »

The problem not confirmed.
Format indentation, normally works.
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: [5.31 x64 x86] IDE indentation

Post by breeze4me »

Hmm, it's weird. On Windows 7/8.1 x86 and 7 x64 Korean, it always happens.
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: [5.31 x64 x86] IDE indentation

Post by breeze4me »

another examples.

Code: Select all

HyperLinkGadget(#wndMain_hpBlog, 135, 310, 185, 25, "제작자:breeze4me@네이버", #Blue)
testcode = 1
The result is

Code: Select all

HyperLinkGadget(#wndMain_hpBlog, 135, 310, 185, 25, "제작자:breeze4me@네이버", #Blue)
                                                                         testcode = 1

Code: Select all

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_Long)
testcode = 1
The result is

Code: Select all

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_Long)
                                     testcode = 1
Little John
Addict
Addict
Posts: 4802
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [5.31 x64 x86] IDE indentation

Post by Little John »

breeze4me wrote:Hmm, it's weird. On Windows 7/8.1 x86 and 7 x64 Korean, it always happens.
No problem with your first code example here with PB 5.31 x86/x64 on Windows 10 (using source file format UTF-8).
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: [5.31 x64 x86] IDE indentation

Post by breeze4me »

Maybe it only happens on Windows Korean edition??

The next code is normal.

Code: Select all

Debug "실제 계산할 해시 종류: " + Bin(Result)
testcode = 1
Only ", #PB_Long" is removed, but it works normal.



Code: Select all

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_a)
testcode = 1

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_ab)
testcode = 1

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_abc)
testcode = 1
result..

Code: Select all

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_a)
testcode = 1

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_ab)
testcode = 1

Debug "실제 계산할 해시 종류: " + Bin(Result, #PB_abc)
                                     testcode = 1

another one.

Code: Select all

Debug "실제 계산할 해시 종류: " + Bin(Result,#PBabcde)
                                    testcode = 1

Debug "실제 계산할 해시 종류: " + Bin(Result,#PBabcd)
testcode = 1

Debug "실제 계산할 해시 종류: " + Bin(Result, #PBabcd)
                                     testcode = 1
Edit:

very weird.

Code: Select all

Proc("제작자:breeze4me@네이버" + #a)
testcode = 1

Proc("제작자:breeze4me@네이버" + #aa)
testcode = 1

Proc("제작자:breeze4me@네이버" + #aaa)
     testcode = 1

Proc("제작자:breeze4me@네이버" + #aaaa)
     testcode = 1

Proc("제작자:breeze4me@네이버" + #aaaaa)
testcode = 1

Proc("제작자:breeze4me@네이버" + #aaaaaa)
testcode = 1

Code: Select all

x("가나다라마바"+#aa)
testcode = 1

x("가나다라마바"+#aaa)
testcode = 1

x("가나다라마바"+#aaaa)
  testcode = 1

x("가나다라마바"+#aaaaa)
testcode = 1

x("가나다라마바"+#aaaaaa)
testcode = 1

Code: Select all

x("가나다라마바"+ #aa)
testcode = 1

x("가나다라마바"+ #aaa)
  testcode = 1

x("가나다라마바"+ #aaaa)
  testcode = 1

x("가나다라마바"+ #aaaaa)
testcode = 1

x("가나다라마바"+ #aaaaaa)
testcode = 1

Code: Select all

If a
  e = "기타오류" + #aa
a = 1
  b = 1
EndIf
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: [5.31 x64 x86] IDE indentation

Post by breeze4me »

I just tested the problem on Windows 7 x86 English edition, it didn't happen with default system locale.
But I changed the system locale to Korean (Region and language in Control Panel), then it happened.
No problems with Japanese/Chinese locale.
Post Reply