A set of small patches that clean up form.cc , mostly to do with DilloHtmlSelect . * refactor by creating new functions: - a_Html_parse_stash() - DilloHtmlSelect::ensureSelection() - DilloHtmlSelect::addOptionsTo() - DilloHtmlSelect::appendValuesTo() - DilloHtmlSelect::getCurrentOption() (cf. other getCurrent* methods) * make DilloHtmlSelect::options private * rename DilloHtmlInput::getInputValues() to appendValuesTo() (the new name is more mnemonic and consistent with the DilloHtmlSelect method above) Regards, Jeremy Henty
On Sat, Jun 14, 2008 at 04:14:32PM +0100, Jeremy Henty wrote:
A set of small patches that clean up form.cc , mostly to do with DilloHtmlSelect .
* refactor by creating new functions: - a_Html_parse_stash() - DilloHtmlSelect::ensureSelection() - DilloHtmlSelect::addOptionsTo() - DilloHtmlSelect::appendValuesTo() - DilloHtmlSelect::getCurrentOption() (cf. other getCurrent* methods) * make DilloHtmlSelect::options private * rename DilloHtmlInput::getInputValues() to appendValuesTo() (the new name is more mnemonic and consistent with the DilloHtmlSelect method above)
Committed, except 00 and 05. 00: The stash buffer may hold a script, in that case parse_stash is not as clear as parse_entities. 05: gives compilation errors: [...] form.cc: In function 'void Html_option_finish(DilloHtml*)': form.cc:184: error: 'lout::misc::SimpleVector<DilloHtmlOption*>* DilloHtmlSelect::options' is private form.cc:1918: error: within this context form.cc:184: error: 'lout::misc::SimpleVector<DilloHtmlOption*>* DilloHtmlSelect::options' is private form.cc:1918: error: within this context -- Cheers Jorge.-
On Wed, Jun 18, 2008 at 08:35:57AM -0400, Jorge Arellano Cid wrote:
Committed, except 00 and 05.
00: The stash buffer may hold a script, in that case parse_stash is not as clear as parse_entities.
Would a better name make the change acceptable? For instance, Html_parse_stash_entries() ?
05: gives compilation errors: [...] form.cc: In function 'void Html_option_finish(DilloHtml*)': form.cc:184: error: 'lout::misc::SimpleVector<DilloHtmlOption*>* DilloHtmlSelect::options' is private form.cc:1918: error: within this context form.cc:184: error: 'lout::misc::SimpleVector<DilloHtmlOption*>* DilloHtmlSelect::options' is private form.cc:1918: error: within this context
That's because not committing 00 breaks one of the chunks in 04 so you still have an explicit ->inputs which should have been replaced by a call to getCurrentOption() . I'm appending the missing chunk of 04 and resubmitting 05 . Regards, Jeremy Henty
On Thu, Jun 19, 2008 at 08:48:48PM +0100, Jeremy Henty wrote:
On Wed, Jun 18, 2008 at 08:35:57AM -0400, Jorge Arellano Cid wrote:
Committed, except 00 and 05.
00: The stash buffer may hold a script, in that case parse_stash is not as clear as parse_entities.
Would a better name make the change acceptable? For instance, Html_parse_stash_entries() ?
Html_parse_stash_entities() ? Why is it better than the traditional a_Html_parse_entities()?
05: gives compilation errors: [...] form.cc: In function 'void Html_option_finish(DilloHtml*)': form.cc:184: error: 'lout::misc::SimpleVector<DilloHtmlOption*>* DilloHtmlSelect::options' is private form.cc:1918: error: within this context form.cc:184: error: 'lout::misc::SimpleVector<DilloHtmlOption*>* DilloHtmlSelect::options' is private form.cc:1918: error: within this context
That's because not committing 00 breaks one of the chunks in 04 so you still have an explicit ->inputs which should have been replaced by a call to getCurrentOption() . I'm appending the missing chunk of 04 and resubmitting 05 .
Committed. -- Cheers Jorge.-
On Fri, Jun 20, 2008 at 02:37:22PM -0400, Jorge Arellano Cid wrote:
On Thu, Jun 19, 2008 at 08:48:48PM +0100, Jeremy Henty wrote:
On Wed, Jun 18, 2008 at 08:35:57AM -0400, Jorge Arellano Cid wrote:
Committed, except 00 and 05.
00: The stash buffer may hold a script, in that case parse_stash is not as clear as parse_entities.
Would a better name make the change acceptable? For instance, Html_parse_stash_entries() ?
Html_parse_stash_entities() ?
Why is it better than the traditional a_Html_parse_entities()?
Sorry, I wasn't very clear. I read you as saying that the new function a_Html_parse_stash() was not very well named, and I meant to suggest a_Html_parse_stash_entities() as an improvement. If you were saying that the refactoring itself is confusing then I misread you. Regards, Jeremy Henty
On Mon, Jun 23, 2008 at 12:58:41AM +0100, Jeremy Henty wrote:
On Fri, Jun 20, 2008 at 02:37:22PM -0400, Jorge Arellano Cid wrote:
On Thu, Jun 19, 2008 at 08:48:48PM +0100, Jeremy Henty wrote:
On Wed, Jun 18, 2008 at 08:35:57AM -0400, Jorge Arellano Cid wrote:
Committed, except 00 and 05.
00: The stash buffer may hold a script, in that case parse_stash is not as clear as parse_entities.
Would a better name make the change acceptable? For instance, Html_parse_stash_entries() ?
Html_parse_stash_entities() ?
Why is it better than the traditional a_Html_parse_entities()?
Sorry, I wasn't very clear. I read you as saying that the new function a_Html_parse_stash() was not very well named, and I meant to suggest a_Html_parse_stash_entities() as an improvement. If you were saying that the refactoring itself is confusing then I misread you.
I find the generic a_Html_parse_entities() OK. -- Cheers Jorge.-
participants (2)
-
jcid@dillo.org
-
onepoint@starurchin.org