Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PB Compiler Error during Save As

Status
Not open for further replies.

Statey603

Programmer
Nov 10, 2009
196
US
I am trying to save a PowerBuilder window object to a new name so I can load the original in the same PBL for testing.

when I attempt the Save As with the new name (orginal name preceded by x), I get the following error.

---------- Compiler: Errors
bill_temp.pbl(xgeneric_indiv_prot_rept).datastore_1.1: Error C0046: Illegal datatype for within clause: w_sh_generic_indiv_prot_rept
---------- Finished Errors (8:46:06 AM)

NOTE: This window compiles with no errors and executes fine.

I appreciate any ideas on this.
 
very weird!

does it only happen when using 'x'?

if really not working you could try this:
(from library painter with right mouse button)

1) export the code to a file
2)edit the file (shift+F6) and change the name in header of the exported file
3)import the exported and modified file into a library
4)use the "edit source" option and do a search and replace of the original "objectname" to "xobjectname" in the exported code)


hihelps
(if that gives you trouble importing since

regards,
Miguel L.
 


RE: does it only happen when using 'x'?
No. No matter what name I provide, I get the error.
(zObjectName, TestObjectName, etc)


RE: 1) export the code to a file
I will try this out.


thanks !!!

 
Note: Once you get errors importing files you should do an "optimize" of your library. (using right-mouse button from library painter).

Try to do a saveAs to another library too.

good luck

regards,
Miguel L.
 
then another thing:

the error you get: "bill_temp.pbl(xgeneric_indiv_prot_rept).datastore_1.1: Error C0046: Illegal datatype for within clause: w_sh_generic_indiv_prot_rept"

illegal datatype for within clause: if not wrong, this means that your window must be inherited from w_sh_generic_indiv_prot_rept. Maybe the problem must be looked for in that window. Try to regenerate it for a start.

Has the parent been changed? seems like something is missing now in the descendent.

regards,
Miguel L.
 
your problem might be a "cyclic reference":

your ancestor references the descendent, and the descendent references the ancestor. if one of the two is not correctly regenerated you'll probably get the problem you have.

to fix the problem: export the ancestor and use some special comment to temporarily avoid references to the descendent. like for example: //&& (that way once things are importable, you can de-comment those).

if necesary do the same with the descendent window.

regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top