To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 13919
     
   
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Sat, 15 Jul 2006 20:32:29 GMT
Viewed: 
5955 times
  

Don Heyse wrote:

Sounds like you want a wrapper plugin to start up the executable
version of syncedit and return control to LDDP right away.  I did
something like this years ago with the ldlist wrapper plugin.

http://ldglite.cvs.sourceforge.net/ldglite/ldglite/plugins/pluginldlist.c?revision=1.1&view=markup

Then you could theoretically work in both the LDDP and syncedit
windows with the ldview window displaying any updates, as long as you
can make syncedit and LDDP poll the file for changes like ldview.

Can a LDDP plugin get the name of the current file? AFAICS it's only given
the contents of the editor buffer (or just the selection). Without the file
name there's no way to do any polling, and when it's given the selection
only it's imperative that the file is not overwritten with only these lines!

This could be even better if LDDP and the syncedit executable both
supported the ldlist style drag and drop, but I don't know if that
ever got implemented in LDDP.


I don't think ldlist D&D is implemented in LDDP (pity!), and IIRC the ldlist
D&D is one part at a time only. If so it's not very easy to drag a whole
buffer from SyncEdit to LDDP using this protocol.

It almost seems like LDDP needs a new kind of 'plugin' ('plug-beside') that
can be live at the same time as LDDP, and gets automatic sync messages from
LDDP (and vice versa). The easiest way might be to let LDDP start an
external .exe with a (or maybe two, one for each direction)temporary file
and a window handle as the arguments, making it possible for LDDP to signal
the external program, and the external program to signal LDDP when the text
has been changed.

--
Anders Isaksson, Sweden
BlockCAD:  http://web.telia.com/~u16122508/proglego.htm
Gallery:   http://web.telia.com/~u16122508/gallery/index.htm

   
         
   
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Sun, 16 Jul 2006 00:02:12 GMT
Viewed: 
6204 times
  

In lugnet.cad, Anders Isaksson wrote:

Can a LDDP plugin get the name of the current file? AFAICS it's only given
the contents of the editor buffer (or just the selection). Without the file
name there's no way to do any polling, and when it's given the selection
only it's imperative that the file is not overwritten with only these lines!

This could be even better if LDDP and the syncedit executable both
supported the ldlist style drag and drop, but I don't know if that
ever got implemented in LDDP.

I don't think ldlist D&D is implemented in LDDP (pity!), and IIRC the ldlist
D&D is one part at a time only. If so it's not very easy to drag a whole
buffer from SyncEdit to LDDP using this protocol.

It almost seems like LDDP needs a new kind of 'plugin' ('plug-beside') that
can be live at the same time as LDDP, and gets automatic sync messages from
LDDP (and vice versa). The easiest way might be to let LDDP start an
external .exe with a (or maybe two, one for each direction)temporary file
and a window handle as the arguments, making it possible for LDDP to signal
the external program, and the external program to signal LDDP when the text
has been changed.

I think LDDP does already have support for *one* configurable external
program.  Put a %0 in the args list to make LDDP pass the name of the
temp file to the external program.  I used to add a -p to the args list
to tell ldglite to poll the file for changes, but I don't remember if
LDDP also polls the file for changes.  Anyhow, you might be able to do
the same sort of thing with syncedit.exe.

It'd be nice if LDDP could support more than one external program, like
it does with plugins.

   
         
   
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Sun, 16 Jul 2006 08:40:00 GMT
Viewed: 
6419 times
  

Don Heyse wrote:

It'd be nice if LDDP could support more than one external program,
like it does with plugins.

The version 1.5.7.0 of LDDP that I have installed supports any number of
external programs, although the interface for adding them is a bit
non-intuitive.

Unfortunately, looking at the sources, I find no place where LDDP re-reads
the text buffer after activating an external program (it can work in WAIT or
NOWAIT mode), it seems it's mainly intended for viewers. Of course, a
workaround is to let the external program put it's result to the clipboard,
and manually paste that into LDDP or fiddle with Windows messages to do the
pasting automatically, but it feels like an unsafe way to work. Maybe I
should experiment a bit with SyncEdit.exe?

--
Anders Isaksson, Sweden
BlockCAD:  http://web.telia.com/~u16122508/proglego.htm
Gallery:   http://web.telia.com/~u16122508/gallery/index.htm

   
         
   
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Sun, 16 Jul 2006 11:19:55 GMT
Viewed: 
7521 times
  

Anders Isaksson wrote:
Of course, a workaround is to let the external program put
it's result to the clipboard, and manually paste that into LDDP

OK, I modified the standalone version a bit. It is now suitable to be used
as a 'User-defined program' in LDDP (the 'Parameter' field in LDDP should be
set to '%0'). Note that such programs can *only* work with the full file,
not selections in LDDP. Remember that you have to paste the results yourself
into the right window in LDDP (CTRL-A, CTRL-V)

http://web.telia.com/~u16122953/synceditsa.zip

There is no automatic update of the SyncEdit window when you change anything
in the LDDP window, it *might* be possible to do even though there is no
setting for automatic saving of the buffer for user-defined programs, only
for LDView and L3Lab, but it looks like the file name used is the same.

or fiddle with Windows messages to do the pasting automatically, but it
feels like an unsafe way to work

This isn't really doable, as LDDP is a MDI program (can have many files open
at the same time) and there's no way for an external program to be sure that
the right file window is still open and has focus.

--
Anders Isaksson, Sweden
BlockCAD:  http://web.telia.com/~u16122508/proglego.htm
Gallery:   http://web.telia.com/~u16122508/gallery/index.htm

   
         
     
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Mon, 17 Jul 2006 14:07:26 GMT
Viewed: 
6893 times
  

In lugnet.cad, Anders Isaksson wrote:
Anders Isaksson wrote:
Of course, a workaround is to let the external program put
it's result to the clipboard, and manually paste that into LDDP

OK, I modified the standalone version a bit. It is now suitable to be used
as a 'User-defined program' in LDDP (the 'Parameter' field in LDDP should be
set to '%0'). Note that such programs can *only* work with the full file,
not selections in LDDP. Remember that you have to paste the results yourself
into the right window in LDDP (CTRL-A, CTRL-V)

many thx,anders. I'll test it. question though: CRTL-A for copy? most progs use:
CTRL-C for "copy", CTRL-V for "paste", CTRL-X for "cut" while CTRL-A is used for
"select all". a typo?

bye, w.

    
          
     
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Mon, 17 Jul 2006 17:50:10 GMT
Viewed: 
6994 times
  

Willy Tschager wrote:

many thx,anders. I'll test it. question though: CRTL-A for copy? most
progs use: CTRL-C for "copy", CTRL-V for "paste", CTRL-X for "cut"
while CTRL-A is used for "select all". a typo?

No, what I mean is:

'OK' or 'Send to Clipboard' in SyncEdit does an automatic 'copy', then in
LDDP you should do CTRL-A (Select all), CTRL-V (Paste) to replace the
contents of the edit buffer. Remember, a 'plug beside .exe' always gets the
full file, never just the lines that are selected in LDDP (while a plugin
will get the full file if nothing is selected, the selection otherwise).

--
Anders Isaksson, Sweden
BlockCAD:  http://web.telia.com/~u16122508/proglego.htm
Gallery:   http://web.telia.com/~u16122508/gallery/index.htm

   
         
   
Subject: 
Re: Call for GUI part editor
Newsgroups: 
lugnet.cad
Date: 
Tue, 18 Jul 2006 07:17:34 GMT
Viewed: 
6804 times
  

In lugnet.cad, Anders Isaksson wrote:
Anders Isaksson wrote:
Of course, a workaround is to let the external program put
it's result to the clipboard, and manually paste that into LDDP

OK, I modified the standalone version a bit. It is now suitable to be used
as a 'User-defined program' in LDDP (the 'Parameter' field in LDDP should be
set to '%0'). Note that such programs can *only* work with the full file,
not selections in LDDP. Remember that you have to paste the results yourself
into the right window in LDDP (CTRL-A, CTRL-V)

http://web.telia.com/~u16122953/synceditsa.zip

works! thank you. as this is the standalone version I'll repeat my request for a
"Always on top" feature. is this doable? I also glimps for a split second an
about dialog when I start-up the prog. how about moving the about dialog into an
about button. I just had the feeling I missed some key info. I was up to ask for
an "undo" when I found out that I just can undo the paste in LDDP and fire up
Syncedit agian ... well ... it wouldn't hurt ...

cheers, w.

 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR