Card Size Change

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Card Size Change

Post by newpie » Wed Oct 07, 2015 2:52 am

I did try to find this before posting, but wanted to request a "Card Size" setting. I do realize that it is inherently built as Stack Size = Card Size and I am aware on how to change the stack size between cards with code as well.
I think it would be great though if we could set the Card Size just like any dropdown in the inspector and as we move between the cards it will change the size automatically to what we set. This would make it easier I would think and less likely to mess up the coding if you have multitudes of cards in your stack.

Thanks for the ear

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6160
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Card Size Change

Post by dunbarx » Wed Oct 07, 2015 3:01 pm

Hi.

The size and position of a stack can be set in the property inspector just like any other object. Right? :D

If you mean that the size of each card might change according to a series of rect properties that you have in mind, this is far more easily done in an openCard handler in the stack script. Each card can have its own custom property and resize itself upon opening, or the handler itself might contain that information based on some property of the card. In any case that is easier than doing it by hand.

Or I am missing your point...

Craig Newman

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Card Size Change

Post by newpie » Sat Oct 10, 2015 4:56 pm

Hey Craig, to answer your question I am looking for the card inspector to be used to set the size and position of the card for ease of use basically as of right now it is dithered out of course.

I would like to try your option "this is far more easily done in an openCard handler in the stack script. Each card can have its own custom property and resize itself upon opening" . I am unfamiliar with how to do this, can you give me an example if you have time.

Thanks for your help.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6160
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Card Size Change

Post by dunbarx » Sun Oct 11, 2015 4:51 am

Klaus, you might move this to the "Beginner" section.

Newpie.

Make a new stack with a handful of cards. In the stack script:

Code: Select all

on opencard
set the rect of this stack to "100,100,500," & 450 + random(100)
end openCard
Now navigate from card to catd, using Cmd-3. See how the height of the stack changes as you open each new card? A lot of lessons here, mainly the use of the message path in a compact way. On the local level, do you see how this handler works? Write back with your thoughts,

Craig

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Card Size Change

Post by newpie » Sun Oct 11, 2015 5:50 pm

Thanks Craig, I actually knew how to do this. I just got confused when you said custom property, I thought you were referring to the custom property option in the inspector. I still think this can be a feature requests as it doesn't exist and would be very nice for ease of use to just change the size of the card with the property inspector choice "Size and Position" as it makes logical sense.

Thanks for your reply Craig.

SparkOut
Posts: 2020
Joined: Sun Sep 23, 2007 4:58 pm

Re: Card Size Change

Post by SparkOut » Sun Oct 11, 2015 5:58 pm

I think Craig was advising you can specify the size of the individual cards by storing the dimensions in a custom property of the card, then using the openCard handler to get the custom property of "this" card and set the size. So yes, what you already know, but storing the required size as a custom property so that you can save the info, that's all. The card size is always the stack size, so the property inspector will let you change the values for the stack, but not cards individually.

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Card Size Change

Post by newpie » Mon Oct 12, 2015 6:17 pm

Thanks SparkOut for explaining I appreciate it. Yes I agree the current build is the card size is always the stack size, hence why I was opting for a feature to make the property inspector control the cards per say not the stack, thats all. I think it would make it more logical process. I of course don't know what it takes to do this, but I think exploring it can't hurt especially if it is an easy change. I appreciate everyone's comments. Great community here.

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

Re: Card Size Change

Post by FourthWorld » Mon Oct 12, 2015 7:21 pm

newpie wrote:Thanks SparkOut for explaining I appreciate it. Yes I agree the current build is the card size is always the stack size, hence why I was opting for a feature to make the property inspector control the cards per say not the stack, thats all. I think it would make it more logical process. I of course don't know what it takes to do this, but I think exploring it can't hurt especially if it is an easy change. I appreciate everyone's comments. Great community here.
The challenge with putting that stack property in the Card Inspector is that it might give some the impression that it's a card property, ultimately raising a lot of questions about why it doesn't affect the card and only the stack.

