KitCAD i3 KGC 2011 release testing

Uploaded a 2011 alpha test case for the JavaScript runtime optimiser & DOM Store with an example of required changes to just one KitCAD i3 KGC function.

See the KitCAD225_kgc_exploit_function_catche example online.

Full changes to KitCAD i3 KGC source code are not expected to be completed and uploaded until some time in early 2011.

The example Runtime JavaScript optimizer aids users in removing unwanted cycle and command loops from scripting. The run-once feature allows the inital release of jsappcatche.js to build a store; After which repeated procedure calls to the same functions with same values are evaluated from the pre-built store; The stored functions aids Ajax, xml and repeated user navigation requests. The example DOM storage method allows for page refresh and history.back/foward navigation.

18 Responses to “KitCAD i3 KGC 2011 release testing”

  1. Admin Says:

    RadPHP DesignTime view

    A non-working night test build of KGraphicControl re-coded for use with RadPHP can be found online at:-

    Download Link: (out-of-date, see updated download below)

    No examples, or instructions for use is provided. Requires IE to render Php output (RadPHP IDE, Chrome, Firefox, Safari browsers are not supported at this time as code is being written).

    Online KGraphicControl.js HTML help files include Out-of-date 2006-2007 Webpage writers help document, and code executing KGraphicControl.js deployment examples.

    NOTE: The patch/fix release notice for HTML 5 Builder/RPCL 5.0 can be found below [link].

  2. Admin Says:

    RadPHP DesignTime View

    Updated kgraphiccontrol.*.* to draw KPD within the RadPHP IDE with the following steps after reading entire comment :-

    1. Download updated from post above.
    2. Unzip to %PROGRAMFILES%\RadPHP\3.0\rpcl\
    3. Open the RadPHP 3.0 IDE
    4. Click Component on the RadPHP toolbar, and select Install Packages which will launch the Install Packages dialog window
    5. Click Add and select the file of %PROGRAMFILES%\RadPHP\3.0\rpcl\kitchenpages\kgraphiccontrol.package.php
    6. Click the Ok button to close Install Packages dialog window
    7. Open the sample example at %PROGRAMFILES%\RadPHP\3.0\rpcl\kitchenpages\kgraphiccontrol_http_localhost.phprj
    8. when prompted, click the Yes button to use ActiveX control.
    A message will be shown of ‘File does not exist’, Click the KGraphicControl1 control on the Design view. Then scroll the Object Inspector to find the value of URL_get. Clear the value of get.cgi?r= so there is an empty string (Clear any text, or spaces).
    9. when prompted again, click the Yes button to use ActiveX control.
    10. Optional steps to render outside of RadPHP:- Select the KGraphicControl1 control, and update the value of DFileName from bc2di.kpd to bc2di_1000w_600d_903h_0hf.kpd. Save the modified example Php form as kgraphiccontrol_httpandfile_localhost.php, and then save the modified example Project group as kgraphiccontrol_httpandfile_localhost.phprj

    Note: KitCAD i3 TEST Setup must be installed at its default locaitons (for RadPHP to load KPD file data). Pages when rendered for webbrowsers are using the XAMPP webserver version of KitCAD i3 to resolve KPD file data (no SVG support yet). See kgc_exploit.js for information about KPD file locations.

    Later versions of may correct some issues and include bug fixing to remove un-used script from DesignTime; which will make the process described above not affective as there would be no need of any changes.

    Another package for KP2 files is being developed so users can load KP2 files. The KP2 control will load KPD files with limited editing support by the KitCAD i3 KGC TEST Setup interfaces. Any KP2 controls for RadPHP 3.0 should be released mid-2011 depending on any programming or other issues not yet known 🙂

    BEFORE STARTING PACKAGE INSTALL or COMPONENT PACKAGE INSTALLERS NOTE: The instructions given are for RadPHP, and only describe RadPHP runtime, and not PHP or HTML runtimes within other processes. To make other runtimes work installers/users will need to have copied ALL files and folders at %PROGRAMFILES%\RadPHP\3.0\rpcl\kitchenpages\i3\ into the following 2 locations of %MYDOCUMENTS%\RadPHP\Projects\rpcl\kitchenpages\i3\ and %MYDOCUMENTS%\RadPHP\Projects\ before performing the Package install process as described above.

  3. Admin Says:

    The sample files (eg kgraphiccontrol-http-get-svr.php) for rpcl 3.0 require a minimum of 32meg memory when running on a memory limited/secured server.

    See Bug report for more information.

    NOTE: SECURITY is NOT included with any examples for KGraphicControl or KitCAD; The values sent to any PHP script by any source SHOULD be checked/tested/scanned for error/exploit/overflow conditions, or include a default fallback upon undesired operation.

  4. Admin Says:

    Updated (download link above) with corrected getz.js file, see Issue report for more information.

  5. Admin Says:

    The RPCL 3.0 Qooxdoo version 1.1 interface has issues with Firefox 16, other RadPHP XE RPCL 3.0 packages may also be affected by Mozilla Firefox ending XUL supports.

    Firefox 16 Error: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMHTMLDocument.createElementNS]

    See Using Remote XUL instructions for Mozilla Firefox about:config options that will re-enable XUL.

    As a work-around to restore action of previous Firefox verions in allowing XUL, see Mozilla Support.

    If Patching RADPHP RPCL 3.0 Qooxdoo version 1.1, see bugzilla fix’s for details and code examples.

    The kqxapp.js file has been modified to include the required patch’s, see below for more information and download link.

    Qooxdoo source code/s can be found on, and software developer kit downloads can be found on

    Any updated RPCL versions of the Qooxdoo package may be found at

    Modified version of Qooxdoo in kqxapp.js fails to boot with Mozilla Firefox version 29.0.1 and KitCAD i3 KGC r3 – See issue notice for more information. No issue was found with Mozilla Firefox version 30.0.0 and KitCAD i3 KGC r3.

  6. Admin Says:

    Click to view larger image

    The KitCAD i3 KGC – RPCL 3.0 RadPHP archive contains a pre-patched version of the Qooxdoo version 1.1 for RPCL 3.0 qxapp.js file (which has been renamed to kqxapp.js); See bug/issue patch information. Note : Qooxdoo version 1.1 for RPCL 3.0 differs from Qooxdoo version 1.1 for RPCL 4.0

    The patched kqxapp.js file does not render qx window/dialog title bars or button colour with Firefox versions 15/16 (see image above). A test Firefox 16 CSS fix is included with and is named kqxf16.js. See forum question for more information.

    Modified version of Qooxdoo in kqxapp.js/ fails to boot with Mozilla Firefox version 29.0.1 and KitCAD i3 KGC r3 – See issue notice for more information. No issue was found with Mozilla Firefox version 30.0.0 and KitCAD i3 KGC r3.

  7. Admin Says:

    The RPCL 3.0 version of KGraphicControl has issue with Textarea onChange events after the first round of XML processing called by the first XAJAX 0.2.5 request.

    RadPHP Page authors using the RPCL 3.0 version of KGraphicControl on a XAJAX 0.2.5 enabled project form could insert a modified version of updated example code; See the Issue report/review for more information and example code.

    A possible work-around for this issue could be to download/test updated RPCL 3.0 versions – or correct use of the RPCL PHP server function. RPCL 5.0 and RPCL 5.1 do not behave in the same way as RPCL 3.0 and this issue can be avoided by using XAJAX 0.5 or better included with RPCL 5.0 and RPCL 5.1 or higher.

  8. Admin Says:

    The *get-svr.php example/s included with the RPCL 3.0 KGraphicControl will need to be modified to prevent XAJAX error messages relating to whitespace in the XML response. No action is needed if not using XAJAX 0.2.5 for getting KPD data.

    The modification is performed by either removing the ?> at the end of the XAJAX called Php file or wrap the XAJAX called Php file include() or require() lines with ob_start() and ob_end_clean() functions.

    See the section titled ‘WhiteSpaces’ on the XAJAX tips and tricks tutorial for more information.

    Adding the line ob_start("ob_gzhandler"); or ob_start(); at the start of the Php file will enable GZip compression or the DEFLATE method (Php also checks if the ACCEPT_ENCODING header is sent but it can also be performed using a simple IF statement) for all standard output until a ob_end* function is executed or the end of standard output is reached. Example of GZ compression at start of Php file:-
    if( substr_count($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") ) {
    if (session_id() === null ){ //if session is NOT already running then continue
    ob_start("ob_gzhandler"); //the ob_start function also checks the ACCEPT_ENCODING header

  9. Admin Says:

    HTML5 Builder
    Rad H5B DesignTime view

    A non-working patch to phprj_source_kgraphiccontrol download (above) for use with HTML 5 Builder can be found online at:-

    Download Link: (out-of-date, see updated download below)

    Extract the previous phprj_source_kgraphiccontrol (written for RPCL 3.0) into RPCL 5.0 and then update the /KitchenPages/i3 folder files with h5bprj_patch_kgraphiccontrol (w32).

    NOTE: The default PHP value for $_URL_get of get.cgi?r= will have to be deleted from generated output. Deleting the value in the HTML 5 Builder IDE properties for URL_get does not delete default text of get.cgi?r= from generated output (at this time). The patched kgraphiccontrol.*.php files for HB5 (using RPCL 5.0) can NOT be used with RadPHP, or Delphi4PHP.

    The h5bprj_patch_kgraphiccontrol zip archive has w32 paths of C:\Program Files\ as an example only, other known paths could be C:\Program Files (x86)\ or C:\Program Files (x64)\ and more – depending on the operating system or user desire [Program Files (x64) as example]

  10. Admin Says:

    HB5 KGC test
    HTML5 Builder DesignTime View

    Updated kgraphiccontrol.*.* to draw KPD within the H5B IDE with the following steps :-

    1. Download updated from post above.

    To test the KGC with H5B follow the RadPHP XE updated KGC test instructions above; When testing with H5B – change the instruction text of RadPHP to HTML5 Builder and text of 3.0 into 5.0

    NOTE: The samples folder for kitchenpages/i3/ has NOT been updated from RadPHP RPCL 3.0 to HTML5 Builder and the KGGraphicControl XAJAX JavaScript control support examples have not been updated to H5B RPCL 5.0 at this time.

    H5B IDE KGC COMPONENT USERS NOTE: The patched kgraphiccontrol.*.php files are modified to work with the STANDARD page types of CLIENT and SERVER (RPCL generated code appends _outer to elements); The new MOBILE page types of H5B are currently unsupported at this time. A syntax document generated by H5B help system is in PDF format online – see KGraphicControl.*.php component documentation [PDF File].

    H5B IDE KGC PROJECT USERS NOTE: The patched kgraphiccontrol.*.php files for H5B uses rpcl-bin folder during runtime/debug; For deployment a COMPONENT developer should edit the paths within the patched kgraphiccontrol.*.php files from rpcl-bin to be rpcl; or create a alias folder named rpcl-bin that points to the rpcl folder when any H5B Projects KGraphicControl controls use a rpcl-bin folder.

    The kgraphiccontrol.*.php files from the previous RadPHP version can be used for deployment and require no changes if the environment variables match that of RadPHP RPCL 3.0 – however during H5B Projects deployment any KGraphicControl controls that use a rpcl-bin folder may fail to run.

  11. Admin Says:

    Fixed v1.10: See Bug/Issue notice before attempting download/setup.

    Fixed v1.11: See Bug/Issue notice and updated information for systems with IE 9 or above installed.

    Issue v?.??: See Last-minute notes.

    Download : KGC_RPCL_3-5_Installer_Setup.exe Download (version 1.11[e]) [11Mb]

    The KGC_RPCL_3-5_Installer_Setup.exe is for win32 and x86/x64 systems running IDE’s with RPCL versions 3.0, 4.0, 5.0 and/or 5.1; The Installer will remove the need to use the above KGC downloads/patching instructions or worry about code updates – All required files for RPCL based Projects is included for using KGraphicControls within HTML5 Builder and RadPHP (XE2/XE) IDE’s. The RPCL folder includes source files while the Project folder will contain required deployment files (as example).

    HTML meta tags in user created/installed projects and files should be altered for KitCAD i3 KGC r30 deployment; See List of Meta Tags by Lance Pollard,, and Mozilla Meta Properties for more information. The HTML element of NOSCRIPT needs to be added to alert Web Browsers users that scripting is disabled (NOSCRIPT is a blank screen without addition), and SEO should be performed by web developers before deployment on a public accessible web server.

    Keyboard support is included for KitCAD i3 KGC r30 by default and may clash with other interfaces – as an example: Holding down the SHIFT and ALT keys and pressing the O key {Opens a new drawing for users of KitCAD i3 KGC}. Administrators should enable a system to detect keyboard interactions; See DOM3 Events, Keyboard Events by Jan Wolter ,and JQuery keypress function. The Qooxdoo built RPCL 3.0 library includes a out-dated key-in-use-detection script within the file named /rpcl/qooxdoo/scripts/qxhelp.js. Keyboard event settings for r30/r35 developers can be found in the r3en.js Javascript file.

    NOTE: The CGI files required to operate the r3 package are NOT included within the KGC_RPCL_3-5_Installer_Setup.exe; The required *.cgi mime extension example files will be uploaded within other r3 and r35 source code downloads at a later date (see KGC_RPCL_3-5_XAMPP* downloads/archives for *.pl mime extension example files – stand alone versions; Or for non-windows systems see KGC_RPCL_3-5_cgi-bin* for *.cgi mime extension example files).
    The KGraphicControl package was not tested for use with RPCL 4.0 IDE’s.

    Advanced Users that know their Windows system type may like to use a smaller file: win32 [6Mb] or x86/x64 [6Mb]

  12. Admin Says:

    The first release of KGC_RPCL_3-5_Installer_Setup.exe (release notice for version 1.0) includes KGraphicControl package that had errors with RPCL 3.0 and RPCL 4.0 versions of the RadPHP IDE (the user designtime interface).

    Lines within
    C:\Program Files\Embarcadero\RadPHP\3.0\rpcl\kitchenpages\i3\ (version
    should be changed (as example); for the functions of dumpHeaderCode and dumpContents :-

    $thekpcpath = RPCL_HTTP_PATH;
    to be
    $thekpcpath = "rpcl";

    Failure to change or remove the designtime RPCL_HTTP_PATH value will result in a php generated javascript path value like:-

    kgcrel = “..\/..\/..\/..\/..\/Program Files\/Embarcadero\/RadPHP\/3.0\/rpclkitchenpages\/i3″;

    The text of “rpclkitchenpages” in the path above; has no escaped path symbols of “\/” between “rpcl” and “kitchenpages”, causing javascript designtime error.

    This issue does not apply to the KGraphicControl package installed for use within the HTML5 Builder IDE (RPCL 5.0 and RPCL 5.1).

    More information: Issue report

    The updated installer setup has been uploaded and activated (not tested); The release download link for KGC_RPCL_3-5_Installer_Setup.exe will download the updated version of 1.10

    If updating from version 1.0 using the automated system (preset to manual checking); Users should remove the installed packaged from ALL of the RadPHP and HTML5 Builder IDE’s before downloading the updated version; Or if prompted, during the install process choose the custom install option and de-select the three sub-features named ‘packages’ from installing. Removing unwanted packages (double names) from the IDE’s can be done after the updated version of 1.10 is installed.

  13. Admin Says:

    The first and second release of KGC_RPCL_3-5_Installer_Setup.exe (release notice for version 1.10) includes the KitCAD i3 KGC r3 package (version r30) which has 2 minor bugs in Javascript files (no error is generated but logs show warnings in regard to use of the : symbol after scheme; And cant swap from ssl back to non-ssl mode).

    Bug #1;
    Syntax typo. Until the update/release of 1.11 for version r30 – the corrected files can be downloaded from the following links (Right click on the links, and select Save As):
    r3.js, r3.js.gz and _Index3050API1.js

    Or – as another work-around to the above or version r35, correct the syntax typo by editing the files of r3.js, r3.js.gz and _Index3050API1.js; Changing the line text of :-
    ss = ss =
    to be
    ss =

    Bug #2;
    Can NOT swap back to http scheme. Until the update/release of 1.11 for version r30 – the corrected files can be downloaded from the following links (Right click on the links, and select Save As):
    r3_.js, r3_.js.gz and _Index3050LANG.js

    Or – as another work-around to the above or version r35, correct the bug by editing the files of r3_.js, r3_.js.gz, and _Index3050LANG.js; Changing the line text of :-
    document.location.href = sslonoff;
    to be
    sslonoff = sslonoff.replace(/https\:\/\/secure\.netsolhost\.com\/https\:\/\/secure\.netsolhost\.com\//i,"http:\/\/"); /* this line was added for netsolhost */
    sslonoff = sslonoff.replace(/https\:\/\/https\:\/\//i,"http:\/\/"); /* this line was added for XAMPP and ANY IP/HOST */
    document.location.href = sslonoff;

    Or – as another work-around to the above, manually edit the address bar location by selecting and deleting the unwanted https:// or part of the address, and then press return or click the go button.

    NOTE: The r30 and r35 servers will display a KitCAD i3 authorization error message for during HTTPS loading (which is the correct behavior).

  14. Admin Says:

    Administrators/users with Internet Explorer 9 or above should read the following post about .htaccess setting the browser to IE=8; see .htaccess changes for IE 9, 10 and above

  15. Admin Says:

    The third release of KGC_RPCL_3-5_Installer_Setup.exe (release notice for version 1.11[e]) includes fixes for .htaccess file, RPCL 5.0; And updates X3dom.

    Target environment: XP with SP3 (and Internet Explorer 7/8 installed).

    Unless major issues are found – no fourth release of {KGC; RPCL 3.0, RPCL 5.0} (with r30 for RPCL 5.0) is planned at this time. Source code versions of {KGC i3 r35} and above may be released inline with future versions of the RPCL at a later date.

    NOTE : Re-released on 20th of October, 2013.

    Last-minute notes

    On systems using IE 9 or above and the previous versions of (downloaded before 20th October, 2013) may/will fail to display; Caused by the following issue as described for IE 10 VML work-around.

    As a IDE only fix/work-around; Alter for creating a meta http-equiv tag during RadPHP and HTML5 Builder IDE design time as follows:-
    Edit the all files named and locate the following text:

    define('KGRAPHICCONTROL', '1');

    Insert the following lines, as follows:

    define('KGRAPHICCONTROL', '1');
    if(($this->ControlState & csDesigning) == csDesigning){
    echo '<meta http-equiv="X-UA-Compatible" content="IE=8">';

    X-UA-Compatible meta tag
    H5B IDE and a incorrect X-UA-Compatible meta tag

    – Information use only –

    The function of the above work-around can be altered by removing the ‘if‘ condition that encloses the echo line of X-UA-Compatible http meta tag which will allow the same meta tag to be written for out-side of the IDE (onto the created page).

    Users who downloaded the 1.11 version of source code before the 20th of October, 2013 AU EST should un-install the installed source code, and re-download the updated setup on the 21st as to acquire all changed code.

    The contains a function named __construct; as follows:

    function __construct($aowner = null) {

    $this->ControlStyle = “csWebEngine=ie”;


    As shown above; The script engine control style for the RadPHP and HTML5 Builder IDE’s is set to IE (the default). The JavaScript code of KGraphicControl is enabled to detect browser support – settings provided by the IDE affect the page and not just one KGraphicControl component.

    As a work-around to the first above and viewing using a IE Web Browser, create the projects page holding the KGraphicControl with the following markup inserted under the projects page title element, as follows:
    <meta http-equiv="X-UA-Compatible" content="IE=8">

    Or send using PHP headers from the PHP code of the projects page, as follows:
    <?php header('X-UA-Compatible: IE=8');

    For systems with IE 10 or above using XML structure; the following x-ua-compatible PI meta tag should be considered.

  16. Admin Says:

    A new IDE from Intel (and friends) that can aid in deployment time savings, see XDK test for more information.

  17. Admin Says:


    JavaScript runtime optimiser & DOM Store ->

    Minor code correction, see for updated files. No update of KGC_RPCL_3-5_Installer_Setup.exe [1.11e] is planned at this time.

  18. Admin Says:

    Added Enhanced Keyboard support for KGC to be moved using the arrow keys for all online versions of r30/r35/r3/r5/r50. See release notice for more information. (r3kb.js); No update of KGC_RPCL_3-5_Installer_Setup.exe [1.11e] is planned at this time.

Leave a Reply

You must be logged in to post a comment.