Breaking auto realding feature with embeded classes

2012-06-30 Thread bhorvat
So one of my favourite features is the fact that once I change some piece of
the code, I dont have to restart the application, all I have to do is let
auto reloading work its magic. Sadly I have found a way to break that
feature :(

I have a page that has a bunch of block, so in order to keep things simple I
am using the embeded Enum class to map which block should be displayed.
However once I change something I get the following exception


com.bomahabo.flow.tapestry.pages.Scenes$ShotView cannot be cast to
com.bomahabo.flow.tapestry.pages.Scenes$ShotView

I take it that I can move the embeded class outside and that it wont cause
the problems but since this class is only used in here I would like to keep
it there. Any suggestion about this? Also if someone from dev team is
reading this, are you aware of this problem.

Cheers

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Breaking-auto-realding-feature-with-embeded-classes-tp5714201.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Breaking auto realding feature with embeded classes

2012-06-30 Thread Steve Eynon
Correct, the Enum class has to reside outside of the special packages.

Otherwise, as observed, once the Enum class is reloaded, it's a
totally different class, incompatible with any previous references. T5
cannot replace these references as a) they're not injected b) may be
used in non-T5 classes.

Steve.

On 30 June 2012 19:35, bhorvat horvat.z.bo...@gmail.com wrote:
 So one of my favourite features is the fact that once I change some piece of
 the code, I dont have to restart the application, all I have to do is let
 auto reloading work its magic. Sadly I have found a way to break that
 feature :(

 I have a page that has a bunch of block, so in order to keep things simple I
 am using the embeded Enum class to map which block should be displayed.
 However once I change something I get the following exception


 com.bomahabo.flow.tapestry.pages.Scenes$ShotView cannot be cast to
 com.bomahabo.flow.tapestry.pages.Scenes$ShotView

 I take it that I can move the embeded class outside and that it wont cause
 the problems but since this class is only used in here I would like to keep
 it there. Any suggestion about this? Also if someone from dev team is
 reading this, are you aware of this problem.

 Cheers

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Breaking-auto-realding-feature-with-embeded-classes-tp5714201.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Breaking auto realding feature with embeded classes

2012-06-30 Thread bhorvat
I see, well that makes sense. Can I place that class then inside a components
page, or better yet components subpackage?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Breaking-auto-realding-feature-with-embeded-classes-tp5714201p5714206.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Breaking auto realding feature with embeded classes

2012-06-30 Thread Steve Eynon
Alas no. All classes inside those packages (and sub packages) are
transformed (re-loaded) by T5. I either stick it in the services
package or create a separate package called util or entity.

com.myapp.components
com.myapp.pages
com.myapp.services -- here
com.myapp.entities  -- or here
com.myapp.util-- or here

Steve.



On 30 June 2012 20:22, bhorvat horvat.z.bo...@gmail.com wrote:
 I see, well that makes sense. Can I place that class then inside a components
 page, or better yet components subpackage?

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Breaking-auto-realding-feature-with-embeded-classes-tp5714201p5714206.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Breaking auto realding feature with embeded classes

2012-06-30 Thread bhorvat
Thanks for help I will do as you suggest 

cheers

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Breaking-auto-realding-feature-with-embeded-classes-tp5714201p5714208.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Breaking auto realding feature with embeded classes

2012-06-30 Thread Thiago H de Paula Figueiredo
On Sat, 30 Jun 2012 08:35:49 -0300, bhorvat horvat.z.bo...@gmail.com  
wrote:


I have a page that has a bunch of block, so in order to keep things  
simple I

am using the embeded Enum class to map which block should be displayed.
However once I change something I get the following exception
com.bomahabo.flow.tapestry.pages.Scenes$ShotView cannot be cast to
com.bomahabo.flow.tapestry.pages.Scenes$ShotView


This is actually expected. Anything that isn't a page (including nested  
classes, unless they're used only inside the page and instances of it not  
passed to other classes) shouldn't be inside the pages package. Make your  
enum class a top-level one and put it outside the Tapestry controlled  
packages.


Could you please provide the complete stack trace?

--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Breaking auto realding feature with embeded classes

2012-06-30 Thread bhorvat
and the error 

Render queue error in SetupRender[Scenes]:
com.bomahabo.flow.tapestry.pages.Scenes$ShotView cannot be cast to
com.bomahabo.flow.tapestry.pages.Scenes$ShotView

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Breaking-auto-realding-feature-with-embeded-classes-tp5714201p5714211.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org