One first thing is to note that getline checks the current page by
default, and log writes to log.{p} by default. Maybe this needs to
change but it seems the most reasonable to me.
To get your form working a bit better try changinge it to [(getline
"Some Text" page=log.{p})]
And leave the log part alone.
Getting a button at the end of each line will be a good bit harder. As
you will not only have to replace the line content but the entire
button (and some related recursion problems...). But with a little
tinkering we can probably come up with something. See what you can do
on your end, and keep me posted if you need further help.
Cheers,
Dan
On Tue, Sep 9, 2008 at 6:05 AM, Linly <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> In BoltWire 2.32, there is a new function which can achieve "line
> edit" in some way. By testing about two hours, here is my result so
> far:
>
> <code>
> [form]
> [text linenumber size=10 'Line Number']
> [box lineed cols=70 rows=2]
> [(getline "Some" page={p})]
> [box]
> [session log content="{=lineed}" flags="line={=linenumber}"
> target={p}]
> [submit]
> [form]
> </code>
>
> At first I used "[(getline "Some" page={p})]" to grab the line
> containing "Some", but failed. It returned an "0".
>
> So I omit the [(getline)] syntax, and it give me an empty edit box. I
> can add new text to replace the old text in the linenumber input box I
> fill in. But this is not right. If I want to "edit" a line I should
> have that line in the box.
>
> So I replace the [(getline)] with [(include)]. [(include page="{p}"
> lines="1..1")] can grab the first line into edit box. But there is a
> big problem that I can't specify a certain line to be read easily. I
> have to open the code page and edit the line lines="1..1" directly.
>
> Very stupid but that's all I can do by now. I need help here.
>
> If I put the form surrounded by a show/hide box (showhide plugin
> needed) like this:
>
> <code>
> [(showhide id=editline show='Edit This Line' hide='Close'
> type=button)]
>
> <box id=editline>
> [form]
> [text js=1 linenumber size=10 'Line Number']
> [box lineed cols=70 rows=2][(include page="{p}" lines="1..1")][box]
> [session log content="{=lineed}" flags="line={=linenumber}"
> target={p}] [submit]
> [form]
> </box>
> </code>
>
> My problems are:
>
> 1) How can I put the button into every line's end?
> 2) And how can I automatically sand the line number into the form
> according to which line the button at.
>
> Is this the right way to achieve "line edit"?
>
> Cheers,
> linly
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---