|
|
bBrowser Edit problem
Hello all. I am appending a record to a browser and want the first
field of the new record to be an editable date field. It appends and
opens in edit mode but I can't save it or any other fields until I
move the cursor to a differnet record and then back. Does this make
sense? Once the cursor has moved up and down a record the new record
can be saved. It looks like I haven't been able to set the edit mode
after the append properly. The following is some of the code I am
trying to use.
The postinit sets the browser to edit mode
"self:oDCbBrowser1:Editable := true" and the new record is appended as
follows:
METHOD OnInsert() CLASS dtwJOB
//append a new record
IF self:oDCbBrowser1:Used
self:oDCbBrowser1:Append()
self:oDCbBrowser1:CurrentColumn:=1
self:oDCbBrowser1:Edit()
self:oDCbBrowser1:Recalculate()
self:oDCbBrowser1:Refresh()
ENDIF
RETURN nil
Then the date and cusomer field are entered in the callback method as
follows:
Method RecordAppend(oEvent) class dtwJob
Local dDate as date
dDate := Today()
oEvent:Server:SuspendNotification()
// evaluate append mode
if oEvent:Mode=BRA_APPENDED
// cCustomer := cFName
// initialize new record
oEvent:Server:FIELDPUT(#CUSTOMER, cFName)
oEvent:Server:FIELDPUT(#JDATE,dDate)
oEvent:Server:Commit()
endif
oEvent:Server:ResetNotification()
oEvent:Server:Notify( NOTIFYRECORDCHANGE )
return .T.
This al works fine. Now I want the append operation to finish with the
date field open for editing and be able to enter data into the other
fields and to save the data. Now I can edit the fields but not save.
Any advice would be appreciated.
Thank you
|
|
0
|
|
|
|
Reply
|
grantd (4)
|
3/10/2010 6:05:51 PM |
|
Easy - you need a CellEdit() method in your owner window.
Look up the bBrowser help for detailed examples.
Geoff
"Grant" <grantd@dunsmoreinfo.com> wrote in message
news:5b967c29-a07b-41a8-a584-4dc7717a7e18@p3g2000pra.googlegroups.com:
> Hello all. I am appending a record to a browser and want the first
> field of the new record to be an editable date field. It appends and
> opens in edit mode but I can't save it or any other fields until I
> move the cursor to a differnet record and then back. Does this make
> sense? Once the cursor has moved up and down a record the new record
> can be saved. It looks like I haven't been able to set the edit mode
> after the append properly. The following is some of the code I am
> trying to use.
> The postinit sets the browser to edit mode
> "self:oDCbBrowser1:Editable := true" and the new record is appended as
> follows:
> METHOD OnInsert() CLASS dtwJOB
> //append a new record
> IF self:oDCbBrowser1:Used
> self:oDCbBrowser1:Append()
> self:oDCbBrowser1:CurrentColumn:=1
> self:oDCbBrowser1:Edit()
> self:oDCbBrowser1:Recalculate()
> self:oDCbBrowser1:Refresh()
> ENDIF
> RETURN nil
> Then the date and cusomer field are entered in the callback method as
> follows:
> Method RecordAppend(oEvent) class dtwJob
> Local dDate as date
> dDate := Today()
>
> oEvent:Server:SuspendNotification()
> // evaluate append mode
> if oEvent:Mode=BRA_APPENDED
> // cCustomer := cFName
> // initialize new record
> oEvent:Server:FIELDPUT(#CUSTOMER, cFName)
> oEvent:Server:FIELDPUT(#JDATE,dDate)
> oEvent:Server:Commit()
> endif
> oEvent:Server:ResetNotification()
> oEvent:Server:Notify( NOTIFYRECORDCHANGE )
> return .T.
> This al works fine. Now I want the append operation to finish with the
> date field open for editing and be able to enter data into the other
> fields and to save the data. Now I can edit the fields but not save.
> Any advice would be appreciated.
> Thank you
|
|
0
|
|
|
|
Reply
|
Geoff
|
3/10/2010 10:03:10 PM
|
|
On Mar 10, 2:03=A0pm, "Geoff Schaller"
<geo...@softxwareobjectives.com.au> wrote:
> Easy - you need a CellEdit() method in your owner window.
> Look up the bBrowser help for detailed examples.
>
> Geoff
>
> "Grant" <gra...@dunsmoreinfo.com> wrote in message
>
> news:5b967c29-a07b-41a8-a584-4dc7717a7e18@p3g2000pra.googlegroups.com:
>
>
>
> > Hello all. I am appending a record to a browser and want the first
> > field of the new record to be an editable date field. It appends and
> > opens in edit mode but I can't save it or any other fields until I
> > move the cursor to a differnet record and then back. Does this make
> > sense? Once the cursor has moved up and down a record the new record
> > can be saved. It looks like I haven't been able to set the edit mode
> > after the append properly. The following is some of the code I am
> > trying to use.
> > The postinit sets the browser to edit mode
> > "self:oDCbBrowser1:Editable :=3D true" and the new record is appended a=
s
> > follows:
> > =A0 =A0 =A0METHOD OnInsert() CLASS dtwJOB
> > =A0 =A0 //append a new record
> > =A0 =A0 IF self:oDCbBrowser1:Used
> > self:oDCbBrowser1:Append()
> > =A0 =A0self:oDCbBrowser1:CurrentColumn:=3D1
> > =A0 self:oDCbBrowser1:Edit()
> > =A0 =A0 self:oDCbBrowser1:Recalculate()
> > self:oDCbBrowser1:Refresh()
> > =A0 =A0 ENDIF
> > =A0 =A0 RETURN nil
> > Then the date and cusomer field are entered in the callback method as
> > follows:
> > =A0 =A0 Method RecordAppend(oEvent) class dtwJob
> > =A0 =A0 =A0 =A0Local dDate as date
> > =A0 =A0 =A0 =A0dDate :=3D Today()
>
> > oEvent:Server:SuspendNotification()
> > // evaluate append mode
> > if oEvent:Mode=3DBRA_APPENDED
> > // cCustomer :=3D cFName
> > // initialize new record
> > oEvent:Server:FIELDPUT(#CUSTOMER, cFName)
> > oEvent:Server:FIELDPUT(#JDATE,dDate)
> > oEvent:Server:Commit()
> > endif
> > oEvent:Server:ResetNotification()
> > oEvent:Server:Notify( NOTIFYRECORDCHANGE )
> > =A0 =A0 return .T.
> > This al works fine. Now I want the append operation to finish with the
> > date field open for editing and be able to enter data into the other
> > fields and to save the data. Now I can edit the fields but not save.
> > Any advice would be appreciated.
> > Thank you- Hide quoted text -
>
> - Show quoted text -
Sorry not easy to me. I studied the example but still having problems.
I have a CellEdit() method. It contains the drop down boxes for a
number of fields where the user can choose from lists to enter data. I
added a section to detect when the first cell(#JDATE)is in edit mode
and I can do things when it is detected but I not sure what to do. I
still don't see why the cell initially will allow me to edit it but
not save it unless I move the cursor to another record and back (press
the down key).
Also I'm not sure what EditMode the cell should be in to accept and
save data. The following is a section that I added to the CellEdit()
with no change.
Please advise.
METHOD CellEdit(oEvent) CLASS dtwJob
LOCAL oColumn as bDataColumn
IF oEvent:EditMode=3DBEDIT_CREATE
oColumn :=3D
oEvent:Control:GetOpenColumn(oEvent:EditCell:Column)
IF oColumn:FieldSym=3D=3D#JDATE
self:oDCbBrowser1:Editable :=3D true
ENDIF
....
|
|
0
|
|
|
|
Reply
|
Grant
|
3/11/2010 5:52:07 AM
|
|
Hi Grant,
I would suggest that you do it like this instead. (see code below).
Going to edit-mode automatically does not help the user very much.
Edit mode is started on the first key stroke anyway and only makes it
more complicated if the user regrets the append.
/Mathias
=A0METHOD OnInsert() CLASS dtwJOB
=A0 =A0 //append a new record
=A0 =A0 IF self:oDCbBrowser1:Used
=A0 =A0 =A0 =A0 self:oDCbBrowser1:Append()
=A0 =A0 =A0 =A0 self:oDCbBrowser1:Refresh()
DoEvents()
self:oDCbBrowser1:CurrentColumn:=3D1
self:oDCbBrowser1:Edit() // You could skip this...
=A0 =A0 ENDIF
=A0 =A0 RETURN nil
On 10 mar, 19:05, Grant <gra...@dunsmoreinfo.com> wrote:
> Hello all. I am appending a record to a browser and want the first
> field of the new record to be an editable date field. It appends and
> opens in edit mode but I can't save it or any other fields until I
> move the cursor to a differnet record and then back. Does this make
> sense? Once the cursor has moved up and down a record the new record
> can be saved. It looks like I haven't been able to set the edit mode
> after the append properly. The following is some of the code I am
> trying to use.
> The postinit sets the browser to edit mode
> "self:oDCbBrowser1:Editable :=3D true" and the new record is appended as
> follows:
> =A0 =A0 =A0METHOD OnInsert() CLASS dtwJOB
> =A0 =A0 //append a new record
> =A0 =A0 IF self:oDCbBrowser1:Used
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Append()
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:CurrentColumn:=3D1
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Edit()
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Recalculate()
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Refresh()
> =A0 =A0 ENDIF
> =A0 =A0 RETURN nil
> Then the date and cusomer field are entered in the callback method as
> follows:
> =A0 =A0 Method RecordAppend(oEvent) class dtwJob
> =A0 =A0 =A0 =A0Local dDate as date
> =A0 =A0 =A0 =A0dDate :=3D Today()
>
> oEvent:Server:SuspendNotification()
> =A0 =A0 =A0 =A0 // evaluate append mode
> =A0 =A0 =A0 =A0 if oEvent:Mode=3DBRA_APPENDED
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 // cCustomer :=3D cFName
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 // initialize new record
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 oEvent:Server:FIELDPUT(#CUSTOMER, cFName)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 oEvent:Server:FIELDPUT(#JDATE,dDate)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 oEvent:Server:Commit()
> =A0 =A0 =A0 =A0 endif
> =A0 =A0 =A0 =A0 oEvent:Server:ResetNotification()
> =A0 =A0 =A0 =A0 oEvent:Server:Notify( NOTIFYRECORDCHANGE )
> =A0 =A0 return .T.
> This al works fine. Now I want the append operation to finish with the
> date field open for editing and be able to enter data into the other
> fields and to save the data. Now I can edit the fields but not save.
> Any advice would be appreciated.
> Thank you
|
|
0
|
|
|
|
Reply
|
Mathias
|
3/12/2010 8:39:21 AM
|
|
Thank you for your comments Geoff and Mathias. I am now top posting. I
apologize for not responding sooner but I am doing as you said Geoff
and have created a sample app which is working fine as far as I have
gotten. I will post again if I run into trouble but now I'm learning a
lot and appreciate your help.
On Mar 10, 11:05=A0am, Grant <gra...@dunsmoreinfo.com> wrote:
> Hello all. I am appending a record to a browser and want the first
> field of the new record to be an editable date field. It appends and
> opens in edit mode but I can't save it or any other fields until I
> move the cursor to a differnet record and then back. Does this make
> sense? Once the cursor has moved up and down a record the new record
> can be saved. It looks like I haven't been able to set the edit mode
> after the append properly. The following is some of the code I am
> trying to use.
> The postinit sets the browser to edit mode
> "self:oDCbBrowser1:Editable :=3D true" and the new record is appended as
> follows:
> =A0 =A0 =A0METHOD OnInsert() CLASS dtwJOB
> =A0 =A0 //append a new record
> =A0 =A0 IF self:oDCbBrowser1:Used
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Append()
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:CurrentColumn:=3D1
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Edit()
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Recalculate()
> =A0 =A0 =A0 =A0 self:oDCbBrowser1:Refresh()
> =A0 =A0 ENDIF
> =A0 =A0 RETURN nil
> Then the date and cusomer field are entered in the callback method as
> follows:
> =A0 =A0 Method RecordAppend(oEvent) class dtwJob
> =A0 =A0 =A0 =A0Local dDate as date
> =A0 =A0 =A0 =A0dDate :=3D Today()
>
> oEvent:Server:SuspendNotification()
> =A0 =A0 =A0 =A0 // evaluate append mode
> =A0 =A0 =A0 =A0 if oEvent:Mode=3DBRA_APPENDED
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 // cCustomer :=3D cFName
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 // initialize new record
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 oEvent:Server:FIELDPUT(#CUSTOMER, cFName)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 oEvent:Server:FIELDPUT(#JDATE,dDate)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 oEvent:Server:Commit()
> =A0 =A0 =A0 =A0 endif
> =A0 =A0 =A0 =A0 oEvent:Server:ResetNotification()
> =A0 =A0 =A0 =A0 oEvent:Server:Notify( NOTIFYRECORDCHANGE )
> =A0 =A0 return .T.
> This al works fine. Now I want the append operation to finish with the
> date field open for editing and be able to enter data into the other
> fields and to save the data. Now I can edit the fields but not save.
> Any advice would be appreciated.
> Thank you
|
|
0
|
|
|
|
Reply
|
Grant
|
3/16/2010 6:07:14 PM
|
|
|
4 Replies
221 Views
(page loaded in 0.112 seconds)
Similiar Articles: ANNOUNCE: A C++ Class Browser Sidekick for Vi, Vim, Emacs & Xemacs ...o Internal source code browser is also available. ... fb [a.c] ==> start firebolt in editor mode [on a.c ... Known problems with Sirius ... Can't modify httpd.conf under apache 2.2.16 - comp.infosystems.www ...I then started my browser and visited http://localhost ... apache process, yet when I attempt to use a text editor ... If the problem is not with file permissions, check which ... OpenGL help in Visual Studio 2010 - comp.graphics.api.opengl ...VS2010 comes with a browser based help system tha... ... or a mismatched ')' you can see it as you edit ... I haven't had any problems so far apart from needing to ... Disable the God forsaken Firefox Adobe Acrobat PDF plugin (please ...In my version, 5.1, its under Edit, Preferences, Options, Web Browser Options, and its the first box ... is to disable the Adobe Acrobat >> PDF plugin? > > The problem of ... Eclipse Plugin - Export: class not found - comp.lang.java.gui ...hi there, I've written an eclipse plugin to browser JacORBs NamingService. It runs without any problems when I ... Class not found" when run/debug JUnit tests ..... edit ... windows error message: file does not start with %PDF - comp.text ...you are right it was an editor problem. It starts right with ... This are the the first 14 bytes Ok, now the problem ... File does not begin with '%PDF-' Configure browser to ... Problems getting photos from Canon EOS D20 - comp.graphics.apps ...Anybody with an idea on what I can do to rememdy the problem? I am ... info directly from the EXIF display WITHIN PhotoLine 32's browser (as well as being able to view/edit ... Fonts with numbers as subscripts - comp.fontsIf not, how does one edit an existing font (not true ... guess that you are using VB to write HTML to a browser ... This is the way a typographer would approach the problem ... How to give all permissions to an unsigned applet - comp.lang.java ...Hi, I'm trying to edit the java.policy file to ... security.AllPermission; }; It runs without problems. ... know how to give an Applet running in a web browser the ... Does anyone recognize this problems with PSP8 - comp.graphics.apps ...Hi all I am Kitty and I have lately some problems with my ... kind of rasterwork besides it. > > When using the browser ... Edit picture to "comic style" ?! - comp.graphics.apps ... bBrowser Edit problem - comp.lang.clipper.visual-objects ...Hello all. I am appending a record to a browser and want the first field of the new record to be an editable date field. It appends and opens in edit mode but I can't ... Browser problem..... "FILE-EDIT-VIEW-FAVORITES-TOOLS-HELP" MISSING ...Best Answer: I guess you've installed IE7. Your favourites are not hidden in the star on the top left of your browser. You can get your file menus back by ... 7/22/2012 6:32:13 AM
|
|
|
|
|
|
|
|
|