Re: [Harbour] Problem with upper and lower based on CDP

2010-05-21 Thread 2D Info - Leandro Damasio
I don't see why such complication is necessary, or what do you really want to do. If you need "ANSI" codepage, why don't you use PTISO, or it's also possible to add a PTWIN codepage if you (or anybody else) can provide one. Waw! This is great news for me! ??ISO cp is more than enough to my needs

Re: [Harbour] Problem with upper and lower based on CDP

2010-05-21 Thread 2D Info - Leandro Damasio
This is impossible to tell when pasted to an e-mail. Anyhow I've checked it locally directly in the source and to me the PT850 looks alright. Try to open src/codepage/cppt850.c with an editor which you can set to 850 CP, or your browser. Or do the same with above test after your write the result

Re: [Harbour] Problem with upper and lower based on CDP

2010-05-20 Thread 2D Info - Leandro Damasio
Nothing missing nor bug. UPPER(CHR(0)) ir CHR(0), and CHR(0) is end of string symbol. Sorry Mindaugas, but I couldn't understand what you mean. Can you give me a hand please? :) Leandro ___ Harbour mailing list (attachment size limit: 40KB) Harbour

Re: [Harbour] Problem with upper and lower based on CDP

2010-05-20 Thread 2D Info - Leandro Damasio
Hi Viktor These are internal structures, so there if is any notion of writing stable code I strongly suggest to not use them directly at all. I think the bug here is that you can access these members at all. IMO they should be protected like HB_ITEM members. You must be right. The .C code

[Harbour] Problem with upper and lower based on CDP

