Thanks for all the help getting me started with Squeak.
I decided to play around with the morphic development style rather than working directly in the Class Browser. My goal is to develop techniques for developing apps for the Open Slate project. I have always wanted a HyperCard-like application to use for this purpose and am delighted to discover that a StackMorph does just that. Having created a minimal stack, I set out to learn how to provide navigation controls. I placed a buttom morph on the background used later in the stack with a target of the name of the StackMorph and an actionSelector of goToFirstCardOfStack. This works. But when I put a button on the first page, which has a different background, and make its actionSelector goToNextCardInStack, nothing happens. If I make it flash, the default, the book flashes, so the target is correct. Any idea why this is not working? Is a background a stack? I thought all the pages in a StackMorph were one stack. The book's navigation controls work as expected, and the menu uses goToNextCardInStack. I have another unrelated issue. I have Squeak installed on two computers. Both use the same version, 3.9, and both are running FreeBSD and Gnome but slightly different versions. On one, morphs dropped onto a stack page disappear when anything is right-clicked (yellow). On the other one they don't. I can get them to stick by adding them to the background, but I want them to be unique to that page. What am I doing wrong? -- Gary Dunn, Honolulu [hidden email] http://openslate.net/ http://e9erust.blogspot.com/ Sent from Slate001 |
On Friday 19 June 2009 05:06:25 pm Gary Dunn wrote:
> Having created a minimal stack, I set out to learn how to provide > navigation controls. I placed a buttom morph on the background used > later in the stack with a target of the name of the StackMorph and an > actionSelector of goToFirstCardOfStack. This works. But when I put a > button on the first page, which has a different background, and make its > actionSelector goToNextCardInStack, nothing happens. If I make it flash, > the default, the book flashes, How many pages do you have in your Stack? Inspect it. While inspecting, you can also debug sends like 'self goToNextCardInStack'. Trace through and check. This may appear tedious but it is a good way to pick up Squeak internals. Subbu |
On Fri, 2009-06-19 at 20:06 +0530, K. K. Subramaniam wrote:
> On Friday 19 June 2009 05:06:25 pm Gary Dunn wrote: > > Having created a minimal stack, I set out to learn how to provide > > navigation controls. I placed a buttom morph on the background used > > later in the stack with a target of the name of the StackMorph and an > > actionSelector of goToFirstCardOfStack. This works. But when I put a > > button on the first page, which has a different background, and make its > > actionSelector goToNextCardInStack, nothing happens. If I make it flash, > > the default, the book flashes, > How many pages do you have in your Stack? Inspect it. While inspecting, you > can also debug sends like 'self goToNextCardInStack'. Trace through and check. > This may appear tedious but it is a good way to pick up Squeak internals. > > Subbu > First an update. Two changes. First, the difference I saw between the two computers is not there. They behave the same. Second, I got the button working but I don't know why. I just deleted the one and created a new one. This one works with nextPage and goToNextCardOfStack, but they do not do the same thing. I am using a ScriptableButton, taken from the Objects menu. My stack has three pages, which seem to act like backgrounds. I have one instance of the first page, four of the second, and two of the third. When I navigate with the StackMorph menu, < and >, the cards display in sequence, as expected. The > menu item sends goToNextCardInStack. My Start button is on the title page. I have another button attached to the background of the second page which goes to the first page (a "Home" button). Because it is attached to the background it appears on every card of that background. If I am on the third card (second card of second page) and click the home button I go to the first card, which is correct. But if I then click the Start button when set to nextPage I go to where I was on the second page, card #3. So I set it send goToNextCardInStack and that does what I want. The problem I still have is that unless the button is attached to the background it disappears when I yellow-click anything. I found the button while inspecting the page. It is listed under submorphs, along with the two text morphs also on the page: an Array(a ScriptableButton<StartButton>(886) a TextMorph<PublishInfo>(2522) a TextMorph<Title>(2417)) If I have that inspector open and yellow-click anything, the part about the button disappears, along with the button. Setting "resist being deleted" does not help. If I blue-click the button and click the red menu button, stacks and cards, and select "put into background," it no longer disappears. I have cards with sketch morphs on them that do not behave this way. Are there morphs that must be attached to the background and others that can float on top of a background? -- Gary Dunn, Honolulu [hidden email] http://openslate.net/ http://e9erust.blogspot.com/ Sent from Slate001 |
Free forum by Nabble | Edit this page |