NetTalk Central

Author Topic: ERROR: Too many segdef in file:E,4000  (Read 8977 times)

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
ERROR: Too many segdef in file:E,4000
« on: June 30, 2014, 12:53:13 AM »
Bruce,

I'm getting this error (ERROR: Too many segdef in file:E,4000) when I try to compile my NetTalk app.  You indicated on the user group that it could be caused by too many fields on a form (around 200 or more) - which is the case here.

The obvious solution is to break the form up into different procedures, but I really hate to do that.  Would compiling the data into a dll help with this Clarion limit.  Do you have any other suggestions?

Thanks
Alan Schoolcraft

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #1 on: June 30, 2014, 01:30:42 AM »
Hi,

I remember that suppressing comments might help.
Or perhaps it was for something completely different.

:: rainer

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #2 on: June 30, 2014, 04:12:19 AM »
Maybe reducing the number of procedures per module would help. I know I ran into a problem like this when I upped the procedure per module from 10 to 20 in one application.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

TomD

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #3 on: June 30, 2014, 10:32:09 PM »
I had a similar error but in my case it was exactly what Terry said - too many procedures in one module.
Try moving some procedures from module where You got the form into another module and see if it helps.

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #4 on: June 30, 2014, 11:35:25 PM »
Thanks for the suggestions guys. Unfortunately, in trying to figure this out, I totally trashed my app file.  Tried everything to try to recover it and finally had to restore from a backup.  I lost two days of work but hey, I'm alive, so it can't be that bad! :-)

This all happened when I added a bunch of fields to that one procedure and Bruce did tell me if it was a NetTalk app the error is probably from too many fields on a page (on the news group).  So, I'm going with that theory and I'll redesign it to break the procedure into multiple forms..... not the cleanest interface but it'll work.

Alan

Alan Schoolcraft

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #5 on: July 01, 2014, 02:08:09 PM »
Allan

I also have had this problem with a Form that has 6 tabs and about 130 fields (not counting prompts etc).  An answer that Terry has already noted is to reduce the number of procedures per module (Application/Redistribute Procedures).

An additional point is that when you select 'Redistribute Procedures' the number displayed always seems to be 10 rather than the current number - it seems to be displaying a default number rather than what you have actually set and this is a bit confusing.

Cheers

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #6 on: July 01, 2014, 05:45:50 PM »
Thanks Keith
Alan Schoolcraft

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ERROR: Too many segdef in file:E,4000
« Reply #7 on: July 01, 2014, 10:14:49 PM »
Hi Keith,

>>  I lost two days of work ...

And we don't make backups every day because.....? Or indeed every few hours..... and especially when you're about to "butcher" the app to try various things...

BTW - NT allows for a "form inside form" approach, and this will probably solve the Segdef issue.
the "sub form" can be on the file fields, but it should be a "memory form" (with the option to not generate the <form> tag).
Tab style for this form set to plain, save buttons etc turned off..

cheers
Bruce

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #8 on: July 01, 2014, 11:44:16 PM »
Keith
The dafault setting is set on Tools\Application Options\Application Procedures per module.
I normally set it to 1 while developing since if an error calls the clw then I know exactly which procedure has the problem. Before distribution I then redistribute procedures to 10.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000 - Resolved
« Reply #9 on: July 02, 2014, 05:33:22 AM »
Thanks to you guys who suggested reducing the number of procedures per module.

I re-created the procedure (with about 200 fields, 4 browses, and 4 tabs) and I placed it in it's own procedure.

The app now compiles without error.
Alan Schoolcraft

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: ERROR: Too many segdef in file:E,4000
« Reply #10 on: July 02, 2014, 02:30:07 PM »
Thanks Terry re the Default setting - another little mystery cleared up!

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27