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 18 Dec 2014, 04:50
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 Posts_count  
Author Message
arivas_2005

Joined: 25 Feb 2007
Posts: 100

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

Edited_time_total
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3435
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: 100

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: 3435
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: 3435
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: 100

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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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