Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Editing fields of a record in forms?

From: anton::wilddsl::net::au at: 23-Aug-2007 1:19

Hi, VIEW/NEW does not WAIT. Read source of VIEW and DO-EVENTS to see this. ?? view ?? do-events You could WAIT after opening your window, eg: view/new layout [...] DO-EVENTS ; <--- return l-act-role-block, OR you could pop a requester, like REQUEST does. ?? request See modified code below. Regards, Anton. Edit-ActorRole: func [ actor-block [block!] /local l-act-role-block l-actor-block rtn result ][ rtn: func [value][result: value hide-popup] ; make sure it is empty, will contain the return value l-act-role-block: copy [] ; copy content of actor-block to l-actor-block so that ; actor-block keeps untouched l-actor-block: copy actor-block ; Check if l-actor-block is empy, if yes feed with zero String "" if (l-actor-block/1 = none) [ append l-actor-block "" ] ;Formular: view/new layout [ inform layout [ text "Actor 1:" Fact1: field l-actor-block/1 button #"^M" "OK" [ ;as soon as OK is clicked l-actor-block is cleared and ;then refilled with the values from the Fields l-actor-block: copy [] ; <- this creates a new empty block if not (Fact1/text = "") [ append l-actor-block Fact1/text ] append/only l-act-role-block l-actor-block rtn l-act-role-block ] ] ;return l-act-role-block return result ] a: ["dada"] b: Edit-ActorRole a ;----------------------------------------