Edit in Place embeds 
Author Message
 Edit in Place embeds

CW5EE
ABC Edit in Place
I need to embed some code after one
of the edit variables are accepted.
I've tried dozens of places but can't
finf the right place.
Where ???

Roger Clark



Wed, 11 Apr 2001 03:00:00 GMT  
 Edit in Place embeds

Quote:
>I need to embed some code after one
>of the edit variables are accepted.

First of all, you have to declare your field in the column specific of the
EIP (even if now is already editing)
Then you have three new embed points , saying 'Edit in Place....
Init/TakeEvent/Kill'
TakeEvent is what you're looking for
However, there are some things you have to take in account:
1) The data is in BRWn.Q.FILE:Field, not in FILE:Field
2) You have to detect that EVENT() is EVENT:Accepted
3) Look in the App. Handbook for the various return values of the TakeEvent
method
4) You have to UPDATE prior take field value, and DISPLAY later
5) Inits & Kill method for ALL columns are called once at startup, once at
end of editing (before saving the record) TakeEvent is called everytime.

With a bit of patience, you should do it (like me! :)

Best Regards
Juanro



Wed, 11 Apr 2001 03:00:00 GMT  
 Edit in Place embeds
I don't know cw5ee,
but cw4bg
You need configure Edit-in-place at BrowseUpdatingButtons
and use embed(Edit-in-place field...TakeEvent) at Any BrowseUpdatingButtons.
Best Regards
Dmitri Osipov

example:
 update(field())
 l#=contents(field())
 CASE Event                                      !Evaluate passed in event
 OF EVENT:AlertKey                         ! and handle only AlertKey events
   CASE KEYCODE()
  OF EnterKey                                      !On Enter
     if l#
      RETURN(EditAction:Complete)   ! set action complete
     else
      RETURN(EditAction:None)         !FIELD IS ZERO     .
  OF EscKey                                         !On Escape
      RETURN(EditAction:Cancel)       ! set action cancelled
  OF TabKey
     if l#
      RETURN(EditAction:Forward)     ! set action forward
     else
      RETURN(EditAction:None)          !FIELD IS ZERO     .
     .
  OF ShiftTab                                                           !On
Shift+Tab
      RETURN(EditAction:Backward)                     ! set action backward
  END
END
RETURN(EditAction:None)

Quote:

>CW5EE
>ABC Edit in Place
>I need to embed some code after one
>of the edit variables are accepted.
>I've tried dozens of places but can't
>finf the right place.
>Where ???

>Roger Clark



Thu, 12 Apr 2001 02:00:00 GMT  
 Edit in Place embeds

Thanks guys appreciate your answers
Roger Clark

Quote:
>CW5EE
>ABC Edit in Place
>I need to embed some code after one
>of the edit variables are accepted.
>I've tried dozens of places but can't
>finf the right place.
>Where ???
>Roger Clark



Thu, 12 Apr 2001 02:00:00 GMT  
 Edit in Place embeds

Quote:

> ABC Edit in Place
> I need to embed some code after one
> of the edit variables are accepted.
> I've tried dozens of places but can't
> finf the right place.
> Where ???

> Roger Clark

Roger:
Use EditInPlace::YourVariable.TakeEvent.  It's a little tricky because
you have to update() the variable here is some sample code out of my
ForKeeps archive.  If you ever have trouble finding an old message,
ForKeeps is for you! A quick search on Edit in place found:
----------------------------------------------------------------
         Message retrieved by ForKeeps Message Archiver        
----------------------------------------------------------------
Subject: Edit In Place embed
From: Kane,Jim 73741,2774
To: Broll,Carl F. 76366,1256
Date: 30-Jul-98
Forum: CLARION/08 Design/Productivity
MsgNo: 488512 (reply to 488510)
----------------------------------------------------------------
Quote:
>> (CW4B ABC) I have a form with a listbox that uses edit in place. I

want to modify one of the fields in the record based on other fields in
the record and form before the record is saved. Can someone tell me how
to put embed code right before the record is written to disk on an edit
in place listbox? <<

In one case I had two fields, an inventory level and the delta or
change in inventory level from the previous inventory.  The general
idea was when one was entered using EIP the other was calculated and
displayed plus some colors where set for the browse line.  Here is the
embed for the delta EIP field:
the key features are the events and doing the update(focus()) then just
do what every you want to the browse queue variables and save the Q.

EditInPlace::Loc:Delta.TakeEvent PROCEDURE(UNSIGNED Event)

ReturnValue          BYTE,AUTO
! Start of "Edit-In-Place Manager Method Executable Data Section"
! [Priority 5000]

! End of "Edit-In-Place Manager Method Executable Data Section"
  CODE
  ! Start of "Edit-In-Place Manager Executable Code Section"
  ! [Priority 2500]

  ReturnValue = PARENT.TakeEvent(Event)
  ! [Priority 7500]
  if returnvalue<>EditAction:Cancel and returnvalue<>EditAction:None
then
    Update(focus())
    loc:delta=brw1.q.Loc:delta !Update local variable
    if loc:delta<>0 then
      Loc:newQty=loc:curQty+loc:delta
    else
      loc:newQty=0
    end
    brw1.q.loc:NewQty=loc:NewQty       !update q variable
    If loc:delta or loc:newQty then
     brw1.Q.ite:ITEMN_NormalFG=color:red
     brw1.Q.ite:ITEMN_SelectedFG=color:red
    else
     brw1.Q.ite:ITEMN_NormalFG=color:none
     brw1.Q.ite:ITEMN_SelectedFG=color:None
    end
    put(brw1.q)
  end
  ! End of "Edit-In-Place Manager Executable Code Section"
  RETURN ReturnValue

Jim Kane
Team TopSpeed(Compuserve)
String Search Template Set for Clarion(.DAT) Files
http://www.bmtmicro.com/catalog/strsrch
ForKeeps 3.5 Professional Extension WordSearch
http://www.fkeeps.com
----------------------------------------------------------------
                            End Of Quote                        
----------------------------------------------------------------

---
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com



Thu, 12 Apr 2001 02:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Edit in Place embedded point

2. EDIT in place embed points

3. C55: Edit in place, embeds?

4. Embed point in edit-in-place for Clarion4a

5. embed point in edit-in-place

6. place control in edit in place

7. Edit drop list Edit in place - problem

8. Edit in Place- Combo Box

9. Edit in place

10. EDIT-IN-PLACE

11. Updating Edit in Place

12. Edit in place and dict rules

 

 
Powered by phpBB® Forum Software