Difference between revisions of "Talk:Development/Tutorials/Using KActions"

Jump to: navigation, search
 
 
(15 intermediate revisions by 8 users not shown)
Line 3: Line 3:
  
 
I fixed it by using this instead:
 
I fixed it by using this instead:
 +
 +
----
 +
  
 
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
 
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
Line 17: Line 20:
 
   </MenuBar>
 
   </MenuBar>
 
</kpartgui>
 
</kpartgui>
 +
 +
 +
---
  
 
I'm not shure why.
 
I'm not shure why.
Line 23: Line 29:
 
--
 
--
 
Jonarne
 
Jonarne
 +
 +
----
 +
 +
Let's wait, to my experience this is repaired quickly --[[User:Tstaerk|Tstaerk]] 21:12, 18 March 2007 (CET)
 +
 +
 +
----
 +
 +
after creating the files i get this error message after starting the tutorial 3 application (through dbus-launch ./tutorial3):
 +
 +
tutorial3: WARNING: KXMLGUIClient::setXMLFile: cannot find .rc file tutorial3ui.rc
 +
 +
but this file exists in the current directory... any hint? thx --[[User:Stefon|Stefon]] 21:41, 16 April 2007 (CEST)
 +
 +
:It tells you in the CMake section that you must install the application in order to get it to work. --[[User:Milliams|milliams]] 22:38, 16 April 2007 (CEST)
 +
 +
 +
----
 +
sorry. you are right. maybe we can stress this difference out a little more?
 +
 +
--[[User:Stefon|Stefon]] 00:31, 18 April 2007 (CEST)
 +
 +
== Broken tutorial (kdelibs have changed) ==
 +
 +
KAction has no constructor which takes a KActionCollection and a QString as stated in the tutorial. Also, moments later in the "final" code section, this constructor is not used.
 +
 +
A QAction is also being used! :@
 +
 +
--[[User:Gavinbeatty|Gavinbeatty]] 22:50, 19 June 2007 (CEST)
 +
 +
Well it seems that KActionCollection extends QAction, so I doubt it's even possible or sane to use a KAction here. Not to mention that if you use QAction you depend a little less on the kdelibs. The problem is that knowing that, you learn basically nothing about KAction in this Tutorial.
 +
 +
--fabiank2
 +
 +
:Where possible, K* classes should be used in place of Q* classes. I've fixed the tutorial to correctly use KAction. --[[User:Milliams|milliams]] 17:26, 28 June 2007 (CEST)
 +
 +
 +
The link on KStandardAction is dead, it should lead to http://api.kde.org/4.0-api/kdelibs-apidocs/kdeui/html/namespaceKStandardAction.html but leads to classmapper, which doesn't find it. 12/27/07
 +
 +
--shaga
 +
:It's really a problem with classmapper that it doesn't search for namespace matches. Nonetheless, I've changed it now to hard-link to the url. Thanks for pointing this out. --[[User:Milliams|milliams]] 23:07, 27 December 2007 (CET)
 +
 +
== Success story ==
 +
 +
Without this tutorial, [http://websvn.kde.org/?view=rev&revision=918834 this revision] would not have been possible. Thanks! --[[User:Tstaerk|Tstaerk]] 09:03, 31 January 2009 (UTC)
 +
 +
And [http://websvn.kde.org/?view=rev&revision=980167 this]. --[[User:Tstaerk|Tstaerk]] 11:08, 11 June 2009 (UTC)
 +
 +
== ui.rc file location ==
 +
 +
The page currently says this: "So in our example, the file is called tutorial3ui.rc, and is located in the build directory."
 +
 +
Shouldn't the ui.rc files go in the source directory?
 +
 +
-- [[Special:Contributions/76.181.87.26|76.181.87.26]] 00:21, 24 November 2009 (UTC)

Latest revision as of 01:21, 24 November 2009

2007/3/18: The .ui file isn't working with trunk from svn

I fixed it by using this instead:



<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> <kpartgui version="2" name="tutorial3"> <ToolBar name="mainToolBar" >

   <text>Main Toolbar</text>
   <Action name="clear" />
 </ToolBar>
 <MenuBar>
   <Menu name="file" >
     <text>&File</text>
     <Action name="clear" />
   </Menu>
 </MenuBar>

</kpartgui>


---

I'm not shure why. Should this be added to the tutorial?

-- Jonarne


Let's wait, to my experience this is repaired quickly --Tstaerk 21:12, 18 March 2007 (CET)



after creating the files i get this error message after starting the tutorial 3 application (through dbus-launch ./tutorial3):

tutorial3: WARNING: KXMLGUIClient::setXMLFile: cannot find .rc file tutorial3ui.rc

but this file exists in the current directory... any hint? thx --Stefon 21:41, 16 April 2007 (CEST)

It tells you in the CMake section that you must install the application in order to get it to work. --milliams 22:38, 16 April 2007 (CEST)



sorry. you are right. maybe we can stress this difference out a little more?

--Stefon 00:31, 18 April 2007 (CEST)

[edit] Broken tutorial (kdelibs have changed)

KAction has no constructor which takes a KActionCollection and a QString as stated in the tutorial. Also, moments later in the "final" code section, this constructor is not used.

A QAction is also being used! :@

--Gavinbeatty 22:50, 19 June 2007 (CEST)

Well it seems that KActionCollection extends QAction, so I doubt it's even possible or sane to use a KAction here. Not to mention that if you use QAction you depend a little less on the kdelibs. The problem is that knowing that, you learn basically nothing about KAction in this Tutorial.

--fabiank2

Where possible, K* classes should be used in place of Q* classes. I've fixed the tutorial to correctly use KAction. --milliams 17:26, 28 June 2007 (CEST)


The link on KStandardAction is dead, it should lead to http://api.kde.org/4.0-api/kdelibs-apidocs/kdeui/html/namespaceKStandardAction.html but leads to classmapper, which doesn't find it. 12/27/07

--shaga

It's really a problem with classmapper that it doesn't search for namespace matches. Nonetheless, I've changed it now to hard-link to the url. Thanks for pointing this out. --milliams 23:07, 27 December 2007 (CET)

[edit] Success story

Without this tutorial, this revision would not have been possible. Thanks! --Tstaerk 09:03, 31 January 2009 (UTC)

And this. --Tstaerk 11:08, 11 June 2009 (UTC)

[edit] ui.rc file location

The page currently says this: "So in our example, the file is called tutorial3ui.rc, and is located in the build directory."

Shouldn't the ui.rc files go in the source directory?

-- 76.181.87.26 00:21, 24 November 2009 (UTC)


This page was last modified on 24 November 2009, at 01:21. This page has been accessed 3,867 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal