Author Topic: Multi Line or textbox with DCL  (Read 9406 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
Multi Line or textbox with DCL
« on: February 17, 2017, 03:15:08 PM »
I am trying to create a textbox with DCL. I have read that DCL only supports a single line.
ObjectDCL, OpenDCL, Doslib will not work for me because I cannot install executables in my office network environment.

The goal of my next script would be to allow the user to enter multi-line text in a textbox and save it to a .txt file on the network.

Any ideas on how to achieve this?

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Multi Line or textbox with DCL
« Reply #1 on: February 17, 2017, 05:20:54 PM »
I've previously used a list box to display multiline text, as per this example.

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Multi Line or textbox with DCL
« Reply #2 on: February 17, 2017, 05:42:18 PM »
What about creating a list of strings and popultate the DCL code on the fly, by using paragraph and text_part:
http://www.afralisp.net/archive/lispa/lisp48u.htm
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Multi Line or textbox with DCL
« Reply #3 on: February 17, 2017, 11:36:08 PM »
This is an old routine that works with text file stored data.
I never completed the user edit portion. It was easy to edit the stored data directly.

http://www.theswamp.org/index.php?topic=1392.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

BIGAL

  • Swamp Rat
  • Posts: 1398
  • 40 + years of using Autocad
Re: Multi Line or textbox with DCL
« Reply #4 on: February 18, 2017, 08:07:38 PM »
Whilst a dcl would be nice could you not just use mtext, pull the text out after closing write to file then erase it.
A man who never made a mistake never made anything

dubb

  • Swamp Rat
  • Posts: 1105
Re: Multi Line or textbox with DCL
« Reply #5 on: February 20, 2017, 01:47:18 PM »
This is an old routine that works with text file stored data.
I never completed the user edit portion. It was easy to edit the stored data directly.

http://www.theswamp.org/index.php?topic=1392.0

I like what you have done with this script, its what I'm trying to achieve.
Per other replies, I'm also going to explore those methods.