|
2011-02-22
, 14:20
|
Posts: 5 |
Thanked: 1 time |
Joined on Feb 2011
@ USA
|
#1122
|
run-standalone.sh dbus-send --system --type=signal /com/example/app/Signal com.example.app.Signal.Test string:'Oh' string:'No!!!' string:'More QBWs!!!' string:"single quotes don't work here" boolean:true uint32:10000
[queen-beecon-header] version=1.000000 checksum=2855790 [queen-beecon-exported-instance] widgetType=0 widgetVisible=1 operationalStatus=0 hideCanvas=false hideClickCanvas=true snippetBgRGB=0 snippetExtBgRGB=#83477ee7845f beecon_lt0_ImgZoom=0 beecon_lt0_BgRGB=2 beecon_lt0_ExtBgRGB=#808080808080 beecon_lt0_ImgFilename= beecon_eq0_ImgZoom=0 beecon_eq0_BgRGB=3 beecon_eq0_ExtBgRGB=#0000ffff0000 beecon_eq0_ImgFilename= beecon_eq1_ImgZoom=0 beecon_eq1_BgRGB=4 beecon_eq1_ExtBgRGB=#ffff00000000 beecon_eq1_ImgFilename= beecon_ge2_ImgZoom=0 beecon_ge2_BgRGB=5 beecon_ge2_ExtBgRGB=#ffffffff0000 beecon_ge2_ImgFilename= beecon_idxge2_ImgZoom=0 beecon_idxge2_BgRGB=11 beecon_idxge2_ExtBgRGB=#ffff8c080000 beecon_idxge2_ImgFilename= widWidth=500.67741935483866 widHeight=320.57142857142856 instanceTitle=single quote fail instanceCmd=echo "$QBW_ID $QBW_EXEC_REASON"; echo '$QBW_DBUS_VERBOSE_OUTPUT'; exit 2 rememberMe= cmdImgFilename= cmdImgAngle=0 cmdImgZoom=0 cmdFgRGB=1 cmdExtFgRGB=#ffffffffffff cmdTextAngle=0 cmdVisibilityPosition=0 cmdImgVisibilityPosition=5 cmdJustify=0 cmdExtFont=Nokia Sans bold italic 12 cmdFontName=3 cmdFontSize=12 resImgFilename=queen-beecon-resimg.png resImgAngle=0 resImgZoom=0 resFgRGB=1 resExtFgRGB=#000000000000 resTextAngle=0 resVisibilityPosition=1 resImgVisibilityPosition=5 resJustify=0 resExtFont=Nokia Sans Cn 17 resFontName=16 resFontSize=10 resWrapLongLines=true progressAnimationFrames=4 progressAnimationTimer=4 progressAnimationPos=4 progressAnimationAtClickXY=false progressAnimationBasename=queen-beecon-progress updOnStartup=false updOnClick=true multiClick=false updOnDesktop=false updOnSight=false updOnOrientation=false delayIndex=0 customIntervalSecs=0 updNeworkPolicy=0 GPSsettings=0 updOnDBUS=1 updOnDBUSBus=0 updOnDBUSMatchRule=type='signal',interface='com.example.app.Signal'
The Following User Says Thank You to Midnite_Rider For This Useful Post: | ||
|
2011-02-22
, 19:23
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#1123
|
|
2011-02-22
, 19:48
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#1124
|
Hi, No!No!No!Yes!
I love your app, I have been busy replacing my regular widgets with beecons for the past week or so,
and I am currently working on a "like button" for my mp3 player",
I dump a bunch of new songs onto a folder, and if I hear a song i like, I just press the LIKEbutton,
and it saves the song file to another folder.
it seems to be working well, but I think I found a bug in queenbeecon,
I am using QBW V1.3.3, and my N900 firmware is up to date.
the LIKEbutton uses the DBUS to get the currently playing song from the media player (I am using Mediabox player),
but if the song titles have single quotes in them (" ' "), $QBW_DBUS_VERBOSE_OUTPUT returns NOTHING,
in fact, the entire script seems to crash, returning an exit code 2.
I set up a demo beecon that was taken from your own Wiki page,
with a slight modification to include a " ' " in a DBUS output string.
if you changeCode:run-standalone.sh dbus-send --system --type=signal /com/example/app/Signal com.example.app.Signal.Test string:'Oh' string:'No!!!' string:'More QBWs!!!' string:"single quotes don't work here" boolean:true uint32:10000
"single quotes don't work here"
to
"single quotes dont work here"
the script works fine.
here is the beecon that demonstrates the bug (original script code from Wiki):
Code:[queen-beecon-header] version=1.000000 checksum=2855790 [queen-beecon-exported-instance] widgetType=0 widgetVisible=1 operationalStatus=0 hideCanvas=false hideClickCanvas=true snippetBgRGB=0 snippetExtBgRGB=#83477ee7845f beecon_lt0_ImgZoom=0 beecon_lt0_BgRGB=2 beecon_lt0_ExtBgRGB=#808080808080 beecon_lt0_ImgFilename= beecon_eq0_ImgZoom=0 beecon_eq0_BgRGB=3 beecon_eq0_ExtBgRGB=#0000ffff0000 beecon_eq0_ImgFilename= beecon_eq1_ImgZoom=0 beecon_eq1_BgRGB=4 beecon_eq1_ExtBgRGB=#ffff00000000 beecon_eq1_ImgFilename= beecon_ge2_ImgZoom=0 beecon_ge2_BgRGB=5 beecon_ge2_ExtBgRGB=#ffffffff0000 beecon_ge2_ImgFilename= beecon_idxge2_ImgZoom=0 beecon_idxge2_BgRGB=11 beecon_idxge2_ExtBgRGB=#ffff8c080000 beecon_idxge2_ImgFilename= widWidth=500.67741935483866 widHeight=320.57142857142856 instanceTitle=single quote fail instanceCmd=echo "$QBW_ID $QBW_EXEC_REASON"; echo '$QBW_DBUS_VERBOSE_OUTPUT'; exit 2 rememberMe= cmdImgFilename= cmdImgAngle=0 cmdImgZoom=0 cmdFgRGB=1 cmdExtFgRGB=#ffffffffffff cmdTextAngle=0 cmdVisibilityPosition=0 cmdImgVisibilityPosition=5 cmdJustify=0 cmdExtFont=Nokia Sans bold italic 12 cmdFontName=3 cmdFontSize=12 resImgFilename=queen-beecon-resimg.png resImgAngle=0 resImgZoom=0 resFgRGB=1 resExtFgRGB=#000000000000 resTextAngle=0 resVisibilityPosition=1 resImgVisibilityPosition=5 resJustify=0 resExtFont=Nokia Sans Cn 17 resFontName=16 resFontSize=10 resWrapLongLines=true progressAnimationFrames=4 progressAnimationTimer=4 progressAnimationPos=4 progressAnimationAtClickXY=false progressAnimationBasename=queen-beecon-progress updOnStartup=false updOnClick=true multiClick=false updOnDesktop=false updOnSight=false updOnOrientation=false delayIndex=0 customIntervalSecs=0 updNeworkPolicy=0 GPSsettings=0 updOnDBUS=1 updOnDBUSBus=0 updOnDBUSMatchRule=type='signal',interface='com.example.app.Signal'
Thanks for reading
echo '$QBW_DBUS_VERBOSE_OUTPUT'
echo '.....single quotes don't work here...'
echo "$QBW_DBUS_VERBOSE_OUTPUT"
echo <<LikeThisSong $QBW_DBUS_VERBOSE_OUTPUT LikeThisSong
|
2011-02-22
, 21:00
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1125
|
|
2011-02-22
, 21:55
|
Posts: 5 |
Thanked: 1 time |
Joined on Feb 2011
@ USA
|
#1126
|
Thanks for thorough reporting
Actually, I think the problem here is the:
How about trying with:Code:echo '$QBW_DBUS_VERBOSE_OUTPUT'
Code:echo "$QBW_DBUS_VERBOSE_OUTPUT"
QT="'"; echo $QT$QBW_DBUS_VERBOSE_OUTPUT$QT
One more thing to try (shell Here Documents):
Code:echo <<LikeThisSong $QBW_DBUS_VERBOSE_OUTPUT LikeThisSong
QBW_DBUS_VERBOSE_OUTPUT="single quotes don't work here"
|
2011-02-22
, 22:39
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#1127
|
|
2011-02-23
, 14:08
|
Posts: 5 |
Thanked: 1 time |
Joined on Feb 2011
@ USA
|
#1128
|
variable=$(cat <<SETVAR This variable runs over multiple lines. SETVAR) echo "$variable"
|
2011-02-23
, 15:37
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#1129
|
well, I was wrong,
it does seem to work, but it's not very useful, unfortunately.
it only displays the entire dbus output, you can't pass it to another variable for further processing, and a here-doc that was posted on the page you linked to is SUPPOSED to pass the output to a variable doesn't seem to work
So, I guess that you aren't going to fix the bug in your app ?Code:variable=$(cat <<SETVAR This variable runs over multiple lines. SETVAR) echo "$variable"
or even look to see if it can be fixed ?
I would think it can be fixed, since the dbus output shows up in the QBW logs & is formatted correctly .
Thanks for pointing me to the here-docs though, at least I learned something new for all my effort .
|
2011-02-23
, 18:52
|
Posts: 5 |
Thanked: 1 time |
Joined on Feb 2011
@ USA
|
#1130
|
how to do this