Field limit?

eugen helbling eugen.helbling at ginit-technology.com
Fri Dec 14 05:19:01 EST 2001


Jacqueline Landman Gay wrote:
> 
> Shari wrote:
> >
> > I have a very large text file I wanted to import into a field.
> >
> > When I use the IMPORT button, the entire file ends up on one line,
> > even with the wrapping turned on.  And it doesn't import the entire
> > file.
> >
> > When I use a script to import,
> >
> > open file theFile
> > read from file theFile until eof
> > close file theFile
> > put it into cd fld someField
> >
> > it only puts a very very small portion of theFile into the field.  I
> > mean about a paragraph.
> >
> > When I expand the import script to go through the file and delete
> > about 2/3 of it, it pastes the result into the field, but all in 4
> > lines, so that each line is overwritten several times and you cannot
> > read the result.
> >
> > I can import the file and put it into a global variable, and the
> > entire file is in the variable, with no problem.
> 
> It sounds like the file has no natural word breaks. Some Mac apps will
> break a line in the middle of a word if there isn't any other choice,
> but MC doesn't. So it all shows up on one line, or if there is an
> occasional space or return, just a few lines. The overwriting on the
> same line sounds like a bug.
Could be a bug. Then I think the mc engine uses the properties as well. so
during a write to a line it uses the formattedwidth property of the field and
the property returns maximum one integer value (65536 byte). so if the width exceedes this
limitation -> engine begins to put the next chars at the beging of the line and so on.

I used this code in a field
----------------------
on mouseUp n
  local c="0"
  local i_preload=43600
  -- preload
  repeat i_preload times
    put c after tmp
  end repeat
  put tmp into line 1 of fld 1
  -- check
  repeat while the shiftkey is not "down"
    put "o" after the line 1 of fld 1
    put length(line 1 of fld 1)&"--"&the formattedwidth of fld 1
  end repeat
end mouseUp
-----------------------

> 
> If you only need to store the info and don't need to display it, store
> it in a custom property. That will act just as though it were in a variable.
> 
> Storing the file inside the stack won't help with the load times though.
> MC still has to load it, whether it is from an external file on disk or
> from its own stack file. You should get identical results when the stack
> opens whether you store the text inside the stack itself, or whether you
> read it in from an external file on openstack. The only reason to store
> it inside the stack would be to keep both files consolidated into one on disk.
> 
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard


-- 
Eugen Helbling
_____________________________________________________________________

   GINIT Technology GmbH        eugen.helbling at ginit-technology.com
   Eugen Helbling                          www.ginit-technology.com
   Emmy-Noether-Str. 11                    phone:   +49-721-96681-0
   D-76131 Karlsruhe                       fax:   +49-721-96681-111



More information about the metacard mailing list