[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent
 thread


Re: Benefits over KJSEmbed?
by Ian Monroe on Tuesday 21/Sep/2004, @07:35
Ruby may still need the occasional :: (especiall in RubyQt), but overall its fairly sparse in the punctuaction dept. No semicolons I guess being the biggest difference, as well as using begin and end to define most functions.
  Related Links
 ·   Articles on Developer
 ·   Also by Ian Monroe
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Re: Benefits over KJSEmbed?
by Richard Dale on Tuesday 21/Sep/2004, @08:32
Note than you can use an 'include Qt' or 'include KDE' directive if you prefer to have Widget over Qt::Widget, or Application over KDE::Application in your code. Thats much like the 'using' directive for C++ namespaces:

require 'Korundum'
include Qt
include KDE

about = AboutData.new("p2", "Hello World", "0.1")
CmdLineArgs.init(ARGV, about)
a = Application.new
hello = PushButton.new( a.i18n("Hello World !")
a.mainWidget = hello
hello.show
a.exec
[ Reply To This | View ]
  • Re: Benefits over KJSEmbed?
    by Richard Dale on Tuesday 21/Sep/2004, @08:38
    Oops, syntax error, it should be:

    hello = PushButton.new(a.i18n("Hello World !"))

    And PushButton is ambiguous, does it mean a QPushButton or a KPushButton in this case? So maybe use the include directive with care..
    [ Reply To This | View ]

 
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "KDE is much too well-structured for this world..." -- Rob Buis
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]