Request for change

Topics: Developer Forum
Developer
Aug 29, 2013 at 9:05 PM
Hi,

I propose the following change in ActiveVFP.mergescript(). It helps in running an external debugger and keeping the debugger in an entirely separate folder. It would not make any difference to existing installations.

.... ORIGINAL CODE........
   IF [INCLUDE] $ SYS(16,PROGRAM(-1)-1)   && prevent recursive error in TextMerge/ExecScript 
SET PROCEDURE TO codeblck ADDITIVE
        oCodeBlock = CREATEOBJECT( "cusCodeBlock") 
        oCodeBlock.SetCodeBlock(cEval) 
        oCodeBlock.lAccumulateMergedText = .T.
        SET TEXTMERGE ON
        oCodeBlock.Execute() 
        lcStr=oCodeBlock.GetMergedText()
   ELSE
        lcStr=EXECSCRIPT(cEval)  && Microsoft EXECSCRIPT seems to be reliable in VFP9
   ENDIF    

......... Proposed Code .............
   IF [INCLUDE] $ SYS(16,PROGRAM(-1)-1)   && prevent recursive error in TextMerge/ExecScript 
        *-----+ Putting flexible path so that we can debug
        If VARTYPE(oProp) = "O" and VARTYPE(oProp.AppStartPath) <> "U" 
            Local cpathCodeBlck
            cpathCodeBlck = oProp.AppStartPath+[Prg\codeblck.prg]
            SET PROCEDURE TO (cpathCodeBlck) ADDITIVE
        Else     
            SET PROCEDURE TO codeblck ADDITIVE
        EndIf
        oCodeBlock = CREATEOBJECT( "cusCodeBlock") 
        oCodeBlock.SetCodeBlock(cEval) 
        oCodeBlock.lAccumulateMergedText = .T.
        SET TEXTMERGE ON
        oCodeBlock.Execute() 
        lcStr=oCodeBlock.GetMergedText()
   ELSE
        lcStr=EXECSCRIPT(cEval)  && Microsoft EXECSCRIPT seems to be reliable in VFP9
   ENDIF    







Coordinator
Aug 29, 2013 at 9:51 PM
Sounds good. Have you implemented and tested this? Does this work over the web live? That would be great... especially if we didn't need to use Visual Studio anymore for interactive debugging(as is done in AVFP 5.53)

FWIW, if we can figure out how to get the HTTP Handler for AVFP 6.03 working in Visual Studio debugging, that would be fantastic. It works with AVFP 5.53 but because of the HTTP Handler used in 6.03, the debugger stumbles after the first page. It's probably fixable ....... we'll see. It would be nice if someone familiar with Visual Studio could take the lead here. I will help as much as I can.
Developer
Aug 30, 2013 at 12:57 AM
Lol.. no such luck with Handlers. Also, I don't have V5.5 so can not tell if that debugger worked the same way as mine.

This debugger can run locally only, i.e. on intranet, and it only traces the step by step creation of HTML. file. I generally manually submit this html file to //infohound.net/tidy/tidy.pl to check the tags & syntax. infohound has problem with JQuery but it's better then nothing.

You can also open the HTML file in browser, and if running activeX permission is given, it also displays the page correctly.

I am still developing it on as needed basis..and fix issues with it as and when they occur. Eventually, hope is to create it into an exe that can be called from within MS Expressions. Then, it'll run automatically, if any page is called when Dubug mode is switched 'on'. MS Expressions loading require a simple registry change but those guys are not very co-operative at this time.

I had written about this method to ABigDreamer not sure if he read any of my suggestions. It would have helped him a lot.. but that is my opinion only.
Aug 30, 2013 at 3:14 AM
I'm glad your solving some of these issues Tutu1. I am still using Activevfp however not for anything to do with json. I have a much better solution.

:)
Developer
Aug 30, 2013 at 4:44 AM
That is good. But it's not so good news for me. I was hoping to get some pointers when I start client side i.e. REST with JQM.

Anyway, I cannot start REST without first developing a router, If table hierarchy is very deep with thousands of tables then design needs to scale well.

Also, I am made to understand, just SSL is not enough. SSL is for securing at network/data/transmission level. We need something on 'individual level', replicating SSL three way handshake for any ID/Resource sent over URL i.e. REST.

Also, I think only 'single page applications' are getting past development 'focus group', stuffed with Java and .net hotshots.

So the stakes are little high against my avfp REST project, at the moment.

If anyone has done work on above lines with avfp which can help in faster development time, it would be a godsent.