Page 1 of 1

[5.31 x64 x86] IDE indentation

Posted: Sun Aug 30, 2015 1:57 pm
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

Re: [5.31 x64 x86] IDE indentation

Posted: Sun Aug 30, 2015 2:13 pm
by User_Russian
The problem not confirmed.
Format indentation, normally works.

Re: [5.31 x64 x86] IDE indentation

Posted: Sun Aug 30, 2015 2:46 pm
by breeze4me
Hmm, it's weird. On Windows 7/8.1 x86 and 7 x64 Korean, it always happens.

Re: [5.31 x64 x86] IDE indentation

Posted: Sun Aug 30, 2015 2:54 pm
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

Re: [5.31 x64 x86] IDE indentation

Posted: Sun Aug 30, 2015 2:58 pm
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).

Re: [5.31 x64 x86] IDE indentation

Posted: Sun Aug 30, 2015 3:06 pm
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

Re: [5.31 x64 x86] IDE indentation

Posted: Mon Aug 31, 2015 5:59 am
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.