forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDSBrw and contentEditable
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Mon Jul 07, 2014 4:11 pm    Post subject: VDSBrw and contentEditable Reply with quote

I am working on an editor that I want to give "richedit" support. When I use VDSBrw and apply the javascript contentEditable to it, it locks up. I used richeditpa from http://forum.vdsworld.com/viewtopic.php?t=5159 in that app and it works fine. When trying to add to my app, it locks up. Any ideas as to why?

Thanks

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 07, 2014 5:42 pm    Post subject: Reply with quote

If you are using VDS 6, be sure to check which version of VDS is being used in the project manager. I have found many times that this is the cause of many of my errors. I'll be trying to run VDS 6 code, but the project is set for VDS 5 and vice versa. Even resulting in lock ups, crashes and spitting in my face.
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Mon Jul 07, 2014 5:47 pm    Post subject: Reply with quote

Yeah. I made sure to check that before I posted. Using VDS 6 with vdsbrw60.dll
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 07, 2014 6:00 pm    Post subject: Reply with quote

But! is the code you are using from the forums VDS 6 compatible, or was it from a VDS 5 project?

Trying switching the whole project out to a VDS 5 project and browser object and see if that makes any difference.

~Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Mon Jul 07, 2014 6:03 pm    Post subject: Reply with quote

The code from the forum was VDS 5, but I have used the javascript code before on a VDS 6 project and it worked fine.... I may try to switch it over to test, but the app uses A LOT of VDS 6 features that I would rather not lose.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 07, 2014 6:05 pm    Post subject: Reply with quote

Ah... Well, just for the testing sake, backup your files, remove the vds 6 stuff and give it a try and see..

I know, easy for me to say.. LOL Trust me though, I've done this a few times myself to find that the project either had to be rewritten from scratch or demoted to VDS 5. I don't like demoting a project so I always end up rewriting from scratch for VDS 6.

~Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Mon Jul 07, 2014 6:31 pm    Post subject: Reply with quote

I just did a test using the much the same code on a new script and the javascript works. It must be something else in my code that is causing it to lock up.... great...
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 07, 2014 6:33 pm    Post subject: Reply with quote

Sad
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Mon Jul 07, 2014 7:16 pm    Post subject: Reply with quote

You have VDS 6 yeah? I figured out when it locks up. Can you try this please?

Compile the code below. Run it an enter some text. Then select the menu item Make Read-Only. Then Select Save Test.... It should save a test.html file in the same location but it does not and the EXE will not close. You have to End Task.... Any ideas as to why....

.... Any one know how to fix this? ......

Code:


  EXTERNAL VDSBRW60.DLL
  #DEFINE COMMAND,BROWSER
  #DEFINE FUNCTION,BROWSER,richedit
  DIALOG CREATE,New Dialog,-1,0,761,478,RESIZABLE
  DIALOG ADD,BROWSER,E1,0,0,@dlgpos(,w),@dlgpos(,h),<html><body contenteditable=true><font face=arial></body></html>,,nonavigate,offline
  DIALOG ADD,MENU,&File,&Make Editable|&Make Read-only|Save Test|-|E&xit
  dialog add,menu,format,Bold|Link
  DIALOG SHOW

  #dialog set,E1,<html><body contenteditable=true>this is a test<font face=arial></body></html>
 
:evloop
:EVENTLOOP
  WAIT EVENT
  GOTO @event()

:EXITMENU
:CLOSE
  EXIT

:RESIZE
  DIALOG SETPOS,E1,,,@dlgpos(,w),@dlgpos(,h)
  GOTO EVENTLOOP

:BoldMenu
dialog set,E1,javascript:document.execCommand('Bold');void(0);
goto evloop

:LinkMenu
dialog set,E1,"javascript:document.execCommand('CreateLink',true);void(0);"
goto evloop
 
:Make EditableMENU
dialog set,E1,javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
GOTO EVENTLOOP

:Make Read-onlyMENU
dialog set,E1,"javascript:document.body.contentEditable='false'; document.designMode='off'; void 0"
GOTO EVENTLOOP

:Save TestMenu
browser savefile,E1,@path(%0)test.html
goto evloop
 
:Browser1Navigate
%l = @browser(E1,navurl)
shell open,%l
goto eventloop



_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 07, 2014 9:53 pm    Post subject: Reply with quote

As you anticipated, it did not save. Plus, it would not close for me.. had to kill it via Task Manager.

My only thought is that maybe it's not saving due to the javascript. Haven't played with that thought yet though.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 07, 2014 9:57 pm    Post subject: Reply with quote

If I do not apply the readonly, I can save the file and the program exits as it should. But the only thing that is saved is this:

Code:
<html><body contenteditable=true><font face=arial></body></html>


If I apply any of the options, bold, link, anything where VDS injects the javascript, it won't save and the program won't close.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Tue Jul 08, 2014 1:09 pm    Post subject: Reply with quote

Yeah, and I don't understand why. The one that Brandon made works fine, but it uses a sep dialog attached to the main dialog. Not sure if that is the work around, but I cannot do that on my application.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Jul 08, 2014 3:46 pm    Post subject: Reply with quote

I think the main problem with using the browser element is that it's very much disabled compared to IE itself. Many of the features are just not available to use in the browser element as it is in IE.

Though I do find uses for the browser element now and then. Like a few days back I made a character map / font viewer type program and used the browser as the display method for both the char map and the font example viewer.

I think Brandon's method was to use Chrome and slap the Chrome window on the dialog, which means you have to have Chrome installed.

Wish I had a fix for you on this, but this is beyond my capabilities.

~Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Tue Jul 08, 2014 7:33 pm    Post subject: Reply with quote

Have you tried VDSSurfx dll ?

http://www.vdsworld.com/search.php?keywords=vdssurfx&match_type=%200&sid=80b8f54698046fdd447e2619046aa88a

just a suggestion...
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1739
Location: Space and Time

PostPosted: Tue Jul 08, 2014 7:35 pm    Post subject: Reply with quote

No I have not. I'll give that a try. Fingers crossed.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group