Bug 163980 - The constructor of the Picture class: Picture(window,url) returns error
Summary: The constructor of the Picture class: Picture(window,url) returns error
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: scripting (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-13 18:17 UTC by Yiwen Mao
Modified: 2008-06-17 00:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)