Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Beautify on selected block
Message
From
23/05/2016 23:44:27
 
 
To
18/05/2016 04:36:29
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01636473
Message ID:
01636719
Views:
70
Likes (1)
As I had mentioned initially , it doesn't work properly only for selection. I.e. certainly beautify.app is found and run.
Out of curiosity ( as we have a source code - beautify.prg ) I did some tracing/debugging and turned out the piece invoked in case of selection
checks for return value from C function.
m.fSuccess = Beautify((m.cTempInfile), (m.OutFile), (m.Options))
IF  m.fSuccess  
For unknown reason ancient C code ( which results in fd3.fll ) started to return .F. on my box

Replacing with
IF  FILE(m.OutFile) && m.fSuccess  
did the trick.

When no selection, C beautify is run without further checks on return value or out file existence.
IF m.lSelection
....
ELSE
  m.fSuccess = Beautify((m.inFile), (m.outfile), (m.options))
ENDIF
I had no interest in tracing C code, so just patched beautify.app

>I cannot imagine the native beautify solution does not work for you.
Previous
Reply
Map
View

Click here to load this message in the networking platform