Text Widget 
Author Message
 Text Widget

This question may be more appropriate in a "regular" perl forum, instead
of here, but maybe there is someone who has run into this.

I have a text widget, from which I grab all of the lines, and store them
into a variable, using 'get'.  I take this information, and store it into
a perl database, using the following code:

  %db_hash = ();
  dbmopen(%db_hash, "$database_file", 0775);
  $db_hash{PROJ_COMMENT} = $proj_comment;
  dbmclose %db_hash;

The problem lies with the size of '$proj_comment'.  It seems that if this
grows to a certain size, or above, I get this error:

   Tk::Error: ndbm store returned -1, errno 28, key "PROJ_COMMENT" at
   /tools/custom/bin/release_fpga line 4020.

The line that it complains about is this one from above:

  $db_hash{PROJ_COMMENT} = $proj_comment;

I am guessing that there is some sort of limitation with regards to this
database hash size, or something else.  Has anyone seen this?  If there is
a default size limitation, is there any way to increase it?

Any help is appreciated!

Thanks,

Jon

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Mon, 28 Mar 2005 02:22:06 GMT  
 Text Widget

Quote:

> This question may be more appropriate in a "regular" perl forum,
> instead
> of here, but maybe there is someone who has run into this.

> I have a text widget, from which I grab all of the lines, and store
> them
> into a variable, using 'get'.  I take this information, and store it
> into
> a perl database, using the following code:

>   %db_hash = ();
>   dbmopen(%db_hash, "$database_file", 0775);
>   $db_hash{PROJ_COMMENT} = $proj_comment;
>   dbmclose %db_hash;

> The problem lies with the size of '$proj_comment'.  It seems that if
> this
> grows to a certain size, or above, I get this error:

>    Tk::Error: ndbm store returned -1, errno 28, key "PROJ_COMMENT" at
>    /tools/custom/bin/release_fpga line 4020.

> The line that it complains about is this one from above:

>   $db_hash{PROJ_COMMENT} = $proj_comment;

> I am guessing that there is some sort of limitation with regards to
> this
> database hash size, or something else.  Has anyone seen this?  If
> there is
> a default size limitation, is there any way to increase it?

> Any help is appreciated!

I believe the value limit is 4K.

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Mon, 28 Mar 2005 03:15:03 GMT  
 Text Widget
Thanks for the info, Toby.  I am changing to gdbm or bsd-db.

Jon

Quote:

> From the AnyDBM_File man page:

>                          odbm    ndbm    sdbm    gdbm    bsd-db

>                          ----    ----    ----    ----    ------

>  Linkage comes w/ perl   yes     yes     yes     yes     yes

>  Src comes w/ perl       no      no      yes     no      no

>  Comes w/ many unix os   yes     yes[0]  no      no      no

>  Builds ok on !unix      ?       ?       yes     yes     ?

>  Code Size               ?       ?       small   big     big

>  Database Size           ?       ?       small   big?    ok[1]

>  Speed                   ?       ?       slow    ok      fast

>  FTPable                 no      no      yes     yes     yes

>  Easy to build          N/A     N/A      yes     yes     ok[2]

>  Size limits             1k      4k      1k[3]   none    none

>  Byte-order independent  no      no      no      no      yes

>  Licensing restrictions  ?       ?       no      yes     no

> --Toby Everett

>            -----Original Message-----

>            Sent:   Wednesday, October 09, 2002 9:27 AM
>            To:     Perl/TK NewsGroup
>            Subject:        Text Widget

>            This question may be more appropriate in a "regular" perl
> forum, instead
>            of here, but maybe there is someone who has run into this.

>            I have a text widget, from which I grab all of the lines,
> and store them
>            into a variable, using 'get'.  I take this information, and
> store it into
>            a perl database, using the following code:

>              %db_hash = ();
>              dbmopen(%db_hash, "$database_file", 0775);
>              $db_hash{PROJ_COMMENT} = $proj_comment;
>              dbmclose %db_hash;

>            The problem lies with the size of '$proj_comment'.  It seems
> that if this
>            grows to a certain size, or above, I get this error:

>               Tk::Error: ndbm store returned -1, errno 28, key
> "PROJ_COMMENT" at
>               /tools/custom/bin/release_fpga line 4020.

>            The line that it complains about is this one from above:

>              $db_hash{PROJ_COMMENT} = $proj_comment;

>            I am guessing that there is some sort of limitation with
> regards to this
>            database hash size, or something else.  Has anyone seen
> this?  If there is
>            a default size limitation, is there any way to increase it?

>            Any help is appreciated!

>            Thanks,

>            Jon

>            -++**==--++**==--++**==--++**==--++**==--++**==--++**==
>            This message was posted through the Stanford campus mailing
> list
>            server.  If you wish to unsubscribe from this mailing list,
> send the
>            message body of "unsubscribe ptk" to


-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Mon, 28 Mar 2005 04:05:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Q: Changing Text-Color in Text-Widget?

2. text formatting in a Text widget

3. How update text in text widget when executing some other callback

4. Color Coding Text in a Tk::Text Widget

5. Checking for marked or selected text in a Text widget

6. Grabbing Text from Text widget

7. Retrieving a line of text from a Text Widget when clicking on it

8. Making text appear in a text widget...

9. best way to save text in Text widget

10. text in a Text widget

11. Displaying text formats in a text widget...

12. fitting text in Text widget

 

 
Powered by phpBB® Forum Software