Re: [Cocoadialog-users] Problem with line breaks
Status: Beta
Brought to you by:
sporkstorms
From: Mark A. S. <ma...@sp...> - 2009-01-18 14:17:06
|
explode() takes an optional third argument, a limit. list($button, $message) = explode("\n", $rv, 2); should probably do the trick (untested though). It tells php to lump all the remaining stuff into the last element of the returned array. The 2nd element, in this case. - mark Andy H wrote: > Hello all. I'm using Cocoadialog with Platypus on my mac. So, I was > just testing a script I made today that sends email with the php > mail() function. Everything works except for I have a problem with the > textbox- when I send a multi-line email, it breaks off after the first > line. > > My code: > $return_values = `$argv[1]/Contents/Resources/CocoaDialog.app/Contents/ > MacOS/CocoaDialog textbox --title "Message Content" --informative-text > "Enter the message content here" --button1 "OK" --editable --focus- > textbox --float --string-output`; > list($button3, $message) = explode("\n", $return_values); > > I know what's wrong. list($button3, $message) = explode("\n", > $return_values); is just listing the first two lines outputted by > cocoadialog: the button pressed and the first line of the message. I'm > not too savvy with PHP, so I turned to the mailing list. Is there any > way I can fix this bug? > > Thanks, > > Andy > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Cocoadialog-users mailing list > Coc...@li... > https://lists.sourceforge.net/lists/listinfo/cocoadialog-users > |