Codejock Calendar Samples?

User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: Codejock Calendar Samples?

Post by Richard Chidiak »

Antonio,

My pleasure , i would be glad to help

I will publish a copy of my codejock program running (same program) with Xharbour and Harbour

Massimo : Sorry about the link, we had a hack on our servers 3 months ago and we had to reinstall almost everything, this sample was not backed.

I can provide any help on Codejock if you need, just let me know.

Just to mention, i have moved all my applications from xharbour/bcc 5.82 to Harbour/MSVC 2010.

Regards,

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Codejock Calendar Samples?

Post by Massimo Linossi »

Thanks Richard, very kind.
No problem with the link, I've made some tests with the one that Antonio has published.
The problem is that I receive some errors when I try to run it. And if I correct one line there is another one
that is generating another error. And so on. So I think that the problem is not the code but the compiler,
because if you have published that code, it was working. For these reasons I want to change the compiler and
to pass to Harbour, and to test also MSVC.
When I'm ready to make the transition, If I can ask something to you it will be a great help.
Thanks a lot.
Massimo
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Codejock Calendar Samples?

Post by TimStone »

Massimo and Richard,

I am also working with Codejock. I originally had it running perfectly with xHarbour ( .com ), but I've been transition my primary application to Harbour / MSVC 2010.

I have further testing to do with some of my other ActiveX controls, but so far it looks like everything is running well. I don't do major updates for my clients over the summer ( only smaller modifications automatically updated ). However, my goal is to release for general use the MSVC version in September.

I would strongly encourage people to make this shift. Ultimately I think we will see more potential for integration. Yes, we are likely to also do the shift to 2012 Visual Studio with Harbour / FWH. There is great potential there.

Richard, you can also share my calendar program because I believe it is an easier implementation. Just remove the license key .... but I think you already have it without that.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Codejock Calendar Samples?

Post by Enrico Maria Giordano »

Antonio Linares wrote:Enrico,

Could you provide a small self contained example ? thanks :-)
Here it is:

Code: Select all

FUNCTION MAIN()

    LOCAL hBkg := HB_BACKGROUNDADD( { || Tone( 440, 1 ) }, 10, .F. )
    LOCAL hIdl := HB_IDLEADD( { || HB_BackGroundRun( hBkg ) } )

    SET BACKGROUND TASKS ON

    HB_BACKGROUNDACTIVE( hBkg, .T. )

    INKEY( 0 )

    SET BACKGROUND TASKS OFF

    HB_BACKGROUNDDEL( hBkg )

    HB_IDLEDEL( hIdl )

    RETURN NIL
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

Enrico,

Here you can review Harbour threads management great examples:

https://github.com/harbour/core/tree/master/tests/mt

Surely there are some that are very similar. I wonder if xharbour supports them.

I think that we could implement the function HB_BACKGROUNDADD() using Harbour functions...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Codejock Calendar Samples?

Post by Enrico Maria Giordano »

What if I don't want to use multithreading libs (they would inflate my EXEs, I suppose)?

EMG
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: Codejock Calendar Samples?

Post by lucasdebeltran »

Mr. Enrico,

Why are you afraid with exe sizes with present Ram sizes of the Pcs?.

Also, I indicated you some swithcs for latest BCC to reduce size. Are you happy with them?.

Thank you.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

Enrico,

Here you have a Harbour example similar to yours:

Code: Select all

#include "FiveWin.ch"

function Main()

   local thID := hb_threadStart( @thFunc() )

   MsgInfo( "ok" )

return nil

function thFunc()

   local n 
   
   for n = 1 to 10
      Tone( 440, 1 )
   next   
   
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

Using a codeblock:

Code: Select all

#include "FiveWin.ch"

static bAction

function Main()

   local thId

   bAction = { || Tone( 440, 1 ) }
   thId = hb_threadStart( @thFunc() )

   MsgInfo( "ok" )

return nil

function thFunc()

   local n 
   
   for n = 1 to 10
      Eval( bAction )
   next   
   
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

In order to build those examples hbvmmt.lib has to be linked instead of hbvm.lib

and also from Borland, we have to link cw32mt.lib instead of cw32.lib
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

Enrico,

My example size built using threads is 2.515.416 bytes

without threads: 2.486.784 bytes

very little difference :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

Enrico,

Keep in mind that if you are not using threads then you are slicing the Harbour virtual machine execution process and slowing the whole app.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock Calendar Samples?

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Codejock Calendar Samples?

Post by Enrico Maria Giordano »

Sorry, the background task is only one of the incompatibilities I found. The warnings is another one (see an old thread on this subject). :-(

EMG
Post Reply