Problem with focusIn and a substack

2008-07-26 Thread Bill Vlahos
I have a field that when a user clicks on it a calendar picker stack  
appears to let the user click on a date. The field is locked to allow  
the mouseUp to work. The script below works fine when the user clicks  
on the field. The date is selected from the popup and put into the  
field.


It is also possible for the user to tab into the field from the  
previous field so I added the focusIn handler. If I uncomment click  
at the loc of me the calendar stack shows up but when the user  
selects the date it doesn't go into the field.


How do I get both to work?

on mouseUp
  put SmallCalendar into tStackName
  put me into theDate
  put theDate into theOldDate
  convert theDate from short system date to short English date
  put getDate(theDate, tStackName) into theDate
  if theDate is theOldDate then exit to top
  if theDate is clear then
put empty into me
  else
convert theDate from short English date to short system date
put theDate into me
  end if
  closeField
end mouseUp

on focusIn
--  click at the loc of me
end focusIn

Bill Vlahos
___
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: Re: Problem with FocusIn

2007-11-05 Thread Claus Dreischer
Hello Devin,

i think i do want to use the closeField message :-)
because i want to know when a field *has* changed.

Context:
The card has several fields like name, company, street, address, etc.
a save button, to buttons for up and down paging, a new button and a delete 
button.

What i'd like to achive is to remember the user to save his changes,
when he changed a field and not saved it by pushing the save button.
So i need a flag like some-fields-have-changed to evaluate when he is 
pressing the up or down button, 
or when he's leaving the card.

Regards,
   Claus.


 Hello Claus,

...

  The solution to my problem is the closeField message, which is only  
  sent when the content *has* changed.
 
 What you want is the exitField message. It is sent when leaving the  
 field and the content has not changed.
 
 Devin
 
 
 
  check the field locking.
 
  from the docs:
 
  If the control is an unlocked field or a button whose menuMode is  
  comboBox, the openField message is sent to it instead of the  
  focusIn message.
 
  A locked field receives the focusIn message when the user tabs to  
  it or otherwise makes it active (focused), or when text in it is  
  selected by a handler.
 
  Hi,
 
  i have problems with the focusIn message.
 
  What i want to achive is to remember the value of a field
  when the user is editing it (on focusIn). After that (on focusOut),
  i would like to check the new value against the remembered one.
  If they are different, the change has to be saved,
  so i ask the user to do so when he's leaving the card.
 
  I think the focusIn message is not sent because even something like
 
  on focusIn
beep
  end focusIn
 
  does not work.
 
 
 Devin Asay
 Humanities Technology and Research Support Center
 Brigham Young University

___
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: Problem with FocusIn

2007-11-05 Thread Eric Chatonet

Hello Claus,

I think you are right when wanting to use closeField.
In the script of the card:

local lChangedFlag -- local script variable
on closeField
  put true into lChangedFlag
  -- will be set to true for any change in any field in the card
end closeField

on closeCard
  if lChangedFlag then save
  put false into lChangedFlag
end closeCard

Best regards from Paris,
Eric Chatonet.

Le 5 nov. 07 à 11:55, Claus Dreischer a écrit :


Hello Devin,

i think i do want to use the closeField message :-)
because i want to know when a field *has* changed.

Context:
The card has several fields like name, company, street, address, etc.
a save button, to buttons for up and down paging, a new button  
and a delete button.


What i'd like to achive is to remember the user to save his changes,
when he changed a field and not saved it by pushing the save button.
So i need a flag like some-fields-have-changed to evaluate when  
he is pressing the up or down button,

or when he's leaving the card.

Regards,
   Claus.



Hello Claus,


...


The solution to my problem is the closeField message, which is only
sent when the content *has* changed.


What you want is the exitField message. It is sent when leaving the
field and the content has not changed.

Devin





check the field locking.

from the docs:

If the control is an unlocked field or a button whose menuMode is
comboBox, the openField message is sent to it instead of the
focusIn message.

A locked field receives the focusIn message when the user tabs to
it or otherwise makes it active (focused), or when text in it is
selected by a handler.


Hi,

i have problems with the focusIn message.

What i want to achive is to remember the value of a field
when the user is editing it (on focusIn). After that (on  
focusOut),

i would like to check the new value against the remembered one.
If they are different, the change has to be saved,
so i ask the user to do so when he's leaving the card.

I think the focusIn message is not sent because even something  
like


on focusIn
beep
end focusIn

does not work.




Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
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: Problem with FocusIn

2007-11-05 Thread Devin Asay

Hi Claus,

I see that I misread your message, and that closeField was what you  
needed. Very often in situations like yours I write both a closeField  
and exitField handler so that I can account for all possible outcomes.


Sorry for misreading; hope I didn't add to the confusion. :-P

Devin

On Nov 5, 2007, at 3:55 AM, Claus Dreischer wrote:


Hello Devin,

i think i do want to use the closeField message :-)
because i want to know when a field *has* changed.

Context:
The card has several fields like name, company, street, address, etc.
a save button, to buttons for up and down paging, a new button  
and a delete button.


What i'd like to achive is to remember the user to save his changes,
when he changed a field and not saved it by pushing the save button.
So i need a flag like some-fields-have-changed to evaluate when  
he is pressing the up or down button,

or when he's leaving the card.

Regards,
   Claus.



Hello Claus,


...


The solution to my problem is the closeField message, which is only
sent when the content *has* changed.


