Page 1 of 1

getting beep to work

Posted: Sat Jan 28, 2012 3:58 am
by marksmithhfx
Hi, does anyone know how to get beep to work on an iPad? (I think I have to put something into beepSound first but not sure what to put to get the regular beep).

Thanks

-- Mark

Re: getting beep to work

Posted: Sat Jan 28, 2012 10:51 am
by Mark
Hi,

Beepsound is only for Windows and I've never used it. If there is an interest, I can compile an external to beep and vibrate.

Kind regards,

Mark

Re: getting beep to work

Posted: Sat Jan 28, 2012 12:00 pm
by Dixie
Hi...
Copy the sound that you wish to use as a beep sound to your app through the 'copy files' pane... then say, in the preOpenStack handler...

Code: Select all

  set the beepSound to specialFolderPath("engine") & "/sound/shortbeep.aiff"
Then whenver you issue the 'beep' command, your sound will play.

be well

Dixie

Re: getting beep to work

Posted: Sat Jan 28, 2012 12:08 pm
by Mark
Hi Dixie,

Where did you find this? Have you actually tried it? According to the LiveCode dictionary, the beepSound "sets the method used to produce sound when the beep command is used" and can only be either "system" or "internal".

Edit: I found it in the LC 5.0.2 help files. I really believe this needs to be documented better. All it says is: "Note: The iPhone does not have a default system alert sound so if a sounds is required one must be specified by using the beepSound property."

Kind regards,

Mark

Re: getting beep to work

Posted: Sat Jan 28, 2012 10:53 pm
by Jellicle
Mark, with respect, where else other than the iOS release notes do you think iOS-specific documentation should be published?

Gerry

Re: getting beep to work

Posted: Sun Jan 29, 2012 2:17 am
by Mark
Hi Gerry,

The beepSound property is defined in the built-in LiveCode dictionary. In LC 5.0.2 and maybe one or two earlier versions this entry in the dictionary includes one sentence about iOS.

Kind regards,

Mark

Re: getting beep to work

Posted: Sun Jan 29, 2012 10:33 pm
by Jellicle
Mark, the release notes spell out in detail how the beep sound works on iOS. Don't you consult the release notes?

Gerry

Re: getting beep to work

Posted: Sun Jan 29, 2012 11:03 pm
by Mark
Hi Gerry,

Surely, I read the release notes, but I think the dictionary needs to be complete. That once sentence really is too limited. If RunRev modifies the dictionary, they should do it the right way. The dictionary still is that place where to look first. The title of the Release Notes implies that you read them to be informed about the latest changes in that particular release. Otherwise, the title would have been LiveCode Syntax Manual Supplement.

Best,

Mark

Re: getting beep to work

Posted: Sun Jan 29, 2012 11:24 pm
by marksmithhfx
Dixie wrote:Hi...
Copy the sound that you wish to use as a beep sound to your app through the 'copy files' pane... then say, in the preOpenStack handler...

Code: Select all

  set the beepSound to specialFolderPath("engine") & "/sound/shortbeep.aiff"
Then whenver you issue the 'beep' command, your sound will play.
Thanks Dixie, I figured it was going to be something like that. I appreciate the coding example as I would certainly have struggled with it.

Relatedly, does anyone have an .aiff file that implements a beep sound? (that is not something I have tucked away for a rainy day, nor would know how to make).

Thanks

-- Mark

Re: getting beep to work

Posted: Mon Jan 30, 2012 2:52 am
by Dixie
Hi Mark...

I too am no musician...:-) I made this a while ago, it works for me on the iphone...

be well

Dixie

Re: getting beep to work

Posted: Mon Jan 30, 2012 4:14 am
by Jellicle
Mark wrote:Hi Gerry,
I think the dictionary needs to be complete.
Sure, I agree. There are lots of platform-specific things in there that aren't in the dictionary. RR are slow at updating it, for whatever reason, or they think release notes are a better way to provide platform-specific information. If that's the case they should, as you suggest, call them something else.

g

Re: getting beep to work

Posted: Mon Jan 30, 2012 9:53 am
by marksmithhfx
Dixie wrote:Hi Mark...

I too am no musician...:-) I made this a while ago, it works for me on the iphone...

be well

Dixie
Thanks Dixie will give it a go!!

Re: getting beep to work -- not really

Posted: Tue Jan 31, 2012 3:46 am
by marksmithhfx
Switching gears completely for a moment. I have the following code which is attempting to store some fields in a database. Works fine, unless one of the fields has an apostrophe in it and then it causes the write to fail. I know there is a concept of "escaping" characters, but I am not sure how it would work in this case.

Code: Select all

  put "INSERT INTO master (delivery_date,mothers_name,mothers_phin,mothers_mhsc,mothers_dob,care_provider,note)" & \
           merge("VALUES ('[[globaldate]]', '[[tmaternalname]]', '[[tmaternalphin]]', '[[tmaternalmhsc]]', " & \
           "'[[tmaternaldob]]', [[tcareprovider]]', '[[tnote]]')") into tCmd
   revExecuteSQL gConnectID, tCmd
Any suggestions?

Thanks
-- Mark

Re: getting beep to work

Posted: Tue Jan 31, 2012 4:27 am
by marksmithhfx
Hi Dixie, just a quick note to say I copied and pasted your example code without really thinking about it and was a little surprised when my app stopped working :(

I should have looked more closely, there was no folder /sound in my "engine" directory, so removing that part of the example got things going again. Sure works nice :D

Thanks again,
-- Mark