Re: why does this not work and how do you do it?
OK, thanks, its now clear why the send to card doesn't work. But still, surely in the two object one script example, focus should work? That is, the only script on the card is from the very first example: on mouseUp ask think of a number if it is not a number then put empty into field Field focus on field Field else put it into field Field focus on field Field end if end mouseUp Focus not going to field in this case when you type in is a bug, yes? Peter -- View this message in context: http://www.nabble.com/why-does-this-not-work-and-how-do-you-do-it--tp16593303p16625617.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Peter Acibiades wrote: on mouseUp ask think of a number I knew Revolution is was clever but is it also telepathic? ;.) Best regards Barry ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Peter Alcibiades wrote: OK, thanks, its now clear why the send to card doesn't work. But still, surely in the two object one script example, focus should work? That is, the only script on the card is from the very first example: on mouseUp ask think of a number if it is not a number then put empty into field Field focus on field Field else put it into field Field focus on field Field end if end mouseUp Focus not going to field in this case when you type in is a bug, yes? Probably, since it works fine here on Mac OS X. Apparently it's a Linux bug. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Jacque and Mark - thanks, select the text of does indeed work. I'd previously tried 'select after' which did not work. It must definitely be a bug then, and apparently specific to the Linux build? Its a very specific problem. Its not that focus on field does not work. On the same screen I have a backup handler at card level to trap miscellaneous mouse clicks and restore focus to the field. That one does work fine. The thing seems to be, if you start out with the cursor in a field and focus on the field, then do something which places focus on another object, even if the handlers for that object try to restore focus on the field they cannot do it with 'focus'. Though they can do it with 'select'. Obviously this is not what you'd expect, its inconsistent behaviour. You'd expect focus on field to work the same wherever it is found, and it don't. Its also not very good, because from the user point of view, what he/she sees is the cursor flashing normally in the input field, but for some reason the keyboard fails to work. My dear users are totally baffled by this, so I get calls saying the keyboard is broken! Well, it must be. You push the keys and nothing happens! The other odd thing about this is, there is a card script which just does focus on field if there is a mouse up. This works fine if you click anywhere on the screen. But it does not work if it is invoked by 'send mouseUp to this card'. Peter -- View this message in context: http://www.nabble.com/why-does-this-not-work-and-how-do-you-do-it--tp16593303p16602982.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Hi Peter, No, I don't think this is specific to Linux. There are similar problems on Mac OS X. The other odd thing might be yet another bug in Rev or a problem in your script. You might want to tell us more about it. Best regards, Mark Schonewille -- Economy-x-Talk Consulting and Software Engineering http://economy-x-talk.com http://www.salery.biz A large collection of scripts for HyperCard, Revolution, SuperCard and other programming languages can be found at http://runrev.info On 10 apr 2008, at 08:36, Peter Alcibiades wrote: Jacque and Mark - thanks, select the text of does indeed work. I'd previously tried 'select after' which did not work. It must definitely be a bug then, and apparently specific to the Linux build? Its a very specific problem. Its not that focus on field does not work. On the same screen I have a backup handler at card level to trap miscellaneous mouse clicks and restore focus to the field. That one does work fine. snip The other odd thing about this is, there is a card script which just does focus on field if there is a mouse up. This works fine if you click anywhere on the screen. But it does not work if it is invoked by 'send mouseUp to this card'. Peter ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
OK, this is really simple to do. You make a new mainstack with one card whose script is: on mouseUp focus on field Field end mouseUp Now you create a button with traversal off and a field with traversal on. The button script is: on mouseUp ask pick a number if isNumber(it) is true then put it into field Field if the result is Cancel then select the text of field Field if isNumber(it) is false then send mouseUp to this card end mouseUp Select text as you and Jacque suggested works fine. Now, what I expect is that if you enter say xyz at the prompt, it should send mouseUp to the card, and this should be exactly the same as clicking on the card. Maybe this is not right? At any rate, it doesn't activate. However, if you then click on the card, the field is activated. So what seems so strange to me is that doing mouseUp on the card works fine, but sending mouseUp to the card from the button doesn't work. I did put in a line to answer it, and the alpha stuff really is in it, so definitely we should meet the condition of isNumber(it) being false. Be glad to see someone else duplicating this! Peter -- View this message in context: http://www.nabble.com/why-does-this-not-work-and-how-do-you-do-it--tp16593303p16615268.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Peter Alcibiades wrote: OK, this is really simple to do. You make a new mainstack with one card whose script is: on mouseUp focus on field Field end mouseUp Now you create a button with traversal off and a field with traversal on. The button script is: on mouseUp ask pick a number if isNumber(it) is true then put it into field Field if the result is Cancel then select the text of field Field if isNumber(it) is false then send mouseUp to this card end mouseUp Select text as you and Jacque suggested works fine. Now, what I expect is that if you enter say xyz at the prompt, it should send mouseUp to the card, and this should be exactly the same as clicking on the card. Maybe this is not right? I think it is not right. :) When you send a message, like mouseup, to a card, that is all that happens. Just the message. Any user actions that would ensue from a physical click don't execute. You only get a message entry lined up in the message queue. It's all very silent and behind the scenes. If you want to simulate a real, physical click, then use click at locx,locy or click at the loc of fld 1. This duplicates a physical user action. It isn't really the best way to go about it though. However, the click at command sends all the normal mouse messages that are associated with a physical click (mousedown, mousestilldown, mouseup) and sets the focus. But a better way is to just script the behaviors you want -- i.e., to select the text of the field. Just like you did. :) -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
why does this not work and how do you do it?
One card, one button, one field (called Field) Traversal is off on the button, on for the field. There is only one script - for the button - which goes: on mouseUp ask think of a number if it is not a number then put empty into field Field focus on field Field else put it into field Field focus on field Field end if end mouseUp What I expect to happen is that in either case the user will be able to enter from the keyboard. But what actually happens is that the cursor flashes in the field, but the keyboard is dead. To activate the keyboard you have to double click in the field (why double?). There is going to be a simple and obvious answer, but I cannot find it. Oh dear. Yours, fully expecting to feel very foolish in a few minutes from now! Peter ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Peter Alcibiades wrote: One card, one button, one field (called Field) Traversal is off on the button, on for the field. There is only one script - for the button - which goes: on mouseUp ask think of a number if it is not a number then put empty into field Field focus on field Field else put it into field Field focus on field Field end if end mouseUp What I expect to happen is that in either case the user will be able to enter from the keyboard. But what actually happens is that the cursor flashes in the field, but the keyboard is dead. To activate the keyboard you have to double click in the field (why double?). Your script works okay here, though if I enter a number the insertion point appears before the number rather than after. I can still type though. You could try select text of fld x instead, maybe that will help. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: why does this not work and how do you do it?
Hi Peter, AFAIK there is no simple answer and you are not foolish. This is a bug, possible related to http://quality.runrev.com/qacenter/show_bug.cgi?id=6056 . I believe there is another, similar bug, but I can't find it that quickly. There are two things you can try. First, select the text of the field, instead of focusing the field. Second, create a new handler, which focuses the field, and send a message in 0 millisecs, which triggers that handler. Best regards, Mark Schonewille -- Economy-x-Talk Consulting and Software Engineering http://economy-x-talk.com http://www.salery.biz A large collection of scripts for HyperCard, Revolution, SuperCard and other programming languages can be found at http://runrev.info On 9 apr 2008, at 20:17, Peter Alcibiades wrote: One card, one button, one field (called Field) Traversal is off on the button, on for the field. There is only one script - for the button - which goes: on mouseUp ask think of a number if it is not a number then put empty into field Field focus on field Field else put it into field Field focus on field Field end if end mouseUp What I expect to happen is that in either case the user will be able to enter from the keyboard. But what actually happens is that the cursor flashes in the field, but the keyboard is dead. To activate the keyboard you have to double click in the field (why double?). There is going to be a simple and obvious answer, but I cannot find it. Oh dear. Yours, fully expecting to feel very foolish in a few minutes from now! Peter ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution