Beiträge von gsaunders

    Hi Julian,

    This solved the problem in the test case I gave you, but I still have the same issue in my full blown application so there may be multiple issues at hand.

    I will try and provide some debug information as I should not have this problem.

    Let me give you some info on how this app is built.

    Basically I have a Application Group with a core EXE and about 15 packages (BPL's). A small number of these packages use the LexPkgD6.bpl and the SplPkgD6.bpl and WPTools5_D6.bpl.

    I have rebuilt the complete Application Group to be certain everything is kosher and the changes to AbsBuffer.pas are in use.

    I'll follow up with some debug info.

    Ok... I have a project built with text already in the editor that locks up every time at a certain line. Now remember it is random in terms of different letters lock up at different points, but in this one it always locks up on the "LUP" in the last sentance of paragraph two. Just start spell checking and tell it to correct everything... even if it isn't really the correct word.

    You can download the zip file from http://www.branchgroup.com/dl/edsspelldemo.zip.

    This locks up every time. I figured if you could reproduce it would be easier than me trying to pass debug info to you.

    Greg

    Thanks for the reply... and description of the parameters for ReformatAll as I wasn't absolutely certain what they did and didn't see it in the docs (but could have missed it).

    Yes... I've looked at many of the demos... I think I must just run into things where I want to know how to do x, but the demos talk about y.

    I'll just post questions here if I can't find it in the help or demos.

    Thanks.

    Hey Julian,

    Basically we want it to work like MS Word. Each document seems to have control over the printer and even though you set the first and second page on one word document the other document open at the same time (which didn't have the trays set) just use the default trays.

    In the same way when we print a letter our of our letter module where we set the trays we want a documetn out of our contract module to print either using the default trays or the trays selected within it's printing mechanism.

    Will doing the above achieve this?

    Is there another way of doing this without altering your source code?

    Thanks for your help.

    Ok...

    Should a refresh be needed after the ReformatAll?

    I have noticed at times I have to do a refresh to see everything updated... but perhaps I shouldn't be doing refresh.

    I think part of my problem is there are many methods and properties that are in WPTools that are not clearly defined as to when they should be used or what they are really for. Not everything is this way as you do have a fair amount of documentation... but there is a lot of items a new developer with your product is left guessing about.

    I definitely would love to see more examples of how to do this or how to do that type of demos that would help the new user of your components get up to speed. Looks like there is a lot of power, just a fairly decent learning curve.

    My coworker who use to do this is no longer with us so it was pushed to me so I am jamming everything he learned over a 3 month period into a couple of weeks.

    Thanks for your time.

    One thing I am doing now is letting the text be a space by a default so this way if it is on a line by itself and doesn't have any merge data that it will take a full line instead of the half line. In our module they are fine with the blank line as they can just delete one line above or below that field and be fine with spacing.

    We just can't ever delete the merge field, because at any given time they could edit a field on a form that would then need to be merged there.

    I have been playing with hiding and showing the field markers so they know where they are at any given time.

    They definitely didn't like seeing the field name there... it actually confused people, because that is what I did before.... I like the field markers though... just have to see if the powers that be will be ok with them showing by default to help them know where things are in the document.

    Where is the WPDEBUG located? In the Project Options / Debugging section I have everything checked accept use debug dcu's. Is this the area you are talking about. Or are you talking about the WPINC.INC? If the WPINC.INC do I have to rebuild the WPTools5_D6 package?

    In regards to sending you a sample. This is a massive multi-tier, multi-module application and I can't send anything from it. I will have to try and duplicate this in a sample application.

    I can also take print screens of cpu and call stack area for you.[/img]

    Here is an email I sent to EDSSpell support that should explain the issue.

    Now after further testing by myself I have gotten it to lockup IMMEDIATELY when correcting text that has been merged in and it just sporatically locks up when correcting text in the body.

    Any ideas.

    Ok... after many tests with the user I have found the answer to 2 of the issues, but would like to know if there is a way to prevent it.

    We have a document where we create a few lines of text via code and then we create a merge field and then several more lines of text. So you get something like.

    Zitat

    Today's Date

    FirstName LastName
    Address Line 1
    Address Line 2

    RE: MergeField
    Extending
    3 Lines

    Some other text

    Now the first 2 problems in my original post stemmed from the fact the user put the cursor on the last line of the RE merge field text (after the word lines above). She then hit enter twice and started typing more content. Our merge field is not showing the indicators around the text so what is happening is she is actually extending the merge field and typing new text into it. Since the RE text was indented it was causing strange stuff further down several paragraphs AND when the user hit the print button we re-merge in case some other data changed which in turn deleted all of the text they typed into the now extended merge field.

    So this mystery has been solved, but now how do I prevent this?

    What would you recommend doing to keep a user from accidentally extending a merge field, because the merge field will re-merge again prior to printing to handle changes made elsewhere that could effect the merge text?

    Thank you.

    We have some merge text fields that don't always get a value.

    They are setup using the following code:

    Code
    WPRichText.InputMergeField('ClosingCompanyName');

    We also have the HiddenTextAttr.Hidden set to true and InsertPointAttr.Hidden.

    If there is no text to merge into one of these fields you can still see where this field is in the document by cursoring through the document and at the point where there is a merge field with no value you will see something like a half cursor... if it is on a line by itself then the line is like a half blank line.

    Anyway... just want to verify what should we see under the circumstances described above?

    I know we don't want to delete those blank merge fields as they could have a value later.

    Just trying to understand what we should be seeing.

    Thanks

    When we use the WPRichText.Print all of the text is now gray and the cursor is sitting on one of the blank merge fields.

    Also when the editor is first brought into the view for some reason the user can click in the header area and the text goes gray as well. They can click back into the body portion of the editor and it goes black. Now they cannot click back in the header area which is the way it should be.

    Why is the text going gray? Users get confused by this.

    Is there a way to prevent it from going gray?

    This editor has a header and then the body and some merge fields.

    Note: We don't have separate windows for header and body. It is just one editor window and we created the header from code and then the body.

    Also how do we prevent the user from clicking in the header area when the editor comes into view the first time?

    I am simply going to forward some of the issues we are seeing from some users and hopefully get some feedback here. The ONLY change is from v4 to v5 and we are using the absolute minimal code with the WPRichText or DBWPRichText. The only code we are using is setting the default font via the WrittingAttr and DefaultAttr, set the Header left and right margin, do a few inputstring commands and a few inputmergefields, then merge text. It is very basic, yet we are experiencing some very strange issues.

    Thank you for your time.

    Zitat von wpsupport


    OnClear and AfterLoadText to update your GUI or set the focus.

    OnClear is also good to set WritingAttr.

    Julian

    When does OnClear fire? Right now I have put the WritingAttr in the OnCreate for the form since I need it to always default to this font when the user loads the form with the WPRichText.

    What is strange is in v4 everything did default to Times New Roman without any code. When we went to v5 everything defaulted to Arial.

    Greg

    Using WPTools 5:

    We print a letter where we set the FirstPagePaperSource to Tray 2 and printed.

    Then the user exits our letter module and then goes to our contract module. They open up a contract and tell it to print (without selecting trays). It prints to Tray 2 AGAIN.

    Now with WPTools v4 this did not happen to us... the bins appeared to alwasy go back to defaults. But with WPTools 5 it appears to remember these settings and prints to the same tray.

    Is there a way to reset the bins back to defaults or is there a particular practice that should be done in the way printing and bins are used??

    When we exit the whole application and come back in everything is back to defaults.

    Thanks,

    Greg

    The FAQ WPTool 5 Upgrade Forum now says the following when trying to access it: Sorry, but only moderators can read topics in this forum.

    This seems counter productive for folks trying to work with WPTools 5 after upgrading.

    Please open this forum up for all users to be able to read as well as the other FAQ forums as they all do the same to me.

    Greg

    Looks like it has to do with the parameters used on MergeText.

    I started using this and it worked:

    Code
    WPRichText.MergeText('',True);

    The switch from v4.x to v5.x has definitely had it's share of differences.

    I think we have just about worked out most of them.