locked
LitDev Extension Updates

All replies

  • Thanks for the XML + typo corrections.  I like the user cursor and added (slightly simplified) to LDCursors (hope this is OK).

    BTW, you can use LDColours.GetPixel to get the colour of any pixel on the GW, regardless of if it is a background, drawing or shape (the default GraphicsWIndow.GetPixel only works for the drawing layer).

    EDIT

    If you fancy a little C# extension project, how about creating your own cursors on the fly like this.  You can create bitmaps on the fly as in the example, or use from an input image (jpg, png, bmp etc).  Could make a fun extension and get some insight into image formats, conversion and a little C# interop (user32.dll) into the bargain.  Perhaps cursor = CreateCursor(fileName, xHotSpot, yHotSpot) where cursor can be used in method below or set using SetUserCursor(cursor) when cursor is not a file path.

    You could also attach the cursors to individual UIElements on the GraphicsWindow (i.e. individual shapes, controls etc) with a command like SetCursor(shapeName, cursor).

    Both of the the above should not be too hard and may be fun.

    Sunday, August 24, 2014 10:03 AM
    Moderator
  • Ay Caramba, much better so :-).

    I think i came across the upper switchonthecode C#Tut, which looked a little bit too hard at that moment, but 'll try when done with my additional ImageList effects (Sepia, PureBW, MakeTransp, ChangeColor, RemoveAlpha, SwitchChannels, SetBrightness, -Gamma, -ColorFilter etc.) you suggested some time before (on 'Transp Toolbar Buttons'). Anyway CursorTest.zip in DLs and

    here's german xml for LitDevDe_v1-0-0-117_2 (and some corrections in SBLib.De.xml)

    Edit: A huge cursor library for free DL, eg here

    Btw. I think it's not possible via XML, but tried some variations to change text color in IntelliSense help under LDColours.COLOUR: <summary>HERE coloured Text or eg. filled square etc.</summary> to get a better impression of the color during coding. Neither default html code does work, nor &lt; etc. If it should be possible anyhow through XML, do you know a way that may work ??




    Sunday, August 24, 2014 6:42 PM
    Answerer
  • I did the cursor ideas for next release - create your own cursor from image and apply cursor to individual shapes.

    I did think about a way to do colours better in IDE, but couldn't see any way with the constraints of how SB displays xml.

    The image manipulation ideas sound cool - with a bit of work a pretty reasonable image processing tool should be possible in SB.

    Sunday, August 24, 2014 7:15 PM
    Moderator
  • Uploaded new version (118) - mostly refactoring (moving random bits out of LDUtilities to new objects), but a couple new bits and fixes too.
    Friday, September 19, 2014 6:04 PM
    Moderator
  • Hi LitDev, well rested ? :-)

    As i see, back again to business as usual with a general revision (LDServicePack).

    About my w.i.p.: The cut out methods from LDUtilities (and some from LDShapes) to -> LDGraphicsWindow etc.

    Are there serious changes in the engl. version, or did you only rename/replace the method.names ??

    Think, that I'll need a bit longer this time.

    Friday, September 19, 2014 10:20 PM
    Answerer
  • So we in Scotland are still part of UK - probably the safer option but less interesting.

    Sorry making work for you! - much appreciated and take your time - there are no changes to content of methods that are moved, just a rename to new object.  If you want I can give a complete list of all renamed.

    There had been a few additions recently to LDUtilities (dumping ground for ad-hoc stuff), but they were mounting up and really made sense to create new method names that are appropriate and when Martmen commented on it I decided to upload.

    Friday, September 19, 2014 10:39 PM
    Moderator
  • 1. ..they were mounting up and really made sense to create new method names that are appropriate. 2. ...can give a complete list of all renamed..

    1. Can only agree with that and better sooner now, than later when it would make more changes. 2. Got them from temp file, after cut out obsolete method names.

    There where a lot of changes in new LitDev.dll v118, and already existing SB programs need to be updated if they contain any of the below Methods, to work:
    (This are the former method names and their new names. New added methods NOT shown here)

    FROM                                      to     NOW

    LDUtilities.GWCapture                      LDGraphicsWindow.Capture
    LDUtilities.GWPrint                           LDGraphicsWindow.Print
    LDUtilities.PauseUpdates                 LDGraphicsWindow.PauseUpdates
    LDUtilities.ResumeUpdates              LDGraphicsWindow.ResumeUpdates
    LDUtilities.ExitButtonMode               LDGraphicsWindow.ExitButtonMode
    LDUtilities.TransparentGW               LDGraphicsWindow.TransparentGW
    LDUtilities.TopMostGW("bool")         LDGraphicsWindow.TopMost = "bool"    (now PROPERTY, see eg. with findstr /s /i /c:"("\"True\"")" *.sb    , will also show: While ("True")  lines)
    LDUtilities.GWStyle                           LDGraphicsWindow.Style
    LDUtilities.GWState                          LDGraphicsWindow.State
    LDUtilities.Icon                                 LDGraphicsWindow.Icon
    LDUtilities.GWWidth                         LDGraphicsWindow.Width
    LDUtilities.GWHeight                        LDGraphicsWindow.Height
    LDUtilities.ScreenCapture                LDGraphicsWindow.ScreenCapture
    LDUtilities.ExitOnClose                    LDGraphicsWindow.ExitOnClose
    LDUtilities.CancelClose                    LDGraphicsWindow.CancelClose
    LDUtilities.GWClosing                      LDGraphicsWindow.Closing

    LDUtilities.RegexMatch                    LDRegex.Match
    LDUtilities.RegexReplace                 LDRegex.Replace

    LDUtilities.TWCapture                     LDTextWindow.Capture
    LDUtilities.TWPrint                           LDTextWindow.Print

    LDUtilities.Zip                                  LDZip.Zip
    LDUtilities.UnZip                              LDZip.UnZip
    LDUtilities.ZipList                             LDZip.ZipList

    LDColours.GetPixel                          LDGraphicsWindow.GetPixel        ' v119

    LDShapes.BackgroundImage                LDGraphicsWindow.BackgroundImage
    LDShapes.BrushGradientBackground    LDGraphicsWindow.BackgroundBrushGradient

    To change FROM to NOW (in existing .sb files) automatically from the CmdLine one can use eg.
     FART or ProjectPage (:-) OK, dont mind its name), which is very fast and easy to use:

    PreviewMode:  fart.exe -r -i -p *.sb FROM NOW
    like example:   fart.exe -r -i -p *.sb LDUtilities.GWCapture LDGraphicsWindow.Capture

    and the same command (but without the -p switch) for ReplaceMode in current directory and SUBs (-r).

    LDImage.EffectBlocks        +2. Param    like  now: LDImage.EffectBlocks(old, 0)   ' default
    LDImage.EffectContrast    +2. Param     -"-  find with eg: findstr /s /i LDImage.EffectContrast *.sb
    LDImage.EffectFuzzy        +2. Param      -"-
    LDImage.EffectJagged      +2. Param      -"-
    LDImage.EffectReflect       +2. Param     -"-
    LDImage.EffectSnow         +2. Param     -"-

     Last 6 LDImageEffect..  to change manually, just like occurencies of LDUtilities.TopMostGW  above.


    Sunday, September 21, 2014 6:00 PM
    Answerer
  • Thanks for this - all of the old commands will still work (e.g. LDUtilities.GWCapture will work just like LDGraphicsWindow.Capture).

    The ones that will need updating are the effects now taking parameters, but I didn't think there would be many programs using these and the added parameters give much better image manipulation control, rotation etc.. 

    I did update all the samples in download (I think).

    The main reason to re-organize was so the methods could be found more easily in logical(ish) objects.  I may shuffle a few about in the future (always maintaining the old methods to work) but it was best to get it over in one step.

    Sunday, September 21, 2014 6:53 PM
    Moderator
  • all of the old commands will still work

    Ah, did'nt even try but changed them all at once. But good to know. All your samples are updated. German xml is in the last post above and just put it here  LitDevDe_v1-0-0-118_2.zip, again after found some minimal errors and changed, but both work and show up in ISense now.


    Sunday, September 21, 2014 7:45 PM
    Answerer
  • Thanks - will fix the Regex typos for next.

    The way the old commands are handled is:

    1. Create a copy of the method in new object (maybe change name a bit)
    2. The /// xml is removed from the old command and replaced with [HideFromIntellisense] attribute
    3. All the code from the old method is deleted and just calls the new method.

    So the old commands still work in code, but there is no reference to them in documentation or intellisense.

    The LDUtilities GWCapture now looks like -
            [HideFromIntellisense]
            public static void GWCapture(Primitive fileName, Primitive border)
            {
                LDGraphicsWindow.Capture(fileName, border);
            }
    

    Sunday, September 21, 2014 8:04 PM
    Moderator
  • Oh, cool. Just see it, comparing Utilities.cs (v117)  and Utilities.cs (v118)  in WinDiff.

    Sunday, September 21, 2014 8:38 PM
    Answerer
  • Thanks!
    Friday, September 26, 2014 7:57 PM
    Moderator
  • Thanks!
    Wednesday, October 01, 2014 7:04 PM
    Moderator
  • Thanks, some extra public static methods that are not for SB sometime creep in
    Sunday, October 12, 2014 5:33 PM
    Moderator
  • Thanks - I re-uploaded.
    Monday, October 13, 2014 6:03 PM
    Moderator
  • Thanks as usual for the xml and testing - bug fixed for swirl (only tested with webcab where a typo didn't show itself).

    I like your effects too - just about anything is possible really and not so hard to do.

    Thursday, October 23, 2014 7:48 PM
    Moderator
  • Hi LitDev,

    Here's german xml for LitDevDe_v1-0-0-122.

    The new ColorMatrix is really a great idea and an 'Egg-laying wool milk sow' for all kinds of color-, opacity-, brightness- ... adjustments and LDCharts statistic data view looks wonderfull. My thumbs & toes 're UP.

    Saturday, November 15, 2014 9:48 PM
    Answerer
  • Thanks for xml - I post added a couple other chart types (bubble, bar and column).
    Saturday, November 15, 2014 10:27 PM
    Moderator
  • Thanks, sorry for quick upload repeat - couldn't resist tinkering...
    Saturday, November 15, 2014 11:31 PM
    Moderator
  • Oh no well done, MY fault. Usually i call 'LDLinksCheck.exe' from the Console and would have seen

    ... LitDev_Source.zip:      15.11.14 20:33:30  ... . But that was AFTER my upload then :-). Busy testing ColorMatrix, ...

    Sunday, November 16, 2014 12:00 AM
    Answerer
  • In anticipation of when I may need to move the free host site (they delete stuff sometimes, its been down a bit and ftp is getting slow) I have parked a new domain name which I can move seamlessly when I change hosting.

    litdev.hostoi.com will contue to work while I am still there, but from now on and into the future best to locate at:

    http://litdev.co.uk/

    Sunday, November 16, 2014 10:29 AM
    Moderator
  • Thanks, and with 96 dpi you never saw the issue jibba jabba was having so I think it is all clear now.
    Sunday, November 23, 2014 6:08 PM
    Moderator
  • LDTranslate object added Build#124 - for example works with recent SolarSystem model translation of planet details from Spanish to Englush.

    GraphicsWindow.ShowMessage(LDTranslate.Translate(InfoPlaneta[Iplan],"es","en"),NombrePlaneta[Iplan])

    Test sample

    languages = LDTranslate.Languages()
    indices = Array.GetAllIndices(languages)
    For i = 1 To Array.GetItemCount(indices)
      TextWindow.WriteLine(indices[i]+" : "+languages[indices[i]])
    EndFor
    TextWindow.WriteLine(LDTranslate.Translate("Hello World","en","tlh"))
    tlh is Klingon language!
    Wednesday, November 26, 2014 6:19 PM
    Moderator
  • Thanks and for the typos
    Wednesday, November 26, 2014 10:57 PM
    Moderator
  • Just noticed LDImage.SaveAs does nothing (v124 and v125_Test ‎ 11. ‎Dez ‎2014, ‏‎20:36 h)

    I guess dots for   .. cases "ext": ...  ??

    Friday, December 12, 2014 6:11 PM
    Answerer
  • Thanks, exactly that "jpg" should have been ".jpg" etc.
    Friday, December 12, 2014 8:02 PM
    Moderator
  • Yes, but seems that .Icon will not work. In ImageList i add an SB overlay over a loaded icon (spec. SB icons for my SB programs), like , but ImageFormat.Icon does'nt work:

    Image Format Conversion in .NET, 1st upper comment from 'gggustafson': Certain formats do not work (Emf, Icon, Wmf). Microsoft knows this but does not plan a fix.

    LDImage.SaveAs((image, fileName.ico) saves as .png

    I simply use "..ImageMagick\convert.exe inFile.png outFile.ico"  afterwards.

    Saturday, December 13, 2014 4:18 PM
    Answerer
  • Thanks very much - I have fixed the typos for next relase and test version

    Also changed UNCONNECTED to NOT_CONNECTED
    Tuesday, December 16, 2014 10:16 PM
    Moderator
  • Here's german xml for LitDevDe_v1-0-0-126 and i wish all a good slide into '15 ...

    Sunday, December 28, 2014 9:00 PM
    Answerer
  • I like the image - happy new year and thanks.
    Sunday, December 28, 2014 10:02 PM
    Moderator
  • I like the image ...

    PS: Here Ich habe den Weihnachtsmann gesehen .. is the orig one. But, NO Scotch in the glass. :-)

    Sunday, December 28, 2014 11:16 PM
    Answerer
  • Litdev. Maybe my broadband is too slow but I still can't d/load the extension.
    Monday, December 29, 2014 7:53 AM
    Moderator
  • @ Pappa Thanks for de xml

    @ Jibba Jabba - do you still have problems, perhaps I tried putting is somewhere else to see if it is some issue with my website - I won't maintain it on my SkyDrive but here it is: http://1drv.ms/1wm5FNE, main dll  with samples, source code and beta version (just extension and no samples/documentation - smaller)

    Monday, January 19, 2015 6:35 PM
    Moderator
  • Thanks again for the translation.

    You have a very strange case indeed wih TW.  Can't see why it should be, perhaps the JavaScript used for the evaluate is somehow causing some low level threading issue and the variable res is somehow not ready or somehow interacts badly with the Console used for TW - but why it works with TW.Show I have no idea?


    TW.Show() is:

    public static void Show()
    {
    	if (!TextWindow._windowVisible && NativeHelper.AllocConsole())
    	{
    		TextWindow._windowVisible = true;
    	}
    }

    The AllocConsole sets the console (TW output) for the current process see here.  Reading the Remarks gives a clue,I guess the JavaScript is hogging the Console internally and it is only returned to Sb when TW.Show calls AllocConsole. Will try to fix... kinda obscure but hard for a user to figure...


    Sunday, January 25, 2015 9:10 PM
    Moderator
  • So something like:

    myValue = LDMath.Evaluate("(9/6) + 3")
    TextWindow.WriteLine(myValue)

    does/did'nt work in general. Same for you?

    Sunday, January 25, 2015 9:53 PM
    Answerer
  • Not unless you TW.Show before the Evaluate, since the JS mucks  up the console (TW) allocation:

    TextWindow.Show()
    myValue = LDMath.Evaluate("(9/6) + 3")
    TextWindow.WriteLine(myValue)

    Sunday, January 25, 2015 10:06 PM
    Moderator
  • Should'nt be a prob if one knows about the TW.Show() in front. I've noted it to the De.xml

    ot: Also noticed about ZIndexProperty ( By default, the z-order of objects within a Panel is determined by the sequence in which they are declared. Objects that are declared later appear in front of objects that are declared earlier.) But after adding eg. 10 Shapes in a loop to the GW, found out using GetZIndex Method, that in fact all shapes have default value of ZIndex 0, while i had supposed eg. 0 to 9 for 10 shapes.

    Sunday, January 25, 2015 10:22 PM
    Answerer
  • You are right, by default all shapes have z index 0, but do appear in the order created, unless modified by ZIndex - this is how .Net does it.
    Sunday, January 25, 2015 10:25 PM
    Moderator
  • Thanks
    Sunday, February 08, 2015 10:40 PM
    Moderator
  • Thanks, I didn't see the coodinat typo, perhaps I fixed it?

    I will checkout the SBShell - Thanks

    I'm having some issues with ftp upload so I may leave till tater

    Saturday, February 21, 2015 10:29 PM
    Moderator
  • @ Papa,

    I checked out the SBShell (lots of cool bits) and if you want I can easily add it to LD extension (or not if you prefer) with recognition written by you (works on 64 bit W8.1 fine).

    Wednesday, February 25, 2015 7:23 PM
    Moderator
  • Hi LitDev,

    that's why i sent it to you. To ev. check through it and let you decide if you find them useful too and could imagine to add them. Sure there are useful methods for use in SB and modify and integrate whatever you find useful. It's just great to have all the useful methods together in one single LitDev extension .dll. Glad you like it and guess the extended details names are in engl. for you and depend on system language then. Then it will be great.

    Ah, just found it in todays LitDev_Test.zip but 'll view that tomorrow. I hope my engl. translation is  halfway understandable.
    Wednesday, February 25, 2015 9:14 PM
    Answerer
  • Thanks and made the changes to fix as per your comments.  Uploading is intermittent just now so will try again later.  I have all the file and zip creation automated on build, but the one obstacle to a really smooth process is the erratic uploading.
    Saturday, March 14, 2015 11:32 AM
    Moderator
  • Thanks, I got in a bit of a muddlle with web server playing up and my automated updating so ended up with a new release number...
    Monday, March 16, 2015 6:20 PM
    Moderator
  • Thanks for XML - the new version is needed for new SB release  codebase the same.
    Saturday, March 28, 2015 3:41 PM
    Moderator
  • Hi Litdev,

    I installed SB 1.1 on two Win 8.1 machines, both of which previously had SB1.0 installed.  I also installed on a couple of Win 10 machines, one of which previously had a SB1.0 installation and the other was a clean install.

    Smallbasic itself works fine on all machines, but your extension only works for me on both the Win 10 machines.  On the Win 8.1 machines SB doesn't seem to find the extension as none of the LDxxxx commands are available.

    I used the same installation files and procedure for all installations.  I'm guessing it's something to do with permissions or something, but have no clue how to go about troubleshooting it....any suggestions?

    I tried running SB as administrator, but no difference.

    Thanks for any guidance you, or any one else, can provide.

    Sunday, March 29, 2015 12:13 PM
  • Hi OzJerry,

    The conversion of the extension to version 1.1 included some issues merging the various dlls into the single LitDev.dll that I provide (using IlMerge).  I tested on a fairly standard Windows 8.1 and it worked OK for me after a few mods.

    Check that you have files here:

    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5

    I suggest getting the latest beta version of the extension I uploaded.  Perhaps uninstall SB and re-install to be sure.

    I also uploaded a very simple version 1.1 compatible extension.  As a first test check this works - it does nothing much, but checks that extensions should work.

    Sunday, March 29, 2015 12:29 PM
    Moderator
  • Thanks Litdev, I think you have hit on the problem. I have no v4.5 directory within directory structure you listed above.  I did try to install .Net 4.5 earlier, but it said it was already included in my windows version.

    It's getting late here so I'll have a look tomorrow, but at least I now know where to start.

    Thanks very much.

    Edit: The test extension you uploaded also fails...as expected I suppose, based on the issue above, but though I better mention it.

    Edit 2: Thinking about it some more, if .Net 4.5 is 'missing' then surely SB1.1 shouldn't work either?  

    I'll play with it tomorrow and also try the beta version as you suggest.  Will report here what happens in case anyone else has the same issue.

    Cheers


    • Edited by OzJerry Sunday, March 29, 2015 1:03 PM
    Sunday, March 29, 2015 12:50 PM
  • Because these files don't exist doesn't mean you are missing .Net4.5, its just where it is on my PC.  All windows 8.1 have it pre-installed and Small Basic V1.1 works so I don't think its that simple, but also check if these files are present on the other Win 10 machines.

    It may be that the IlMerge process I use is sensitive to how .Net4.5 is installed in some way?

    Also, definitely do the other tests

    • uninstall-reinstall SB
    • get current beta extension
    • also try the simple test extension I uploaded on my last post.

    Sunday, March 29, 2015 12:58 PM
    Moderator
  • Sorry, my edits crossed with your post. Just to reiterate:

    Test extension doesn't work either (am assuming it would inject an object named 'testsomething'.

    Just tried latest beta and that doesn't work.

    Have tried uninstalling and cleaning the registry ebefore reinstalling..No joy.

    It's well past midnight here so I'll have to call it a day and will play tomorrow.

    Thanks again for the assistance and very prompt response.

    Sunday, March 29, 2015 1:18 PM
  • Thanks - I would look at why the simple extension doesn't work - this really is just a 5 line extension that echos the input to TextWindow.  If this doesn't work then no extensions will.  Also I wouldn't manually edit the registry unless you are very sure about it.
    Sunday, March 29, 2015 1:33 PM
    Moderator
  • Thanks - I would look at why the simple extension doesn't work - this really is just a 5 line extension that echos the input to TextWindow.  If this doesn't work then no extensions will.  Also I wouldn't manually edit the registry unless you are very sure about it.

    Hi Litdev

    Simple extension doesn't work on my PC too.

    I could add my extension.   I think New Microsoft Smallbasic Library.dll   should be refered.

    Sunday, March 29, 2015 2:20 PM
    Answerer
  • Interesting.  I did uninstall SB 1.0, installed SB 1.1 and referenced the new SmallBasicLibrary.dll in the extension C# code as well setting it to be .Net4.5.  It does run for me and some others using SB v1.1 so there is something odd?

    If you open the test extension in IlSpy it is clearly referencing v1.1 of SmallBasicLibrary.


    My extension code is also very simple

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.SmallBasic.Library;
    
    namespace TextExtension
    {
        [SmallBasicType]
        public static class TextExtension
        {
            /// <summary>
            /// A simple test function
            /// </summary>
            /// <param name="text">Text To write</param>
            /// <returns>The text</returns>
            public static Primitive Text(Primitive text)
            {
                TextWindow.WriteLine(text);
                return text;
            }
        }
    }

    Sunday, March 29, 2015 2:38 PM
    Moderator
  • Litdev

    this is serialport extension. (SBComport)  Made by using Visual studio 2010 express and then rebuild by VS 2012 express . 

     refered new microsft.smallbasic.library.dll

    Does this work on your PC?

    https://drive.google.com/file/d/0B8mzGh2PVjd-bkl0YUVWT3dYSzA/view?usp=sharing

    Sunday, March 29, 2015 3:12 PM
    Answerer
  • NaochanON,

    Yes, your extension works fine for me.

    Here is the full project for my simple test code - Compiled in VS2013 Express, but should also work in earlier versions.

    Sunday, March 29, 2015 3:28 PM
    Moderator
  • NaochanON,

    Yes, your extension works fine for me.

    Here is the full project for my simple test code - Compiled in VS2013 Express, but should also work in earlier versions.

    Litdev , it doesn't appear  on small basic intellisense.   and when build, this error message occurs. is this OK?

     * After  added XML comment, it appeared.  and worked fine.   !!!!!!!


    • Edited by NaochanONEditor Sunday, March 29, 2015 3:54 PM problem is fixed
    Sunday, March 29, 2015 3:45 PM
    Answerer
  • Yes its just a warnng that I didn't add xml for the main object (just the methods).  Should be no problem, but you can always add a simple xml comment.

        /// <summary>
        /// My test.
        /// </summary>
        [SmallBasicType]
        public static class TextExtension
    

    So if you can't run it after compiling I'm at a bit of a loss to know what it might be?

    Check that the new SmallBasicLibrary.dll is referenced and project is .Net4.5 AnyCPU which they are.

    Maybe try compiling in VS2012 as you did the commPort?

    Sunday, March 29, 2015 3:55 PM
    Moderator
  • Yes its just a warnng that I didn't add xml for the main object (just the methods).  Should be no problem, but you can always add a simple xml comment.

        /// <summary>
        /// My test.
        /// </summary>
        [SmallBasicType]
        public static class TextExtension

    So if you can't run it after compiling I'm at a bit of a loss to know what it might be?

    Check that the new SmallBasicLibrary.dll is referenced and project is .Net4.5 AnyCPU which they are.

    Maybe try compiling in VS2012 as you did the commPort?

      As mentioned above, after XML comment added, TestExtension  appeared and worked fine. 

    so,  XML comment will be necessary.

      

    Sunday, March 29, 2015 4:21 PM
    Answerer
  • I have no idea how the xml warning could be an issue for TestExtension or even LitDev extension. 

    On my version of Small Basic the TestExtension works fine (no decription of the object due to missing xml) but SB compiles and runs fine, and the TestExtension appears in intellisense wheel and the Text method appears in the help. 

    It behaves exactly as it did for version 1.0 so I am completely confused?

    As another test, I have uploaded a compiled SB program using LitDev.dll. 

    • Does it work when the exe is run?
    • Can it be compiled by SB?

    As a second thught I have re-uploaded the TestExtension with xml added to test if it is really this or perhaps code compiled by my machine isn't working for you.  Does this version work?
    Sunday, March 29, 2015 5:00 PM
    Moderator
  • As another test, I have uploaded a compiled SB program using LitDev.dll. 

    • Does it work when the exe is run?
    • Can it be compiled by SB?

    As a second thught I have re-uploaded the TestExtension with xml added to test if it is really this or perhaps code compiled by my machine isn't working for you.  Does this version work?
    • Does it work when the exe is run?  .....  Yes, it works fine
    • Can it be compiled by SB?   .... No,  because  Test1.1.zip does not include Litdev.xml.   XD)

    Sunday, March 29, 2015 11:21 PM
    Answerer
  • So this is what I've tried and the results:

    Compiled SB Program:

    • Does it work when the exe is run? ...Yes
    • Can it be compiled by SB?... No it throws an error to say it can't find the LDGraph Object

    Latest Beta version of LD Extension:

    Doesn't work on wither of the Win 8.1 Machines

    Latest version of 'Simple Test Extension' with added XML:

    Doesn't work on either of the Win 8.1 Machines

    So I installed VS2013 Express on one of the Win 8.1 machines and created my own extension using LitDev's guide.  This extension worked fine on both Win 8.1 machines (and Windows 10).

    I then downloaded LitDevs source for the simple test extension and compiled it on my machine.  This also worked fine on both Win 8.1 machines and Win 10.

    Incidentally, after installing VS2013 I then had .net4.5 files in the directory structure which LitDev mentioned above.  The Win10 machines do not have any .net4.5 files in that directory and in that respect look identical to the Win 8.1 machine prior to the VS2013 installation.

    I used ILSpy to examine the working and non-working extensions on my machine and couldn't find any differences with regards to references and .net targets.

    So I'm at a loss as to what to try next.  It appears to be something in the way that it's compiled rather than the installation of .net 4.5 on my machine.  

    Monday, March 30, 2015 5:04 AM
  • Litdev

    this is serialport extension. (SBComport)  Made by using Visual studio 2010 express and then rebuild by VS 2012 express . 

     refered new microsft.smallbasic.library.dll

    Does this work on your PC?

    https://drive.google.com/file/d/0B8mzGh2PVjd-bkl0YUVWT3dYSzA/view?usp=sharing

    I tested below on win7.  ( I'll test it on win8.1 later) 

    In this stage,

     ***.dll  and ???.exe  works fine.  But

     Downloded ***.dll and ***.xml  do not work in SB IDE

    Rebuild on your PC is necessary?

     
    <Download Litdev's TestExtension or other  on win7>
    OK : Litdev.dll and graph_update.exe  works fine.
    NG : Downloaded TestExtension1.1.zip.→ Unzipped .
         TestExtension.dll and TestExtension.xml are  installed in smallbasic\lib
         It doesn't appear in intellisense.
    OK : Above TestExtension is rebuiled (VS2012), and new TestExtension.dll and TestExtension.xml
         are  installed in smallbasic\lib.
         TestExtension appeared in intellisense and worked fine.

    <Download my SBcommport Extension on win7>
    NG : Downloaded RS232c SerialCommPort-3rd Final FW4.5.zip. → Unzipped .
         SerialCommPort.dll and SerialCommPort.xml are  installed in smallbasic\lib
         It doesn't appear in intellisense.
    OK : Above SerialCommPort is rebuiled (VS2012), and new SerialCommPort.dll and SerialCommPort.xml
         are  installed in smallbasic\lib.
         SerialCommPort appeared in intellisense and worked fine.

    * In case of Win8.1, same results were obtained.  Other person's ***.xml doesn't work?

       rebuild is necessary?????. 




    • Edited by NaochanONEditor Monday, March 30, 2015 10:25 AM added win 8.1 results
    Monday, March 30, 2015 9:08 AM
    Answerer
  • Sorry, if probably a silly comment, but some words about ILMerge

    Latest Version is 2.14.1208 on Nuget.

    DirectLinks: ilmerge.2.14.1208.nupkg or ilmerge.2.14.1208.nupkg

    Also read: ILMerge on .Net 4.5About 'MergeLitDev.bat': For me all seems to work so far, i compile my extensions using eg.

    %windir%\Micro....\v4.0.30319\csc.exe /t:library /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\..dll" ... or /r:"%windir%\Micro......\Framework\v4.0.30319\..dll" ....

    (about paths for %windir% and %ProgramFiles% assemblies)

    and

    C:\Program Files\Reference Assemblies\Microsoft\Framework>tree /A    (info: removed the 'de' folders here)
    +---.NETFramework
    |   +---v3.5
    |   |   \---Profile
    |   |       +---Client
    |   |       |   \---RedistList
    |   |       \---Server Core
    |   \---v4.0
    |       +---PermissionSets
    |       +---Profile
    |       |   \---Client
    |       |       +---PermissionSets
    |       |       \---RedistList
    |       \---RedistList
    +---v3.0
    |   +---RedistList
    |   \---SubsetList
    \---v3.5
        +---RedistList
        \---SubsetList

    So there'sNO '\v4.5\' directory here under 'Reference Assemblies'. Sorry if stupid. Just an idea ???

    Monday, March 30, 2015 11:51 AM
    Answerer
  • Thank you OzJerry, NaochanOn and Pappa,

    This has been a stange one and I think the tests that OzJerry (thanks for clear reporting of results of all suggestedtests) did rule out anything to do with IlMerge or xml - some early suspects.

    It now appears that a very simple extension compiled for .Net 4.5 AnyCPU referencing SmallBasicLibary.dll (version 1.1) using VS2013 Express produces different (the binaries are different) dll if compiled on my PC or another.

    The version compiled on my PC works for me and some other machines, but not others.

    What can cause this - any ideas?

    It looks to me like I must be using a different compiler in some way with some incompatibility - my last suspect usually but maybe even a compiler bug or very bizarre virus.  My best guess is that the incompatibility comes from some VS2013 service pack updates which I have done.  These can be hard to unwind, but at present this seems my only option.

    So very strange...

    Actually I am using Visual Studio Community 2013 with update 4.

    EDIT

    @NaochanON

    <Download my SBcommport Extension on win7>
    NG : Downloaded RS232c SerialCommPort-3rd Final FW4.5.zip. → Unzipped .
         SerialCommPort.dll and SerialCommPort.xml are  installed in smallbasic\lib
         It doesn't appear in intellisense.

    This is the same file that you uploaded and worked before upload?  If so then perhaps the zip/upload download is modifying the dll in some way?  Or maybe it is just another variant of the compiled on one PC not workig on another?

    Monday, March 30, 2015 5:42 PM
    Moderator
  • Donno if this helps, because not a single failure on Win7 32bit (since SB 1.1 and before):

    1.  http://litdev.co.uk/downloads/Test1.1.zip:
    graph_update.exe    OK, runs without probs.
    graph_update.sb      Compiles OK, with LitDev.dll (from Test1.1.zip, mod:29.03.15  11:20).
     .. and for same LitDev.dll    I see all LitDev.De.xml IntelliSense Help  (<?xml version="1.0" encoding="UTF-8"?>) 

       as well as help for the original SBCommPort from NaochanOn. Everything works perfect.

    2.  About: http://litdev.co.uk/downloads/TextExtension1.zip

    3 x compiled like this:
    C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /r:"C:\Program Files\Microsoft\Small Basic\SmallBasicLibrary.dll" /doc:"TextExtension.xml" TextExtension.cs AssemblyInfo.cs

    and all 3x TextExtension.dll is different in MD5 but same in Byte size (but thats default and always so, not only since last weekend. every compilation is different)

    Monday, March 30, 2015 7:08 PM
    Answerer
  • @Pappa Thanks for info - maybe there is something we have installed or not installed but I have no idea what.  It seems to be how SB IDE finds the dlls and their methods - the actual dll + exe compiled by me seems to work even if  the dll doesn't work in IDE.
    Monday, March 30, 2015 7:35 PM
    Moderator
  • Hmm, i'm afraid i'm also finished with my latin and won't be of any productive help. The very last helpless idea i could suggest would be CLEANing, like here (at the bottom).

     Ev. try some native .sb compilations with temporarily renamed %SB%\lib  directory, clearing jumplists and temp. .NET stuff and hoping that probs get solved by itself (sometimes magic happens :-))

    Monday, March 30, 2015 8:22 PM
    Answerer
  • @NaochanON

    <Download my SBcommport Extension on win7>
    NG : Downloaded RS232c SerialCommPort-3rd Final FW4.5.zip. → Unzipped .
         SerialCommPort.dll and SerialCommPort.xml are  installed in smallbasic\lib
         It doesn't appear in intellisense.

    This is the same file that you uploaded and worked before upload?  If so then perhaps the zip/upload download is modifying the dll in some way?  Or maybe it is just another variant of the compiled on one PC not workig on another?

    Yes. its same. PLZ see above photo.  ( March 29 )

     and I tested below.   thisproject  means  <RS232c SerialCommPort-3rd Final FW4.5>

    First of all thisproject is build.
    1)copied serialcommport.dll and serialcommport.xml in \Release folder to \smallbasic\lib
     SBcommport appeared in Smallbasic IDE intellisense. (like above photo. XML works)    <---OK

    2)moved serialcommport.dll and serialcommport.xml in \smallbasic\lib  to  Desktop.
       (erased serialcommport.dll and serialcommport.xml in \smallbasic\lib)
    they are Zipped on desktop. (serialcommport.zip has only dll and xml )
    serialcommport.zip is unzipped.
    copied serialcommport.dll and serialcommport.xml to \smallbasic\lib
    serialcommport appeared in Smallbasic IDE intellisense (XML works)   <---OK

    3)I send serialcommport.zip to another email address.
    From email sent box,  saved serialcommport.zip  to download folder.
    unzipped serialcommport.zip.

    copied serialcommport.dll and serialcommport.xml  to \smallbasic\lib.
    serialcommport appeared in Smallbasic IDE intellisense (XML works)   <---OK

    4)erased serialcommport.dll and serialcommport.xml in \smallbasic\lib.

    I send thisproject.zip to another email address.
    From email sent box,  saved thisproject.zip to download folder.
    Unzipped thisproject, and
    copied serialcommport.dll and serialcommport.xml in \Release folder to \smallbasic\lib
    SBcommport doesn't appear in Smallbasic IDE intellisense. (XML doesn't work) <---NG

    Xml file unzipped  from downloded project file doesn't work???.

       



    Tuesday, March 31, 2015 12:33 AM
    Answerer
  • @NaonchanON, OK, think that's it:

    About your point 4: When i add a Zone.Identifier:$DATA with [ZoneTransfer] ZoneId=3 (Web, via a .bat) to SerialCommPort.XML and SerialCommPort.dll it's HIDDEN from IntelliSense (even without restarting SBIDE). Clearing the streams, and 'New' sheet in SBIDE shows the help again. You can try running from Streams.zip  or SysinternalsSuite.zip : streams.exe -d %SB%\lib\SerialCommPort.*  or streams -d %SB%\lib\*   (to clear them for all in \lib\) and IntelliSense should show up for your Pt. 4 problem.

    PS: running streams -d against the downloaded thisproject.zip could also clear the ZoneIdentifier from the inside files (for .zip\Subs donno)

    Tuesday, March 31, 2015 10:59 AM
    Answerer
  • LitDev, if it is a compiler issue then it must be something specific to Win 8.1 as all the extensions you have provided work fine on Win 10.  As .Net 4.5 comes standard in both 8.1 and 10 it could be something nuanced about the versions.  I'll try disabling .net 4.5 on one of my machines and then downloading a fresh .net 4.5 implementation to see if that helps.

    In the meantime I downloaded the source for your ShapesExtension and compiled that for 4.5 to test something more complex.  That worked fine.

    I did try downloading the full source for the LitDev extension, but that throws multiple errors on my machine due to missing references so not sure that is a goer as it's light years beyond my level of expertise.

    Tuesday, March 31, 2015 12:48 PM
  • @NaonchanON, OK, think that's it:

    About your point 4: When i add a Zone.Identifier:$DATA with [ZoneTransfer] ZoneId=3 (Web, via a .bat) to SerialCommPort.XML and SerialCommPort.dll it's HIDDEN from IntelliSense (even without restarting SBIDE). Clearing the streams, and 'New' sheet in SBIDE shows the help again. You can try running from Streams.zip  or SysinternalsSuite.zip : streams.exe -d %SB%\lib\SerialCommPort.*  or streams -d %SB%\lib\*   (to clear them for all in \lib\) and IntelliSense should show up for your Pt. 4 problem.

    PS: running streams -d against the downloaded thisproject.zip could also clear the ZoneIdentifier from the inside files (for .zip\Subs donno)

    `@Papa    thanks.  I downloded streams.zip.

    Tuesday, March 31, 2015 1:19 PM
    Answerer
  • @NaochanON - your test 4 looks interesting - can you see if the xml or binary is different after the zip/email/unzip, perhaps using something like winmerge.

    @Pappa - the streams idea looks interesting.

    @Ozjerry - all of the required dlls to reference should be included in the download.  Once compiled, all of the dlls (LitDev.dll HelixToolkit.Wpf.dll InTheHand.Net.Personal.dll Ionic.Zip.dll MySql.Data.dll DirectShowLib-2005.dll Svg.dll IWshRuntimeLibrary.dll Interop.Shell32.dll) need to be copied to lib (can be combined into one using IlMerge - see my MergeLitDev.bat) or just keep all the dlls in lib.

    Tuesday, March 31, 2015 6:10 PM
    Moderator
  • Hi LitDev,

    Did some more tests and it's a fact. for ZoneId=3 (web), help is hidden. If ZoneId=1 (local intranet) IntelliSense help shows up. But after changing or clearing the stream contents, SBIDE needs a restart to refresh (prob. was in halfsleep at last post :-)). To add or modify the Zone.Identifier:$DATA i used a batch from RobvdWoude (the unblock.bat at the bottom of page) with some changes. I've just translated the changedto WriteZoneID.bat to eng. and upped it then, so you can try yourself, if you want. WriteZoneID.zip

     


    Tuesday, March 31, 2015 7:25 PM
    Answerer
  • @Pappa - You may well be onto something - certainly zone 3 fails and zone 1 works - perhaps some of people (where the download fails) can try setting to zone 1 - modify bat file in WriteZoneID.zip:

    >> "%~f1":Zone.Identifier ECHO ZoneId=1

    and then run in lib folder:

    WriteZoneID.bat TextExtension.dll
    WriteZoneID.bat TextExtension.xml

    Or this simplified bat file, named SetZone.bat in lib folder:

    @ECHO OFF

    :: Set ZoneId = 1 for dll
    >  "%~f1".dll:Zone.Identifier ECHO [ZoneTransfer]
    >> "%~f1".dll:Zone.Identifier ECHO ZoneId=1
    MORE < "%~f1".dll:Zone.Identifier

    :: Set ZoneId = 1 for xml
    >  "%~f1".xml:Zone.Identifier ECHO [ZoneTransfer]
    >> "%~f1".xml:Zone.Identifier ECHO ZoneId=1
    MORE < "%~f1".xml:Zone.Identifier

    Usage in lib folder - run from cmd window:

    C:\Program Files (x86)\Microsoft\Small Basic\lib>SetZone TextExtension

    Tuesday, March 31, 2015 8:57 PM
    Moderator
  • So I have no idea what you're both talking about, but.......It worked!

    I created the simplified batch file above and it fixed both the textextension and the LitDev extension.  Both are now running fine on one of my Win8.1 machines...will fix the other when I get a minute. 

    I will do some reading as to what it all means, but thank you both for getting to the bottom of it.  I guess the question is why and how to make it easy for others.

    LitDev, thanks for the response regarding the source download.  It's probably a path issue on my machine with it not finding the requisite files where it expects to.  When I get some time I'll hunt them all down and get it running for my own educational purposes.

    Cheers

    Tuesday, March 31, 2015 11:31 PM
  • Or this simplified bat file, named SetZone.bat in lib folder:

    @ECHO OFF

    :: Set ZoneId = 1 for dll
    >  "%~f1".dll:Zone.Identifier ECHO [ZoneTransfer]
    >> "%~f1".dll:Zone.Identifier ECHO ZoneId=1
    MORE < "%~f1".dll:Zone.Identifier

    :: Set ZoneId = 1 for xml
    >  "%~f1".xml:Zone.Identifier ECHO [ZoneTransfer]
    >> "%~f1".xml:Zone.Identifier ECHO ZoneId=1
    MORE < "%~f1".xml:Zone.Identifier

    Usage in lib folder - run from cmd window:

    C:\Program Files (x86)\Microsoft\Small Basic\lib>SetZone TextExtension

    To confirm , I did dir /r in Programfiles\microsoft\smallbasic\Lib folser.

    above photo is the result. Some files are added Zone.Identifier:$DATA.

    I see downloded files are added a blocked code.

    I tried setzone.bat. But, 
    Setzone.bat was denied to access  in \smallBasic\Lib folder.


    I searched how to release block code.
    It was easy to erase it.

     1)download Litdev.zip to downlod folder
     2)Unzip Litdev.zip.
       Litdev.dll , Litdev.XMl  etc are unzipped.
     3)see Litdev.dll property.
      downloded file show security block message.
      (see below photo)
     4)click Release button --> OK button

     5) copy Litdev.dll to SmallBasic\Lib folder
     6) do also Litdev.XML
     7) You can see litdev extension commands in intellisense.  

     Sorry, This photo's language is Japanes.  PLZ some one show English version.

      



    • Edited by NaochanONEditor Wednesday, April 01, 2015 1:05 AM add photo and comment
    Wednesday, April 01, 2015 12:42 AM
    Answerer
  •  added Zone.Identifier:$DATA are erased. Below is SB IDE photo


     
    Wednesday, April 01, 2015 1:12 AM
    Answerer
  • Here's the English version of the picture, but I didn't have any such issues.  I had already tried changing this as a first attempt to get things working but it didn't help.  The only thing to add is that when I ran the batch file I used an admin command prompt.

    
    Wednesday, April 01, 2015 1:21 AM
  • Here's the English version of the picture, but I didn't have any such issues.  I had already tried changing this as a first attempt to get things working but it didn't help.  The only thing to add is that when I ran the batch file I used an admin command prompt.

    

     OzJerry

    thanks useful information.  (I didn't know admin mord  xD)

    To start a command prompt as an administrator
    1.Click Start, click All Programs, and then click Accessories.
    2.Right-click Command prompt, and then click Run as administrator.

    https://technet.microsoft.com/ja-jp/library/cc947813(v=ws.10).aspx

    *I tried admin prompt mode and Setzone TextExtension. It resulted successful.

     *  Thanks Litdev,Papa,OzJerry    Now  Litdev extension, my extension etc work fine.



    Wednesday, April 01, 2015 1:35 AM
    Answerer
  • Thanks to Pappa, NaochanOn and OzJerry!

    A simple and logical solution to a tricky problem identified and proven by group ideas and team work - good job to all.

    Wednesday, April 01, 2015 6:20 PM
    Moderator
  • @OzJerry, To set the required references to compile extension follow the steps below:

    1. Open project in VS2013
    2. Find the Solution Explorer window (View->SolutionExplorer)
    3. Expand the LitDev project
    4. Expand the References section
    5. There will be serveal yellow unidentified references - these are all located in the top level folder of the solution
    6. Richt click the References and select Add Reference
    7. Click Browse tab on left and then Browse button at the bottom
    8. Navigate to where you saved the solution
    9. Select all the dlls which were marked yellow - to reference them
    10. Repeat for the TestHarness project to get SmallBasicLibrary.dll in the same way
    Wednesday, April 01, 2015 7:33 PM
    Moderator
  • @NaochanON, OzJerry,

    No idea which browser you two use (obviously both the same). Tried IE10, FF37, Iron41(should be same with Chrome41) and Opera12 and only Opera does NOT add a ZoneIdentifier, but NONE of the others adds a ZoneIdentifier to the INSIDE files (only appends to the downloaded .zip). Can't even reproduce that manually offline, because after packing binaries (with appended Zone3 Identifiers) and then unpacking them again with 7-zip , the former streams are gone again. Anyhow mysterious!. As mentioned above 'streams.exe -d archive.zip' should also clear the inside files of an archive from the ZoneId. To keep track of any kind of streams in eg. WinExplorer i could recommend AltstreamOverlay which ads an icon overlay to such files/folders as well as a contextmenu entry and a propsTab/-Sheet to even view the data contents of the stream(s), see pictures there.

    Wednesday, April 01, 2015 10:24 PM
    Answerer
  • Thanks Papa Lapub, very curious.  The only thing I would say is that I used the windows right click context menu to extract the files from the zip, so possibly the windows shell injects the internal files with the same status as the parent zip file as it unpacks them?

    LitDev, thanks for the detailed instructions.  I gave it a crack, but still couldn't find a couple of the Office references. Not to worry, I've already got the source for your old ShapesExtension and will look at a couple of the others.  They will provide more than enough learning material for me at this stage.  I can still read the code for the main extension so can look into anything I need.

    Cheers

    Thursday, April 02, 2015 10:35 AM
  • Ya, definitely, because a ZoneId would be OK, but could be anything else on a archived file, eg. by mail... But did'nt think about the native Win method and 'll try this out. Thx.
    PS: The reason was 7z which did'nt support streams before v15, but the 'compressed folders' shell did.
    Thursday, April 02, 2015 6:00 PM
    Answerer
  • @LitDev, I know, you're away this week. Seems your hoster deleted some of your downloads again.

    Thursday, April 09, 2015 6:32 PM
    Answerer
  • Thanks - I made a new version since too confusing to recreate the old version files deleted by server.
    Friday, April 10, 2015 3:22 PM
    Moderator
  • Gee that's a bit ruff - getting your stuff deleted.

    Why would that happen?

    Friday, April 10, 2015 11:09 PM
    Moderator
  • Thank again for xml - will check out the PreviewHandler - Cheers.
    Saturday, April 11, 2015 5:59 PM
    Moderator
  • Thanks for the de translations.

    The complication with the clipboard is it needs to be called in a separate STA apartment thread.

    Any upload location is fine for me.

    ===========================================================

    Thread Continued here https://social.msdn.microsoft.com/Forums/en-US/fef3c437-7715-4a9f-a783-7f62f768fec0/litdev-extension-updates?forum=smallbasic

    Thursday, April 30, 2015 9:40 PM
    Moderator
  • Thanks for de xml and your correctionsfor my typos.  I also fixed the renamefile I hope - these file methods are dangerous!
    Wednesday, May 20, 2015 10:17 PM
    Moderator
  • Here's german xml for LitDevDe_v1-1-0-5
    Friday, June 12, 2015 9:20 PM
    Answerer
  • Thanks
    Friday, June 12, 2015 9:34 PM
    Moderator
  • Hello Lidev, i c'ant download your extentions. I clicked to the Icon for the download but it do nothing. Please check it.

    Best Regards Martin

    Saturday, June 13, 2015 6:44 AM
  • Sometime the site is down - the perks of free hosting.  I also upload a copy on Technet Gallery.

    Pease use the thread split from this (link below) from now on - ths one is a bit long and can be slow to load.

    https://social.msdn.microsoft.com/Forums/en-US/fef3c437-7715-4a9f-a783-7f62f768fec0/litdev-extension-updates?forum=smallbasic

    Saturday, June 13, 2015 8:06 AM
    Moderator