Create new records. Substack, group hidden?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Create new records. Substack, group hidden?
Hi all,
My question is the following:
I have a stack with the following cards, Estates, floors, tenants, income, suppliers and expenses.
What I have thought, I do not know if it is the best option, is to create a substack to enter the new records. Apart from having to pass the data between the subStack and the original Stack, at the moment I am not worried, in a card there may be 2 entry fields and in another about 20 fields.
The size of the cards would have to be different, depending on the fields to enter. If I'm not confused a stack is only one size and I would have to make as many substances as sizes. The same for printing an A4 portrait and another for an A4 landscape. It is right?
Another alternative would be to have a group hidden in each card and display it at the time of entering the new records. I do not know if there may be more options.
What experts advise me
Thanks in advance,
Carles
My question is the following:
I have a stack with the following cards, Estates, floors, tenants, income, suppliers and expenses.
What I have thought, I do not know if it is the best option, is to create a substack to enter the new records. Apart from having to pass the data between the subStack and the original Stack, at the moment I am not worried, in a card there may be 2 entry fields and in another about 20 fields.
The size of the cards would have to be different, depending on the fields to enter. If I'm not confused a stack is only one size and I would have to make as many substances as sizes. The same for printing an A4 portrait and another for an A4 landscape. It is right?
Another alternative would be to have a group hidden in each card and display it at the time of entering the new records. I do not know if there may be more options.
What experts advise me
Thanks in advance,
Carles
-
- VIP Livecode Opensource Backer
- Posts: 9582
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Create new records. Substack, group hidden?
Hi.
I like the subStack method, because it will float above or to the side of the working card, and that is more to the liking of most users.
The subStack can be any size, and can be changed as you need. All stacks have a "rect" property, which is open to change in many ways. You need to know this.
So create a single subStack of a single card. Several different suites (likely groups) of entry fields and buttons are then created,. and you show only the one pertinent to the card that is to be worked on. You might resize the subStack (If you want to) to the size of the current visible group. But that is often disconcerting to the user. It might be best to keep it to a single size.
Is this clear? Management of the subStack is simple. The "show" and Hide" commands are your friends here, both for the subStack and for the groups of controls.
Craig Newman
I like the subStack method, because it will float above or to the side of the working card, and that is more to the liking of most users.
The subStack can be any size, and can be changed as you need. All stacks have a "rect" property, which is open to change in many ways. You need to know this.
So create a single subStack of a single card. Several different suites (likely groups) of entry fields and buttons are then created,. and you show only the one pertinent to the card that is to be worked on. You might resize the subStack (If you want to) to the size of the current visible group. But that is often disconcerting to the user. It might be best to keep it to a single size.
Is this clear? Management of the subStack is simple. The "show" and Hide" commands are your friends here, both for the subStack and for the groups of controls.
Craig Newman
Re: Create new records. Substack, group hidden?
Thanks for the answer Dunbarx.
If I have not misunderstood, I give the example of A4 printing and my program
1. I create a 900 x 900 substack
2.1. I create a group with the fields, buttons, etc., of 595 x 842. A4 Portrait
2.2.I create another group with fields, buttons, etc., of 842 x 595. A4 Landscape
2.n. For Expenses of 450 x 600
3. I'm going to the subStaqck that is hidden. I adjust it to the extent that I need, I make the corresponding group visible and show it as a modal window, or normal?
4. Then there is the issue of checking the data and saving the record. But it is the last step.
I'll look what I find in the lessons.
Regards
Carles
If I have not misunderstood, I give the example of A4 printing and my program
1. I create a 900 x 900 substack
2.1. I create a group with the fields, buttons, etc., of 595 x 842. A4 Portrait
2.2.I create another group with fields, buttons, etc., of 842 x 595. A4 Landscape
2.n. For Expenses of 450 x 600
3. I'm going to the subStaqck that is hidden. I adjust it to the extent that I need, I make the corresponding group visible and show it as a modal window, or normal?
4. Then there is the issue of checking the data and saving the record. But it is the last step.
I'll look what I find in the lessons.
Regards
Carles
-
- VIP Livecode Opensource Backer
- Posts: 9582
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Create new records. Substack, group hidden?
Play around all you like.
But I would not think in terms of print areas when you create your groups. Build them as you like, and simply set the rect of the subStack to hold the largest of them comfortably.
Again, you could resize the subStack to always just frame whatever group happens to be visible. I personally would like to see a fixed-sized order entry window, even if a group pertinent to a particular card only occupies a portion of that window. That is a matter of style.
Correct. The subStack, and its groups, are made visible as needed, and hidden when not. The mode you show it as is up to you. Start off with a standard (mode 1) window.
Craig
But I would not think in terms of print areas when you create your groups. Build them as you like, and simply set the rect of the subStack to hold the largest of them comfortably.
Again, you could resize the subStack to always just frame whatever group happens to be visible. I personally would like to see a fixed-sized order entry window, even if a group pertinent to a particular card only occupies a portion of that window. That is a matter of style.
Correct. The subStack, and its groups, are made visible as needed, and hidden when not. The mode you show it as is up to you. Start off with a standard (mode 1) window.
Craig
Re: Create new records. Substack, group hidden?
Hi Craig,
When referring to "rec" property, is the option position of the Inspector panel?
I enclose the demo that I have done. It works, but I do not want the record creation window to lose focus. The user has to choose between Cancel or Save to continue, now if he selects the mainstack pas in the background.
Thank you for your advices
Carles
When referring to "rec" property, is the option position of the Inspector panel?
I enclose the demo that I have done. It works, but I do not want the record creation window to lose focus. The user has to choose between Cancel or Save to continue, now if he selects the mainstack pas in the background.
Thank you for your advices
Carles
-
- VIP Livecode Opensource Backer
- Posts: 9582
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Create new records. Substack, group hidden?
"rect", not "rec".When referring to "rec" property, is the option position of the Inspector panel?
The rect of an object is its upper left and lower right coordinates, like "0,0,100,100". You would use the "position" pane in the inspector for stacks, cards or controls. Each of the above items is set there separately.
It is similar to many other properties that can set both the position and the size of things, like "top", "width", "bottomLeft", and "loc". Please read about ALL this in the dictionary, and experiment. Know that all these properties may be set under script control:
Code: Select all
set the top of field 3 to "100"
Craig
Re: Create new records. Substack, group hidden?
Hi all,
When I press the New Record button I run on preOpenStack in mainStack. I put a preOpenStack in the Support stack with pass preOpenStack, but it does the same to me. The same with closeStack in mainStack.
Any solution
Carles
When I press the New Record button I run on preOpenStack in mainStack. I put a preOpenStack in the Support stack with pass preOpenStack, but it does the same to me. The same with closeStack in mainStack.
Any solution
Carles
-
- VIP Livecode Opensource Backer
- Posts: 9582
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Create new records. Substack, group hidden?
Not sure what this means. You press a button, and then what, exactly, happens? in other words, what is in the script of that button?When I press the New Record button I run on preOpenStack in mainStack.
Craig
Re: Create new records. Substack, group hidden?
The same as the demo, changing the names of the stack and the group to Catalan.
Carles
Code: Select all
on mouseUp
go invisible stack "Suport"
set the width of stack "Suport" to 420
set the height of stack "Suport" to 160
show the group "grpFinques" of stack "Suport"
-- hide the group "grpRent" of stack "Suport"
show stack "Suport"
end mouseUp
Last edited by cbarbal on Wed Nov 07, 2018 6:41 pm, edited 1 time in total.
Re: Create new records. Substack, group hidden?
Hi Carles,
if "Suport" is a substack, you can actually first format the stack and then go to it:
Best
Klaus
if "Suport" is a substack, you can actually first format the stack and then go to it:
Code: Select all
on mouseUp
set the width of stack "Suport" to 420
set the height of stack "Suport" to 160
# NOT -> THE group!
show group "grpFinques" of stack "Suport"
## hide group "grpRent" of stack "Suport"
go stack "Suport"
end mouseUp
Klaus
Re: Create new records. Substack, group hidden?
Hi Klaus,
There will be several groups, each one will create the record in the corresponding table. How do I activate them?
I have answered too fast. It is only to omit the "the"
Carles
There will be several groups, each one will create the record in the corresponding table. How do I activate them?
I have answered too fast. It is only to omit the "the"
Carles
Re: Create new records. Substack, group hidden?
Just show/hide them, but maybe add: ... grp "xyz" OF CD X of stack "Suport"
Jut to be on hte safe side
Que?
Re: Create new records. Substack, group hidden?
Hi Klaus,
Continue doing preOpenStack ..
Carles
Code: Select all
on mouseUp
set the width of stack "Suport" to 420
set the height of stack "Suport" to 160
show group "grpFinques" of stack "Suport"
go stack "Suport"
end mouseUp
Carles
Re: Create new records. Substack, group hidden?
Searching on the internet I found this link https://use-livecode.runrev.narkive.com ... bstack-why in which Klaus recommends an empty preOpenStack. I had it with pass preOpenStack.
Carles
Carles