Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #5174 > unrolled thread

Overwriting Today and Seconds

Started by"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
First post2013-04-30 09:48 +0200
Last post2013-04-30 12:07 +0200
Articles 5 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Overwriting Today and Seconds "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2013-04-30 09:48 +0200
    Re: Overwriting Today and Seconds "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-04-30 10:11 +0200
    Re: Overwriting Today and Seconds Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2013-04-30 09:24 +0100
    Re: Overwriting Today and Seconds "Karl-Heinz" <invalid@invalid.invalid> - 2013-04-30 11:37 +0200
      Re: Overwriting Today and Seconds "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2013-04-30 12:07 +0200

#5174 — Overwriting Today and Seconds

From"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
Date2013-04-30 09:48 +0200
SubjectOverwriting Today and Seconds
Message-ID<klnsqb$i66$1@dont-email.me>
I would like to overwrite the two functions Today and Seconds. For one 
customer I have to adjust the OS date and time using a time zone model. But 
I need also the originally functionality, calling the original functions in 
the VO28Run dll or having a substitute for both functions.

Arne Ortlinghaus
ACS Data Systems

[toc] | [next] | [standalone]


#5175

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2013-04-30 10:11 +0200
Message-ID<au9cl8Fgb8fU1@mid.individual.net>
In reply to#5174
Hi Arne,

> I would like to overwrite the two functions Today and Seconds. For
> one customer I have to adjust the OS date and time using a time zone
> model. But I need also the originally functionality, calling the
> original functions in the VO28Run dll or having a substitute for both
> functions.

Uwe Holz had presented something like this years ago....

If I remember correctly, you could define the functions in your own
library, overwriting the ones of the system library.
To call the original ones, you could use a _dll statement, using other
names.

If you need more info, I can search my archives if I can find something.

Wolfgang


-- 

[toc] | [prev] | [next] | [standalone]


#5176

FromMalcolm G <malcolm-news2012delete@delete.jobstream.com>
Date2013-04-30 09:24 +0100
Message-ID<VcLft.81782$z82.7285@fx07.fr7>
In reply to#5174
On 30/04/2013 08:48, Arne Ortlinghaus wrote:
> I would like to overwrite the two functions Today and Seconds. For one 
> customer I have to adjust the OS date and time using a time zone model. But 
> I need also the originally functionality, calling the original functions in 
> the VO28Run dll or having a substitute for both functions.

Do you want to override them everywhere or only in code you write?

(In code you write it is fairly easy, I don't know how do it everywhere)

[toc] | [prev] | [next] | [standalone]


#5178

From"Karl-Heinz" <invalid@invalid.invalid>
Date2013-04-30 11:37 +0200
Message-ID<au9hppFhfmvU1@mid.individual.net>
In reply to#5174
Hi Arne,

>I would like to overwrite the two functions Today and Seconds. For one
>customer I have to adjust the OS date and time using a time zone model. But
>I need also the originally functionality, calling the original functions in
>the VO28Run dll or having a substitute for both functions.

1. To be able to use the original functionality later on, import the desired
function with a different name.

2. Overwrite the original function and add your business logic.

------------------------
_DLL FUNCTION DefaultToday() AS DATE    PASCAL:VO28RUN.Today
-------------------------

FUNCTION Today() AS DATE PASCAL
LOCAL d AS DATE

 IF Specialcondition

  d := ....

 ELSE
  d := DefaultToday()

 ENDIF


 RETURN d

---------------------
regards
Karl-Heinz

[toc] | [prev] | [next] | [standalone]


#5180

From"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
Date2013-04-30 12:07 +0200
Message-ID<klo4vf$pks$1@dont-email.me>
In reply to#5178
Hi Wolfgang, Malcom, Karl-Heinz,

yes, it was what I was searching for for changing functionality in my own 
code. I did not think on the possibility of renaming the function via the 
_dll statement.

Thanks a lot. You all have had a good performance returning an unpaid answer 
in less than 2 hours :-)

Arne


"Karl-Heinz" <invalid@invalid.invalid> schrieb im Newsbeitrag 
news:au9hppFhfmvU1@mid.individual.net...
> Hi Arne,
>
>>I would like to overwrite the two functions Today and Seconds. For one
>>customer I have to adjust the OS date and time using a time zone model. 
>>But
>>I need also the originally functionality, calling the original functions 
>>in
>>the VO28Run dll or having a substitute for both functions.
>
> 1. To be able to use the original functionality later on, import the 
> desired
> function with a different name.
>
> 2. Overwrite the original function and add your business logic.
>
> ------------------------
> _DLL FUNCTION DefaultToday() AS DATE    PASCAL:VO28RUN.Today
> -------------------------
>
> FUNCTION Today() AS DATE PASCAL
> LOCAL d AS DATE
>
> IF Specialcondition
>
>  d := ....
>
> ELSE
>  d := DefaultToday()
>
> ENDIF
>
>
> RETURN d
>
> ---------------------
> regards
> Karl-Heinz
> 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web