Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Oct 2014, 15:20
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
[SOLVED] error in combobox select
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
arivas_2005

Joined: 25 Feb 2007
Posts: 93

PostPosted: Wed 06 Nov 2013, 19:59    Post subject:  [SOLVED] error in combobox select  

regards

in /usr/share/doc/gtkdialog/examples/combobox I found the following example
(puppy slacko 5.4..)

Code:
#!/bin/sh

GTKDIALOG=gtkdialog

MAIN_DIALOG='
<window>
   <vbox>
      <hbox>
         <text>
            <label>Combobox</label>
         </text>
         <combobox width-request="295">
            <variable>COMBOBOX</variable>
            <item>First item</item>
            <item>Second item</item>
            <item>Third item</item>
         </combobox>
      </hbox>
      <hbox>
         <button ok></button>
         <button cancel></button>
      </hbox>
   </vbox>
</window>
'
export MAIN_DIALOG

 I=$IFS; IFS=""
   for STATEMENTS in  $(gtkdialog --program MAIN_DIALOG); do
      eval $STATEMENTS
    done
 IFS=$I

   Xdialog --title "View selection" --msgbox $COMBOBOX " select" 10 60 & MSGID23=$!
   sleep 5
   kill $MSGID23 2>/dev/null 


Problem:
in xdialog only shows the first word of the items: "First", "Second" or "Third"; ignores the second words: "item" in the three lines.

but to remove the space in the "First item" (Example: item>Firstitem</item>), then shows the full term xdialog

How to select the whole phrase including spaces

excuse for my English. and thanks

Last edited by arivas_2005 on Wed 06 Nov 2013, 22:31; edited 1 time in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3341
Location: Ontario

PostPosted: Wed 06 Nov 2013, 20:05    Post subject:  

Have you tried quotes i.e.

Code:
<item>"First item"</item>


_________________________________
Back to top
View user's profile Send private message 
arivas_2005

Joined: 25 Feb 2007
Posts: 93

PostPosted: Wed 06 Nov 2013, 20:33    Post subject:  

The error continues, only appears the first word. For the third case only Third (no Third item).

I hope there is another way
thanks
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3341
Location: Ontario

PostPosted: Wed 06 Nov 2013, 20:52    Post subject:  

next step : try two quotes . strong and weak

Code:
<item>"'First item'"</item>


then try substitution

Code:
<item>"'$VAR'"</item>
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3341
Location: Ontario

PostPosted: Wed 06 Nov 2013, 21:00    Post subject:  

Baconrecorder 4.4
has a combo box that works.

_________________________________________
Back to top
View user's profile Send private message 
arivas_2005

Joined: 25 Feb 2007
Posts: 93

PostPosted: Wed 06 Nov 2013, 22:31    Post subject:  

thanks don570

Xdialog is error. always gives a word (first word)

I tested the console and observed see the complete sentence.

I used reference baconrecorder.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0581s ][ Queries: 11 (0.0075s) ][ GZIP on ]