This might be useful for some (New AGAIN)

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: This might be useful for some (New AGAIN)

Post by FourthWorld » Fri Mar 12, 2021 9:08 pm

Nicely done, Michael. Thank you for posting that.

In fact, I think I recall someone here requesting exactly this just a couple weeks ago.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New AGAIN)

Post by micmac » Sat Mar 13, 2021 5:08 pm

FourthWorld wrote:
Fri Mar 12, 2021 9:08 pm
Nicely done, Michael. Thank you for posting that.

In fact, I think I recall someone here requesting exactly this just a couple weeks ago.
Thank you, Richard!

Hope it is useful to some.

I did see you found some old emails from me, but I did come around to answer it on the list.

All well to you.

Michael

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New AGAIN)

Post by micmac » Mon Mar 15, 2021 12:54 pm

Version 1.1

Add three new features
• Easy resize.
• Set distance of arrow from corner.
• Transparent mode to ease the size and arrow decision.

Michael
Attachments
Fair and Square PopUp Palette-1.1.livecode.zip
(4.38 KiB) Downloaded 180 times

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by marksmithhfx » Wed Apr 21, 2021 10:06 am

micmac wrote:
Fri Mar 12, 2021 7:45 pm
Hi there

This is a tool to make graphics for popUp palettes etc.

The advantage is ease of use and only a single graphic.

Michael

Fair and Square PopUp Palette.livecode.zip
Michael, thanks for posting this. I just used it to make a "guidance" dialog for an iOS app similar to the ones in Livecodes interactive tutorials. It was so simple to do with your Popup tool. Great tool!!!

Mark

https://postimg.cc/D8Fh8Qz5
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by stam » Wed Apr 21, 2021 5:44 pm

FourthWorld wrote:
Fri Mar 12, 2021 9:08 pm
In fact, I think I recall someone here requesting exactly this just a couple weeks ago.
Hi Richard, i think that might have been me, some time ago ;)

However i've since rolled my own.
Been meaning to share but it probably needs a bit more polish. I'm fine-tuning as i need to in real everyday use so it's still a work in progress.
i've created into a plugin that will actually launch itself when you hover over a graphic in the IDE so you can re-configure the popover settings, or you can just copy a new one to the top stack.

I've made mine configurable to my own needs (free choice of arrow side/width/location, line thickness, corner radius, background and border colour). Easily resizable - components move with resizing. Granted the implementation is probably less elegant than drawing dots directly, but some people may find it helpful so have uploaded to sample stacks/liveCodeShare:

http://livecodeshare.runrev.com/stack/990/skPopover
skPopover.jpg

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New AGAIN)

Post by micmac » Wed Apr 21, 2021 9:29 pm

Hi Mark

I made the popupPalette tool you used. (and Thanks for that!)

On the image you posted I can see that you have resized the graphic, since the corners is not round anymore.

The graphic is "absolute" when you paste it. Thats because its made of polygon points and they do not reposition themself well when you resize.

So I suggest you use it again with the transparency on so you can see the size you need. Its of course up to you.

Kind regards
Michael

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by stam » Wed Apr 21, 2021 9:35 pm

micmac wrote:
Wed Apr 21, 2021 9:29 pm
The graphic is "absolute" when you paste it. Thats because its made of polygon points and they do not reposition themself well when you resize.
give my solution above a whirl - it resizes comfortably at any point.
Different beast though - it's group rather than points drawn.

The arrows are positioned as a percentage of the length of the chosen side of the popover body and the width of the arrows are scaled as percentage of the length of the chosen side of the popover.

Not only can you resize the popover after it's on the top stack, you can go back and change any of it's properties at any point as well.
There's a straightforward API which allows you to do this in script as well, so you for example change the position of the arrow if the popover goes over the edge of the stack (for example if linked to a datagrid and you're popping it up near the bottom of the window)

I use this for my own projects but happy to incorporate any feedback...

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New AGAIN)

Post by micmac » Wed Apr 21, 2021 10:30 pm

Its very good stam!

There might be cases where you need a longer arrow.

Mic

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by stam » Thu Apr 22, 2021 4:50 pm

micmac wrote:
Wed Apr 21, 2021 10:30 pm
There might be cases where you need a longer arrow.
Thanks Mic, from memory i think i stumbled a bit on that one but will revisit...

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by marksmithhfx » Sun Apr 25, 2021 5:10 pm

micmac wrote:
Wed Apr 21, 2021 9:29 pm
The graphic is "absolute" when you paste it. Thats because its made of polygon points and they do not reposition themself well when you resize.
Thanks Michael, I will have to look into that more closely (I actually hadn't noticed until you pointed this out) but its intended for distribution through the app store so everything will have to resize nicely for different device sizes.

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by marksmithhfx » Sun Apr 25, 2021 5:13 pm

stam wrote:
Wed Apr 21, 2021 9:35 pm
I use this for my own projects but happy to incorporate any feedback...
Hi Stam,

I'll give it a try next week and let you know how it works.

Thanks
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by marksmithhfx » Tue Apr 27, 2021 10:42 pm

micmac wrote:
Mon Mar 15, 2021 12:54 pm
Version 1.1

Add three new features
• Easy resize.
• Set distance of arrow from corner.
• Transparent mode to ease the size and arrow decision.

Michael
Michael, thanks for posting the update. The transparency feature is really cool and also really useful in terms of trying to get the size just right. I took your advice. However, could you check for me because I don't think I can really see a difference and I didn't resize it this time.

Thanks
Mark

https://postimg.cc/hJsBFpYs
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

micmac
Posts: 49
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New AGAIN)

Post by micmac » Tue Apr 27, 2021 10:52 pm

Hi Again Mark

I can see the corners is not completely round.

It has also been rotated 90 degrees. (as I said one could)

It might be the cause. The rotation do not retain the roundness.

If that is the case I would have to revise the tool.

Please examine the graphic before and after the rotation.

Mic

Edit

I just tested all three corner radius and all rotated fine.

So I don't know why it happened for you Mark ....

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by marksmithhfx » Tue Apr 27, 2021 11:08 pm

micmac wrote:
Tue Apr 27, 2021 10:52 pm
So I don't know why it happened for you Mark ....
Thanks, I'll take another look tomorrow.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: This might be useful for some (New AGAIN)

Post by marksmithhfx » Tue Apr 27, 2021 11:24 pm

stam wrote:
Wed Apr 21, 2021 9:35 pm
I use this for my own projects but happy to incorporate any feedback...
Hi Stam, I gave it a quick look and need to play some more. It looks very interesting. I did run into one error when hovering over the gears. The version I downloaded from livecodeshare had a .rev extension, but the code is looking for a file with a .livecode extension.

https://postimg.cc/YjhzWjtq
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply

Return to “Talking LiveCode”