Erlang/OTP Forums

Author Message

<  Erlyweb mailing list  ~  erlyweb_magic failing and using MVC w/o db table

Guest
Posted: Sun Jan 13, 2008 10:49 pm Reply with quote
Guest
With erlyweb 0.7 adding

-erlyweb_magic(off)


to either the controller or the view results in

=ERROR REPORT==== 14-Jan-2008::09:43:39 ===
Error in process <0.11074.1> with exit value:
{undef,[{off,module_info,[]},{smerl,get_extend_data,2},{smerl,extend,4},{erlyweb_compile,add_forms,3},{erlyweb_compile,compile_file,5},{erlyweb_compile,compile_component_file,6},{filelib,fold_files2,6},{filelib,fold_files2...


** exited: {undef,[{off,module_info,[]},
{smerl,get_extend_data,2},
{smerl,extend,4},
{erlyweb_compile,add_forms,3},
{erlyweb_compile,compile_file,5},
{erlyweb_compile,compile_component_file,6},
{filelib,fold_files2,6},
{filelib,fold_files2,6}]} **

at the moment the fix appears to be to comment the line out.

Second, is there anyway to use the standard MVC setup for one component
with out a table in the database? As erlyweb automatically tries to
inspect the tabe it generates this error,

** exited: {no_such_table,{{module,modulename},{table,modulename}}} **



Jeff.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Mon Jan 14, 2008 2:43 am Reply with quote
Guest
On Jan 13, 2008 2:49 PM, jm <jeffm@ghostgun.com> wrote:
>
>
>
> With erlyweb 0.7 adding
>
> -erlyweb_magic(off)
>
>
> to either the controller or the view results in
>
> =ERROR REPORT==== 14-Jan-2008::09:43:39 ===
> Error in process <0.11074.1> with exit value:
> {undef,[{off,module_info,[]},{smerl,get_extend_data,2},{smerl,extend,4},{erlyweb_compile,add_forms,3},{erlyweb_compile,compile_file,5},{erlyweb_compile,compile_component_file,6},{filelib,fold_files2,6},{filelib,fold_files2...
>
>
> ** exited: {undef,[{off,module_info,[]},
> {smerl,get_extend_data,2},
> {smerl,extend,4},
> {erlyweb_compile,add_forms,3},
> {erlyweb_compile,compile_file,5},
> {erlyweb_compile,compile_component_file,6},
> {filelib,fold_files2,6},
> {filelib,fold_files2,6}]} **
>
> at the moment the fix appears to be to comment the line out.

thanks...

>
> Second, is there anyway to use the standard MVC setup for one component
> with out a table in the database? As erlyweb automatically tries to
> inspect the tabe it generates this error,
>
> ** exited: {no_such_table,{{module,modulename},{table,modulename}}} **

You can do this by removing the "model" modules (modules that don't
end with "_controller" or "_view") from src/components. ErlyWeb only
attempts to inspect database tables for model modules under
src/components.

>
>
>
> Jeff.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Mon Jan 14, 2008 5:45 am Reply with quote
Guest
Yariv Sadan wrote:
> On Jan 13, 2008 2:49 PM, jm <jeffm@ghostgun.com> wrote:

>> Second, is there anyway to use the standard MVC setup for one component
>> with out a table in the database? As erlyweb automatically tries to
>> inspect the tabe it generates this error,
>>
>> ** exited: {no_such_table,{{module,modulename},{table,modulename}}} **
>
> You can do this by removing the "model" modules (modules that don't
> end with "_controller" or "_view") from src/components. ErlyWeb only
> attempts to inspect database tables for model modules under
> src/components.
>

mmm, not optimal as there are a number of methods which naturally fall
into a model as these are calculations used by other components. These
are methods that shouldn't be publicly available through the controller,
but there are other methods which are on should be available in the
controller so private() -> true won't help me here. Have you thought
about adding an inheritance parameter like in controller and view to
control this? Exactly what and how I'm trying is still a little up in
the air. I may not be approaching this in the best way possible.

Jeff.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Mon Jan 14, 2008 7:00 am Reply with quote
Guest
On Jan 13, 2008 9:45 PM, jm <jeffm@ghostgun.com> wrote:
>
> Yariv Sadan wrote:
> > On Jan 13, 2008 2:49 PM, jm <jeffm@ghostgun.com> wrote:
>
> >> Second, is there anyway to use the standard MVC setup for one component
> >> with out a table in the database? As erlyweb automatically tries to
> >> inspect the tabe it generates this error,
> >>
> >> ** exited: {no_such_table,{{module,modulename},{table,modulename}}} **
> >
> > You can do this by removing the "model" modules (modules that don't
> > end with "_controller" or "_view") from src/components. ErlyWeb only
> > attempts to inspect database tables for model modules under
> > src/components.
> >
>
> mmm, not optimal as there are a number of methods which naturally fall
> into a model as these are calculations used by other components. These
> are methods that shouldn't be publicly available through the controller,
> but there are other methods which are on should be available in the
> controller so private() -> true won't help me here. Have you thought
> about adding an inheritance parameter like in controller and view to
> control this? Exactly what and how I'm trying is still a little up in
> the air. I may not be approaching this in the best way possible.

For now, you can keep the models outside of the components subdir and
ErlyDB will ignore them. I do think it would be a nice feature to be
able to export functions from public controllers but tell ErlyWeb to
hide those functions from requesting clients.

>
>
> Jeff.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum