ryuuguu
Posts: 13
|
| Posted: 10/16/2004, 1:21 AM |
|
I want to include a file for use anywhere in my project using a statement like
include_once("./project.php");
wher can put this? right now I am including when ever I add custom code just below the globals satement but I would rather put it in common file where it will not get removed everytime code is generated.
Thanks,
Grant
|
 |
 |
peterr
Posts: 5971
|
| Posted: 10/16/2004, 5:41 AM |
|
Yes, common file (Common.php) would be the best place.
You can add your custom statements at the beginning or end of Common.php, in a white area. Only the grey code blocks usually should not be modified.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
crecalde
Posts: 13
|
| Posted: 10/29/2004, 9:05 PM |
|
Peter:
I have noticed on a few occassions that I went to make a modification to php in the 'grey code block'. However, I see that it get's regenerated withouth my changes. How do I go about making the changes so that they stick?
Then again, maybe this is the 'wrong' question.... The only time I have had to go into the grey code blocks is when I have manually added an item to a standard grid after it had originally been created by the app builder. It seems that sometimes CCS adds the field in some places, and skips it in others (e.g. it includes it in the Initialize Method, and omits it from the Prepare Method). That's when I have to go put it into where CCS missed it. Do you know what might cause this?
Thanks,
Carlos
|
 |
 |
peterr
Posts: 5971
|
| Posted: 10/29/2004, 10:54 PM |
|
Carlos,
Code changes: as far as I know they always stick. You can contact the support if you like to show us some code sample that doesn't stick.
Omitted code: I don't believe it. I never seen it, plus no one could use CCS if this was happening. This may happen only if you modified some of the generated code.
I recommend that you never touch the grey code blocks, or even any of the generated code in your page.php. If any of the above problems occurs, delete everything - your whole PHP code or the pagename.php file (except pagename_events.php). This will usually fix all such problems.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
crecalde
Posts: 13
|
| Posted: 10/30/2004, 5:10 PM |
|
OK Peter:
I will be more dilligient in noting when this situation occurs. It has happened to me on multiple occassions - when I have not touched the generated code. It seems that at times, only the HTML gets changed, and the underlying logic doesn't complete. I'll try to create a specific example that I can forward along. I'm sure that it's something that I'm doing, because its not consistent. I just haven't determined the pattern yet - other than that it happens when I try to add a column to a previously specified grid, or if I try to add a field to a Record Table. (Sometimes it's not practical to go out and generate a new page from scratch. Otherwise that would be a sure way to avoid the problem.)
Has anyone else experienced this?
C.
|
 |
 |
klw
|
| Posted: 11/05/2004, 7:25 AM |
|
What version of CCS are you currently using?
Quote crecalde:
OK Peter:
I will be more dilligient in noting when this situation occurs. It has happened to me on multiple occassions - when I have not touched the generated code. It seems that at times, only the HTML gets changed, and the underlying logic doesn't complete. I'll try to create a specific example that I can forward along. I'm sure that it's something that I'm doing, because its not consistent. I just haven't determined the pattern yet - other than that it happens when I try to add a column to a previously specified grid, or if I try to add a field to a Record Table. (Sometimes it's not practical to go out and generate a new page from scratch. Otherwise that would be a sure way to avoid the problem.)
Has anyone else experienced this?
C.
|
|
|
 |
|