Announcement

Collapse
No announcement yet.

New Freeware App for PB Developers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Freeware App for PB Developers

    About a month ago I started making the conversion from Tsunami database to the new SQLitening engine from Fred Meier and Paul Squires. In order to really get a handle on things, I thought I'd focus on writting an application that I've long wanted but never quite got around to doing. I've now complete the first releasable version and I'm making it available for my fellow PBer's out here.

    The program is called CodeClips and it's primary purpose is to provide an organized, central depository for all those little 'snippets' of code we collect over the years. Although there is no reason why you can't store entire applications, I mainly wanted to be able to quickly locate code for reuse in various projects. Also, If you're like me, you see something posted here and you think "That could come in handy someday...." only to save it to your disk and promptly forget it exists!

    CodeClips uses a SQLite database to store a large amount of information about the source files, including the actual source code itself. When you need to find something, you can search the entire code text, your own comments about the file, a set of user-defined keywords, and more. Each file clip can be assigned to a user-defined category which makes finding "like solutions" even easier.

    For each clip, you can categorize it, save the source code, author, copyright info, required compiler, minimum compiler version, free-form comments, and as many 'keywords' as you want to minimize searching later on. The source code can be sent to your favorite editor of choice automatically, and there is a facility to do a 'bulk' import of files that already exist on your computer.

    There are more options that I have in mind, but for now, I find the program very helpful as is.

    I retain the copyright to it, but you are free to use the program for either personal or commercial use free of charge. The program was written with EZ-GUI and a few other commercial add-on products so I can't release the source code at this time. I may rewrite it with PBForms or FireFly 3 at some point and if that happens, I will make the source code available as well.

    I welcome comments of all kinds. I'm most certainly interested in improving the basic application, so if you have ideas for improvements, please let me know.

    The install file can also be downloaded from here. No registry entries are made and all files are contained within the application's folder. I haven't tested this on Vista and have no plans to make it "vista compliant" so if you have Vista, you have my sympathies but not much more
    Last edited by Joe Byrne; 14 Sep 2008, 09:06 PM.
    Software makes Hardware Happen

  • #2
    Hi Joe,

    Seems like a very nice tool.
    A few remarks:

    - Could you add an option to make the clip text control capable of word wrapping. Now it doesn't seem to word wrap.

    - If I edit the clip text and (because it does not word wrap) my cursor goes way right to the text control so that the text scrolls to the left, there does not appear a horizontal scrollbar below the text control, where one should normally expect that it does.

    - There is a 'Save' button in the toolbar and a 'Save as' menu item. Usually, clicking 'Save as' brings up a 'Save file as' dialog box to enter a filename to save the database under a different name. Here the 'Save as' does not bring up a file selection dialog box, so I assume it just saves the current database under the current name, just like the 'Save' toolbar button ?

    - Just selecting a clip already allows you to edit the text in the text control. Maybe it is a good idea to disable editing the text until the 'Edit Selected Clip' button is clicked.

    - I added a source code file as a clip. Right clicking showed a popup menu with 'Edit source'. Selecting that did not seem to do anything. It did not bring up an editor, although I have JellyFish set as the default .bas application program.
    I did not find an option to manually select the editor so I assume the Windows default application is used.

    - This is just a matter of personal choice. If a clip name is too long to show in the treeview, a tooltip text balloon shows to display the complete clip name. Personally I would prefer to see the 'classic' rectangle used to display the full clip name instead of the tooltip balloon. But that is probably just me ..:-)

    - I also had 2 crashes of your application after it showed following error:
    "SQLite or SQLitening returned the following unexpected message!
    -14 = Invalid set number.
    Statement = GetFieldName ClipName"
    After those 2 crashes I could not duplicate that error anymore so I'm afraid I can not give much more info as to the reason why it did.

    Otherwise, good work Joe ! Thanks for making this freeware !

    Kind regards
    Eddy

    Comment


    • #3
      Originally posted by Joe Byrne View Post
      .. I started making the conversion from Tsunami database to the new SQLitening engine
      Any particular reason or just to 'expand your horizon' ?
      Are your abandoning Tsunami completely from now on?

      Kind regards
      Eddy

      Comment


      • #4
        Originally posted by Eddy Van Esch View Post
        Any particular reason or just to 'expand your horizon' ?
        Are your abandoning Tsunami completely from now on?
        Kind regards
        Yea, I'm afraid so, for a number of reasons. The main reason is SQL offers far more flexibility as a database engine and its become "expected" in the market. After nearly 2 years of developing a very (very) large vertical application, the #1 comment I received was the choice of database. People just couldn't believe I was using a proprietary database. They have a good point. A SQL based file can at least be dealt with my most developers should the need arise, but if their data is locked away in a proprietary system, they are at the mercy (and availability) of the few (potentially one) person who knows how to access it.

        The second reason is that Timm is really, really, really busy and after month after month of "any day now" waiting for the new client/server version, I had to make some business choices. I appreciate Timm's work on Tsunami, and I'm grateful for all he's done for this community with Tsunami, but I asked him point blank over 16 months ago if I should move forward with Don's TTDS or wait for the new version. I was told to wait, the new version would be out within weeks. Well, its still isn't available and I started that project 6 weeks behind schedule. That's not Timm's fault, but it made me realize how dependent one can become on proprietary systems.

        When Paul first announced wrappers for SQLite, that solved all my problems. No special database server to install, its fast, has client/server built in, and open source. If something goes wrong, I don't have to wait for someone else to look into it. If I need a feature that's not there, at least there a chance I can add it myself. And being SQL, well, my customer's are far more comfortable too.

        SQLitening simply made a good idea (Paul's original SQLite C/S wrappers) great. SQLitening is still in its infancy, but very, very usable as is.

        My hat is off to Fred and Paul for some excellent work.

        BTW: Thanks for the comments. I'll digest what you suggested and see how to improve the program from your comments!
        Software makes Hardware Happen

        Comment


        • #5
          Joe,
          Thanks for the explanation. That indeed makes sense.

          Kind regards
          Eddy

          Comment


          • #6
            Originally posted by Eddy Van Esch View Post
            Hi Joe,
            - Could you add an option to make the clip text control capable of word wrapping. Now it doesn't seem to word wrap.
            Are you talking about the treeview? I'm not sure which clip text control you mean.
            - If I edit the clip text and (because it does not word wrap) my cursor goes way right to the text control so that the text scrolls to the left, there does not appear a horizontal scrollbar below the text control, where one should normally expect that it does.
            Ok, I think you're talking about the treeview. This is the first time I've used that contol so I have to look into its properties. I can see how h-scrolling would be useful here though.
            - There is a 'Save' button in the toolbar and a 'Save as' menu item. Usually, clicking 'Save as' brings up a 'Save file as' dialog box to enter a filename to save the database under a different name. Here the 'Save as' does not bring up a file selection dialog box, so I assume it just saves the current database under the current name, just like the 'Save' toolbar button ?
            Yea, "my bad" I used a template menu that has the save/save as in there. There really isn't a save-as option. I need to clean up the menu options a bit.
            - I added a source code file as a clip. Right clicking showed a popup menu with 'Edit source'. Selecting that did not seem to do anything. It did not bring up an editor, although I have JellyFish set as the default .bas application program.I did not find an option to manually select the editor so I assume the Windows default application is used.
            You need to define your editor in the options form. Click Options on the toolbar.
            - This is just a matter of personal choice. If a clip name is too long to show in the treeview, a tooltip text balloon shows to display the complete clip name. Personally I would prefer to see the 'classic' rectangle used to display the full clip name instead of the tooltip balloon. But that is probably just me ..:-)
            Good point. I'll see about making this an option as well.
            - I also had 2 crashes of your application after it showed following error:
            "SQLite or SQLitening returned the following unexpected message!
            -14 = Invalid set number.
            Statement = GetFieldName ClipName"
            After those 2 crashes I could not duplicate that error anymore so I'm afraid I can not give much more info as to the reason why it did.
            There are only two places this error could result from, so I'll look closer at those lines.

            Thanks for the feedback!!
            Software makes Hardware Happen

            Comment


            • #7
              Originally posted by Joe Byrne View Post
              Are you talking about the treeview?
              -- No, the text box that contains the clip 'contents'. (see attached screen shot).
              But now, unlike before, the horizontal scrollbar seems to be there .. Strange ...

              I can see how h-scrolling would be useful here though.
              The treeview already has a horizontal scrollbar.

              You need to define your editor in the options form.
              I filled in the path to PBWin 9.0 bin directory in the 'compiler path' box but it still does not open the file..

              Kind regards
              Attached Files
              Eddy

              Comment


              • #8
                Originally posted by Eddy Van Esch View Post
                -- No, the text box that contains the clip 'contents'. (see attached screen shot).
                But now, unlike before, the horizontal scrollbar seems to be there .. Strange ...
                Yea, that is strange. The default for the RT control in EZGUI is word-wrap. I wasn't all that happy with how that looked so I sub-classed it to prevent word-wrap and use the horz-scrolling instead.

                One of the first changes I want to make is to add some basic source-code editing features to this control. At the least, I want to do keyword highlighting.

                The treeview already has a horizontal scrollbar.
                Another strange on. After your initial comment, I went in to the code and added horizontal scrolling to the treeview. I can't see how it would appear in the version I posted....
                I filled in the path to PBWin 9.0 bin directory in the 'compiler path' box but it still does not open the file..
                Did you include the entire path, with the executable name? All I'm really doing here is shelling out to whatever value is there. I use Jellyfish myself, so its possible that the PB-IDE doesn't like the way I'm passing the temp file to it. I'll check into this and see if I can figure out what's going on.
                Kind regards[/QUOTE]
                Software makes Hardware Happen

                Comment


                • #9
                  word-wrap.
                  Perhaps it would be even nice to have a word-wrap option that is settable for each clip text individually !
                  Because source code looks nicest with word-wrap turned off, while ordinary text looks best with word-wrap turned on..


                  Did you include the entire path, with the executable name?
                  Yes, tried with PBEdit and with JellyFish but nothing happens.

                  Kind regards
                  Eddy

                  Comment


                  • #10
                    Yes, tried with PBEdit and with JellyFish but nothing happens.
                    Sure enough! I did something wrong between the time I last tested and compiled the version for distribution. I'll figure out what's going on and post an update.

                    Thanks for catching that !
                    Software makes Hardware Happen

                    Comment


                    • #11
                      Hi Joe

                      Haven't had time to test as Eddy has done but there a few GUI issues that you can correct easily. Screenshot attached with comments.
                      Attached Files
                      Last edited by David Roberts; 11 Sep 2008, 10:53 AM.

                      Comment


                      • #12
                        Joe,

                        I posted on the EZGUI forums some code which should allow you to be able to turn the wordwrap On or Off with the Richedit control.

                        http://chrisboss.hypermart.net/ubb/F...ML/000120.html

                        The horizontal scrollbar (B property in EZGUI) turns off wordwrap. By changing the window styles to get rid of the scrollbar, it should turn thr wordwrap back on.
                        Chris Boss
                        Computer Workshop
                        Developer of "EZGUI"
                        http://cwsof.com
                        http://twitter.com/EZGUIProGuy

                        Comment


                        • #13
                          Thanks David....appreciate the sharp eyes

                          Chris, Its not a matter of know how, its a matter of preference, but thanks.
                          Software makes Hardware Happen

                          Comment


                          • #14
                            Just as a sidebar to Chris's reply, his technique doesn't seem to work with DDT. I tried employing it without success, and even tried one more time this morning, using his code with my variables.

                            In my rich edit text editor built using DDT, I had to kill the control and add it back in with the appropriate styles... and that method, though awkward, does work very well.

                            Comment


                            • #15
                              You are right. It doesn't appear to work.

                              The richedit doesn't change itself, even if you change the window styles.

                              It is true that some controls require you destroy the control and recreate it again to change some window styles., but I don't know if this applies to the richedit control or not.
                              Chris Boss
                              Computer Workshop
                              Developer of "EZGUI"
                              http://cwsof.com
                              http://twitter.com/EZGUIProGuy

                              Comment


                              • #16
                                I found the solution to the toggle wordwrap mode problem for the richedit.
                                I had to seacrh the web for the info and it was a strange richedit message that solved the problem.

                                I updated the EZGUI code on my forum.

                                I posted a DDT version in the source code forum here:

                                http://www.powerbasic.com/support/pb...124#post296124
                                Chris Boss
                                Computer Workshop
                                Developer of "EZGUI"
                                http://cwsof.com
                                http://twitter.com/EZGUIProGuy

                                Comment


                                • #17
                                  YES, YES, YES!

                                  Thank you, Chris... that did it. Your perseverance is appreciated.

                                  Comment


                                  • #18
                                    New version 1.1

                                    I've just uploaded a new version (1.1) that fixes a couple of bugs. The code editor should work fine now. I also added a break-out display of all the SUBs and FUNCTIONs within the source code.

                                    There is no need to uninstall the previous version. If you have version 1.0 already installed, simply run the install program and select the same folder. No changes are made to any existing databases.

                                    As always, comments appreciated!

                                    (Alt. Download Here)
                                    Attached Files
                                    Software makes Hardware Happen

                                    Comment


                                    • #19
                                      Is anyone using this?

                                      There are over 1,000 views on this post, and a fair number of downloads, but I've only gotten feedback from one person.

                                      I have a number of additions to make, but if I'm the only one interested in using the program I won't bother posting the updates.

                                      Just curious.
                                      Software makes Hardware Happen

                                      Comment


                                      • #20
                                        >Is anyone using this?
                                        > There are over 1,000 views on.... but I've only gotten feedback from one person

                                        The Voice of Experience says that after only a couple weeks (Sept 10) you are just about average re feedback volume.

                                        However, you can increase that feedback by coding in few bugs.

                                        MCM
                                        Michael Mattias
                                        Tal Systems (retired)
                                        Port Washington WI USA
                                        [email protected]
                                        http://www.talsystems.com

                                        Comment

                                        Working...
                                        X