Normal Topic Getting the most from the WriteLN window (Read 942 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Getting the most from the WriteLN window
Jul 13th, 2006 at 11:00pm
Print Post Print Post  
I was going to place this post in the 'requests for ver 2.0' thread, but I'd like to hear other users thoughts about the subject first.

We've really become dependant on the WriteLN window. It is a great way to get a quick display of data and it's easy to program in to our application (doesn't require all the coding to write to a file, etc.) Its a great way to present data quickly and efficiently for viewing or copying and pasting into other programs, etc. We use it all day, everyday.

I would love to see this invaluable tool get some more power. For instance;

a scroll bar
ability to keep the window on top of other windows
ability to 'save to file', print, etc.
ability to 'save to element'.

Now that I think about it, perhaps I should be using the F6 editor instead of the writeln window. Also, after writing this, maybe there is an easy way to send data to a simple HTML editor, instead. This would then allow the user to interact more easily with the data being displayed.

Any thoughts or comments?

Steve

  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Getting the most from the WriteLN window
Reply #1 - Jul 14th, 2006 at 1:04pm
Print Post Print Post  
Hello Steve,

2.0 has @PopuStringEditor() which acts like the 2.0 Field Editor but can have any title you want, any values you want displayed in it, be any size you want and be placed where you want it on the screen. When you close it, it returns it's value to the Sbasic code so you can save it out to file or put it in an element.

Quote:
A new SBasic Command @PopupStringEditor() which displays an edit window comparable to the F6 edit window. Syntax is as follows
           @PopupStringEditor(content as string, title as string, width as int, height as int, x_cor as int, y_cor as int) as string

           Content - Initial data to be displayed in Editor. If User Exits without saving the initial value is returned
           Title - The Title that the user wants the Editor to have
           Width - Width of the editor. -1 will use default width. Width can be from 100-???. If less than 100 it is set to 100
           Height - Height of the editor -1 will use default height. Height can be from 100-???. If less than 100 it is set to 100
           X_cor - X Coordinate for the upper left corner of the Editor Window. Relative to Screen. -1 lets O.S. position window.
           Y_cor - Y Coordinate for the upper left corner of the Editor Window. Relative to Screen. -1 lets O.S. position window.


oh and it has scrollbars.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Getting the most from the WriteLN window
Reply #2 - Jul 14th, 2006 at 2:06pm
Print Post Print Post  
Also 2.0 has FileOverWrite() which will make writing data out to a file easier. Syntax is FileOverWrite(filename as string, .. as String) the .. is the data you want to write out to the file. If the file already exists the command will remove it and then create a new one, otherwise it just creates a new one.

Ex:
Code
Select All
FileOverWrite("C:\Sesame\Prog_Log.txt", "This is the First Line", @NewLine(), "This is the Second Line") 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Getting the most from the WriteLN window
Reply #3 - Jul 14th, 2006 at 2:26pm
Print Post Print Post  
Ray, both options sound great. If creating and writing to a file can be done with just one line of code, then I would want to take that route and use an HTML editor to view the data, allowing the user to interact with the data using hyperlinks.

Thanks for the encouraging information.

Steve
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Getting the most from the WriteLN window
Reply #4 - Jul 14th, 2006 at 4:48pm
Print Post Print Post  
Steve,

If you want to you could write a subroutine youself that does what FileOverWrite() does, using the current version. Call it something like MyFileOverWrite(). You write the subroutine once and can call it from anywhere you want. Another useful one would also be MyFileAppend() that just appends data on to the end of an existing file.

Just some ideas to get you by until 2.0

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Getting the most from the WriteLN window
Reply #5 - Jul 14th, 2006 at 5:03pm
Print Post Print Post  
Ray,

Thanks for the tip. I'll give it a shot.

Can I store the subroutine once in 'application programming' so I don't have to put it in Global Code for every form?

Thanks again,

Steve
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Getting the most from the WriteLN window
Reply #6 - Jul 14th, 2006 at 5:21pm
Print Post Print Post  
Steve,

Subroutine has to be in Global Code for each form you want to use it on.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Getting the most from the WriteLN window
Reply #7 - Jul 14th, 2006 at 5:26pm
Print Post Print Post  
OK. I'll give it a shot.

Steve

  
Back to top
IP Logged