Curl Global Community
DCurl and CSPD - Printable Version

+- Curl Global Community (https://communities.curl.com)
+-- Forum: Discussions (https://communities.curl.com/forumdisplay.php?fid=1)
+--- Forum: General Curl questions (https://communities.curl.com/forumdisplay.php?fid=2)
+--- Thread: DCurl and CSPD (/showthread.php?tid=498)



DCurl and CSPD - RobertShiplett - 05-16-2012

Does a Dcurl on a local machine require a license to be able to write CSPD (client-side persistent data) ?

Code which runs CSPD fine at the server fails to write as a local DCurl ( change is only to a View with a window close handler)

Is it really the Pro IDE license that is required ?

Example: privileged applet at http://www.aule-browser.com/kanji/joyo-2010-kanji-nc.html

The "-nc" suffix stands for "no cookies", i.e., uses CSPD to recover state.





RE: DCurl and CSPD - tdeng - 05-16-2012

I'm not sure I fully understand the issue you are describing, did you run the applet using http:// protocol ? If so, you need a pro server license (but not a pro IDE license, an IDE license is only applied to your IDE) to run an applet (no matter it's a detached or non-detached curl applet) that requires accessing CSPD larger than 256KB for each CSPD repository, or more than 20 CSPD repositories within this single applet.


RE: DCurl and CSPD - RobertShiplett - 05-16-2012

It is simply a desktop shorcut on my windiows desktop.

The dcurl file is located in a privileged directory.

It is not out on my server where there is a license.

It is the code from a .curl applet which you can run yourself at

http://www.aule-browser.com/kanji/joyo-2010-kanji-nc.html

The only change to the code is to wrap the VBox in a View as for any simple Dcurl and with a window close handler for that view.

The local directory here has a curl-root.txt

Why would I use HTTP for a DCurl applet on the desktop? My intent is NOT to be in the browser: it is a DCurl desktop app.

But it denies access to CSPD {tested using {output } to Curl console. )

UPDATE: I do see a point - I copied the HTML and the .curl down from the server and ran this test:

1) both are copied into the privileged local directory
2) the HTML <object> is edited to have

resource="file:///c:/kanji/joyo-2010-kanji-nc.curl

3) the HTML is started as a file "Open with" in explorer (not in iexplore browser) and Firefox selected.

RESULT: the CSPD works locally as intended.


Now I will carefully make this .curl into a .dcurl by just wrapping the outer VBox in a View, and then I will UPDATE this note again.

thanks

RESULT -

1) The Curl in browser fails locally if CSPD {get ... } is run conditional on, e.g.,

{let can-save:bool = {request-local-data-permission}}

|| ignore the result

2) The Dcurl version CSPD fails if the CSPD commit is called in the View

{on WindowClose do

3) The Dcurl version CSPD SUCCEEDS if commit is done in

{on-applet-suspend do

QUESTION: why might the request for CSPD be returning false on the local machine ? License ?

I will go back and read over {request-local-data-permission}

thanks






RE: DCurl and CSPD - tdeng - 05-17-2012

There might be some misunderstanding about using CSPD.
Accessing CSPD simply doesn't need permission from a user, so calling {request-local-data-permission} is meaningless.
Rule is simple here, if the applet is a priviledged one, you have no limitation on using CSPD, if the applet is not a priviledged one, then you have limitations I listed in my former post.
{request-local-data-permission} is a proc called by occ applet, before copying an applet and it's resources to a local machine (where the location could be accessed using urls starting with "curl://local-data/".
If you still meet exceptions, could you post the detailed raw errror message here?
By the way, technically, running an applet locally need no license .