Bug 163980

Summary: The constructor of the Picture class: Picture(window,url) returns error
Product: [Applications] kst Reporter: Yiwen Mao <yiwenv>
Component: scriptingAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Yiwen Mao 2008-06-13 18:17:54 UTC
Version:           1.7.0 (using KDE 4.0.1)
Installed from:    Unspecified
Compiler:          Fedora 6 
OS:                Linux

p=new Picture(window,url) returns error

kst> url="http://extragear.kde.org/apps/kst/images/kstdemo.png"
http://extragear.kde.org/apps/kst/images/kstdemo.png
kst> w=new Window()
Window
kst> p=new Picture(w,url)
Error: SyntaxError: Picture: Unexpected number of arguments.

The picture cannot be created and placed in the specified window
Comment 1 Andrew Walker 2008-06-13 18:33:02 UTC
Modified documentation in bind_picture.h
Comment 2 Yiwen Mao 2008-06-16 21:30:54 UTC
The same error still exists
kst>  url="http://extragear.kde.org/apps/kst/images/kstdemo.png"
http://extragear.kde.org/apps/kst/images/kstdemo.png
kst> w=new Window()
Window
kst> p=new Picture(w,url)
Error: SyntaxError: Picture: Unexpected number of arguments.
Comment 3 Andrew Walker 2008-06-17 00:57:57 UTC
The documentation now states that the constructors are:

Picture ( parent )
Picture ( window )

In order to create a picture you need to do the following:

w=new Window()
p=new Picture(w)
url="http://extragear.kde.org/apps/kst/images/kstdemo.png"
p.load(url)