[Glade-users] FW: how to use displayable values?






From: chrisinnanaimo at hotmail.com
To: tristan.van.berkom at gmail.com
Subject: RE: [Glade-users] how to use displayable values?
Date: Sat, 16 Oct 2010 13:35:50 +0000










Date: Sat, 16 Oct 2010 16:51:52 +0900
Subject: Re: [Glade-users] how to use displayable values?
From: tristan.van.berkom at gmail.com
To: chrisinnanaimo at hotmail.com
CC: glade-users at lists.ximian.com

On Sat, Oct 16, 2010 at 12:02 PM, Chris Morley
<chrisinnanaimo at hotmail.com> wrote:
I'm having no luck using displayable values, this is a sample of my catalog:

<property optional-default="True" optional="True" id="off-color"
name="Standard Off-Color" ignore="True"
        save-always="True" default="LED_DARK" >
    <displayable-values>
      <value id="LED_RED" name="Red"/>
      <value id="LED_BLUE" name="Blue"/>
      <value id="LED_DARK" name="dark"/>
    </displayable-values>
  <tooltip>use: red blue green yellow white black dark only</tooltip>
</property>

This doesn't work, the property is not displayed at all and no error
message.
I am using python for the widget and glade 3.6.7

So the widget is in python and the python widget registers this
property as well as it's enum type ? (do python objects install properties
on their widgets ?)

Sorry i sent this to Tristan mail instead of glade users

Thanks for your response
The widget is python.
I can not find any current information on how to have
glade communicate to my widget beyond the initial display.
Unfortunately the docs are too sparse to do much.
This is how I have worked around the problem:
note this is not in docs either:

 <property optional-default="False" optional="True" id="on-color" name="Standard On-Color" ignore="True"
        save-always="True" default="red">
            <parameter-spec>
                <type>GParamString</type>
            </parameter-spec>
            <tooltip>use: red blue green white yellow black only</tooltip>
        </property>

Now the user must type the color. If the type wrong the program that uses the glade file
Is there a current sample of custom adapter code for python?
Thanks Chris Morley
will error.
                                          
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20101018/b24c052f/attachment.html 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]