myFirstScript
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
myFirstScript
Hello,
i just try RevMédia
i create a very simple stack with a card with a text field and a button with this code into:
on mouseUp
create card
end mouseUp
but in browse mode when i click on this button a new card is create but all white , with nothing (no button,no field) in the background..
i 'm an old user of Hypercard and i don't understand why the backround is not totally duplicate (with the button and the field of the first card)
what is my mistake ?
thanks for your help
sorry for my bad english
best regards
i just try RevMédia
i create a very simple stack with a card with a text field and a button with this code into:
on mouseUp
create card
end mouseUp
but in browse mode when i click on this button a new card is create but all white , with nothing (no button,no field) in the background..
i 'm an old user of Hypercard and i don't understand why the backround is not totally duplicate (with the button and the field of the first card)
what is my mistake ?
thanks for your help
sorry for my bad english
best regards
Re: myFirstScript
Hi Ybes,
welcome to the forum.
The background is a little different from Hypercard.
In Rev on the first and only card you set up the elements that you want to have in a background, fields, buttons etc. Then you group all these elements into one group and in the properties inspector for this group you check behave as a background.
Now if you make a new card all the elements of that group will be placed on the new card.
If you have several cards in a stack and than make a group as background only newly created cards will have this background. Not the ones you created before making a background group.
If this does not help enough please feel free to ask again.
regards
Bernd
welcome to the forum.
The background is a little different from Hypercard.
In Rev on the first and only card you set up the elements that you want to have in a background, fields, buttons etc. Then you group all these elements into one group and in the properties inspector for this group you check behave as a background.
Now if you make a new card all the elements of that group will be placed on the new card.
If you have several cards in a stack and than make a group as background only newly created cards will have this background. Not the ones you created before making a background group.
If this does not help enough please feel free to ask again.
regards
Bernd
Re: myFirstScript
Hi Bernd,
If you have a stack with a group of elements set as a background, and then later you want to add another element to behave as a background, do you have to ungroup and then regroup the elements including the new element to have them all show up as a back ground? Or can you group a single element, and set it to behave as a background as a single element - and then the original group plus the new element will all behave like a background for all new cards?
And it sounds like, only new cards created will inherit the new collection of background elements?
btw, is there no way to add a new background element to a stack that already has many cards or is that not possible? It sounds like a person has to carefully plan their stack if there is no flexibility to add new background elements to existing cards.
Thanks
If you have a stack with a group of elements set as a background, and then later you want to add another element to behave as a background, do you have to ungroup and then regroup the elements including the new element to have them all show up as a back ground? Or can you group a single element, and set it to behave as a background as a single element - and then the original group plus the new element will all behave like a background for all new cards?
And it sounds like, only new cards created will inherit the new collection of background elements?
btw, is there no way to add a new background element to a stack that already has many cards or is that not possible? It sounds like a person has to carefully plan their stack if there is no flexibility to add new background elements to existing cards.
Thanks
Skyfisher
Round Rock, Texas
Mac OS
Round Rock, Texas
Mac OS
Re: myFirstScript
Many Thanks Bn,
it's OK , but have'i to create a group for each object ? or ,can i "regroup" all my objects that i need to put in the background in a one group , and How ?
in my little example , i have a text field and three buttons (create , next , previous) , in 4 groups !!
edit+++: i find the solution , that is add control while activate "edit group"
my first project is a little address book
regards
it's OK , but have'i to create a group for each object ? or ,can i "regroup" all my objects that i need to put in the background in a one group , and How ?
in my little example , i have a text field and three buttons (create , next , previous) , in 4 groups !!
edit+++: i find the solution , that is add control while activate "edit group"
my first project is a little address book
regards
Re: myFirstScript
Ybes,
glad you found a solution. And it is the advanced solution once you created a group and forgot something.
Sorry I was not clear enough.
If you lay out your objects on the first card and you are done with the layout then in edit mode you activate (select) all the objects you want to be part of the background group by simply pressing the mouse outside of any of the objects you want to select and drag the mouse across the objects you want to include. They will get the selected state (gray marks around it). When you accidentally selected an object you dont want to include you can still shift-click it afterwards to unselect it. Likewise you can shift-click an unselected object to include it in the selected objects.
Once you are done you go to the object menu and choose 'group selected'. That's it.
But good you found the way to edit a group, that is very important to change the group later (layout etc).
One thing I had to get used to was the Select Grouped command in the menu. When this is on you can edit a member of a group directly. But this can be confusing if you want to edit the whole group. Then you unselect Select Grouped and choose Edit Group instead.
regards
Bernd
glad you found a solution. And it is the advanced solution once you created a group and forgot something.
Sorry I was not clear enough.
If you lay out your objects on the first card and you are done with the layout then in edit mode you activate (select) all the objects you want to be part of the background group by simply pressing the mouse outside of any of the objects you want to select and drag the mouse across the objects you want to include. They will get the selected state (gray marks around it). When you accidentally selected an object you dont want to include you can still shift-click it afterwards to unselect it. Likewise you can shift-click an unselected object to include it in the selected objects.
Once you are done you go to the object menu and choose 'group selected'. That's it.
But good you found the way to edit a group, that is very important to change the group later (layout etc).
One thing I had to get used to was the Select Grouped command in the menu. When this is on you can edit a member of a group directly. But this can be confusing if you want to edit the whole group. Then you unselect Select Grouped and choose Edit Group instead.
regards
Bernd
Re: myFirstScript
@ Bn
thanks for your answer....i progress!!!
now ,i have a problem with the Rev Docs (UsersDoc) ...i don't found a list of the events as keypressed,mouseUp...(it seems are any more than in Hypertalk)
if you have a link ?
best regards
thanks for your answer....i progress!!!
now ,i have a problem with the Rev Docs (UsersDoc) ...i don't found a list of the events as keypressed,mouseUp...(it seems are any more than in Hypertalk)
if you have a link ?
best regards
Re: myFirstScript
Ybes,
could you please explain what exactly you want to do/know?
Basically you can just use the Hypercard commands/events in Rev.
mouseUp, mouseDown etc.
if you go to the dictionary and enter mouse into the search field, you get a list with all the mouse related messages.
regards
Bernd
could you please explain what exactly you want to do/know?
Basically you can just use the Hypercard commands/events in Rev.
mouseUp, mouseDown etc.
if you go to the dictionary and enter mouse into the search field, you get a list with all the mouse related messages.
regards
Bernd
Re: myFirstScript
Skyfisher, I can sympathise with your confusion and frustration regarding the use of groups as opposed to a far more simple (and, for me, more usable) concept of backgrounds.
I, too, come from a long period of HyperCard and SuperCard, and find the use of groups to be extremely clumsy. Perhaps it will get easier through use, but it is certainly the biggest hurdle in converting to Revolution Media (that and the poor documentation).
I have to say that I loved HC and always felt somewhat let down by SuperCard -- a poor imitation, especially as it did not seem to evolve.
I am still getting used to Revolution. I quite like it, but find it rather unstable, so make sure you save your projects regularly and have a good backup (if you have a Mac, TimeMachine is a Godsend). I've been able to return to earlier versions on a couple of occasions (especially when I got into all sorts of knots with groups), but have also lost a lot of coding, when I have forgotten to save regularly during a few hours of development. It seems to me that using the Dictionary increases the chances of a crash, though this might just be an impression. In any case, too much editing without a save is a bad thing!
The really good aspect of Revolution, I have to say, is this forum. The people are friendly, try to understand the problem, and offer answers quickly: answers that are usually exactly what you want.
I, too, come from a long period of HyperCard and SuperCard, and find the use of groups to be extremely clumsy. Perhaps it will get easier through use, but it is certainly the biggest hurdle in converting to Revolution Media (that and the poor documentation).
I have to say that I loved HC and always felt somewhat let down by SuperCard -- a poor imitation, especially as it did not seem to evolve.
I am still getting used to Revolution. I quite like it, but find it rather unstable, so make sure you save your projects regularly and have a good backup (if you have a Mac, TimeMachine is a Godsend). I've been able to return to earlier versions on a couple of occasions (especially when I got into all sorts of knots with groups), but have also lost a lot of coding, when I have forgotten to save regularly during a few hours of development. It seems to me that using the Dictionary increases the chances of a crash, though this might just be an impression. In any case, too much editing without a save is a bad thing!
The really good aspect of Revolution, I have to say, is this forum. The people are friendly, try to understand the problem, and offer answers quickly: answers that are usually exactly what you want.
Re: myFirstScript
@ Exheusden: saving is a very good idea and it became second nature to me while doing stack work in Rev. Although I have the impression that Rev is more stable now than it used to be. What the experienced Rev user are saying is that once you got your code clean and especially you build a standalone Rev is very stable. So it is the IDE, the integrated development environment that introduces the instability. The engine is stable. I also come from a Hypercard background. And in Hypercard you couldnt do without background controls, as a matter of fact any new field was by default a background field. In Hypercard fields were often used as kind of a repository for data, sort of a database. You got away with this because hypercards was very fast in finding things. In Rev, it appears, once you go to a couple of thousand cards things slow down. So the Rev way is to use for data storage often a custom property and arrays to store data and the fields are just displaying the data, not actually storing the data. If your need is to store even larger amount of data then the recomended way is to use a database. The threshold for using a database seems to be > 50000 records. This is what I gather from various discussions of this in the forum. So unless you want to go beyond something like 5000-10000 records you are fine with fields as data storage, as in Hypercard.
@ Skyfisher: sorry your message slipt through. I just did a quick test: The group you define on the first card as a background is expandable, you can add elements to it in edit mode by selecting that group and then choosing Edit Group from the menu. Now you can add an element and it shows up on all cards that have been created in the meantime.
But if you want a second group that behaves like a background after you created some cards then this background group will only show up on newly created cards.
So yes, you can edit a background group later on. And No you can not create a new background group after having created some cards and expect this new background group to show up on existing cards.
I rarely use backgrounds anymore, once you get used to the other ways you dont need them as much as you needed them in Hypercard
regards
Bernd
@ Skyfisher: sorry your message slipt through. I just did a quick test: The group you define on the first card as a background is expandable, you can add elements to it in edit mode by selecting that group and then choosing Edit Group from the menu. Now you can add an element and it shows up on all cards that have been created in the meantime.
But if you want a second group that behaves like a background after you created some cards then this background group will only show up on newly created cards.
So yes, you can edit a background group later on. And No you can not create a new background group after having created some cards and expect this new background group to show up on existing cards.
I rarely use backgrounds anymore, once you get used to the other ways you dont need them as much as you needed them in Hypercard
regards
Bernd
Re: myFirstScript
Bernd, a database-driven solution might well be better in the case of a relatively large amount of data, when using Revolution (and the Find really is terrible), but this does not exclude the use of the background concept. A small amount of constantly changing data fits nicely into the stack concept, for example. Also, an amateur programmer, using Revolution Media for a bit of coding pleasure at home, might have quite sufficient with that product alone, without wishing to worry about the additional complexity of databases.
In the real world, you are quite correct: using Revolution as a front end to a database might well be the most appropriate solution in largish-volume projects, but in smaller, home-grown projects, the stack concept, with its associated background concept, is equally valid, and very attractive.
In the real world, you are quite correct: using Revolution as a front end to a database might well be the most appropriate solution in largish-volume projects, but in smaller, home-grown projects, the stack concept, with its associated background concept, is equally valid, and very attractive.
Re: myFirstScript
Exheusden,
I meant to say up to 5000 something records you can use cards/fields as datastorage. Above or if too slow you could use custom properties and arrays. Beyond 50000 something a dedicated database as sqlite etc might be appropriate. At least that is what I gathered from the discussions.
regards
Bernd
I meant to say up to 5000 something records you can use cards/fields as datastorage. Above or if too slow you could use custom properties and arrays. Beyond 50000 something a dedicated database as sqlite etc might be appropriate. At least that is what I gathered from the discussions.
regards
Bernd
Re: myFirstScript
Exheusden and Bernd, Thank you for your helpful replies. And Yes I do have a Mac with Time Machine running using a large backup Drive. And yes, years ago I enjoyed developing HC stacks. I'm learning to adjust to how Rev is structured. So far, I have not had problems with Rev crashing or locking up, yet, but my first project was not complicated, although the interface sometimes doesn't update correctly when I'm jumping around in spaces - for example debug break points don't show properly at times, or object handles show up when they are not supposed to, but not a major concern as of yet.
I have finished my first learning project and I'll move on to my next as I continue to orient myself in this tool. I very much appreciate the helpful and friendly guidiance in this forum.
Thank you
I have finished my first learning project and I'll move on to my next as I continue to orient myself in this tool. I very much appreciate the helpful and friendly guidiance in this forum.
Thank you
Skyfisher
Round Rock, Texas
Mac OS
Round Rock, Texas
Mac OS
Re: myFirstScript
@ Bernd,
thanks for your help
i finish my little program (an address book and a simple database for my library)
i have understand groups specifications , i hope !
best regards
thanks for your help
i finish my little program (an address book and a simple database for my library)
i have understand groups specifications , i hope !
best regards