|
|
pinEdit WP
Started by cdgidev at 08-08-2008 2:25 . Topic has 12 replies.
 
 
|
|
Sort Posts:
|
|
|
|
08-08-2008, 2:25
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Troubleshooting editor errors
|
|
|
|
|
I can't seem to make the editor work correctly in my app. I do
TextProblem.Text = TextStr
Where TextProblem is a PinEdit desktop version editor and TextStr contains a valid <html> content but nothing gets displayed and i get no error.
Is there a way i can troubleshoot this error? Some kind of errors collection in the control that would tell me why this is happening?
|
|
|
|
|
Report
|
|
|
|
08-08-2008, 2:32
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
Even stranger, if i put a break point in my application on the line that assigns the value, it works fine... for example, i set a breakpoint on the line assigning the value, simply press F5 and then the content appears. If i remove the breakpoint, same operation/data, now the editor doesn't show the data... As many tries as i can do, it never works then if i set the breakpoint again, suddenly it works...
|
|
|
|
|
Report
|
|
|
|
08-08-2008, 3:00
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
Last but not least, anywhere in the application's form loading portion, if i put a breakpoint to let the form load completly, it works. If i do not stop the application from loading the form completly before assigning the value it doesn't show anything...
|
|
|
|
|
Report
|
|
|
|
08-08-2008, 3:01
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
I put a DoEvents in front of my code that loads up the HTML into the control and now it works...
Can any of the developpers tell me why?
|
|
|
|
|
Report
|
|
|
|
08-08-2008, 4:35
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
It seems this is not always the case. This control seems very unstable. I start the application, load up a text into it and sometimes it works. I retry it and sometimes it works, sometimes it doesnt (We are talking about the same data here)
|
|
|
|
|
Report
|
|
|
|
08-08-2008, 5:15
|
Pintexx Support
Joined on 08-30-2005
Posts 1.571
|
Re: Troubleshooting editor errors
|
|
|
|
|
Hello,
if you look into the documentation it says that pinEdit loads asynchronously.
That means you have to set .Text property in "Ready" event when you want to set content during startup.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
08-11-2008, 3:13
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
I've been searching for a way to change the content live by getting the content of the AX control and then setting the content anew or just appending stuff to it. But as soon as i append stuff it deletes everything and puts only what i want in it...
If i try the EditInsertHTML method it doesnt work either, it deletes all my content and puts only the newly inserted content!
How am i supposed to add content to the AX control programatically?
|
|
|
|
|
Report
|
|
|
|
08-11-2008, 4:04
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
Why does readonly property changes affect the content?
When i set readonly to false and true, it fires off the watch breakpoint stating that TEXT changed...
It's why i'm losing my content all the time it seems.
|
|
|
|
|
Report
|
|
|
|
08-11-2008, 7:15
|
Pintexx Support
Joined on 08-30-2005
Posts 1.571
|
Re: Troubleshooting editor errors
|
|
|
|
|
Hello,
pinEdit is no text editor where you can append something.
If you write content using .Text property then this content is written to the editor.
EditInsertHtml works when the editor is fully loaded and when there is a cursor.
Setting ReadOnly causes an internal reload of the control.
But if you load content in "Ready" event it should work even though.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
08-11-2008, 7:29
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
How can i detect if there is a cursor position?
Lets get this straight, i have to implement the following features:
- Text editor with HTML capabilities (We want to drop RTF and have already generated a tool to convert) - Text editor must be able to stop entry from happening (When the user is not in write mode, currently using readonly property) - Text editor must be able to append information at the end of the content such as a name tag - Text editor must be able to lock a portion of text already entered before (Previous log information + new name tag)
If i understand the way the control works, i would have to do the following:
- Load my data from the database - Prepare some kind of routine that fires when the ready event occurs - Set the text inside of the control - Catch further UI events
Is that it? Cause the current software is not managing this like that at all... it's going to be really fun trying to do that...
|
|
|
|
|
Report
|
|
|
|
08-12-2008, 9:36
|
Pintexx Support
Joined on 08-30-2005
Posts 1.571
|
Re: Troubleshooting editor errors
|
|
|
|
|
Hello,
- you should be able to catch the drop event
- Instead of using ReadyOnly mode you can also try this:
editor.execute("editGetDocument().body.contentEditable = false")
- appending works like this:
p = editor.document.createElement("p)
p.innerHTML = "Text"
editor.document.body.appendChild(p)
Please have a look at HTML DOM specification for more information.
- see my previous post to non editable regions.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
08-12-2008, 7:38
|
cdgidev
Joined on 07-08-2008
Posts 9
|
Re: Troubleshooting editor errors
|
|
|
|
|
Is there a list somewhere of the options we can do using: editor.execute()
?
I'd like to set the cursor position to the inside of some element but i don't seem to see any option that allows me this. But knowing your product more and more, i believe this is probably something hidden that we can modify using the execute command?
|
|
|
|
|
Report
|
|
|
|
08-13-2008, 3:06
|
Pintexx Support
Joined on 08-30-2005
Posts 1.571
|
Re: Troubleshooting editor errors
|
|
|
|
|
Hello,
I'm sorry to say that there is no list.
This method was planed to be used internally for executing scripts.
Please try this:
Search the element with
element = editor.document.getElementById(id)
Then you can say:
element.focus()
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
|
Pintexx Forum » Developer Produ... » pinEdit WP » Re: Troubleshooting editor errors
|
|
|
|