You're right, CLEAR-FIELDS does not expect panel to have
its pane set to a face directly. It expects a block
of faces. So the work-around is to give it a block:
pane: reduce [entrypanel]
That is a clear deficiency of CLEAR-FIELDS and should be
fixed. I posted a ticket to RAMBO bug tracker.
Anton.
> 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
> 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
> ]
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.