It's the way you're using the "with: [pane: ....]" part -

clientpanel/pane contains a face, which is also
referenced to by entrypanel.  entrypanel/pane is
what contains the fields to be cleared, so there's 3
fast ways to fix this:

clear-fields clientpanel/pane ;<-- these reference the same face
clear-fields entrypanel ;<-- these reference the same face

Or, the line in form_ClientMaintenance could be changed
to work the way you're thinking:

From:
clientpanel:      box   entry-panel/size  with [ pane: entrypanel ]
To:
clientpanel:      box   entry-panel/size  with [ pane: entrypanel/pane ]

(Hope this helps)

>
> Hi all ~
>
> when I press the New button from the script below, Rebol complains with
>
> ** Script Error: foreach expected data argument of type: series
> ** Where: clear-fields
> ** Near: foreach face panel/pane [
>    if all [series? face/text flag-face? face field] [
>        clear face/text
>        face/line-list: none
>
> and I have no clue as to why?
>
> Can someone enlighten me?
>
> TIA,
> Kai
>
>
> ... snip
>
> ;------------------------------------------------------------------------------------------------
>   entrypanel: layout [
>     across
>      label "First Name"      field_FirstName:   field 200 "Joe"
>      label "Last Name"       field_LastName:    field 200 return
>   ]
>
> ;------------------------------------------------------------------------------------------------
>   form_ClientMaintenance: layout [
>         across
>         clientpanel:      box   entry-panel/size  with [ pane:
> entrypanel ] return
>         newbutton:     button "New" [ rec-new ]
>   ]
>
> ;------------------------------------------------------------------------------------------------
>   rec-new: func [][
>     clear-fields clientpanel
>     focus field_FirstName
>   ]
> ...snip
>
>
> -- 
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
> 

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to