listModle.modify [英] listModle.modify

查看:89
本文介绍了listModle.modify的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为我的GUI添加按钮来操作列表数据。

我今天早上添加了一个删除按钮,以防我决定不再需要特定元素。

我现在正在修改一个修改按钮,以防我想要保留元素,但只修改一两个字段。

删除后这看起来很容易,但现在我遇到了问题。

是否有一个listModel命令,我不熟悉这对我有帮助吗?

现在我修改设置就像删除一样,只是为了放架构到位而不会产生错误。

关于我应该改变什么以使其正常工作的任何提示?这是整个班级。

I have been adding buttons to my GUI to manipulate list data.
I added a Delete button this morning in case I decide I no longer needed a particular element.
I am now working on a modify button, in case I want to keep the element, but only modify a field or two.
This seemed easy after my Delete, but now I am having issues with it.
Is there a listModel command out there that I am unfamiliar with that will help me with this?
Right now I have modify set up exactly like delete, just to put architecture in place without creating an error.
Any tips on what I should change to make it work correctly? Here is entire class.

展开 | 选择 | Wrap | 行号

推荐答案

你确实跟踪''currCD''所有时间,那你为什么不删除

当前''currCD''并插入一个新的?


亲切的问候,


Jos
You do keep track of a ''currCD'' all the time, so why don''t you just delete the
current ''currCD'' and insert a new one?

kind regards,

Jos


我还没有测试你的代码,看看你在说什么,但你应该根据你的添加而不是你的模型来修改你的修改删除。与add的不同之处在于,通过修改,您可以首先显示产品,当保存完成时,您不会创建新产品,只需覆盖现有产品。
I have not tested your code to see what you''re talking about, but you should model your modify around your add rather than your delete. The difference with add should be that with modify you have a product to display first and when a save is done, you don''t create a new product but simply override an existing one.



你一直跟踪''currCD'',所以你为什么不删除

当前''currCD' '并插入一个新的?


亲切的问候,


Jos
You do keep track of a ''currCD'' all the time, so why don''t you just delete the
current ''currCD'' and insert a new one?

kind regards,

Jos



我没有查看代码,但我认为他们在编辑后想要保留的每个产品都有一个唯一的密钥。

I haven''t looked at the code but I would think they have a unique key for each product that they want to mantain after an edit.


这篇关于listModle.modify的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