Thanks for your reply, yes it's working pretty good now. I supposed that
that would work, i just was lazy to change other bits of code where those
attribs were setted as Object hehe. No shortcuts this time ;)
Cheers
Carlos
On 3/7/07, Sri Kalyanaraman <[EMAIL PROTECTED]> wrote:
Lets assume you are putting,
scope.setAttribute("myAtt", value);
of which, the value is of type *SomeObject
*Object obj=*(SomeObject)*scope.getAttribute("myAtt");
then *obj.id* is valid
Even if your value is a simple String, you need to cast it as
getAttribute returns object.
Hope this helps
-Sri.
Storm kirjoitti:
> Hi list.
>
> This question might sound stupid and perhaps it is, but i can't figure
> it out: How can you access a field of a Scope attribute server side?
> explanation:
>
> Imagine you do this somewhere in the code:
>
> scope.setAttribute("myAtt", value);
>
> where value is a Object passed from client wich has a field named "id".
>
> When i send it back to client i don't have problems to access the id
> field client side, but these lines:
> Object obj=scope.getAttribute("myAtt");
> int gotcha=obj.id <http://obj.id>;
>
> won't compile in Java. And i cannot Cast that Object to a "Attribute"
> class created for the ocassion with an "id" field in it because an
> exception is thrown at run-time.
> I need that field to be accesible server-side! If I log a .toString()
> of said object i can perfectly see it's id field and its value in the
> console...i just need to have that number into a variable without
> having to String-Tokenize that damn log String xDDDDDDD
>
> Thanks in advance
>
> Carlos
>
> --
> -------------------------------------------------------------------
> "Nos gusta los domingos ir al parque a pinchar los globos de los niños
> para verlos llorar" .- Eskorbuto
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
--
-------------------------------------------------------------------
"Nos gusta los domingos ir al parque a pinchar los globos de los niños para
verlos llorar" .- Eskorbuto
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org