[ANN] bnGuides alignment tool on livecodeshare

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

[ANN] bnGuides alignment tool on livecodeshare

Post by bn » Tue Dec 18, 2018 4:43 pm

I have put a stack "bnGuides" on livecodeshare (or access it from "Sample Stacks" from within LC).
It is best used as a plugin.

http://livecodeshare.runrev.com/stack/918/BnGuides

bnGuides.png

It helps with visual guides to align objects. It complements the build-in alignment tool.
Feedback welcome.

Kind regards
Bernd
Last edited by bn on Thu Mar 28, 2019 10:33 pm, edited 1 time in total.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: bnGuides alignment tool on livecodeshare

Post by bogs » Tue Dec 18, 2018 5:19 pm

This works very well, thank you Bernd!

If your coming from a VB or Delphi background, or any number of other IDEs which feature a visual alignment tool, I cannot recommend adding this to your plugins enough, it makes alignment and layout a snap.

I give it two big thumbs up and a crown!
ImageImage
Image

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: bnGuides alignment tool on livecodeshare

Post by AndyP » Thu Dec 20, 2018 9:01 am

This is excellent work...most useful.

I have this now set to start with LC, it should be a standard part of the LC ide.

Thank you.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: bnGuides alignment tool on livecodeshare

Post by bn » Thu Dec 20, 2018 9:19 am

Thank you Bogs and Andy,

I am glad you like it.

Kind regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by bn » Thu Mar 28, 2019 10:42 pm

bnGuides has been updated to version 0.5.0

The update fixes some instances where graphics used by bnGuides were not properly removed from the target stack.

Additionally it adds the option to display distances to nearest neighbors when setting the capsLock-key.
Thanks bogs for suggesting "distances" and beta testing.

Please read the help file for more information.

As before bnGuides works from LC 5.5 and up. Use it as plugin.


guidePlusDistance.png
guides and distances
guidePlusDistance.png (16.08 KiB) Viewed 19643 times

You can download it from
http://livecodeshare.runrev.com/stack/918/BnGuides

or from within Livecode -> Sample Stacks

Kind regards
Bernd

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by bogs » Thu Mar 28, 2019 10:52 pm

< Rubbing my greedy lil hands together > Thanks Bernd! :mrgreen:
Image

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by Thierry » Fri Mar 29, 2019 7:18 am

Hallo Bernd,


Was waiting for this kind of tool since such a long time....

sunnY- 2019-03-29 à 07.14.07.png

Congrats for this brilliant tool and thanks for my kids :)

mit freundlichen Grüßen,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by capellan » Mon Apr 01, 2019 11:53 pm

Hi Bernd,

Thanks a lot for updating your stack! :D

On Mac, I copy and pasted the stack plugin into
the LiveCode plugins folder but after opening
the plugin inside Livecode IDE, a message appears
asking me to put the stack inside the plugin folder.
Screen Shot 2019-04-01 at 6.45.29 PM.png
After clicking the button "Move me to plugin folder" then
this message appears:
Screen Shot 2019-04-01 at 6.46.21 PM.png
and finally, after closing and reopening LiveCode, the plugin now shows
this error:
Screen Shot 2019-04-01 at 6.46.59 PM.png
Al

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by bn » Tue Apr 02, 2019 12:05 am

Hi Al,

once you have put the stack into your plugins folder you should start the stack from the Development Menu -> Plugins.

What probably happened is that the stack is set up to move itself into the plugins folder if you start it from anywhwere except the plugins folder. That is where the installation routine tripped.

Does bnGuides work for you if you start it via Development -> PlugIns?

Kind regards
Bernd

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by capellan » Tue Apr 02, 2019 1:43 am

Hi Bernd,

The plugin does not work even if I start it from
the Plugin menu.

The error shows that a selected control
should have a script or a behavior named
"initializeScript" but I could not find this
in the selected control.

When does the selected control get this
script or behavior? When I click on them?

By the way, my Mac requires password to
install any software. Could this be the
source of this problem?

Al

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by bn » Tue Apr 02, 2019 8:52 am

The plugin does not work even if I start it from
the Plugin menu.
I have no idea why.
When does the selected control get this
script or behavior? When I click on them?
Yes, when you select a control it gets a behavior set, either the control if it has no behavior or the last behavior of the chain of behaviors of the selected control. The behavior button in bnGuides is "bnGuideBehavior2" = button id 1005.
By the way, my Mac requires password to
install any software. Could this be the
source of this problem?
I do not think so, once installed it should work.

