Beiträge von troubleshooter

    Hi,

    When using the textdymanic control using the wpmodexToolbar mode (16x16 icons in the toolbar), the toolbar combo boxes for font name and font size have text written in them that don't fit - it is too large to be read properly. This only happens when using the 16x16 icon size.

    Is there a way of making the font in these combo boxes smaller so it is easier to read?

    I'm using the textdynamic control in an app where I need to track changes in a very efficient way, as i will be passing data across a very slow data connection (and expensive data rates) and i need to keep my memory footprint as low as inhumanly possible!

    Because of this i cannot cache the original state of the controls content and i need to minimize drastically any queries about the original state of the control, so i cannot be checking every now and again to see if the current contents equals the original contents. I need a better way of tracking changes.

    However i've noticed problems.
    There appears to be no reliable way to track if the contents have changed or not, and it appears to be because of what looks like a bad combination of bugs or at least undesirable behaviour within the control. Basically the events and state of the control are unreliable for tracking changes.

    1) the textchanged event doesnt seem to always fire when the text has changed. It doesn't get fired when a bitmap is attached to the control by using the "attach image" toolbar button. It does however if you paste from the clipboard. This seems like a bug, or at least inconsistent. It also means you cannot rely on the event to track changes.

    2) When a bitmap image is attached to the control by clicking on the built in image attach toolbar button, the undo stack clears. (If however a bitmap is pasted from the clipboard, the undo stack works properly). it seems inconsistent. Querying the undo status, or listening for undo events does not help if someone attaches an image via the toolbar button. Attaching a bitmap using the button, and the undo stack clearning seems like a bug to me.

    3) Using the OnUpdateGUI method of querying for changes is unreliable too. Particularly with the add image button. if you query the changed state it says that an undo isnt available, but it clearly should be. probably because of the bug mentioned at (2)

    4) Listening in to the event saying a button has been pressed doesn't help, i can even find out which button it was, but i dont know if they then pressed cancel or not on the resulting dialog.

    How does someone reliably track changes? In particular how does someone reliably listen to see if the toolbar button for attaching images has been used to attach an image.

    Or, are there any plans to fix up the events/undo stack so that they can be used in a reliable manner?

    I get a "runtime error 217" when I close my application. However it does not happen all the time, only occasionally. Perhaps there is some kind of race condition?

    I found that it happens in a very simple new project that has no code, and simply is a WinForm with the text editor control embedded. run the app, close the app and occasionally you get the runtime error.

    I also have the following behaviour in the simple test app, which i think is probably related -

    Run the app in debug, then close the app, VSHost.exe crashes every time
    Embed the WPTextDynamic control inside a user control. Use that user control in an otherwise empty form. Save the form.
    Now close the form designer inside the VS IDE (in my case VS 2008 with all the service packs) and kaboom! the VS IDE crashes.... every time

    I think all of these are related as they all happen when the form is dismissed. They all happen with the simplest of apps, with no code behind them, just the control.

    This will affect anyone using this control in this manner will have problems submtting their app to microsoft for windows certification as one of the conditions is that your app, and any 3rd party tools that it uses must not crash.

    What solution can i use to get rid of these problems?

    i'm not so concerned about the VS IDE.
    i am concerned about the runtime error. It makes my otherwise polished app look very bad, and the window that comes up is in a style that doesnt look like a VS message, or a system message. It looks more like a custom exception handler within the control itself.

    I also get the same "runtime error 217" when I close my application. However it does not happen all the time, only occasionally. Perhaps there is some kind of race condition?

    I am using WPTextDynamic in a WinForms2 application. I know this isnt the correct forum but i think it might be related to the one that was mentioned above. I have posted a copy of this in the correct forum also.

    I found that it happens in a very simple new project that has no code, and simply is a WinForm with the text editor control embedded. run the app, close the app and occasionally you get the runtime error.

    I also have the following behaviour in the simple test app, which i think is probably related -

    Run the app in debug, then close the app, VSHost.exe crashes every time
    Embed the WPTextDynamic control inside a user control. Use that user control in an otherwise empty form. Save the form.
    Now close the form designer inside the VS IDE (in my case VS 2008 with all the service packs) and kaboom! the VS IDE crashes.... every time


    I think all of these are related as they all happen when the form is dismissed.

    What solution can i use to get rid of these problems?
    i'm not so concerned about the VS IDE.
    i am concerned about the runtime error. It makes my otherwise polished app look very bad, and the window that comes up is in a style that doesnt look like a VS message, or a system message. It looks more like a custom exception handler within the control itself.

    Hi Julian,

    I originally had the files under "C:\ProgramData\<myapp>\Data" and the NTFS permissions on that directory are the default ones (all according to microsoft guidelines on shared data).
    It works under Vista just fine (which is what i discovered initially). But it doesnt work under Win7.

    So to make sure I have just double checked on both a clean image of vista and a clean win7. I've just confirmed that the problem is not there in vista, but is definitely there in win7.

    In the code sample above i moved it to "c:\program files...." just for illustrative purposes. But i tested it in various different directories, it made no difference. Under vista any directory worked, under win7 no directory worked. Both the configuration (directory and permissions) and the code is identical under both os's but they have different behaviours.

    To confuse me a little i can even see SysInternals process monitor tool enumerating the files under win7, so it does detect their presence, but the textdynamic editor ignores them anyway.
    To confuse things further still, if i go into the configuration dialog for spellchecking options i can add the files in manually from that exact folder "C:\ProgramData\<myapp>\Data", it works just fine. It just doesn't seem to initialize for the very first time programatically under Win7 only.

    cheers

    Neil

    Hi,

    I'm installing my application which uses TextDynamic with the spell checker switched on, under Windows 7.
    When installed on a pristine clean Win7, the spell checker dictionaries fail to load. But they load just fine under Vista and WinXP

    Here is the code sample i'm using

    Code
    wpTextDynamic.SetLayout("c:\Program files\MyAPP\wpButtonsDefault.pcc"), "default", String.Empty, "main", "main");
    
    
    // the following line fails under windows 7
    wpTextDynamic.SpellCtrl.AddFromPath("c:\Program files\MyAPP\wpDictionaries");
    
    
    wpTextDynamic.SpellCtrl.SetLanguage("9"); // English
    wpTextDynamic.wpaProcess("SpellAsYouGo", "1");

    The specified directory does indeed have the .dct files (7 in all i think).
    I've chosen not to use an ini file or a registry entry to initialise the control (I want to keep the target machine as clean as possible), and doing it like this works beautifully under WinXp and Vista.
    The usual tricks using Win7 of "running as administrator" or "running in XP sp3 compatibility mode" makes no difference. Neither does the location of the directory, or the NTFS permissions on that directory.

    I've checked with the sysinternals process monitor and found that when the "AddFromPath" line is executed, that all *.dct files in that directory are enumerated, but they then appear to be ignored.

    Does anyone else have this problem?
    If so is it possible to request a bugfix?

    Thanks