2010-05-20 Thread 2D Info - Leandro Damasio
Hello, See code below: HB_FUNC( _2D_CURRENTCODEPAGE ) { const char * cdpID = hb_cdpID(); PHB_CODEPAGE cdp = hb_cdpFind(cdpID); MessageBox(NULL,cdp->lower,'test',MB_OK); hb_reta(4) ; hb_storvc( cdp->lower, -1, 1 ); hb_storvc( cdp->upper , -1, 2 ); hb_storvc( cdpID

Re: [Harbour] date comparison

2010-05-19 Thread Leandro Damasio - 2D Info
? "t1==t2",t1==t2 // shows .F. ? "t1==date()",t1==date() // shows .T. ? "t2==date()",t2==date() // shows .F. return Shouldn't the comparisons above all return .T.? No, it's correct behavior. Think about SET CENTURY. If you want reversible conversion independent from any setting,

[Harbour] date comparison

2010-05-19 Thread Leandro Damasio - 2D Info
Hello Please look at the code below (harbour 2.1.0 rev 13756). <.code> procedure main() local t1:=date() local t2:=ctod(dtoc(date())) ? "t1",t1// current date ? "t2",t2// current date ? "t1=t2",t1=t2 // shows .F. ? "t1=date()",t1=date(

Re: [Harbour] Error in SDDFB

2010-03-22 Thread Leandro Damasio - 2D Info
So for me it's hard to understand why to reinvent it, if we already have it by the name "RDD". If we want to go beyond this and implement the whole "ORM" buzzword, it's a whole separate project, not just some extra lines of code in sqlmix. ORM is defined as Object Relational Mapping at wikipedi

Re: [Harbour] Re: About Harbour Documentation

2010-02-19 Thread Leandro Damasio
Hi all I would like to help to make Official Harbour Documentation a reality. You have been done an excelent coding job here and harbour could be much more appreciated and enjoyed (yet) with a proper official documentation within. Unfortunatelly I have been following that writing Official Harb

Re: [Harbour] Re: About Harbour Documentation

2010-02-19 Thread Leandro Damasio
ect is not a company and that nobody is paid for any participation or has the obligation to do anything. Let me know if there is something else I can do to help. Best regards, Leandro Damasio -- From: "Bacco" Sent: Friday, February 19

Re: [Harbour] Re: About Harbour Documentation

2010-02-19 Thread Leandro Damasio
Hi I would like to help to make Official Harbour Documentation a reality. You have been done an excelent coding job here and harbour could be much more appreciated and enjoyed (yet) with a proper official documentation within. Unfortunatelly I have been following that writing Official Harbour

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-14 Thread Leandro Damasio
Is the proceding defined? Read the ChangeLog. You do not have to even use it. Should I test it already? I already tested it but as I said you do not have to use it at all. I'll surely try HRB files as you suggested, but first I want to see how it works with pCode DLLs. Thank you very mu

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-14 Thread Leandro Damasio
There is an error when I try to recompile Harbour core with -DHB_DYNLIB. Apparently the problem is about hbpp.exe See the error below: ... gcc -I. -I../../../../../include -Wall -W -O3 -fomit-frame-pointer -march=i586 -mtune=pentiumpro -DHB_LEGACY_TYPES_OFF -DHB_DYNLIB -ohbpp.o -c ../../../hbpp

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-11 Thread Leandro Damasio
Hello Przemek >It will work but I do not understand how it's possible to call >function by macro knowing it's name when macro value is created >but in other context you do not know this name. Your above >description does not make any sense or you simply forgot to say >about some important condit

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-11 Thread Leandro Damasio
>But in the .prg code used for EXE file when you are calling >functions which do not exist in it and are loaded dynamically >then all such functions should be declared as DYNAMIC otherwise >you will have link time error (function does not exist). In my case of use the functions in the DLL are call

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-10 Thread 2D Info - Leandro Damasio
Hi Przemek But in the .prg code used for EXE file when you are calling functions which do not exist in it and are loaded dynamically then all such functions should be declared as DYNAMIC otherwise you will have link time error (function does not exist). In my case of use the functions in the D

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-10 Thread 2D Info - Leandro Damasio
-implib for -hbexe is okay, I'll commit it. For the other, I'd prefer to suggest -ldflag=--export-all-symbols until we find at least one more target which supports this option. Probably I've lost you, but does this flag (--export-all-symbols) supress the need of using DYNAMIC clause on exe prog

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-09 Thread 2D Info - Leandro Damasio
Hi We only have to choose name for this new option. My propositions: -hasdyn or -usedyn -expdyn Sorry but I'm the last person for such jobs but I believe that other users can help us. -usedyn sounds the most intuitive for me Regards Leandro ___

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-09 Thread 2D Info - Leandro Damasio
You are right. It's side effect of code added to exclude hbpp_dyn.obj from DLL. I'll replace it with other solution. Anyhow probably today we add support for using PCODE DLLs with standard static builds so you can wait a while for it. Ok Przemek Thanks Brgds Leandro ___

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-09 Thread 2D Info - Leandro Damasio
Hi Przemek If you are using statically linked application then it's necessary to recompile Harbour using with HB_DYNLIB macro to force exporting hb_vmProcessSymbols() and hb_vmExecute() functions. You can make it by setting HB_USER_CFLAGS envvar, i.e.: set HB_USER_CFLAGS=-DHB_DYNLIB before c

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
Very good Viktor! This text will be really very helpfull to many people! Brgds Leandro -- From: "Viktor Szakáts" Sent: Monday, February 08, 2010 8:27 PM To: "Harbour Project Main Developer List." Subject: Re: [Harbour] How to build and use pCode

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
Hi Przemek! I know what you did and why. The same will work also in Harbour if you use exactly the same C compiler and linker. Anyhow it's really dirty hack and the worse thing you could do. Believe me do if you would know all internal details of such hack with all possible problems and how many

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
Hi Przemek I agree though I do not now if I'm right person to describe it in INSTALL. For shared binaries using harbour*.dll there is no problem at all and it's enough to link PCODE dll with harbour*.dll. The problem is only with binaries which have HVM linked with static part of application. In

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
Hello Viktor I hope someone can answer these, but until then I suggest to lookup past messages, there has been _lots_ of detailed talk about .hrb files, even recently. You can start by looking up HB_HRB*() functions in ChangeLog and find examples in source tree. Thanks a lot. I'll follow your

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
Hi I was creating them without any problems and from time to time I made such tests together with HRB support. As long as some of recent modification did not seriously break sth then it should work without any problem. The most important rule which users have to always remember: it's illegal to

Re: [Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
ly make it more interesting to deal with. In the meantime I'd suggest to consider to use .hrb files instead. Unless there is the need to include .c code in these pcode .dlls, they are superior in all aspects, moreover they already work. Brgds, Viktor On 2010 Feb 8, at 13:34, 2D Info - Le

[Harbour] How to build and use pCode DLL with hbmk2

2010-02-08 Thread 2D Info - Leandro Damasio
Hello I have an aplication based on pCode Dll funcionallity. It was written in xHarbour + BCC55 and now I need to know how to build it hbmk2+MINGW. In xHarbour we could choose between 3 dll entry-points by chosing between maindll.obj, maindllh.obj or maindllp.obj and once linking the dll with m

[Harbour] pCode DLL

2010-02-06 Thread Leandro Damasio
Hi How to build a pcode dll using hbmk2 + mingw? And once built, is it enought to hb_libload it to call a function in the dll from the exe? Thanks Leandro ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.ha

[Harbour] How to avoid terminal window using hbide/hbmk2 under windows

2010-02-01 Thread Leandro Damasio
Hello, I'm working on a new Win32 gui lib for Harbour and when I link an aplication using hbide (hbmk2) it calls a empty black terminal window behind my main window. How do I avoid it? Thanks Leandro___ Harbour mailing list (attachment size limit: 40KB

Re: [Harbour] undefined reference to 'hb_stack'

2010-01-31 Thread Leandro Damasio
Rest should work, though if you need more eval examples, I'd recommend grepping into Harbour contrib or core (except VM) source code, you'll find plenty of working examples. It worked perfectly Viktor, thank you! Best regards Leandro ___ Harbour ma

Re: [Harbour] undefined reference to 'hb_stack'

2010-01-30 Thread Leandro Damasio
*.h headers for the most part. I guess most things can be solved with it; if not, you may describe the situation and if justified and doable we can add new API functions. Brgds, Viktor On 2010 Jan 30, at 23:43, Leandro Damasio wrote: Viktor Szakáts wrote: Just delete '#include "

Re: [Harbour] undefined reference to 'hb_stack'

2010-01-30 Thread Leandro Damasio
parameter 'pArray' hbmk2: Erro: Executando compilador C/C++. 1 gcc.exe -c -O3 -march=i586 -mtune=pentiumpro -fomit-frame-pointer -Wall -W -Id: /harbour/include array.c array0.c aseek.c -- From: "Viktor Szakáts" Sent: Friday, Ja

Re: [Harbour] undefined reference to 'hb_stack'

2010-01-29 Thread Leandro Damasio
' Just delete '#include "hbvmopt.h"', it's an internal header, not needed. Brgds, Viktor On 2010 Jan 30, at 02:34, Leandro Damasio wrote: Hi Attempting to build a program with the function below I receive the following linkage error message: undefined referen

[Harbour] undefined reference to 'hb_stack'

2010-01-29 Thread Leandro Damasio
Hi Attempting to build a program with the function below I receive the following linkage error message: undefined reference to `hb_stack' The error is related to hb_retnint and hb_retni calls, because when I ommit them the error message goes away. What is wrong with the code please? Thank you Le

Re: [Harbour] How to build hbide with hbqt static libs?

2009-11-30 Thread Leandro Damasio
Hi Can you post thus statically linked hbide.exe ( in a zip format as it will be huge ) somewhere on the web so that I can download to visualize what exactly is happening. Regards Pritpal Bedi Yes, you can download it at http://www.2dinfo.com.br/2dinfo/hbide.zip Brgds Leandro Damasio

Fw: [Harbour] How to build hbide with hbqt static libs?

2009-11-30 Thread Leandro Damasio
The hbide main window opens ok and most the controls function well, but the source button which results in Visual C++ Runtime Library error message Correction: clicking the "Open" button results in error message tks Leandro Damasio _

Re: [Harbour] How to build hbide with hbqt static libs?

2009-11-30 Thread Leandro Damasio
which results in Visual C++ Runtime Library error message "This application has requested the Runtime to terminate it an unusual way. Please contact the application's support team for more information". Seems to be a xbpFileDialog problem in hbide:selectSource method. Brgds

Re: [Harbour] How to build hbide with hbqt static libs?

2009-11-27 Thread Leandro Damasio
for all the other libs. So I assumed that the lib versions not ended with "d" were for static linking and that Qt was ready to use and didn't run configure utility to [re]compile everything. I will [re]build QT and hbide and report the results soon. Thank you,

[Harbour] How to build hbide with hbqt static libs?

2009-11-27 Thread Leandro Damasio
ore4.dll and if the DLL is reachable it crashes with message "Aplication Error - Application not initialized correctly" Am I doing something wrong? Thanks Leandro Damasio ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbou

Re: [Harbour] Qt libs static link

2009-11-26 Thread Leandro Damasio
ted DLLs. = Even linked to static version of hbqt libs, the executable looks/asks for QtCore4.dll and if the DLL is reachable it crashes with message "Aplication Error - Application not initialized correctly" Am I doing something wrong? Than

Re: [Harbour] Qt libs static link

2009-11-26 Thread Leandro Damasio
I'd suggest to peek into INSTALL doc, where you'll find answers for all your build related questions. Found it on harbour INSTALL doc Thanks Viktor! Leandro Damasio -- From: "Viktor Szakáts" Sent: Thursday, November

Re: [Harbour] Qt libs static link

2009-11-26 Thread Leandro Damasio
I mean, how to build HBqt based programs with QT libs statically linked? tks Leandro Damasio From: Leandro Damasio Sent: Thursday, November 26, 2009 10:21 AM To: Harbour Project Main Developer List. Subject: [Harbour] Qt libs static link Hello How to build hbqt programs with QT static libs

[Harbour] Qt libs static link

2009-11-26 Thread Leandro Damasio
Hello How to build hbqt programs with QT static libs, independent from QT dlls? Is it possible? Thanks Leandro Damasio___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/har

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-25 Thread Leandro Damasio
I believe you understand now what I wanted to mean by a real singleton implementation, don't you? You are a newbie here, so, Harbour is a little cheating on you ;) I think you got me! ;) Thank you all for the help! Beat regards Leandro Damasio

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-25 Thread Leandro Damasio
ic and so effective as using the CLASS c structure [in class.h] to keep the PHB_ITEM of the singleton object instance. Thanks for the help! Regards, Leandro Damasio ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.o

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-25 Thread Leandro Damasio
lementation until we know all the benefits which this can give us over already existing methods. Ok. Few of us have proposed solutions, it'd be nice if you could comment on them. Oops! Sorry, I thought I was doing that! Thank you Regards Leandro Damasio __

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
does singleton means. Regards Leandro Damasio ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
eclare a singleton class, program its composition and behavior, box it in a library and share it to other programmers knowing for sure that nobody will can double instantiate it and cause error, because he declared to the machine that this can't be done.

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
singleton class and that would be all. Singleton classes happen in programming because there are singleton objects in real life, so the native concept of singleton classes in harbour would make programming safer, easier and clearer. Regards, Leandro Damasio

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
example below Regards, Leandro Damasio EXAMPLE: = Case 1) A singleton class: //---// CLASS MyClass SINGLETON // THIS IS A SINGLETON CLASS!!! DATA Status INIT 0 METHOD ChangeSt

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
;ve been studing both. Now our aplications at 2DInfo are been changed from xHarbour to Harbour and from hwGUI to 2DWGUI and once we finish this work, crossplataform funcionality is going to be the next step and then I hope we will be ready to participate more activelly. Best Regards Leandro

Re: [Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
he wants for sure unique access to all the members of a class. I believe it would be usefull and simpler if one could just declare a class as Singleton and have always acess to the same object instance when calling the class by name. What do you think? Regards, Leandro Damasio

[Harbour] Singleton Design Pattern in harbour objects

2009-11-24 Thread Leandro Damasio
Hi, My name is Leandro Damasio and I have started to follow Harbour Project Main Developer List few days ago. I recently started 2D Informatica with my associate Ted, to develop commercial aplications using [x]Harbour. We used xHarbour + BCC55 + HWGUI for about 3 years, until we read xhb

Re: [Harbour] how to build hbqt library under Windows?

2009-11-23 Thread Leandro Damasio
Massimo Belgrano said: try SET HB_WITH_QT=c:\devl\qt\2009.04\qt\include set HB_DIR_QT=c:\devl\qt\2009.04\qt ok Massimo thank you Leandro ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project

[Harbour] Singleton

2009-11-23 Thread Leandro Damasio
Is there native support to singleton (design pattern) classes in harbour? Thanks Leandro Rocha ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour

[Harbour] how to build hbqt library under Windows?

2009-11-23 Thread Leandro Damasio
I'm using WinxP SP3 + mingw32 + Qt 4.5 Mingw32-make results on the following: C:\harbour\contrib\hbqt>mingw32-make -f makefile ! Building Harbour 2.0.0beta3 from source - http://www.harbour-project.org ! MAKE: mingw32-make 3.81 sh.exe ! HB_INSTALL_PREFIX: c:\harbour ! HB_LIB_INSTALL: c:\harbour\l