Jump to content

cookies - an alternative to Unigui cookies? JStorage.js


Recommended Posts

Hi,  

 

  Lately I've read in the forum that there are some small problems with cookies.

 

 

  There is an alternative to Unigui cookies? 

 

  I think so! : JStorage.js - store data locally with JavaScript. 

 

  Definitely not elegant as the Unigui solution,but it works. 

 

  I have already used Jstorage.js in Unigui test applications; seems to work fine with all browsers. 

 

 

 

  Please  read carefully the documentation on the site  http://www.jstorage.info    ,if you want to use it. 

 

 

 

 

  So I decided to write a new "component" Unigui  TBroStorage (certainly not very standart.  The Unigui documentation 

  not help much in this). 

 

  The idea was to build a non-visual component, but i not find an appropriate Ext-class, so I improvised. 

 

  I want to share it with the forum in the hope that some more experienced Member can improve it. 

 

  Other Plugins used: lz-String.js: JavaScript compression, fast!  http:\\pieroxy.net/blog/pages/lz-string/index.html

 

 

 

 

 

  Tested only with Delphi XE3 and Unigui 0.96.0.1065 

 

  I think it work with the Unigui release 0.95.0.xx

 

  I do not think there are problems with other releases of Delphi, 

 

  just have to change the package : UniGUIxx.dcp,  xx = Delphi release. 

  

 

 

  Installation :

   

 

  install  Brostorage.dpk  (Only for Delphi XE3) 

 

  Add new Path in Delphi>Tools>Delphi Options>Library 

 

 

  

 

  Campile and Run demo TestBrojs.dpr 

 



 

 

  Have fun! 

 

  sincerely

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...

Hi ,

 

which delphi release you are using ?

 

DesignIntf.dcu is for Delphi XE3. 

 

 DesignIntf.dcu i  used only  to hide some properties on design time, it is not important , only cosmetic. 
 
Let me know if you find the unit  corresponding  for your Delphi  release  .
 
 
Best regards.
Salvatore Marullo
.
Link to comment
Share on other sites

Hi, 

 

 

maybe you can help

 

 

http://docwiki.embarcadero.com/Libraries/XE6/en/DesignIntf

 

 

Defines the interfaces and classes used by the property editors in the IDE.

To use the DesignIntf and DesignEditors units with Delphi, you need to add the following compiler option on the Compiling page in Project Options:

-LUDesignIDE

With C++, you need to ensure that $(BDS)\include\windows\vcl\design is added to the INCLUDE path, and that designide.bpi is added to the Requires of your package.

For more information, see the comments in the source; the DesignIntf.pas source file is liberally commented.

 

 

Regards

Salvatore Marullo

Link to comment
Share on other sites

Hi Ronny , 

 

The data save in the Window Temp Files ?   , no the data is store in  Browser(Client) Storage. 

 

Please see   http://www.jstorage.info/     Is explained better than I can explain. 

 

 

Is Possible to write data at client Side to the files from another Application  ? 

 

sorry ,I do not understand the question. 

 

In an application, I save the data to a Mysql table. 
 
If the client (Browser) has deleted the data, I can restore from Mysql table. 
 
Each Browser application, if  knows the key,  can access the data.

 

 
 
Best Regards 
 
Salvatore Marullo
Link to comment
Share on other sites

Hi Ronny, 

 

The data is stored in the Browser "Local Storage" such as cookies. 
 
I think it's a little difficult to access data with a desktop application, however, can try to create a file (from unigui application) with something. 
 
 
  WriteToFile function (sText) {
var fso = new ActiveXObject ("Scripting.FileSystemObject"); 
var s = fso.CreateTextFile ("C: \\ test.txt", true); 
s.WriteLine ("helloworld"); 
s.Close (); 
 
or save the data From Server site code;
or delphi application with  Embedded Web Browser - EmbeddedWB

 

 
 
 
 
Sorry !!! 
 
As soon as I have some time, I see if I can find something. 
 
Best Regards
 
Salvatore Marullo
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...