Re: Comet Windows Programming, Big Variables


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on June 30, 2014 at 14:48:14:

In Reply to: Re: Comet Windows Programming, Big Variables posted by Jeff Cinelli on June 30, 2014 at 13:18:33:

My too. Only took 6 years to find a use for the commands :) Brian wrote BIGTEXT.IBS and BIGTDLG.IBS. The latter is the better example. His example had horizontal scroll bars turned on. I've turned those options off in VS2008.

The big caveat on (StoreControl) is that it outputs to a multi-line file. Parsing and showing the content back into your 8000 bytes (my 5000) is where things get icky. Especially when the user inserts blank lines into the content. Like so.

<---Width of Edit control--->
-----------------------------
The quick brown fox jumped
over the lazy dog's back.

Now is the time for all good
men to come to the aid of
their party.
-----------------------------
Soft Return = '@0D0D0A@'
Hard Return = '@0D0A@'

The EDIT control inserts Soft Returns at the end of lines 1,2,4, & 5.

The output file will have six lines with a Hard Return added by (StoreControl) to line 3 & 6. When you read the output file (TXT) into Comet the Hard Returns are stripped. Soft Returns are left as just "@0D@".

My thinking is if the last byte of the input record is a "@0D@" then that line ended in a Soft Return. I want to replace the "@0D@" with a space. And, for good measure, STRIPR() the input record to get rid of unwanted trailing spaces and stick the result into the 8K string. Otherwise, there must have been a Hard Return. I want to keep, the now missing Hard Return, and appended '@0D0A@' to my input record and stick that into the 8K string. Last caveat, there's a '@0D0A@' at the end of file. So I have to "undo" any Hard Return added by the last line. Elsewise, the 8K string will fill up with extra Hard Returns.

The advantage of stripping out the Soft Returns is that the Notes/Comments can be displayed in other EDIT controls with different widths. Like so.

<--------Width of Edit control-------->
---------------------------------------
The quick brown fox jumped over the
lazy dog's back.

Now is the time for all good men to
come to the aid of their party.
---------------------------------------

Hope this makes sense :) Makes more sense if you look at the file exported by (StoreControl) in Hex view.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]