How do I set up an'About' menu in stand alone?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How do I set up an'About' menu in stand alone?

Post by FourthWorld » Mon Jun 03, 2013 1:31 pm

If I replace the "send" commands with "answer" commands it all works, so it would appear the problem isn't in the menu but perhaps in either the stack receiving the message or not being able to find that stack.

You may want to add a check for "the result" after the line that's failing to see if there's an error message there, e.g.:

Code: Select all

case "About"
send "ShowStack" to stack "About Quotes"
put the result
break
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

OzSanta
Posts: 34
Joined: Tue Apr 16, 2013 5:48 pm

Re: How do I set up an'About' menu in stand alone?

Post by OzSanta » Tue Jun 04, 2013 12:46 am

G'day Richard.

First of all, thanks for taking the time to try my problem out.

Second, I put in a 'the result' statement, with no result. The 'About...' menu does not respond in any way on my iMac. I still think it's boiling down to my graphics card, which appears to cause Finder hassles.

I'm also having problems with this site, in that when clicking on any of the insertion buttons ex 'B', I get no response. Graphics Card again ????

Regards

Santa

OzSanta
Posts: 34
Joined: Tue Apr 16, 2013 5:48 pm

Re: How do I set up an'About' menu in stand alone?

Post by OzSanta » Tue Jun 04, 2013 9:29 am

G'day all

I believe I've partly solved the problem, Someone, in their infinite wisdom, has replaced the normal Ellipsis with three full stops in LiveCodes 'About…' menu .

I tried Klaus's suggestion of putting in an 'answer pItemName' and it trapped 'About...', however on using this...

on menuPick pItemName
if pItemName = "About…" then # ellipsis, fails
send "ShowStack" to stack "About Quotes"
exit menupick
end if
if pItemName = "About..." then # 3 full stops, works
send "ShowStack" to stack "About Quotes"
exit menupick
end if
switch pItemName
case "Quotes Guide"
send "ShowStack" to stack "Guide"
break
case "About Quotes"
send "ShowStack" to stack "About Quotes"
break
case "About"
send "ShowStack" to stack "About Quotes"
answer the result
break
end switch
end menuPick

I wouldn't mind betting that one programmer is looking for an 'About…' with ellipsis to replace the 'About…' menu item with the last help menu item, and someone else has used 'About...' (3 full stops') in the Menu.

Damn carelessness!

Regards

Santa

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How do I set up an'About' menu in stand alone?

Post by FourthWorld » Tue Jun 04, 2013 6:23 pm

If you used a switch block you could have both the ellipsis and full-stop versions fall through to the same code.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How do I set up an'About' menu in stand alone?

Post by Klaus » Tue Jun 04, 2013 6:38 pm

Hi Santa,
ozsanta@gmail.com wrote:Second, I put in a 'the result' statement, with no result. The 'About...' menu does not respond in any way on my iMac. I still think it's boiling down to my graphics card, which appears to cause Finder hassles.
hm, don't you think it MIGHT be possible that your "ShowStack" handler is causing trouble?

Your menupick handler DOES WORK in general, otherwise you would not have seen the "answer"
dialogs with the name of the picked menu item!
ozsanta@gmail.com wrote:I'm also having problems with this site, in that when clicking on any of the insertion buttons ex 'B', I get no response. Graphics Card again ????
Yes, obviously! :-D
No, just kidding, fixing the broken FORMATTING buttons here in the forum is on the TODO list of RunRev!

Here a short version of your last script like Richard recommended:

Code: Select all

on menuPick pItemName
  switch pItemName
    case "About…"
    case "About..."
    case "About Quotes"
    case "About"
      send "ShowStack" to stack "About Quotes"
      break
    case "Quotes Guide"
      send "ShowStack" to stack "Guide"
      break
  end switch
end menuPick
Best

Klaus

OzSanta
Posts: 34
Joined: Tue Apr 16, 2013 5:48 pm

Re: How do I set up an'About' menu in stand alone?

Post by OzSanta » Tue Jun 04, 2013 11:55 pm

G'day all

Thanks for the short version of the menupick handler Klaus, I hadn't realized that multiple cases could be used before each break.

No, I DON'T think my menuStack handler is a problem, it works flawlessly once you use 'About...' with 3 full stops.

Regards

Santa

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How do I set up an'About' menu in stand alone?

Post by Klaus » Wed Jun 05, 2013 9:47 am

Hi Santa,
ozsanta@gmail.com wrote:No, I DON'T think my menuStack handler is a problem, it works flawlessly once you use 'About...' with 3 full stops.
ah, OK, sorry, that was not too clear to me... ;-)


Best

Klaus

Post Reply