Storing information to use with Intelliprompt

SyntaxEditor for Windows Forms Forum

Posted 15 years ago by Martin Lundberg - Sweden
Avatar
Hello!

Once again I'm not sure if this is a question for this forum but I think it will be good for newbies like me to read this too.

I'm asking for some ideas on how I should store the things I'm going to use with Intelliprmpt. For example all the PHP functions. First I want to be able to show all the functions in a memberlist, then inside a function I want to show the functions syntax and so on.

Should I keep them in a xml file?

I did a example:

<?xml version="1.0" encoding="utf-8" ?>
<test>
    <functions>
        <function name="array_fill" return="array" since="4.2.0">
            <parameters>
                <parameter type="int">start_key</parameter>
                <parameter type="int">num</parameter>
                <parameter type="mixed">val</parameter>
            </parameters>
            <description>
                Create an array containing num elements
                starting with index start_key each 
                initialized to val.
            </description>
        </function>
        <function name="array_flip" return="array" since="4.0.0">
            <parameters>
                <parameter type="array">input</parameter>
            </parameters>
            <description>
                Return array with key and value flipped.
            </description>
        </function>
    </functions>
</test>
I guess you would then load it into objects that you could use to create a memberlist or infotip.

Thanks in advance!

Martin Lundberg
Student, Sweden

Comments (5)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
XML files are always a good idea for generic data storage mechanisms. Then load it into run-time classes.


Actipro Software Support

Posted 15 years ago by Martin Lundberg - Sweden
Avatar
ALot of work to go thought all the php functions and add them to the xml file. Lucky me theres no overloading in php, so theres only one version of every function. =)

thanks!

Martin Lundberg
Student, Sweden

Posted 15 years ago by AdrianRitchie - Guernsey, UK
Avatar
if you ahven't already compiled the xml file you could probably write a simple php script that would run though all of the functions available for PHP and build the function names and the required parameter using the builtin PHP functions.

Or you could parse a copy of the single page HTML help and dump the contents to your XML structure.
Posted 15 years ago by Martin Lundberg - Sweden
Avatar
That sounds really interesting, any tips on how I would do this? =)

I guess using the latest release of php (PHP 5.0.3) and using the bultin php functions would be the most up to date way?

If you would like to haave an easier discusssion about this on icq/msn/irc please e-mail me =)

Thanks in advance!

Martin Lundberg
Student, Sweden

Posted 15 years ago by AdrianRitchie - Guernsey, UK
Avatar
Hi matrin

sorry for the delay, I don't get to visit this forum as often as I should. I'll post this here so others can get to this information if the desire.

The main function you'll need to self-document php is get_defined_fucntions ( <A HREF="http://www.php.net/manual/en/function.get-defined-functions.php" TARGET=_blank>http://www.php.net/manual/en/function.get-defined-functions.php</A> ). You can also find other helpfull functions at <A HREF="http://www.php.net/manual/en/ref.funchand.php" TARGET=_blank>http://www.php.net/manual/en/ref.funchand.php</A> and <A HREF="http://www.php.net/manual/en/ref.info.php" TARGET=_blank>http://www.php.net/manual/en/ref.info.php</A>

I'll also send you a pm with my msn details should you want to talk further about this.

Please note that this can only document your current running PHP version and only the extensions that you have loaded when you run the script.

[ 12-22-2004: Message edited by: AdrianRitchie ]
The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.