在MVP模式中长时间操作的地方设置等待光标的位置?(Where to set wait cursor in long operation in MVP pattern?)
对于将在演示者中执行的长操作,在哪里设置等待光标?
- 在视图中? 该观点不应该太了解业务逻辑,它是被动的。
- 主持人? 主持人调用UI代码似乎很奇怪。
- 向View界面添加方法,如SetWait(bool),并在演示者中调用它?
所以你怎么看?
For a long operation that will be executed in presenter, where to set the wait cursor?
- in View? the view shouldn't know too much about business logic, it is passive.
- in presenter? seems odd in presenter to call UI code.
- add method to View interface, like SetWait(bool), and call it in presenter?
So what do you think?
原文:https://stackoverflow.com/questions/2544333
更新时间:2023-07-03 22:07
最满意答案
在调用
fetch_all
之前cursor.execute(query, args=None)
需要调用cursor.execute(query, args=None)
You need to call
cursor.execute(query, args=None)
before callingfetch_all
相关问答
更多-
有什么数据库专业书籍介绍?[2022-05-19]
mysql -
有一个下拉选择框从Mysql数据库填充另一个(Haveing one drop down selection box populate another from Mysql database)[2022-10-25]
我怀疑你可能是如何使用数据参数。 看看从jQuery传递数据到PHP的ajax帖子 。 尝试类似的东西 $.ajax({ type: "POST", url: "get_sub_catagory.php", // Name of the php files data: {'primary_catagory': dropdown.options[dropdown.selectedIndex].value}, success: function(html) { ... -
有没有办法在MYSQL数据库中添加值而不先查询它?(Any way to add to value in MYSQL database without querying it first?)[2023-10-09]
mysql_query("UPDATE `table` SET `col`=`col`+1 WHERE condition=met") 这将增加列值。 mysql_query("UPDATE `table` SET `col`=`col`+1 WHERE condition=met") That will increment the column value. -
查询时Mysql崩溃(Mysql crash when querying)[2022-02-26]
您应该尝试更新Windows。 在我的情况下,MySql 5.7.17,Windows 2008 R2服务器,更新Win到sp1 =>解决了这个问题。 参考: http : //bugs.mysql.com/bug.php?id = 81197 我的错误日志: Thread pointer: 0x5705b3850 Attempting backtrace. You can use the following information to find out where mysqld died. If you ... -
尝试这个: SELECT * FROM blogs WHERE date > DATE_ADD(NOW(), INTERVAL -3 HOUR) 编辑:我的坏 - 用NOW()代替CURDATE() ,因为我们正在处理DateTime 。 Try this: SELECT * FROM blogs WHERE date > DATE_ADD(NOW(), INTERVAL -3 HOUR) Edit: my bad - replaced CURDATE() with NOW() as we're dea ...
-
如何使用php mysql基于下拉选择更新其他字段(how to update another fields based on drop down selection using php mysql)[2023-09-09]
你需要使用ajax发布url id并从ajax获取结果 var data = 'id='+yourid; $.post( 'abc.php', data success(function(resp){ jsonData = $.parseJSON(resp); alert(jsonData); }); abc.php id = $_POST['id']; your query echo json_encode(a ... -
在调用fetch_all之前cursor.execute(query, args=None)需要调用cursor.execute(query, args=None) You need to call cursor.execute(query, args=None) before calling fetch_all
-
WHERE MONTH(current_time) = 4 因为你的时间戳不是unix的。 我想你也想检查YEAR() 对于当前时期,您可以使用应用于curdate()函数的相应函数,因此,无需显式设置当前月份数 WHERE MONTH(current_time) = 4 as your timestamp is not a unix one. also I suppose you want to check YEAR() as well for the current period you can u ...
-
您必须在下拉框中添加onchange事件侦听器。 当用户选择一个选项时,应该将AJAX( XmlHttpRequest )发送到服务器。 服务器端脚本(例如PHP页面)应该解析参数(在检查之后)。 检查这些参数后,应该将它们转义 为此原因 。 执行搜索查询,解析结果,并将输出发送回客户端(用户,浏览器)。 有用的链接: http://www.php.net/manual/en/ref.mysql.php https://developer.mozilla.org/en/xmlhttprequest You ...
-
首先,您需要在function drop_2($drop_var)更改$.get() ,以便它传递其他数据 function drop_2($drop_var) { include_once('db.php'); ...[your other code]... echo ''; echo "