I'm all for enhanced usability, and I agree there are many opportunities to improve the IDE. But I believe property settings are best served in the Inspector for the object they're affecting; in the long run this makes learning things easier by helping people understand which properties relate to which objects.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Card Size Change

Post by newpie » Mon Oct 12, 2015 8:23 pm

Thanks FourthWorld,

I think the below pic really explains it all below as well. When Card Inspector is pulled up it gives you the option of Size and Position. To me logically , as thus is a pull down option in the the card inspector, it would be great if we could set the card size and position of the card. Obviously, if this is a huge change to the engine then this kind of decision should be carefully considered. I am just giving my opinion from the aspect of a new user that definitely finds this clearer for the need of different size cards in programs built for desktop applications as an example.

I appreciate giving me the opportunity to let me post my ideas on the forum. Thank you
Attachments
CardInspector.PNG
CardInspector.PNG (10.6 KiB) Viewed 3272 times

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

Re: Card Size Change

Post by FourthWorld » Mon Oct 12, 2015 8:40 pm

newpie wrote:I think the below pic really explains it all below as well. When Card Inspector is pulled up it gives you the option of Size and Position. To me logically , as thus is a pull down option in the the card inspector, it would be great if we could set the card size and position of the card. Obviously, if this is a huge change to the engine then this kind of decision should be carefully considered.
Not necessarily. It might be simply solved by the addition of a note there to switch to the stack to edit those values.
I appreciate giving me the opportunity to let me post my ideas on the forum. Thank you
No, thank you. This forum is for you, and anyone else who has questions. I'd go so far as to suggest you're more valuable than me here, and this thread is a good example of why: you're new to LiveCode, so you see things in fresh ways more reflective of how other new users see things. Those of us who've been using LiveCode for years no longer see straight <g>; that is, we just know what we want to do and don't think about the details as much. In fact, I've never even looked at the Size pane for the Card Inspector before. We need more fresh eyes like yours to help refine the UX.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Card Size Change

Post by shaosean » Tue Oct 13, 2015 7:02 pm

Why not allow the cards to have a separate size property and have the engine automatically use it? The default size would be the stack size.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6160
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Card Size Change

Post by dunbarx » Tue Oct 13, 2015 7:44 pm

Hi.
Why not allow the cards to have a separate size property and have the engine automatically use it? The default size would be the stack size.
In a way, they already do: the "rect".

There is a conflict; "size" is a reserved word. Anyway, as per the thread of this thread, the stack rect can be stored as a custom property of each card, and set in an "openCard" handler in the stack script, or wherever.

The real issue here is the (mental) distinction between the rect of the card and the rect of the stack. There is a stubborn tendency to want to separate these. I suppose a new and different basic structure could allow a stack object, with multiple card objects and their individual rects plastered all over it. The current paradigm is that stacks with different rects are overlaid on other stacks. This just needs to be learned and accepted.

Whether that is a change that might have wide support is another discussion...

Craig

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

Re: Card Size Change

Post by FourthWorld » Tue Oct 13, 2015 8:08 pm

shaosean wrote:Why not allow the cards to have a separate size property and have the engine automatically use it? The default size would be the stack size.
I suppose they could. SuperCard has a backsize property for backgrounds that was independent of the window size, but in practice I have to admit I only used it because they didn't have scrolling groups. LC could take that further for cards, but it seems like a lot of work relative to other priorities. Like Craig noted, it's easy enough to get what you want right now with a few lines of script, without having to wait for deep engine revisions.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Card Size Change

Post by newpie » Tue Oct 13, 2015 9:51 pm

shaosean wrote:Why not allow the cards to have a separate size property and have the engine automatically use it? The default size would be the stack size.
This is an excellent Idea. I think to new users this would be quite logical for learning livecode especially since we have a "Size and Position" option in the Card Inspector. I agree with FourthWorld comments of priorities, but maybe down the road if LiveCode Dev team finds this move more favorable with their statement "Make apps with zero coding experience. LiveCode makes it possible. Get started today." then it would be a win/win.

Thanks for everyone's comments.

Post Reply

Return to “Feature Requests”