What you want is the exitField message. It is sent when leaving the
field and the content has not changed.

Devin





check the field locking.

from the docs:

If the control is an unlocked field or a button whose menuMode is
comboBox, the openField message is sent to it instead of the
focusIn message.

A locked field receives the focusIn message when the user tabs to
it or otherwise makes it active (focused), or when text in it is
selected by a handler.


Hi,

i have problems with the focusIn message.

What i want to achive is to remember the value of a field
when the user is editing it (on focusIn). After that (on  
focusOut),

i would like to check the new value against the remembered one.
If they are different, the change has to be saved,
so i ask the user to do so when he's leaving the card.

I think the focusIn message is not sent because even something  
like


on focusIn
beep
end focusIn

does not work.




Devin Asay
Humanities Technology and Research Support Center
Brigham Young University


___
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



Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
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


Problem with FocusIn

2007-11-04 Thread Claus Dreischer

Hi,

i have problems with the focusIn message.

What i want to achive is to remember the value of a field
when the user is editing it (on focusIn). After that (on focusOut),
i would like to check the new value against the remembered one.
If they are different, the change has to be saved,
so i ask the user to do so when he's leaving the card.

I think the focusIn message is not sent because even something like

on focusIn
beep
end focusIn

does not work.
Even the example in the dictionary is not working.

Obviously i am missing something here. Any ideas?

Regards,
Claus.

BTW: It's 2.9.0 dp1 on a Win2k box
--
http://www.danasoft.com/sig/dsagsdg.jpg
___
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: Problem with FocusIn

2007-11-04 Thread Stephen Barncard

check the field locking.

from the docs:

If the control is an unlocked field or a button whose menuMode is 
comboBox, the openField message is sent to it instead of the 
focusIn message.


A locked field receives the focusIn message when the user tabs to it 
or otherwise makes it active (focused), or when text in it is 
selected by a handler.




Hi,

i have problems with the focusIn message.

What i want to achive is to remember the value of a field
when the user is editing it (on focusIn). After that (on focusOut),
i would like to check the new value against the remembered one.
If they are different, the change has to be saved,
so i ask the user to do so when he's leaving the card.

I think the focusIn message is not sent because even something like

on focusIn
beep
end focusIn

does not work.
Even the example in the dictionary is not working.

Obviously i am missing something here. Any ideas?

Regards,
Claus.

BTW: It's 2.9.0 dp1 on a Win2k box
--
http://www.danasoft.com/sig/dsagsdg.jpg
___


--


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -


___
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: Problem with FocusIn

2007-11-04 Thread Claus Dreischer

Hi,

on a side note:
It's nice that some people are trying to improve the documentation 
(wiki, etc.),
but on the other hand, there are people (me) who even can't read the 
existing documentaion =:-/


The solution to my problem is the closeField message, which is only 
sent when the content *has* changed.


Thanks Stephen!

Regards,
Claus.




check the field locking.

from the docs:

If the control is an unlocked field or a button whose menuMode is 
comboBox, the openField message is sent to it instead of the 
focusIn message.


A locked field receives the focusIn message when the user tabs to it 
or otherwise makes it active (focused), or when text in it is 
selected by a handler.



Hi,

i have problems with the focusIn message.

What i want to achive is to remember the value of a field
when the user is editing it (on focusIn). After that (on focusOut),
i would like to check the new value against the remembered one.
If they are different, the change has to be saved,
so i ask the user to do so when he's leaving the card.

I think the focusIn message is not sent because even something like

on focusIn
beep
end focusIn

does not work.


...

--
http://www.danasoft.com/sig/dsagsdg.jpg
___
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: Problem with FocusIn

2007-11-04 Thread Mark Swindell

On Nov 4, 2007, at 8:16 AM, Claus Dreischer wrote:


It's nice that some people are trying to improve the documentation  
(wiki, etc.),
but on the other hand, there are people (me) who even can't read  
the existing documentaion =:-/


With the new and improved interactive mechanisms being explored, you  
ought to be able to add a comment to the focusin keyword that  
describes what you just went through, and which would point a future  
user to a more successful pathway.  What if you had found that  
information as a user comment?


I'm optimistic that BvG and Josh Melliker's solution can come  
together to provide a great service for the Rev community.


Mark
___
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: Problem with FocusIn

2007-11-04 Thread Devin Asay

Hello Claus,

On Nov 4, 2007, at 9:16 AM, Claus Dreischer wrote:


Hi,

on a side note:
It's nice that some people are trying to improve the documentation  
(wiki, etc.),
but on the other hand, there are people (me) who even can't read  
the existing documentaion =:-/


The solution to my problem is the closeField message, which is only  
sent when the content *has* changed.


What you want is the exitField message. It is sent when leaving the  
field and the content has not changed.


Devin





check the field locking.

from the docs:

If the control is an unlocked field or a button whose menuMode is  
comboBox, the openField message is sent to it instead of the  
focusIn message.


A locked field receives the focusIn message when the user tabs to  
it or otherwise makes it active (focused), or when text in it is  
selected by a handler.



Hi,

i have problems with the focusIn message.

What i want to achive is to remember the value of a field
when the user is editing it (on focusIn). After that (on focusOut),
i would like to check the new value against the remembered one.
If they are different, the change has to be saved,
so i ask the user to do so when he's leaving the card.

I think the focusIn message is not sent because even something like

on focusIn
beep
end focusIn

does not work.




Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
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