Common Graphics - initialization of range?
"Andreas Thiele" <[email protected]> Thu, 22 Jan 2009 15:33:01 +0100
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <002101c97c9e$55f5d120$01e17360$@de> |
Dies ist eine mehrteilige Nachricht im MIME-Format.
------=_NextPart_000_0022_01C97CA6.B7BA3920
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hello,
the following code inherits from multi-picture-button and installs a new
item in the IDE toolbar. When I use this new button to add a
picture-switch-button to a form it still has its range initialized to the
value typical for multi-picture-button.
Why do my :default-initargs (:range nil) not overwrite the default?
(Or where does the multi-picture-button get its range from? How can I change
this behavior?)
<code>
(in-package :cg-user)
(defclass picture-switch-button (multi-picture-button)
()
(:default-initargs
:hidden-buttons '(:new)
:recessed t
:range nil
))
(ide.base:add-to-component-toolbar 'picture-switch-button (find-pixmap
'picture-button) :after :last)
</code>
Any help appreciated.
Thanks
Andreas
------=_NextPart_000_0022_01C97CA6.B7BA3920
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DDE link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><span lang=3DEN-US>Hello,<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>the following code inherits from
multi-picture-button and installs a new item in the IDE toolbar. When I =
use
this new button to add a picture-switch-button to a form it still has =
its range
initialized to the value typical for =
multi-picture-button.<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>Why do my :default-initargs =
(:range nil) not
overwrite the default?<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>(Or where does the =
multi-picture-button get
its range from? How can I change this behavior?)<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US><code><o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>(in-package =
:cg-user)<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>(defclass picture-switch-button
(multi-picture-button)<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US> ()<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>
(:default-initargs =
<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US> =
:hidden-buttons '(:new)<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US> :recessed =
t<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US> :range =
nil<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US> =
))<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US>(ide.base:add-to-component-toolbar
'picture-switch-button (find-pixmap 'picture-button) :after =
:last)<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US></code><o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>Any help =
appreciated.<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>Thanks<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>Andreas<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
</div>
</body>
</html>
------=_NextPart_000_0022_01C97CA6.B7BA3920--