[web2py] Re: Can/should {{super}} works even without a parent block?
Sure I can change one of that manually. But wouldn't it be better if {{super}} can simply work no matter the parent block exists or not? Not sure it should fail silently by default, but maybe it would be worth adding an optional keyword to tell it to do so. Anthony
[web2py] Re: Can/should {{super}} works even without a parent block?
Open a ticket about this. Thadeus wrote that implementation and than he disappeared. I have been unable to contact him for more than 1 years. I will try change it. On Monday, 14 May 2012 22:52:58 UTC-5, Ray (a.k.a. Iceberg) wrote: The point here is that the web2py out-of-box layout.html and the web2py.plugin.jqmobile.w2p layout contain different set of blocks. Sure I can change one of that manually. But wouldn't it be better if {{super}} can simply work no matter the parent block exists or not? That way I can even take out a block via layout.html later, without having to adjust all other controller-specific views accordingly. Regards, Ray On Tuesday, May 15, 2012 12:39:56 AM UTC+8, Anthony wrote: Can't you put an empty version of that block in your jQuery Mobile layout as well? Anthony On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray
[web2py] Re: Can/should {{super}} works even without a parent block?
While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of the block and the block keeps showing up as empty.
[web2py] Re: Can/should {{super}} works even without a parent block?
Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote: While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of the block and the block keeps showing up as empty.
[web2py] Re: Can/should {{super}} works even without a parent block?
Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote: Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote: While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of the block and the block keeps showing up as empty.
[web2py] Re: Can/should {{super}} works even without a parent block?
Sorry, been switch between languages a lot this morning. If you are still getting the error, then I'm not sure. Maybe someone else has a thought. On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote: Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote: While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of the block and the block keeps showing up as empty.
[web2py] Re: Can/should {{super}} works even without a parent block?
Can't you put an empty version of that block in your jQuery Mobile layout as well? Anthony On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote: Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote: While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of the block and the block keeps showing up as empty.
[web2py] Re: Can/should {{super}} works even without a parent block?
The point here is that the web2py out-of-box layout.html and the web2py.plugin.jqmobile.w2p layout contain different set of blocks. Sure I can change one of that manually. But wouldn't it be better if {{super}} can simply work no matter the parent block exists or not? That way I can even take out a block via layout.html later, without having to adjust all other controller-specific views accordingly. Regards, Ray On Tuesday, May 15, 2012 12:39:56 AM UTC+8, Anthony wrote: Can't you put an empty version of that block in your jQuery Mobile layout as well? Anthony On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray