[Gambas-devel] gambas wiki db scheme

Sebastian Kulesz sebikul at ...176...
Sun Sep 23 01:42:08 CEST 2012


On Sat, Sep 22, 2012 at 9:28 AM, Benoît Minisini
<gambas at ...1...> wrote:
> Le 22/09/2012 03:54, Sebastian Kulesz a écrit :
>>
>> I already finished moving the header. I will start with the "wiki"
>> part as soon as i get the dump, i'm currently doing the admin page and
>> implementing the user management functions, along with the comments
>> system.
>>
>
> The dump is on the way...

The dump worked just fine, but i need some pages that cover any
variant that the current wiki can handle, like titles for v2 and v3,
the components url (maybe the gb component), etc.


>
>> One question though, is there a way to prevent the Render() function
>> of a webpage from printing the content-type header?
>>   I want to deffer the rendering as much as possible, ideally, until we
>> know *exactly* what the user is expecting to view. This way, each
>> controller is able to customize the call for each view it needs. I'm
>> currently restricted because when executing the header webpage, for
>> example, i can't tell the include statement which webpage should be
>> included next.
>
> Deferring can be done with the Buffered property. But I don't see why
> Render() should not print the content-type header when it wants. The
> Content-type header won't change, whatever the page contents is.

The header should be set using the Response.ContentType property, not
by directly printing it. Besides. almost all template systems provide
both options, to either return the contents of the template rendered
(to be appended to other content) or to dispatch it directly to the
user.

I managed to fix the problem though, but i'm having some issues. The
<<--CONTENTS-->> and <</WebPage>> tags don't seem to work. Anything
after an include statement seems to be omitted.

Also, debugging a webpage is *really* difficult. If there is an error,
the buffer is flushed anyway, until the line where the error happened.
If the error is before the headers are sent , then only this line is
shown in the apache's error_log file:

[Sat Sep 22 19:09:55 2012] [error] [client 127.0.0.1] Premature end of
script headers: doc.cgi.gambas

Thanks!

>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> How fast is your code?
> 3 out of 4 devs don\\\'t know how their code performs in production.
> Find out how slow your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219672;13503038;z?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel




More information about the Devel mailing list