Re: Persistent Data of CDE

2006-09-29 Thread Phil Shapiro
Duke Briscoe [EMAIL PROTECTED] writes:

 I think CDE plugins run as part of the CDE, which is not an applet
 so {get-the-applet} will not work.  Maybe you can run part of your
 plugin as a subapplet, or use a local file instead of the persistent
 data feature.

Duke is right, the IDE isn't an applet so {get-the-applet} won't
work.  The IDE does support an API that can be used in external
editors that works a lot like set-persistent-data.  It's
SurgeLabInterface.set-preference and SurgeLabInterface.get-preference.

An editor (plugin) can use this API to store its data in the IDE
preferences file.  To avoid colliding with other tools, I would
recommend choosing a pref-key based on your editor's ID, for example
the VLE uses keys like visual-layout-editor/session/pane-sizes.

-phil


Re: Persistent Data of CDE

2006-09-28 Thread Duke Briscoe
I think CDE plugins run as part of the CDE, which is not an applet so 
{get-the-applet} will not work.  Maybe you can run part of your plugin 
as a subapplet, or use a local file instead of the persistent data 
feature.


-- Duke

On Sep 28, 2006, at 10:51 PM, JamesWang wrote:


Hello

The attachment is CurlUnit with CDE plugin.
You can install it by importing file source/editor-info.txt.When you 
start

curlunit runner in CDE and load a test sample in the samples
directory,Clicking run button will cause below error.But if  I run
testrunner.curl to do the same thing,everything is ok.
The error has something to do with  proc set-persistent-data.I can not 
find
some useful info in Deguide and my question is whether we can use 
persistent

data feature of curl in CDE.

Error: Improper use of get-the-applet!

#0   get-the-applet (0x04d02ebd+61)

  (args: 0x0 0x0 0x228f460 0x228f3e8 0x228f3c8 0x3)

#1   get-persistent-data-repository (0x04d02d31+25)

  (args: 0x1 0x0 0x228f4a8 0x614b03de 0x614ad168 0x0)

#2   set-persistent-data (0x04d08944+20)

  (args: 0x614ad168 0x0 0x45a234c 0x0 0x1 0x0)

#3   SimpleTestRunner.add-uri-if-new (0x614b03dd+525) at
file:///e:/curl/src/CurlUnit/curlunit/source/ui.scurl:??

  (args: 0x4f86664 0x0 0x228f5d8 0x1 0x228f4d8 0x2196004)

#4   SimpleTestRunner.run (0x614ae7c0+24) at
file:///e:/curl/src/CurlUnit/curlunit/source/ui.scurl:??

  (args: 0x4f86664 0x228f5bc 0x123131b 0x45a232c 0x4bd934c 0x45ef8fc)

#5   [{proc} inside SimpleTestRunner.add-controls] (0x614ac203+15) at
file:///e:/curl/src/CurlUnit/curlunit/source/ui.scurl:??

  (args: 0x45a232c 0x4bd934c 0x45ef8fc 0x45ef8fc 0x228f604 0x39d39c4)

#6   closure_raw_handler (0x0123131a+26)

  (args: 0x45a232c 0x4bd934c 0x3b5d154 0x1 0x3 0x4c3a4b4)

#7   EventTarget.handle-event (0x039d39c3+175)

  (args: 0x4bd934c 0x45a232c 0x446cbd4 0x228f650 0x228f6a8 0x210d508)

#8   GuiEventTarget.handle-event (0x039d38e0+56)

  (args: 0x4bd9324 0x45a232c 0x228f650 0x2196004 0x3 0x1)

#9   EventQueue.dispatch-entry (0x0210d507+111)

  (args: 0x2197020 0x446cbd4 0x228f6dc 0x2196004 0x1 0x1)

#10  EventQueue.dispatch-events-aux-aux (0x021101d4+112)

  (args: 0x2197020 0x0 0x2197020 0x0 0x228f770 0x210fc4d)

#11  EventQueue.dispatch-events-aux (0x0210fd3d+69)

  (args: 0x2197020 0x0 0x0 0x6166351c 0x0 0x3c)

#12  EventQueue.dispatch-events (0x0210fc4c+156)

  (args: 0x2197020 0x1 0x61663684 0x2 0x0 0x0)

#13  dispatch-events (0x0210fb75+53)

  (args: 0x1 0x228f820 0x61663684 0x44c 0x39b 0x1000227a)

#14  event-loop (?) (0x0210fb39+9)

  (args: 0x44c 0x39b 0x1000227a 0x39bad79 0x1283344 0x228f874)

#15  run-surge-lab (0x61663683+359) at
curl://install-6/ide/packages/CURL.IDE.MAIN.pcurl:??

  (args: 0x22a1dcc 0x219200c 0x1 0x0 0x61658530 0x6166351c)

#16  become-surge-lab-aux (0x02590bc9+337)

  (args: 0x0 0x44c 0x219200c 0x2199004 0x25add24 0x25add1c)

#17  become-surge-lab (0x02590a4a+194)

  (args: 0x25add24 0x1 0x68 0x22aa00c 0x22aa1ac 0x1283344)

#18  [initializer for CURL.APPS.SURGE-LAB] (0x0257deca+202)

  (args: 0x217c16c 0x228f9c8 0x0 0x12537a0 0x228f9ac 0x257ddf7)

#19  really-initialize-package (0x020f1dfd+93)

  (args: 0x22aa00c 0x2195004 0x228fb50 0x210baa7 0x22a2d04 0x1)

#20  import-and-run-script (0x0257ddf6+62)

  (args: 0x22a2d04 0x1 0x0 0x2192040 0x1283344 0x228fa1c)

#21  init-and-run-curl-in-this-process (0x0210baa6+926)

  (args: 0x2194004 0x2109be3 0x246 0x228fe18 0x228fba0 0x2196138)

#22  init-and-run-curl-in-this-process-no-ret (0x0210b6dd+13)

  (args: 0x2194004 0x228fba0 0x2196004 0x3 0x1 0x1286d6c)

#23  ProcessRunnable.run-bound-proc (0x02109be2+1246)

  (args: 0x2194004 0x228fd88 0x21096d7 0x217f028 0x228ff30 0x21051ba)

#24  ProcessRunnable.run (0x021096fe+10)

  (args: 0x217f028 0x228ff30 0x21051ba 0x2196004 0x3 0x2196004)

#25  curl-thread-really-really-call-run-in-runnable (0x021096d6+18)

  (args: 0x2196004 0x3 0x2196004 0x1862190 0x228fe18 0x2196004)

#26  curl-thread-really-call-run-in-runnable (0x021051b9+233)

  (args: 0x2196004 0x228ff48 0x1260540 0x127d04c 0x0 0x0)