Custom Property Issue

Eric Chatonet eric.chatonet at sosmartsoftware.com
Mon Dec 11 04:23:27 EST 2006


Hi Scott,

You could try a simpler code since you don't need to open invisible a  
stack then change its style (that is the same thing that reopening it  
again):

on mouseUp
   set the dialogData to empty
   if the platform is "MacOS" then
     sheet stack "StackDataEntry"
   else
     modal stack "StackDataEntry"
   end if
   -- handler pauses here until the StackDataEntry stack is closed
   if the dialogData <> empty then
     <statements>
   end if
end mouseUp

In the Save button of your StackDataEntry stack:

on mouseUp
   set the dialogData to <What_I_Need_To_Know>
   close this stack
end mouseUp

And quite simply in the Cancel button of your StackDataEntry stack:

on mouseUp
   close this stack
end mouseUp

See dialogData in docs.
Hope this helps :-)

Le 11 déc. 06 à 10:01, Scott Kane a écrit :

> Hi,
>
> Not sure what I've got going wrong here but the code below works  
> fine on the second execution but not the first.  A stack is opened  
> (sheet or modal according to OS) and the Stack has a Cancel and  
> Save button.  If the Save button in Clicked the Custom Property  
> ModalResult is set to true and the Stack is send a Hide message  
> from that button.  The converse (set to False) if Cancel is  
> clicked.  The routine that shows the stack below works fine but I  
> can't get it to retrieve the contents (see code below) as the  
> Custom Property does not seem to be set.  As I said - it works find  
> on the second attempt (right after) the first attempt showing stack  
> etc.
>
> Code is:
>
> on mouseUp
>    set the Visible of Stack "StackDataEntry" to True
>  if the platform is "MacOS" then
>    Sheet Stack "StackDataEntry" else
>    Modal Stack "StackDataEntry"
>  end if
>  if the ModalResult of Stack "StackDataEntry" = True then
>    Put the fld "HistoryList" of Stack "StackDataEntry" into btn  
> "Manufacturer"
>     end if
> end mouseUp
>
> Cheers for any help


Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list