I would try to delete bnGuides from the plugins folder and download a fresh copy. Install that manually into the plugins folder and try to start from Development - Plugins. For the first time start it when you are in browse mode. Though that should not make a difference.

It baffles me what happens to you. Maybe we can solve this.

Kind regards
Bernd

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by capellan » Thu Apr 04, 2019 1:24 am

Hi All,

bnGuides alignment tool is working fine now
in my own setup! :D

The culprit was that opencard handler was
not running when I opened the stack.

I changed opencard for openstack and
replaced the original script for a shorter
script that Bernd send to my email.

Many Thanks Bernd!

Al

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

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by stam » Sat Jan 02, 2021 2:48 am

Happy new year all!
sorry to resurrect this slightly older post...

First of all, kudos to Bernd, it's very impressive, really does work very well and brings in functionality that i think most new users would expect as default for the IDE. I wish this (or similar functionality) was actually part of the IDE -- is there any way to push for this?

Secondly, i had a request either for guidance or perhaps a new feature request for the plugin - alignment tools in almost all other IDEs/design software will both bring up alignment guides relative to other controls, but also relative to the window.

Is there any way to create an alignment guide for horizontal/vertical midlines of the stack window? I often find my self struggling to accurately align controls to the vertical or horizontal centre of the window.
IDEs for other platforms will also bring up a further window guide around the edges of the window (typically about 20 px from the edge) - this is often very helpful in lining up controls along either edge of the window (i currently keep having to adjust the pixels in the inspector which is not intuitive or quick...) - is there way to display a guide around the edges of the window?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by bn » Sat Jan 02, 2021 10:41 am

Hi Stam,

Thank you for your kind words.
Have you tried the caps-lock key down? Then the distances to either the edges of the window or the next control are shown for the blue middle guide. (After clicking the the control you have to move the mouse 1 pixel to make the distances show up)
If the caps-lock key is not down only the vertical/horizontal middle of the card is shown when moving the control. Try with a single control to see the effect.

The caps-lock feature was introduced in version 0.5.0 of bnGuides which is the current version on livecodeshare/Sample Stacks.

As far as I understand that is what you would like to see added. If not please explain, preferably with a screenshot.

Kind regards
Bernd

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: [ANN] bnGuides alignment tool on livecodeshare

Post by bogs » Sat Jan 02, 2021 12:03 pm

stam wrote:
Sat Jan 02, 2021 2:48 am
First of all, kudos to Bernd, it's very impressive, really does work very well and brings in functionality that i think most new users would expect as default for the IDE. I wish this (or similar functionality) was actually part of the IDE -- is there any way to push for this?
You and I are holding hands on that one, I think Bernd's guides plugin is the cat's meow for alignment, and say so anytime the chance too comes up!
stam wrote:
Sat Jan 02, 2021 2:48 am
Is there any way to create an alignment guide for horizontal/vertical midlines of the stack window? I often find my self struggling to accurately align controls to the vertical or horizontal centre of the window.
Of course, you have bnGuides! Merely drag your control towards the center of the window, and voila!
aPic_centerGuidelines.png
Center yourself....
aPic_centerGuidelines.png (4.56 KiB) Viewed 14674 times
stam wrote:
Sat Jan 02, 2021 2:48 am
IDEs for other platforms will also bring up a further window guide around the edges of the window (typically about 20 px from the edge) - this is often very helpful in lining up controls along either edge of the window (i currently keep having to adjust the pixels in the inspector which is not intuitive or quick...) - is there way to display a guide around the edges of the window?
Bernd himself has already answered this for bnGuides use, and further up on this page shows the distances being shown here, in the 5th post :mrgreen:

Without using bnGuides, though, you *could* still do it with a few commands (nowhere NEAR as easily or intuitively though).

Code: Select all

# from the message box 
-- center control in window, in this case a button...
    set the loc of button "button name" to the loc of card "card name" of Stack "stack name"
-- set the side of one control exactly the same distance as another control on the opposite side    
    set the right of button 1 to the (right of card 1 of Stack "stack name" -10)
    set the left of button 2 to the (left of card 1 of Stack "stack name" +10)
For me though, bnGuides does all this and more faster and easier when laying your design out.
Image

Post Reply

Return to “Announcements”