It is currently Wed Sep 08, 2010 7:51 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Mon Jan 25, 2010 4:13 pm 
Offline

Joined: Mon Jan 25, 2010 3:06 pm
Posts: 6
When I spell check a TWPRichEdit and click the Change button on the spellcheck dialog to change a misspelling, the WPRichText.OnChange method does not get fired. So how do I know that the user clicked the Change button?
I've looked at the WPTools demo but found nothing there that helps.

Thanks.


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Mon Jan 25, 2010 6:01 pm 
Offline

Joined: Mon Jan 05, 2009 2:50 am
Posts: 131
Location: Kalgoorlie, Western Australia
Hi,

The WPTools Author generously helped design the Addict / WPTools parser - and so there may be a reason that event doesn't fire - I tried just quickly to add something to the ReplaceWord Method of the Parser but couldn't get that event to fire - he may be able to suggest a better event in WPRichEdit to watch.

_________________
Glenn Crouch support@addictivesoftware.com
Addictive Software Support
http://www.addictivesoftware.com


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Tue Jan 26, 2010 1:35 pm 
Offline

Joined: Mon Jan 25, 2010 3:06 pm
Posts: 6
I asked him first. He told me to ask you. :)
Is there some property in the TAddictSpell component that contains a list of all corrections made while the dialog box is in use? Some flag that gets set if the user clicks the Change button maybe?


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Tue Jan 26, 2010 6:30 pm 
Offline

Joined: Mon Jan 05, 2009 2:50 am
Posts: 131
Location: Kalgoorlie, Western Australia
We can't really control whether a 3rd Party Control fires the OnChange Event when a Spelling Correction occurs - if WPRichEdit had a method like DoChange then we could call it in the parser, but I can't seem to find one.

If you have a look at the Addict Demo, and connect a message to the OnChange event of the TRichEdits you will see it dioes get called with both Dialog based Spell Checking and Live Spell Checking - and a similar thing happens in other 3rd party controls, so Addict doesn't normally need an OnChange event - and I must admit till you reported this I didn't realise that WPRichEdit didn't work this way.

I'll check with the Author, but if you could give a bit more info about what you are trying to achieve from the OnChange Event I may be able to advise better - and are you concerned with Dialog-based Spelling or Live Spelling or both.

Also I could perhaps add a OnReplaceWord Event to the WPTools/Addict Parser - but you would have to connect to that at Runtime since it is not a component. Let me know...

_________________
Glenn Crouch support@addictivesoftware.com
Addictive Software Support
http://www.addictivesoftware.com


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Thu Jan 28, 2010 10:26 pm 
Offline

Joined: Mon Jan 25, 2010 3:06 pm
Posts: 6
What I'm trying to do is simply enable my Save button when a user clicks the Change button on the spell check dialog so when they close the rich edit page they get a prompt to save their changes.
I haven't turned on the Live Spelling yet but I'm certainly planning on doing that soon so I'll be wanting that functionality with both spell-checking methods.

The OnReplaceWord event sounds pretty good and attaching it at runtime is no problem.

Thanks.


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Fri Jan 29, 2010 1:40 am 
Offline

Joined: Mon Jan 05, 2009 2:50 am
Posts: 131
Location: Kalgoorlie, Western Australia
I'll try and get a modified version with this event for you to test sometime next week (I only work part time for Addictive).

_________________
Glenn Crouch support@addictivesoftware.com
Addictive Software Support
http://www.addictivesoftware.com


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Fri Jan 29, 2010 1:41 am 
Offline
Site Admin

Joined: Wed Dec 31, 2008 2:55 pm
Posts: 74
This should be the event you want.
It fires before a change is about to be made in the edit control when you're using dialog-based spell checking.

(* Summary
This event fires in response to the first change to an edit
control being checked.

Description
Use this event to be notified before the first change is made
to the edit control being checked. This could be an ideal
place to place a data aware control's dataset into edit mode. *)

property OnBeforeChange:TNotifyEvent read FOnBeforeChange write FOnBeforeChange;

Thanks,

Michael Novak
Addictive Software


Top
 Profile  
 
 Post subject: Re: Addict 4.1 and WPTools6 TWPRichEdit
PostPosted: Fri Feb 05, 2010 3:54 pm 
Offline

Joined: Mon Jan 25, 2010 3:06 pm
Posts: 6
Thanks Michael, that did the trick.

I appreciate the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL Flash Games