Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 9 of 9 total |
Problem with CTRL+V pasting. |
Sun, Jan 10 2010 11:58 PM | Permanent Link |
"Adam H." | Hi Guys,
I've got a curly problem at the moment. I don't think it's DBISAM at fault - but I'm hoping that someone may be able to shed some light. In one of my applications I can not paste into a TDBEdit field (or TcxDBTextEdit, etc) if the table is not in Edit mode first. (The table will not automatically go into Edit mode). However, if I first put the table into Edit mode (by either typing into the field, using a DBNavigator, calling Table.edit, etc) then CTRL+V will paste clipboard contents into the control. But - if I use SHIFT+INSERT to paste instead, it will automatically put the table into Edit mode, and then paste the clipboards contents. If I create a new application it behaves as I expect (ie, CTRL+V will put the table into Edit mode, and then paste the contents into the control). So, I'm guessing there's something I've done within my application to cause this problem, but I'm stumped... I thought maybe I've got something trapping CTRL+V, but if that was the case then it shouldn't paste at all even once the table's in edit mode. I thought maybe I've set a datasource properties AutoEdit mode to false, but then SHIFT+INS shouldn't work (as directly typing into the control shouldn't work either). I thought maybe it's the control at fault, but I've used the standard TDBEdit as well as TcxDBTextEdit controls and both fail. I've tried various forms within my application and all seem to have the same problem, but a new application works fine. Has anyone heard of such a problem before, or knows of what I could have possibly done to cause this to happen? Cheers Adam. |
Mon, Jan 11 2010 12:58 AM | Permanent Link |
"Adam H." | Hi Guys,
I think I have found the problem, but not sure what to do re the best solution. (Part of it has to do with moving my projects from Delphi 7 to Delphi 2007) It would appear as though the problem is associated with a TActionList (or in particular the TEditPaste action). My application has a Paste menu item (with the shortcut key set to CTRL+V). This menu item is linked to the EditPaste1 component (part of the TActionList). I’ve looked at the TEditPaste.UpdateTarget script in StdActns and it checks to see if the active component’s readonly property is set to True. However – the readonly property it is looking at isn’t the component itself, but a TCustomEdit type of the component, thus if I call: DBEdit1.Readonly – it returns False, TCustomEdit(DBEdit1).Readonly – it returns True. The TCustomEdit type of the component returns False for readonly once the dataset has been set to Edit (or insert) mode, but remains false while the underlying dataset is in dsBrowse mode. Shift+Ins works because it’s not bound to this TAction control. Is this a bug, should I just forget working with the TAction control, should I write a custom TAction script, or what do you guys think? If I compile the same application in Delphi 7 everything works normal (or as I would like it to work), but it will not allow pasting in Delphi 2007. I have placed a sample project of this problem in the Binaries newsgroup. Cheers Adam. |
Mon, Jan 11 2010 5:13 AM | Permanent Link |
"J.B. Ferguson" | Adam,
Have you checked the AutoEdit property of your TDataSource? You mention it below but don't indicate whether you did check it and what it's status was. If it is set to False, you can experience the behavior you are seeing. -- Jan Ferguson Adam H. wrote: > In one of my applications I can not paste into a TDBEdit field (or > TcxDBTextEdit, etc) if the table is not in Edit mode first. (The > table will not automatically go into Edit mode). > I thought maybe I've set a datasource properties AutoEdit mode to > false, but then SHIFT+INS shouldn't work (as directly typing into the > control shouldn't work either). |
Mon, Jan 11 2010 4:10 PM | Permanent Link |
"Adam H." | Hi Jan,
> Have you checked the AutoEdit property of your TDataSource? Yes - the AutoEdit property is set to true. Apparently this problem only exists with Delphi 2007. (Delphi 2009 behaves correctly, as does Delphi 7). Getting weirder all the time... Cheers Adam. |
Mon, Jan 11 2010 9:29 PM | Permanent Link |
"J.B. Ferguson" | That is wierd because I primarily use D2007 and have never had this
issue occur. -- Adam H. wrote: > Hi Jan, > > > Have you checked the AutoEdit property of your TDataSource? > > Yes - the AutoEdit property is set to true. > > Apparently this problem only exists with Delphi 2007. (Delphi 2009 > behaves correctly, as does Delphi 7). > > Getting weirder all the time... > > Cheers > > Adam. |
Tue, Jan 12 2010 6:09 AM | Permanent Link |
"Adam H." | Hi Jan,
> That is wierd because I primarily use D2007 and have never had this > issue occur. Just wondering what happens if you run the project I placed in the binaries forum in D2007? Cheers Adam. |
Wed, Jan 13 2010 7:23 AM | Permanent Link |
"J.B. Ferguson" | Adam:
I'll take a look at it later today. I've been extremely busy this week. -- Jan Adam H. wrote: > Hi Jan, > > > That is wierd because I primarily use D2007 and have never had this > > issue occur. > > Just wondering what happens if you run the project I placed in the > binaries forum in D2007? > > Cheers > > Adam. |
Sun, Jan 17 2010 8:27 AM | Permanent Link |
"J.B. Ferguson" | Hi Adam:
Sorry for the delay. This week has been unbelievable. I ran your project under D2007 and got the same results you described. I've never seen that happen before. Must be a CodeGear bug in D2007 or else they had something else in mind and never let their customers know. -- Jan J.B. Ferguson wrote: > Adam: > > I'll take a look at it later today. I've been extremely busy this > week. |
Sun, Jan 17 2010 5:47 PM | Permanent Link |
"Adam H." | Hi JB,
> Sorry for the delay. This week has been unbelievable. No problems at all. I know what that can be like. > I ran your project under D2007 and got the same results you described. > I've never seen that happen before. Must be a CodeGear bug in D2007 or > else they had something else in mind and never let their customers know. Thanks for taking the time out to do that. And I'm glad to know it's not just me going crazy. Have a great day! Adam. |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |