Re: Fcp sizes and time

juergen urner <[email protected]>
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
Jerome Flesch schrieb:
>>
>> To make these values adjustable by users I have to parse them.
>> So there should be a spec somewhere. It would be enough to give
>> me a pointer where to find it in freenets sources (still a bit lost
>> in there) and I'd happily add a page regarding Fcp types to the wiki.
>>
>>     
> http://freenet.googlecode.com/svn/trunk/freenet/src/freenet/config/
> http://freenet.googlecode.com/svn/trunk/freenet/src/freenet/config/LongOption.java
>
> For the sizes: 
> http://freenet.googlecode.com/svn/trunk/freenet/src/freenet/support/Fields.java 
> (Fields.parseLong() ; I think it's the i18n standard (so 1000 and not 1024))
>
> For the periods: 
> http://freenet.googlecode.com/svn/trunk/freenet/src/freenet/support/FileLoggerHook.java
> (FileLoggerHook.setInterval() ; ok, this one is not really standard ...)
>   

Thanks for the pointers Jerome. I'll have a look.

> But I agree, it would probably be better if FCP would be able to specify the 
> type of input expected (boolean, long, string, period, etc).
>   
In the wiki or in the sources? For the sources a (parsable) header file 
containing
all message / field / type decls would put a smile on my face.

> Anyway, if it's an user input issue, you can do like I did in Thaw (the dev 
> version only atm) or like it's done in FProxy : let the user enters whatever 
> [s]he wants, and if the node complains / doesn't accept the value, then tell 
> him (atm, in thaw, it doesn't tell him, it just put displays again the 
> previous value).
I don't trust users. You never know what they might be throwing at your 
input
boxes ;-)


Juergen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.