From: Grant on 24 Mar 2010 00:30 Hello again all. I would like to get back to my original problem and ask if anyone has some insite here. The problem was I cannot append a new record, enter data and save it unless I press the down arrow key first and then enter the data and exit. Only then is it saved. I have created a test sample and found initially when I appended a record and entered data it saved fine until I created a scope on the server. The scope was on the customer field and it works fine with the browser data only showing the proper customer but then I do an append and enter data and it does not save it unless I first press the down arrow key before entering the data and then exit and it will be saved. Here is some of the code from my sample. The scope is defined in the browser postinit as follows: cFName is the customer field obtained from another browser and data file and used to define the scope. odbsServer := MyServerArray[1] odbsServer:SetIndex("JCUSTOME") odbsServer:GoTop() odbsServer:OrderScope(TOPSCOPE, cFName) odbsServer:OrderScope(BOTTOMSCOPE, cFName) nRecord:=odbsServer:RECNO odbsServer:GoTop() oDCbBrowser1:RowHeight := 20 oDCbBrowser1:CaptionHeight := 32 // set title oDCbBrowser1:Title := cFName // format title oDCbBrowser1:TitleView:Foreground := Color{ COLORBLUE } oDCbBrowser1:TitleView:Options := BVO_END_ELLIPSIS self:oDCbBrowser1:Editable := true self:oDCbBrowser1:SelectionMode:= #PERMANENT IF odbsServer:Used //link to browser self:oDCbBrowser1:Use(odbsServer,{#JDATE, #DELIVERY, #TRUCK, #LOCATION, #SUPPLIER, #MATERIAL,#CUSTOMER}) etc... The append and edit routines are: METHOD OnInsert() CLASS dtwBrowser //append a new record IF self:oDCbBrowser1:Used self:oDCbBrowser1:Append() self:oDCbBrowser1:CurrentColumn:=1 self:oDCbBrowser1:Refresh() self:oDCbBrowser1:Edit() ENDIF RETURN nil and method RecordAppend(oEvent) class dtwBrowser Local dDate as date dDate := Today() if oEvent:Mode=BRA_APPENDED oEvent:Server:SuspendNotification() oEvent:Server:FIELDPUT(#CUSTOMER, cFName) oEvent:Server:FIELDPUT(#JDATE,dDate) oEvent:Server:Commit() oEvent:Server:ResetNotification() oEvent:Server:Notify( NOTIFYRECORDCHANGE ) endif return .T. I have a CellEdit method as well and can see I can interupt the flow at each of the edit mode stages and I would like to do that later to refine the edit process but this dosen't seem to be related to my current issue. I have played with the the edit modes and tried to understand and experiment with different approaches but I keep coming back to the fact the edit of the new record works the way I'd like as soon as I press the down key when the browser is in browse mode and then edit and saves the data ok but I have to move the cursor down to get this. It would seem there is a disconnection in a pointer between the browser and the server but I've tried to Refresh(), Recalculate(), set notification on and off but without any success. Can anyone see what I'm missing? I'm afraid I still can't see the forest for the trees yet but I'm learning. On Mar 22, 2:28 pm, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> wrote: > Hi Jorge, > > I understand - I merely offer the alternate. However you can still do > the same thing with the Enter key (I guess instead of the TAB key). The > trouble my users had was realising that cell change mode and cell edit > mode all had different behaviours for enter and tab as they must have. I > just try to avoid this kind of confusion. > > Plus we are in SQL. All that automated editing is to be avoided if > possible. > > Geoff > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > news:36372e73-acf9-4533-8efb-b99a0bafa8c1(a)30g2000yqi.googlegroups.com: > > > > > On 21 mar, 18:19, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > wrote: > > > > Jorge. > > > > Not complicated at all! > > > > I basically never allow editing in a cell (only some very special > > > circumstances) so this is how I approach your requirement: > > > > 1. If the user double-clicks cell (to prevent accidental single click > > > etc) > > > 2. Launch a small browser dialog with options. > > > 3. If the cell was empty - go top - else seek the value > > > 4. Let user look up stuff or select or enter some new value > > > 5. If they select, put the value back in the browser cell > > > 6. Refresh the browser. > > > > Geoff > > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > > >news:898a2897-7d3c-4fc0-b547-b6deb053e3b6(a)33g2000yqj.googlegroups.com: > > > > > On 16 mar, 20:37, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > > wrote: > > > > > > Anyone for an awesome foursome ? > > > > > > <g> > > > > > > "Willie Moore" <will...(a)wmconsulting.com> wrote in message > > > > > >news:hnp2pr$e14$1(a)speranza.aioe.org: > > > > > > > Me three > > > > > > > "Ginny Caughey" <ginny.caughey.onl...(a)wasteworks.com> wrote in message > > > > > >news:4b9fffa5$0$19037$c3e8da3(a)news.astraweb.com: > > > > > > > > Hi Geoff, > > > > > > > > Me too. ;-) > > > > > > > > -- > > > > > > > > Ginny Caughey > > > > > > >www.wasteworks.com > > > > > > > > "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> wrote in message > > > > > > >news:vRSnn.13386$pv.7239(a)news-server.bigpond.net.au... > > > > > > > > > <g> > > > > > > > > > I have solved many a problem by building the angry sample ready to send to > > > > > > > > Robert, only to find the fault in my code because the sample works. Then > > > > > > > > if it doesn't, the sample is ready! > > > > > > > > > Geoff- Ocultar texto de la cita - > > > > > > - Mostrar texto de la cita - > > > > > Hello ! > > > > > " self:oDCbBrowser1:CurrentColumn:=1 > > > > self:oDCbBrowser1:Edit() // You could skip this.... " > > > > > This is a very interesting idea. ( skip edit ) I was working with > > > > bbrowser > > > > in "edit" mode and when i need help for search some code > > > > (Ej product, customers ) I pressed enter in an empty field and thus > > > > opened > > > > a help window, very complicated > > > > > What would be a good way to help my clients > > > > search code, calling a help window , working into a bbrowser > > > > without the edit mode , when they arrive in a cell that needs a > > > > Search help ? > > > > > Best regards > > > > Jorge Accinelli > > > > > I press enter in the empty field > > > > openning a windows. Very complicated- Ocultar texto de la cita - > > > > - Mostrar texto de la cita - > > > Hello, Geoff > > > Thanks for your reply. I remember your advise > > avoid editing in a browser. But it's so powerfull bBrowser .. > > Double-click is a good idea, but I prefer > > avoid the mouse in such situations and > > use some keyboard lauching the same behavior > > (Press any key without triggering the start of the edition) > > > Best Regards > > Jorge- Hide quoted text - > > - Show quoted text -
From: Stephen Quinn on 24 Mar 2010 02:25 Grant > odbsServer:SetIndex("JCUSTOME") Are you using DBFCDX indices?? If so - DO NOT use SetIndex() with them, use SetOrder(). > IF odbsServer:Used Why are you testing to see if the Server is used when 'x' lines before it your doing > odbsServer:SetIndex("JCUSTOME") > odbsServer:GoTop() > odbsServer:OrderScope(TOPSCOPE, cFName) > odbsServer:OrderScope(BOTTOMSCOPE, cFName) > nRecord:=odbsServer:RECNO > odbsServer:GoTop() Why do you think the Server will disappear when you don't have a Close() in there (at least not in the code you've shown)?? When appending a new record it won't be in scope because the relevant scoped FIELD won't have any data in it. I think (you'll need to check the docs<g>) your using RecordAppend() incorrectly, it doesn't take an event parameter (unless your manually calling it with one, if so then I suggest you change the name of it so bBrowser doesn't get confused). IIRC the RecordAppend() method takes an ARRAY of data for the fields ie odbsServer:RecordAppend( { dDate, '', '','', '', '', cFName} ) instead of oEvent:Server:FIELDPUT(#CUSTOMER, cFName) oEvent:Server:FIELDPUT(#JDATE,dDate) CYA Steve
From: Mathias on 24 Mar 2010 04:04 Hi Grant, could you show us your CellEdit method as well? There may be something there that makes the record save fail. Do you have an EditClose method? That could be interesting as well. Mathias On 24 mar, 05:30, Grant <gra...(a)dunsmoreinfo.com> wrote: > Hello again all. > I would like to get back to my original problem and ask if anyone has > some insite here. The problem was I cannot append a new record, enter > data and save it unless I press the down arrow key first and then > enter the data and exit. Only then is it saved. I have created a test > sample and found initially when I appended a record and entered data > it saved fine until I created a scope on the server. The scope was on > the customer field and it works fine with the browser data only > showing the proper customer but then I do an append and enter data and > it does not save it unless I first press the down arrow key before > entering the data and then exit and it will be saved. Here is some of > the code from my sample. > > The scope is defined in the browser postinit as follows: > > cFName is the customer field obtained from another browser and data > file and used to define the scope. > > odbsServer := MyServerArray[1] > odbsServer:SetIndex("JCUSTOME") > odbsServer:GoTop() > > odbsServer:OrderScope(TOPSCOPE, cFName) > odbsServer:OrderScope(BOTTOMSCOPE, cFName) > nRecord:=odbsServer:RECNO > odbsServer:GoTop() > > oDCbBrowser1:RowHeight := 20 > oDCbBrowser1:CaptionHeight := 32 > > // set title > oDCbBrowser1:Title := cFName > > // format title > oDCbBrowser1:TitleView:Foreground := > Color{ COLORBLUE } > > oDCbBrowser1:TitleView:Options := BVO_END_ELLIPSIS > > self:oDCbBrowser1:Editable := true > self:oDCbBrowser1:SelectionMode:= #PERMANENT > > IF odbsServer:Used > //link to browser > self:oDCbBrowser1:Use(odbsServer,{#JDATE, #DELIVERY, #TRUCK, > #LOCATION, #SUPPLIER, #MATERIAL,#CUSTOMER}) > etc... > > The append and edit routines are: > > METHOD OnInsert() CLASS dtwBrowser > //append a new record > IF self:oDCbBrowser1:Used > self:oDCbBrowser1:Append() > self:oDCbBrowser1:CurrentColumn:=1 > self:oDCbBrowser1:Refresh() > self:oDCbBrowser1:Edit() > ENDIF > > RETURN nil > > and > > method RecordAppend(oEvent) class dtwBrowser > > Local dDate as date > > dDate := Today() > if oEvent:Mode=BRA_APPENDED > > oEvent:Server:SuspendNotification() > oEvent:Server:FIELDPUT(#CUSTOMER, cFName) > oEvent:Server:FIELDPUT(#JDATE,dDate) > oEvent:Server:Commit() > oEvent:Server:ResetNotification() > oEvent:Server:Notify( NOTIFYRECORDCHANGE ) > endif > > return .T. > > I have a CellEdit method as well and can see I can interupt the flow > at each of the edit mode stages and I would like to do that later to > refine the edit process but this dosen't seem to be related to my > current issue. > > I have played with the the edit modes and tried to understand and > experiment with different approaches but I keep coming back to the > fact the edit of the new record works the way I'd like as soon as I > press the down key when the browser is in browse mode and then edit > and saves the data ok but I have to move the cursor down to get this. > It would seem there is a disconnection in a pointer between the > browser and the server but I've tried to Refresh(), Recalculate(), set > notification on and off but without any success. Can anyone see what > I'm missing? I'm afraid I still can't see the forest for the trees yet > but I'm learning. > > On Mar 22, 2:28 pm, "Geoff Schaller" > > > > <geo...(a)softxwareobjectives.com.au> wrote: > > Hi Jorge, > > > I understand - I merely offer the alternate. However you can still do > > the same thing with the Enter key (I guess instead of the TAB key). The > > trouble my users had was realising that cell change mode and cell edit > > mode all had different behaviours for enter and tab as they must have. I > > just try to avoid this kind of confusion. > > > Plus we are in SQL. All that automated editing is to be avoided if > > possible. > > > Geoff > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > >news:36372e73-acf9-4533-8efb-b99a0bafa8c1(a)30g2000yqi.googlegroups.com: > > > > On 21 mar, 18:19, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > wrote: > > > > > Jorge. > > > > > Not complicated at all! > > > > > I basically never allow editing in a cell (only some very special > > > > circumstances) so this is how I approach your requirement: > > > > > 1. If the user double-clicks cell (to prevent accidental single click > > > > etc) > > > > 2. Launch a small browser dialog with options. > > > > 3. If the cell was empty - go top - else seek the value > > > > 4. Let user look up stuff or select or enter some new value > > > > 5. If they select, put the value back in the browser cell > > > > 6. Refresh the browser. > > > > > Geoff > > > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > > > >news:898a2897-7d3c-4fc0-b547-b6deb053e3b6(a)33g2000yqj.googlegroups.com: > > > > > > On 16 mar, 20:37, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > > > wrote: > > > > > > > Anyone for an awesome foursome ? > > > > > > > <g> > > > > > > > "Willie Moore" <will...(a)wmconsulting.com> wrote in message > > > > > > >news:hnp2pr$e14$1(a)speranza.aioe.org: > > > > > > > > Me three > > > > > > > > "Ginny Caughey" <ginny.caughey.onl...(a)wasteworks.com> wrote in message > > > > > > >news:4b9fffa5$0$19037$c3e8da3(a)news.astraweb.com: > > > > > > > > > Hi Geoff, > > > > > > > > > Me too. ;-) > > > > > > > > > -- > > > > > > > > > Ginny Caughey > > > > > > > >www.wasteworks.com > > > > > > > > > "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> wrote in message > > > > > > > >news:vRSnn.13386$pv.7239(a)news-server.bigpond.net.au... > > > > > > > > > > <g> > > > > > > > > > > I have solved many a problem by building the angry sample ready to send to > > > > > > > > > Robert, only to find the fault in my code because the sample works. Then > > > > > > > > > if it doesn't, the sample is ready! > > > > > > > > > > Geoff- Ocultar texto de la cita - > > > > > > > - Mostrar texto de la cita - > > > > > > Hello ! > > > > > > " self:oDCbBrowser1:CurrentColumn:=1 > > > > > self:oDCbBrowser1:Edit() // You could skip this... " > > > > > > This is a very interesting idea. ( skip edit ) I was working with > > > > > bbrowser > > > > > in "edit" mode and when i need help for search some code > > > > > (Ej product, customers ) I pressed enter in an empty field and thus > > > > > opened > > > > > a help window, very complicated > > > > > > What would be a good way to help my clients > > > > > search code, calling a help window , working into a bbrowser > > > > > without the edit mode , when they arrive in a cell that needs a > > > > > Search help ? > > > > > > Best regards > > > > > Jorge Accinelli > > > > > > I press enter in the empty field > > > > > openning a windows. Very complicated- Ocultar texto de la cita - > > > > > - Mostrar texto de la cita - > > > > Hello, Geoff > > > > Thanks for your reply. I remember your advise > > > avoid editing in a browser. But it's so powerfull bBrowser .. > > > Double-click is a good idea, but I prefer > > > avoid the mouse in such situations and > > > use some keyboard lauching the same behavior > > > (Press any key without triggering the start of the edition) > > > > Best Regards > > > Jorge- Hide quoted text - > > > - Show quoted text -
From: Grant on 24 Mar 2010 11:04 Hi Mathias I have nothing in the CellEdit() except displays to show where the Celledit gets called. I just displayed some text because I wasn't sure what to do next. Here is the code: method CellEdit(oEvent) class dtwBrowser local oColumn as bDataColumn If oEvent:EditMode=BEDIT_CREATE ? "CREATE" endif If oEvent:EditMode=BEDIT_INIT ? "INIT" endif If oEvent:EditMode=BEDIT_SHOW ? "SHOW" endif If oEvent:EditMode=BEDIT_END ? "END" endif If oEvent:EditMode=BEDIT_CANCEL ? "CANCEL" endif If oEvent:EditMode=BEDIT_COMMIT ? "COMMIT" endif return nil On Mar 24, 1:04 am, Mathias <mathias.hakans...(a)consultec.se> wrote: > Hi Grant, > > could you show us your CellEdit method as well? There may be something > there that makes the record save fail. Do you have an EditClose > method? That could be interesting as well. > > Mathias > > On 24 mar, 05:30, Grant <gra...(a)dunsmoreinfo.com> wrote: > > > > > Hello again all. > > I would like to get back to my original problem and ask if anyone has > > some insite here. The problem was I cannot append a new record, enter > > data and save it unless I press the down arrow key first and then > > enter the data and exit. Only then is it saved. I have created a test > > sample and found initially when I appended a record and entered data > > it saved fine until I created a scope on the server. The scope was on > > the customer field and it works fine with the browser data only > > showing the proper customer but then I do an append and enter data and > > it does not save it unless I first press the down arrow key before > > entering the data and then exit and it will be saved. Here is some of > > the code from my sample. > > > The scope is defined in the browser postinit as follows: > > > cFName is the customer field obtained from another browser and data > > file and used to define the scope. > > > odbsServer := MyServerArray[1] > > odbsServer:SetIndex("JCUSTOME") > > odbsServer:GoTop() > > > odbsServer:OrderScope(TOPSCOPE, cFName) > > odbsServer:OrderScope(BOTTOMSCOPE, cFName) > > nRecord:=odbsServer:RECNO > > odbsServer:GoTop() > > > oDCbBrowser1:RowHeight := 20 > > oDCbBrowser1:CaptionHeight := 32 > > > // set title > > oDCbBrowser1:Title := cFName > > > // format title > > oDCbBrowser1:TitleView:Foreground := > > Color{ COLORBLUE } > > > oDCbBrowser1:TitleView:Options := BVO_END_ELLIPSIS > > > self:oDCbBrowser1:Editable := true > > self:oDCbBrowser1:SelectionMode:= #PERMANENT > > > IF odbsServer:Used > > //link to browser > > self:oDCbBrowser1:Use(odbsServer,{#JDATE, #DELIVERY, #TRUCK, > > #LOCATION, #SUPPLIER, #MATERIAL,#CUSTOMER}) > > etc... > > > The append and edit routines are: > > > METHOD OnInsert() CLASS dtwBrowser > > //append a new record > > IF self:oDCbBrowser1:Used > > self:oDCbBrowser1:Append() > > self:oDCbBrowser1:CurrentColumn:=1 > > self:oDCbBrowser1:Refresh() > > self:oDCbBrowser1:Edit() > > ENDIF > > > RETURN nil > > > and > > > method RecordAppend(oEvent) class dtwBrowser > > > Local dDate as date > > > dDate := Today() > > if oEvent:Mode=BRA_APPENDED > > > oEvent:Server:SuspendNotification() > > oEvent:Server:FIELDPUT(#CUSTOMER, cFName) > > oEvent:Server:FIELDPUT(#JDATE,dDate) > > oEvent:Server:Commit() > > oEvent:Server:ResetNotification() > > oEvent:Server:Notify( NOTIFYRECORDCHANGE ) > > endif > > > return .T. > > > I have a CellEdit method as well and can see I can interupt the flow > > at each of the edit mode stages and I would like to do that later to > > refine the edit process but this dosen't seem to be related to my > > current issue. > > > I have played with the the edit modes and tried to understand and > > experiment with different approaches but I keep coming back to the > > fact the edit of the new record works the way I'd like as soon as I > > press the down key when the browser is in browse mode and then edit > > and saves the data ok but I have to move the cursor down to get this. > > It would seem there is a disconnection in a pointer between the > > browser and the server but I've tried to Refresh(), Recalculate(), set > > notification on and off but without any success. Can anyone see what > > I'm missing? I'm afraid I still can't see the forest for the trees yet > > but I'm learning. > > > On Mar 22, 2:28 pm, "Geoff Schaller" > > > <geo...(a)softxwareobjectives.com.au> wrote: > > > Hi Jorge, > > > > I understand - I merely offer the alternate. However you can still do > > > the same thing with the Enter key (I guess instead of the TAB key). The > > > trouble my users had was realising that cell change mode and cell edit > > > mode all had different behaviours for enter and tab as they must have.. I > > > just try to avoid this kind of confusion. > > > > Plus we are in SQL. All that automated editing is to be avoided if > > > possible. > > > > Geoff > > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > > >news:36372e73-acf9-4533-8efb-b99a0bafa8c1(a)30g2000yqi.googlegroups.com: > > > > > On 21 mar, 18:19, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > > wrote: > > > > > > Jorge. > > > > > > Not complicated at all! > > > > > > I basically never allow editing in a cell (only some very special > > > > > circumstances) so this is how I approach your requirement: > > > > > > 1. If the user double-clicks cell (to prevent accidental single click > > > > > etc) > > > > > 2. Launch a small browser dialog with options. > > > > > 3. If the cell was empty - go top - else seek the value > > > > > 4. Let user look up stuff or select or enter some new value > > > > > 5. If they select, put the value back in the browser cell > > > > > 6. Refresh the browser. > > > > > > Geoff > > > > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > > > > >news:898a2897-7d3c-4fc0-b547-b6deb053e3b6(a)33g2000yqj.googlegroups.com: > > > > > > > On 16 mar, 20:37, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > > > > wrote: > > > > > > > > Anyone for an awesome foursome ? > > > > > > > > <g> > > > > > > > > "Willie Moore" <will...(a)wmconsulting.com> wrote in message > > > > > > > >news:hnp2pr$e14$1(a)speranza.aioe.org: > > > > > > > > > Me three > > > > > > > > > "Ginny Caughey" <ginny.caughey.onl...(a)wasteworks.com> wrote in message > > > > > > > >news:4b9fffa5$0$19037$c3e8da3(a)news.astraweb.com: > > > > > > > > > > Hi Geoff, > > > > > > > > > > Me too. ;-) > > > > > > > > > > -- > > > > > > > > > > Ginny Caughey > > > > > > > > >www.wasteworks.com > > > > > > > > > > "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> wrote in message > > > > > > > > >news:vRSnn.13386$pv.7239(a)news-server.bigpond.net.au... > > > > > > > > > > > <g> > > > > > > > > > > > I have solved many a problem by building the angry sample ready to send to > > > > > > > > > > Robert, only to find the fault in my code because the sample works. Then > > > > > > > > > > if it doesn't, the sample is ready! > > > > > > > > > > > Geoff- Ocultar texto de la cita - > > > > > > > > - Mostrar texto de la cita - > > > > > > > Hello ! > > > > > > > " self:oDCbBrowser1:CurrentColumn:=1 > > > > > > self:oDCbBrowser1:Edit() // You could skip this... " > > > > > > > This is a very interesting idea. ( skip edit ) I was working with > > > > > > bbrowser > > > > > > in "edit" mode and when i need help for search some code > > > > > > (Ej product, customers ) I pressed enter in an empty field and thus > > > > > > opened > > > > > > a help window, very complicated > > > > > > > What would be a good way to help my clients > > > > > > search code, calling a help window , working into a bbrowser > > > > > > without the edit mode , when they arrive in a cell that needs a > > > > > > Search help ? > > > > > > > Best regards > > > > > > Jorge Accinelli > > > > > > > I press enter in the empty field > > > > > > openning a windows. Very complicated- Ocultar texto de la cita - > > > > > > - Mostrar texto de la cita - > > > > > Hello, Geoff > > > > > Thanks for your reply. I remember your advise > > > > avoid editing in a browser. But it's so powerfull bBrowser .. > > > > Double-click is a good idea, but I prefer > > > > avoid the mouse in such situations and > > > > use some keyboard lauching the same behavior > > > > (Press any key without triggering the start of the edition) > > > > > Best Regards > > > > Jorge- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text -
From: Mathias on 24 Mar 2010 11:47 Hi again, I think the CellEdit method should be in the window owning the browser, Not in your own browser class. An alternative to moving the method to the window class would be to call super:CellEdit(oEvent). Mathias On 24 mar, 16:04, Grant <gra...(a)dunsmoreinfo.com> wrote: > Hi Mathias > I have nothing in the CellEdit() except displays to show where the > Celledit gets called. I just displayed some text because I wasn't sure > what to do next. Here is the code: > > method CellEdit(oEvent) class dtwBrowser > local oColumn as bDataColumn > > If oEvent:EditMode=BEDIT_CREATE > ? "CREATE" > endif > > If oEvent:EditMode=BEDIT_INIT > ? "INIT" > endif > > If oEvent:EditMode=BEDIT_SHOW > ? "SHOW" > endif > > If oEvent:EditMode=BEDIT_END > ? "END" > endif > > If oEvent:EditMode=BEDIT_CANCEL > ? "CANCEL" > endif > > If oEvent:EditMode=BEDIT_COMMIT > ? "COMMIT" > endif > > return nil > > On Mar 24, 1:04 am, Mathias <mathias.hakans...(a)consultec.se> wrote: > > > > > Hi Grant, > > > could you show us your CellEdit method as well? There may be something > > there that makes the record save fail. Do you have an EditClose > > method? That could be interesting as well. > > > Mathias > > > On 24 mar, 05:30, Grant <gra...(a)dunsmoreinfo.com> wrote: > > > > Hello again all. > > > I would like to get back to my original problem and ask if anyone has > > > some insite here. The problem was I cannot append a new record, enter > > > data and save it unless I press the down arrow key first and then > > > enter the data and exit. Only then is it saved. I have created a test > > > sample and found initially when I appended a record and entered data > > > it saved fine until I created a scope on the server. The scope was on > > > the customer field and it works fine with the browser data only > > > showing the proper customer but then I do an append and enter data and > > > it does not save it unless I first press the down arrow key before > > > entering the data and then exit and it will be saved. Here is some of > > > the code from my sample. > > > > The scope is defined in the browser postinit as follows: > > > > cFName is the customer field obtained from another browser and data > > > file and used to define the scope. > > > > odbsServer := MyServerArray[1] > > > odbsServer:SetIndex("JCUSTOME") > > > odbsServer:GoTop() > > > > odbsServer:OrderScope(TOPSCOPE, cFName) > > > odbsServer:OrderScope(BOTTOMSCOPE, cFName) > > > nRecord:=odbsServer:RECNO > > > odbsServer:GoTop() > > > > oDCbBrowser1:RowHeight := 20 > > > oDCbBrowser1:CaptionHeight := 32 > > > > // set title > > > oDCbBrowser1:Title := cFName > > > > // format title > > > oDCbBrowser1:TitleView:Foreground := > > > Color{ COLORBLUE } > > > > oDCbBrowser1:TitleView:Options := BVO_END_ELLIPSIS > > > > self:oDCbBrowser1:Editable := true > > > self:oDCbBrowser1:SelectionMode:= #PERMANENT > > > > IF odbsServer:Used > > > //link to browser > > > self:oDCbBrowser1:Use(odbsServer,{#JDATE, #DELIVERY, #TRUCK, > > > #LOCATION, #SUPPLIER, #MATERIAL,#CUSTOMER}) > > > etc... > > > > The append and edit routines are: > > > > METHOD OnInsert() CLASS dtwBrowser > > > //append a new record > > > IF self:oDCbBrowser1:Used > > > self:oDCbBrowser1:Append() > > > self:oDCbBrowser1:CurrentColumn:=1 > > > self:oDCbBrowser1:Refresh() > > > self:oDCbBrowser1:Edit() > > > ENDIF > > > > RETURN nil > > > > and > > > > method RecordAppend(oEvent) class dtwBrowser > > > > Local dDate as date > > > > dDate := Today() > > > if oEvent:Mode=BRA_APPENDED > > > > oEvent:Server:SuspendNotification() > > > oEvent:Server:FIELDPUT(#CUSTOMER, cFName) > > > oEvent:Server:FIELDPUT(#JDATE,dDate) > > > oEvent:Server:Commit() > > > oEvent:Server:ResetNotification() > > > oEvent:Server:Notify( NOTIFYRECORDCHANGE ) > > > endif > > > > return .T. > > > > I have a CellEdit method as well and can see I can interupt the flow > > > at each of the edit mode stages and I would like to do that later to > > > refine the edit process but this dosen't seem to be related to my > > > current issue. > > > > I have played with the the edit modes and tried to understand and > > > experiment with different approaches but I keep coming back to the > > > fact the edit of the new record works the way I'd like as soon as I > > > press the down key when the browser is in browse mode and then edit > > > and saves the data ok but I have to move the cursor down to get this. > > > It would seem there is a disconnection in a pointer between the > > > browser and the server but I've tried to Refresh(), Recalculate(), set > > > notification on and off but without any success. Can anyone see what > > > I'm missing? I'm afraid I still can't see the forest for the trees yet > > > but I'm learning. > > > > On Mar 22, 2:28 pm, "Geoff Schaller" > > > > <geo...(a)softxwareobjectives.com.au> wrote: > > > > Hi Jorge, > > > > > I understand - I merely offer the alternate. However you can still do > > > > the same thing with the Enter key (I guess instead of the TAB key). The > > > > trouble my users had was realising that cell change mode and cell edit > > > > mode all had different behaviours for enter and tab as they must have. I > > > > just try to avoid this kind of confusion. > > > > > Plus we are in SQL. All that automated editing is to be avoided if > > > > possible. > > > > > Geoff > > > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > > > >news:36372e73-acf9-4533-8efb-b99a0bafa8c1(a)30g2000yqi.googlegroups.com: > > > > > > On 21 mar, 18:19, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > > > wrote: > > > > > > > Jorge. > > > > > > > Not complicated at all! > > > > > > > I basically never allow editing in a cell (only some very special > > > > > > circumstances) so this is how I approach your requirement: > > > > > > > 1. If the user double-clicks cell (to prevent accidental single click > > > > > > etc) > > > > > > 2. Launch a small browser dialog with options. > > > > > > 3. If the cell was empty - go top - else seek the value > > > > > > 4. Let user look up stuff or select or enter some new value > > > > > > 5. If they select, put the value back in the browser cell > > > > > > 6. Refresh the browser. > > > > > > > Geoff > > > > > > > "Jorge" <jorgeaccine...(a)dextrasistemas.com.ar> wrote in message > > > > > > >news:898a2897-7d3c-4fc0-b547-b6deb053e3b6(a)33g2000yqj.googlegroups.com: > > > > > > > > On 16 mar, 20:37, "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> > > > > > > > wrote: > > > > > > > > > Anyone for an awesome foursome ? > > > > > > > > > <g> > > > > > > > > > "Willie Moore" <will...(a)wmconsulting.com> wrote in message > > > > > > > > >news:hnp2pr$e14$1(a)speranza.aioe.org: > > > > > > > > > > Me three > > > > > > > > > > "Ginny Caughey" <ginny.caughey.onl...(a)wasteworks.com> wrote in message > > > > > > > > >news:4b9fffa5$0$19037$c3e8da3(a)news.astraweb.com: > > > > > > > > > > > Hi Geoff, > > > > > > > > > > > Me too. ;-) > > > > > > > > > > > -- > > > > > > > > > > > Ginny Caughey > > > > > > > > > >www.wasteworks.com > > > > > > > > > > > "Geoff Schaller" <geo...(a)softxwareobjectives.com.au> wrote in message > > > > > > > > > >news:vRSnn.13386$pv.7239(a)news-server.bigpond.net.au... > > > > > > > > > > > > <g> > > > > > > > > > > > > I have solved many a problem by building the angry sample ready to send to > > > > > > > > > > > Robert, only to find the fault in my code because the sample works. Then > > > > > > > > > > > if it doesn't, the sample is ready! > > > > > > > > > > > > Geoff- Ocultar texto de la cita - > > > > > > > > > - Mostrar texto de la cita - > > > > > > > > Hello ! > > > > > > > > " self:oDCbBrowser1:CurrentColumn:=1 > > > > > > > self:oDCbBrowser1:Edit() // You could skip this... " > > > > > > > > This is a very interesting idea. ( skip edit ) I was working with > > > > > > > bbrowser > > > > > > > in "edit" mode and when i need help for search some code > > > > > > > (Ej product, customers ) I pressed enter in an empty field and thus > > > > > > > opened > > > > > > > a help window, very complicated > > > > > > > > What would be a good way to help my clients > > > > > > > search code, calling a help window , working into a bbrowser > > > > > > > without the edit mode , when they arrive in a cell that needs a > > > > > > > Search help ? > > > > > > > > Best regards > > > > > > > Jorge Accinelli > > > > > > > > I press enter in the empty field > > > > > > > openning a windows. Very complicated- Ocultar texto de la cita - > > > > > > > - Mostrar texto de la cita - > > > > > > Hello, Geoff > > > > > > Thanks for your reply. I remember your advise > > > > > avoid editing in a browser. But it's so powerfull bBrowser ... > > > > > Double-click is a good idea, but I prefer > > > > > avoid the mouse in such situations and > > > > > use some keyboard lauching the same behavior > > > > > (Press any key without triggering the start of the edition) > > > > > > Best Regards > > > > > Jorge- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text -
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Get information about windows user privileges Next: Filter help |