Re: [BLACKBOX] How to find out if a document is "dirty"

From: [at]} <Rainer>
Date: Tue, 17 Jul 2012 16:30:40 +0200

----boundary-LibPST-iamunique-604257737_-_-
Content-type: text/plain

Dear Marc,
thanks a lot for your very quick response to my problem.
I incorporated your code (slightly modified) in the gard procedure of my "second button" which calls the compiler.
The button gets disabled as soon as the user modifies the document and will be reenabled again after the user had saved his modification.

So your solution to my problem works much better than expected :-)

Thanks again and best regards,
Rainer


Am 17.07.2012 um 06:18 schrieb Marc Frei:

> Dear Rainer,
>
>> So I need a simple way to find out if the opened document is "dirty"
>
> Please have a look at the StdCoder encoded snippet below.
>
> Kind regards,
>
> Marc
>
> StdCoder.Decode ..,, ..uS....3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
> hXhC6FU1xhiZiVBhihgmRiioedhgrZcZRiXFfaqmSrtuGfa4700zdGrr8rmCLLCJuyKtYcZRiX
> 7.2.s,sDD.,6.5Qw7uP51QCPuP7PNN9F9vQAy1xB.gdj,UBxhYhAbf9P0G2sIdvPZntgcghghZ
> cZRC8T0E.k4P.H.9g,2.,U08J99SdfJHPNjvQCJuGKfaqmY6MwdONl1QCh0708T,U..w.wZ4.,
> sUGpmWbBxhYhAbndMHT9NY6Mw.sQq2Y6cwB.0.n7,w,Aa2E.0.YR2U00.bnUGLu8ro8quGrmCL
> WKqtE0E.kHE.0.p.0.4.0EJYjyC.6.VQ.El8.1cUZT1E.6C6.c4E.k.Ue.E.mP,UAU.oK6.sIX
> g.iFL8U0Cy2hgqRcjhhhBgiZgZJinpZHZCh0E.4TWKKv.Uio8.,cw5.0..o.6.K,O,yzayIWKJ
> aKIE0JtaKvGoo8LuarRqk4akYqIcyIdGJECJuy4mGECpm4ruKKrCqm8rtmGEOpoKanZZUQcjph
> oJijZhghgmRigsId9NNuPDvCPM1H6IZuH5OF7OJZOF,tI9PQ.,78hfC,dJHPNo3M8p76bONX1s
> QRtI9PQf1QbBAV7oe,JeUIiZRipZhoJbUQeZ,sQ.kR0GmeHECJuy4uGWyqq4qouqR0GweHE4Ib
> aJcGJdin4aEVKoXaIbqk2akUCpdKIdGJIOLECGEuoYmIK0GN0nIin4ak2GKEenS0GvuGWyqqEI
> amRq.HeF,7N,t6,dH2YI3d3pdBA,H6S,dCvFmumXKKuCpm45EIamRk2a2F7S,t6,,H76B76F7S
> aod0mdKqs.CLL.kI0GeWoW.HcQ9vQfXUI5WLICpm45kt.UdgV7AV7gcCZcBAV7g6in4ak28pWG
> pe8Jb0GtK4gV7gcC76bON.in4qk2.U2BhmZC,78hfCUn,a03uHT8H9OERuCPM0HcJsQp76bON.
> CbH,kRAV0,ME..m0.b96pND,tI91EIOrIin4aUG,2Zn3YX2YClIktuGWaKt68HN1HMFRW2Bhml
> R..AdnpcjRgpRi2BhmZCJtCPM0HcJcRp76kt.r767POZXu2Y0,Q582Uq3YugbUQcjpB.uGXyql
> KbKBhZxicAZvg,Gqo85,dCv76FdR,,.7OOZXcoidQ5QeoZgAFL8oryKqWGmaKtM8rN1H.UAphB
> AV3p7aotO2Y6sCqkWuIW2emBBUigVBIUEJidpCU7Ri4xB.8ssHpmsETfP.sIdnVGLtmKWKqtCK
> .4Te..c95uPR9R.7ONbvM,kVkk.Um,..Unp3.6F6.ZD,6.636.M00U.2..AU0CyIVGhighgmRi
> iQ88pum470,Mwd0UnpZGhighA70,cw5.0.L3D.53,6.C6.QiiQ8CJuaLqKKWKqtCK.4D.o3aLq
> .,cwDU.6..F6.I92U.E,,.RNEd1U2hA0U2U...G00k.0.0.0mFf32Uwpr,sbTX,U,U.2.8Mtr.
> 2..c4E.k.Ue.0.,6Y1.0.UA2Tm.mmBjZ92T,eUXDFTXhhAsET1.UG.,..W.0.A,,UMSdn73Ptc
> 0MyfU.az864T8OGNMW7QS,...
> --- end of encoding ---
>
>> -----Original Message-----
>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> Rainer Neubauer
>> Sent: Montag, 16. Juli 2012 20:33
>> To: BLACKBOX{([at]})nowhere.xy
>> Subject: [BLACKBOX] How to find out if a document is "dirty"
>>
>> Hi all,
>> in a form I have a command button which, when clicked, calls
>> StdCmds.OpenDoc (<file name>).
>> The opened document is a source file which may be modified by
>> the user.
>> A second command button, when clicked, calls the compiler on
>> the opened source (thanks to Douglas G. Danforth; his mail
>> "Compiling from a program").
>> Now I would like to ask the user to save his modifications
>> before calling the compiler. So I need a simple way to find
>> out if the opened document is "dirty", i.e. if the user has
>> made any modifications.
>> Does anybody have an idea how to do this ?
>>
>> Thanks in advance and best regards,
>> Rainer
>>
>> ----
>> To unsubscribe, send a message with body "SIGNOFF BLACKBOX"
>> to LISTSERV{([at]})nowhere.xy
>>

>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-604257737_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzIEFyaWFsO30NCntcZjFcZm1vZGVybiBDb3VyaWVyIE5ldzt9DQp7XGYyXGZu
aWxcZmNoYXJzZXQyIFN5bWJvbDt9DQp7XGYzXGZtb2Rlcm5cZmNoYXJzZXQwIENvdXJpZXIgTmV3
O319DQp7XGNvbG9ydGJsXHJlZDBcZ3JlZW4wXGJsdWUwO1xyZWQwXGdyZWVuMFxibHVlMjU1O30N
Clx1YzFccGFyZFxwbGFpblxkZWZ0YWIzNjAgXGYwXGZzMjAgRGVhciBNYXJjLFxwYXINCnRoYW5r
cyBhIGxvdCBmb3IgeW91ciB2ZXJ5IHF1aWNrIHJlc3BvbnNlIHRvIG15IHByb2JsZW0uXHBhcg0K
SSBpbmNvcnBvcmF0ZWQgeW91ciBjb2RlIChzbGlnaH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CTEFD
S0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLn19AJ0UYUNLQg=
----boundary-LibPST-iamunique-604257737_-_---
Received on Tue Jul 17 2012 - 16:30:40 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:00 UTC