bigtoe
Posts: 115
|
| Posted: 09/02/2004, 6:24 PM |
|
I had CCS generate a Grid and Record form.
After using the form for 2 weeks I realized I did not
need 1 particular column in the list of rows.
I removed the column in the Data Source window.
The column was also deleted in MySQL.
I did a re-Publish Project.
I assumed the references to the column would be gone.
But when I tired to view the web page, I got
MySQL errors in the associated php file.
I searched in the directory for the name of the column.
I found the .ccp and .php files with still contained
references to this column.
With a basic text editor I manually removed the
references to the column.
Did a re-Publish Project. Got no errors.
Transferred the project to the web site.
I viewed the web page. Go no MySQL errors.
The page works fine.
Again, I searched in the directory for the name of the column.
I found .ccp files with still contained references to this column.
Is this normal? To have .ccp file still contain references.
Is there a way to completely get rid of all references
to a column that you don't want anymore?
|
 |
 |
Karsten
Posts: 57
|
| Posted: 09/03/2004, 12:57 AM |
|
hi,
i found out, if you type own code in generated files it offten ouccours the stringpharser go broke, it never adds/removes code and values you type in the propertyinspector on the right side of the IDE.
so do it like me, always do a backup before you modify code in a generated file.
i think your references/variables to the colum where not removed because stringpharser broke
_________________
If one gives up, he told himself he failed. |
 |
 |
peterr
Posts: 5971
|
| Posted: 09/03/2004, 1:57 AM |
|
bigtoe,
Looks like after modifying the DataSource you ended up with a grid that utilized a DataSource column that no longer existed. You should just delete that column from your grid. Until you do this, the .ccp will (and should) contain references to that column, since it was never deleted.
I'd like to add that you should try to never modify the generated code. The code modification that you made now disabled parts of your page from being modifiable in CodeChareg Studio. I recommend deleting your whole PHP file (page.php) and it will be automatically re-generated when you re-publish your page. Then you can delete the whole grid column in the Design view.
Karsten,
This stringparser doesn't go broke. It is the specific functionality of CodeCharge Studio to preserve manually modified blocks of code. If you modify generated code then CCS parser knows about it and specifically doesn't re-generate that part of code. Thus if you modify any block of code with gray background, the background changes to white to indicate that now your code is customized, locked and cannot be overwritten.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
bigtoe
Posts: 115
|
| Posted: 09/03/2004, 2:20 AM |
|
Karsten,
Yes, I do backups. Mainly because I make silly mistakes and need to recover.
Peter,
I did delete the column from the grid and followed that with a Project Publish.
Still the references exist.
When you say "you should try to never modify the generated code" are you
talking about php and html or just the php files?
I have modified the html page but even there just added the space
character (& n b s p ;) and added some table tags to make the fields a little
closer because the <p> tag adds too much space when adding new lines.
But the space and table attributes show up just fine in Design view.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 09/03/2004, 2:32 AM |
|
bigtoe,
Sorry, by "you should try to never modify the generated code" I meant PHP. Modifying HTML is fine. The design mode and HTML are quivalent, while PHP is the generated output based on the Design/HTML.
In this case I'm not sure why the references were there. Possibly a link in another column included a parameter based on that deleted field. Or possibly the database connection wasn't refreshed and still storing the previous column. Or something else. If this is important, it may be best to submit your .ccp file to our support for analysis, or provide the part of .ccp that was referring to that deleted column with a code snippet of the generated php that included that column as well.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Karsten
Posts: 57
|
| Posted: 09/03/2004, 2:43 AM |
|
peterr,
i can bring up witness(users from this forum), who was live in action saw how parser broke.
what i mean is, if you type in an event code yourself, parser not recognises changes in propertyinspector nor in action builder anymore(for the WHOLE file).
this is, you can add a statement in property inspector and it is not add in code, as i said, i have witness for this if you need.you may say its because the safety of custom code, ok, but why CCS dont sort out what is custom and what not?it just shows what is custom and what not, but cant deal with.
however , im not here to talk about the can be dones or can not be dones of CCS, i need my time for other things, for writing applications for example.....
i just tell people how i solve MY problems with this product and show them how something CAN be done in MY opinion if they ask a question, and my solutions do work (i can bring you witness too if you need).and if someone dont understands how to implement a solution of a problem where gave an answer so i show him live via remotedesktop because i can stand what i promise and what i say.(see my post offering remote help).
Karsten.
warning: i use UML tools 
_________________
If one gives up, he told himself he failed. |
 |
 |
bigtoe
Posts: 115
|
| Posted: 09/03/2004, 2:44 AM |
|
Peter,
If I delete the
file_name.php
file then what do I do with the
file_name_events.php
file?
How will re-generation affect this events file?
Should I delete the events file too?
But it contains several SetValue function calls that I put there.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 09/03/2004, 2:50 AM |
|
bigtoe,
No, never delete your events file! You can only delete the pagename.php (not pagename_events.php).
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
bigtoe
Posts: 115
|
| Posted: 09/03/2004, 2:58 AM |
|
Thanks Peter.
|
 |
 |
Karsten
Posts: 57
|
| Posted: 09/03/2004, 2:59 AM |
|
bigtoe:
i offer you the following:
start microsoft messenger, add me to your contacts, allow me to have access to your desktop. we fix your problem i show you live, will making this part working without an error for you.
entwicklung@fivea.de
Karsten Arnold
_________________
If one gives up, he told himself he failed. |
 |
 |
peterr
Posts: 5971
|
| Posted: 09/03/2004, 3:12 AM |
|
Karsten,
I previously thought that we were discussing modifications to the main generated code, not to the events code. And the main code should really not be modified, except by very experienced developers, although I never seen a CCS application that needed to use a modified version of the generated page code. I also haven't seen parser problems when modifying the main generated code during experimenting or debugging.
But if we're discussing events (little different subject) then I agree that there is more room for error. I have not seen any issues related to modifying the event code but I cannot be so sure that there aren't any. If a specific issue was reported to our support then it should be resolved in the next product release.
BTW, it's absolutely great to see more experienced users helping others (and generally anyone helping anyone), and I especially appreciate your help to others too.
I am just jumping in when I'd like to clarify something. When loking at someone's application both you and I can see quite clearly what's wrong. But when we don't see an application, I can understand or interpret issues differently than you do.
I prefer Google over UML
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|