Ricardo
|
| Posted: 03/08/2005, 10:05 AM |
|
I'm just starting testing/working with Codecharge Studio and I need to know how can I put more code in the Show Page event without losing the relation with the rest of the code existing in this same event.
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 03/08/2005, 11:55 AM |
|
Usually you can put any code you like in the events, although I'm afraid that this question is too generic and possibly I am missing something.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
DonB
|
| Posted: 03/08/2005, 4:59 PM |
|
Like Peter, I'm not clear on the question.
But, you can click "Add Code" or "Add Action" multiple times on each Event
property. Each time, you add another block of code to the event handler.
Is that what you meant?
There's no reason you can't simply type more code into the block of code
that's already there, but you do want to avoid typing into the "grayed out"
areas.
Perhaps you first did "Add Action" and now you want to extend that "grayed
out" block of code with some more code? Then just click "Add Code" and
there will be two blocks of code in the event - one from the Add Action and
the other from the Add Code. They execute as one unit, but are maintained
as separate blocks by CCS.
--
DonB
http://www.gotodon.com/ccbth
"Ricardo" <Ricardo@forum.codecharge> wrote in message
news:2422de98497f44@news.codecharge.com...
> I'm just starting testing/working with Codecharge Studio and I need to
know how
> can I put more code in the Show Page event without losing the relation
with the
> rest of the code existing in this same event.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Ricardo
|
| Posted: 03/09/2005, 4:14 AM |
|
How can I put code in this part of the program?
....
//Show Page @1-7F6BA192
session_destroy(); <<this is the code that i try to introduce
$Login->Show();
$Tpl->Parse("main", false);
$main_block = $Tpl->GetVar("main");
....
When I make the preview the line of code that I introduce disappear.
Note: using a evaluation copy of 2.3
|
|
|
 |
DonB
|
| Posted: 03/09/2005, 11:16 AM |
|
You need to get familiar with the "Event driven" nature of CCS. You need to
place your code into event handlers - not in the code page that CCS
generates (which is what you indicated in your message).
There's a panel at far right with three tabs. One is "Events". Click your
mouse on the page so that the Properties panel lists the page properties.
Go to the Events panel, and add the Before Show event. Put your code there.
Now you will have two PHP files: something.php and something_events.php.
Your code goes in the second file.
--
DonB
http://www.gotodon.com/ccbth
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 03/09/2005, 11:54 AM |
|
Yep, always use events to add any code you like.
I recommend that you start with the tutorials, which in 30 minutes will show you various coding possibilities.
Here are some examples: http://docs.codecharge.com/studio/html/QuickStart/Creat...rTextColor.html http://docs.codecharge.com/studio/html/QuickStart/Creat...rInitEvent.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |