Ooh, that's a book error! The right method is

     $m->depth()

$m->request_depth() tells you how many subrequests deep you are - it  
will almost always be 1.

(Fix it Dave! :))

Jon

On Jan 13, 2009, at 8:47 AM, Jérôme Etévé wrote:

> Hi,
>
>  You can have a look at http://www.masonbook.com/book/chapter-4.mhtml
>
>  To simply test the depth of the calling chain you are into, you can  
> use
>
>     $m->request_depth() which gives 1 if you're at the root level.
>
>  There's also other usefull introspection methods documented.
>
> Cheers !!
>
> Jerome
>
>
>
>
> On Tue, Jan 13, 2009 at 3:19 PM, Louis-David Mitterrand
> <vindex+lists-mason-us...@apartia.org> wrote:
>> Hi,
>>
>> I have component which can be called directly (top-level) or called  
>> from
>> another component.
>>
>>> From within that component, how can I detect what is going on  
>>> (direct or
>> indirect)?
>>
>> Thanks,
>>
>> --
>> http://www.critikart.net
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>> _______________________________________________
>> Mason-users mailing list
>> Mason-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mason-users
>>
>
>
>
> -- 
> Jerome Eteve.
>
> Chat with me live at http://www.eteve.net
>
> jer...@eteve.net
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to