Codejock Calendar Samples?

Re: Codejock Calendar Samples?

Postby Richard Chidiak » Sat May 25, 2013 5:23 pm

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
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Codejock Calendar Samples?

Postby Massimo Linossi » Sat May 25, 2013 5:37 pm

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
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Codejock Calendar Samples?

Postby TimStone » Sat May 25, 2013 6:08 pm

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Codejock Calendar Samples?

Postby Enrico Maria Giordano » Sat May 25, 2013 6:13 pm

Antonio Linares wrote:Enrico,

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


Here it is:

Code: Select all  Expand view  RUN
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
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 7:37 pm

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
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Codejock Calendar Samples?

Postby Enrico Maria Giordano » Sat May 25, 2013 7:47 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Codejock Calendar Samples?

Postby lucasdebeltran » Sat May 25, 2013 7:52 pm

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
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 7:53 pm

Enrico,

Here you have a Harbour example similar to yours:

Code: Select all  Expand view  RUN
#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: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 7:55 pm

Using a codeblock:

Code: Select all  Expand view  RUN
#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: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 7:56 pm

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: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 8:00 pm

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: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 8:01 pm

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: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Codejock Calendar Samples?

Postby Antonio Linares » Sat May 25, 2013 8:06 pm

regards, saludos

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

Re: Codejock Calendar Samples?

Postby Enrico Maria Giordano » Sat May 25, 2013 10:25 pm

Thank you Master. I'll try it.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Codejock Calendar Samples?

Postby Enrico Maria Giordano » Sat May 25, 2013 10:48 pm

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
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests