Page 1 of 1

Keeping a data field clear when saving...

Posted: Sat Jan 21, 2012 7:35 pm
by kcorey
Hi All,

I have a card I'm using as a data store. The interesting bits I save on this card are things like "login name", and various preferences.

Trouble is, this card won't be saved in the production version. There, it will always load with empty fields on the data card.

I'm using Klaus Major's excellent recommendations from the 99th and 101st newsletters. (They are really good if you want to store smallish bits of preferences in a safe cross platform way, thanks Klaus!).

At any rate, as I'm developing, each time I type Ctrl-S, those data fields might have a value, and will be saved that way. My code will "get used" to having data in those fields, if you see what I mean.

Is there a programmatic way in the IDE to say "I just typed Ctrl-S. Before you save, clear fields x,y and z on card 'data'"?

-Ken

Re: Keeping a data field clear when saving...

Posted: Sat Jan 21, 2012 7:53 pm
by dunbarx
Trap the "saveStackRequest" message, which is sent just before "save" is.

Craig Newman

Re: Keeping a data field clear when saving...

Posted: Mon Jan 23, 2012 7:59 am
by kcorey
That's just fantastic!

I thought that was gonna be some heavy smoke and mirrors.

*grin*

-Ken