materix
|
| Posted: 12/29/2004, 5:13 PM |
|
I am building a directory and in the event "directory_categories_BeforeShow()" I change the value of CategoryLink:
directory_categories->CategoryLink->Setvalue("something");
This works o.k., but when a change the page to be Includable then I suddenly get this error message:
"Fatal error: Call to a member function on a non-object in ..."
That is "directory_categories->CategoryLink" suddenly does not exist as an object.
What can be the cause for this error-message?
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 12/29/2004, 5:30 PM |
|
For includable pages you may need to change the syntax to:
$includable_component_name->directory_categories->CategoryLink->Setvalue("something");
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
materix
|
| Posted: 12/30/2004, 5:37 AM |
|
Thx for the reply.
I did suspect something like what you mention, and have tried to change the syntax to different "values" ...->directory_categories->CategoryLink->Setvalue("something")
but without any succes.
Do you have any example code-snippet for this issue?
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 12/30/2004, 1:34 PM |
|
The above code is such example, I mean it should work. Maybe only one thing missing is that you'd also need to define $includable_component_name. In the end the code would be:
global $includable_component_name
$includable_component_name->directory_categories->CategoryLink->Setvalue("something");
$includable_component_name should match the name of the component used to include the includable page on the parent page.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
materix
|
| Posted: 12/30/2004, 3:03 PM |
|
Hi. I follow what you are saying, but I still get the same error-message
|
|
|
 |