[Harbour] Re: Netio Questions
AbeB wrote: > > Hi Przemek & all, > > Using netiosrv.prg from hbnetio\utils as the server. > > How can I see on the Server all active connections? > > All open files. Global /per connection? > > Kill a connection? > > What happens to a hung up clien (client killed). Is the connection on the > server killed too & it's files closed? > > If the server is stopped (quit), the client stays frozen, it doesn't time > out. Or am I doing something wrong here? > > Thanks a lot, > > Abe. > > any comment on above? -- View this message in context: http://harbour-devel.1590103.n2.nabble.com/Netio-Questions-tp4962372p4974190.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: hbIDE - http://hbide.vouch.info/ - Needed your Reviews
> > > I entrust you can do this very well. Just maintain a list what is missing > and required, > and chances are I will implement them as soon as possible. > > The only problem I can't schedule to you. > > > > Include line numbers configuration in theme manager. > > > > Is already there. > > Just background color is there, not the number and round numbers (10,20, 30, etc). I think you should overhaul Theme Manager to allow change background color for any item just like all other IDEs. An item on theme is a text element like any other. Text element has font type, size, color, bg color, italic tag, bold tag, underline tag, etc) > Edit: > Spaces to Tabs= Tabs to spaces is useful and is > implemented, why this is needed ? > For same reason that spc->tab is needed. To meet all programmers need not just the ones using spaces for tabulation. > > Low->Upcase = Is already there. > Up->Lowcase = Is already there. > Is it in new release? > > > Option to use tabs or spaces (number of columns or spaces configurable). > > > > A candidate for final "Setup" dialog, I have put it to last. > But probably we must not go towards inculsion. Many of the > repositories are immune to it. Also we do not advocate it in Harbour SVN. > > If HbIDE don't have this feature it will be the only one in the market. > > Yes, and a must have, and is on my todo list. > But before I start, we must be very clear how and where the backups > will saved. So far I am not been able to devise a proper location. > Remember, hbIDE is a Project Builder and Text Editor two in one, > Projects are independant of editing sessions, though I save a source > if it falls in included project(s) before building. > > I totally agree. > > > > Usage Search (context menu) to find usage locations from a function. > > > > Please be more subjective, I am unable to follow this point. > > You can point and right-click on a name function (a call or declaration) and the IDE find all calls used on entire project. To know where a function was used is essential to refactoring. And Logic to build function list put us on more than half way to implement usage search. Without go deep on code I think this feature will be very ease to be implemented. > > > Copy to Clipboard with formation (keeping syntax highlite). > > > > Where this information will be used ? > Syntax highlighting are a rule and not an attribute of text itself. > Yes, if we know the target where it will be used, we will encapsulate > thus target to honot syntax-highlighting rules. > > To post on a blog, to create a document. Put on RTF format is my guess. Should be target independent, export to clipboard with formatting is IDE problem only. > > > > Full screen mode. > > > > This works fine on my machine, anybody else with this issue ? > > How I can toggle HbIDE to Full Screen mode? > > > GoTo/View Declaration (context menu, maybe opening a new tab or splitting > > editor) When parameters tips is not enough. > > > > Detail this again. > > You point and right-click a name function (just on calls) and you see the function declaration (implementation) on a new tab or on a splitted editor. > > Show file size and other properties of current file on status bar. > > > > If you inspect Status-bar, it is already cluttered. > What other properties of the current file should go there ? > > I agree. Maybe just file size is ok. Let's gonna think about improved the Project explorer to put more information about the files. In name of flexibility status bar items need to be configurable. Many items there is useless for me but others is needed. The user should choose the right items for him. This is turns status bar more useful to individuals reducing the clutter. > > > Task/ToDo List > > > > Implementation details ? > > Not important now but is a simple list of items to help organize thew user workflow. Later HbIDE could scan project to find comments with tags TODO, FIXIT, DOCUMENTIT, etc to fill task list automatically. The first step is allow user add his own tasks. This is a simple data entry in browser mode with two or three fields (Description, the type of task and maybe the deadline). Not a core feature. > > > Clipboard manager > > > > Please explain . > > Allow multiple items on clipboard. Windows Clipboard has only one item, application should implement its own clipboard manager to allow multiple items. Manager should allow the user access any items easily and should have a box to manage the items. Do you have the MS-Word? > > > > While debugger is not possible, put a BreakPoint in code (Just an > implicit > > AltD(), right?) > > Just to you think :-) Historical Debug AKA Time-Machine Debug AKA > > Intellitrace > > > > No, I could not follow you. > > First part or second part? The second one is almost a joke. This is relatively new technology. It's very hard to implement although I think not so much to Harbour. But firs
Re: [Harbour] Re: Netio Questions
AbeB wrote: If the server is stopped (quit), the client stays frozen, it doesn't time out. Or am I doing something wrong here? I am interested in this question too. This is important to me, so that I can try and automate a recovery. Regards Alex ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: hbIDE - http://hbide.vouch.info/ - Needed your Reviews
> > Option to use tabs or spaces (number of columns or spaces configurable). > > > > A candidate for final "Setup" dialog, I have put it to last. > But probably we must not go towards inculsion. Many of the > repositories are immune to it. Also we do not advocate it in Harbour SVN. HBIDE is meant to edit all sources, not just and not particularly our own ones. It's nice to enforce some good practices (f.e. automatic formatting along with Harbour SVN standards as a default), but there are things which may quite well may be different in other users code, along with their own preferences or heritage. TAB vs. spaces and indentation width are such things, so ideally HBIDE should make it configurable to fit users' existing coding style. IMO HBIDE should offer Harbour standards as default and let user override it. > > Full screen mode. > > > > This works fine on my machine, anybody else with this issue ? > > How I can toggle HbIDE to Full Screen mode? I'm not sure this is priority, given that it seems to need tricks on certain platforms. F.e. Opera OS X, has such mode and it means all standard parts of the screen (like menubar, dock) is hidden and only the app content is visible on screen, even without window borders or toolbars. Firefox OS X does the same but it leaves the url/navigation toolbar visible. > > Sticky notes > > > > Implementation details. > > Not a priority. It's a Post-it to take some notes about the project not > appropriate to comments. For individual use. There are plenty of 3rd party apps doing that perfectly. It's unnecessary to clutter HBIDE with such thing IMO. Same goes for task/project management, and the already dropped web-browser. Besides duplicating efforts and losing focus, it also make HBIDE heavier and heavier, and I'm not sure it's good idea to pull in large amount of unnecessary code into memory just to edit source files. [ BTW, IMO the documentation editor is already somewhat off-place. ] Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Netio Questions
May be a software similar to ledotdb that monitorizing server a client software do thats in leto , and I think some functions are needed Bruno 2010/4/26 AbeB > > Hi Przemek & all, > > > > Using netiosrv.prg from hbnetio\utils as the server. > > > > How can I see on the Server all active connections. > > All open files. Global /per connection? > > Kill a connection. > > What happens to a hung up clien (client killed). Is the connection on the > server killed too & it's files closed? > > If the server is stopped (quit), the client stays frozen, it doesn't time > out. Or am I doing something wrong here? > > > > Thanks a lot, > > Abe. > > > > > > > -- > View this message in context: > http://harbour-devel.1590103.n2.nabble.com/Netio-Questions-tp4962372p4962372.html > Sent from the harbour-devel mailing list archive at Nabble.com. > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Error BASE/1099 Argument error: STR
$ hbmk2 xml1.prg -lxhb -L/usr/local/lib/harbour hbmk2: Processing configuration: /usr/bin/hbmk.cfg Harbour 2.1.0beta1 (Rev. 14394) Copyright (c) 1999-2010, http://www.harbour-project.org/ Compiling 'xml1.prg'... Lines 168, Functions/Procedures 1 Generating C source output to '/tmp/xml1.c'... Done. $ ./xml1 Error BASE/1099 Argument error: STR Called from STR(0) Called from MAIN(19) Can someone help me? TIA Ivan ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
Please, post line 19 from your Main. []'s Maniero 2010/4/28 ivan re > > $ hbmk2 xml1.prg -lxhb -L/usr/local/lib/harbour > hbmk2: Processing configuration: /usr/bin/hbmk.cfg > Harbour 2.1.0beta1 (Rev. 14394) > Copyright (c) 1999-2010, http://www.harbour-project.org/ > > > Compiling 'xml1.prg'... > Lines 168, Functions/Procedures 1 > Generating C source output to '/tmp/xml1.c'... Done. > > > $ ./xml1 > > Error BASE/1099 Argument error: STR > > > > Called from STR(0) > Called from MAIN(19) > > Can someone help me? > TIA Ivan > > > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > > ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
// xml1.prg #include "/home/ivan/src/harbour/contrib/xhb/hbxml.ch" function main() local cFile:="./test.xml", cString local cNote, cDiscount local oDoc, oBook, oIterator, oCurrent cString:=memoread( cFile ) if !( len(cString) > 0 ) wait "xml file unavailable" return NIL endif oDoc:=TXmlDocument( cString, HBXML_STYLE_NOESCAPE ) if !( oDoc:nError==HBXML_ERROR_NONE ) wait "xml file parsing error " + str(oDoc:nError) return NIL endif oBook:=oDoc:findfirst( "book" ) if oBook == NIL wait "no books found" return NIL endif do while .t. if HHasKey( oBook:aAttributes, "id" ) ? "book ID : " + oBook:aAttributes["id"] else ? "no attribute book ID" endif cNote:="" cDiscount:="" oIterator:=TXmlIterator():New( oBook ) do while .t. oCurrent:=oIterator:Next() if oCurrent==NIL ? "end branch" wait "values : "+cNote+" "+cDiscount exit else ? "current tag : " + oCurrent:cName if oCurrent:cName=="note" cNote:=oCurrent:cData elseif oCurrent:cName=="discount" cDiscount:=oCurrent:cData endif endif enddo oBook:=oDoc:findnext() if oBook == NIL wait "no more books found" exit endif enddo return NIL Gambardella, Matthew XML Developer's Guide 111 Computer 44.95 11 2000-10-01 An in-depth look at creating applications with XML. Ralls, Kim Midnight Rain 222 Fantasy 5.95 12 2000-12-16 A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world. Corets, Eva Maeve Ascendant 333 Fantasy 5.95 13 2000-11-17 After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society. Corets, Eva Oberon's Legacy 444 Fantasy 5.95 14 2001-03-10 In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant. Corets, Eva The Sundered Grail 555 Fantasy 5.95 15 2001-09-10 The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy. On Wed, Apr 28, 2010 at 5:37 PM, Antonio Maniero wrote: > Please, post line 19 from your Main. > > []'s Maniero > > > 2010/4/28 ivan re > >> >> $ hbmk2 xml1.prg -lxhb -L/usr/local/lib/harbour >> hbmk2: Processing configuration: /usr/bin/hbmk.cfg >> Harbour 2.1.0beta1 (Rev. 14394) >> Copyright (c) 1999-2010, http://www.harbour-project.org/ >> >> >> >> Compiling 'xml1.prg'... >> Lines 168, Functions/Procedures 1 >> Generating C source output to '/tmp/xml1.c'... Done. >> >> >> $ ./xml1 >> >> Error BASE/1099 Argument error: STR >> >> >> >> >> Called from STR(0) >> Called from MAIN(19) >> >> Can someone help me? >> TIA Ivan >> >> >> ___ >> Harbour mailing list (attachment size limit: 40KB) >> Harbour@harbour-project.org >> http://lists.harbour-project.org/mailman/listinfo/harbour >> >> > > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > > ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: hbIDE - http://hbide.vouch.info/ - Needed your Reviews
Hi Viktor > IMO HBIDE should offer Harbour standards as default > and let user override it. > I totally agree. > > Besides duplicating efforts and losing focus, it also > make HBIDE heavier and heavier, and I'm not sure it's > good idea to pull in large amount of unnecessary > code into memory just to edit source files. > > The last message I just throw some ideas as I wrote on the bottom of original message. For my personal use, HbIDE should have a damn good editor and debugger. Definition of damn good: * all needed features to edit *code* * help to edit code (code and symbol completion, parameters tips, conversions, some code generation, suggestions, etc) * tools to search and navigate through code easily and fast way * don't be intrusive * have every tool in hand (mainly by keyboard) * totally configurable * have predicable ways, consistency * be extensible * be stable and reliable * others points that I don't remember now :-) []'s Maniero ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: hbIDE - http://hbide.vouch.info/ - Needed your Reviews
Hi Antonio, > IMO HBIDE should offer Harbour standards as default > and let user override it. > > I totally agree. > > > Besides duplicating efforts and losing focus, it also > make HBIDE heavier and heavier, and I'm not sure it's > good idea to pull in large amount of unnecessary > code into memory just to edit source files. > > The last message I just throw some ideas as I wrote on the bottom of original > message. For my personal use, HbIDE should have a damn good editor and > debugger. > > Definition of damn good: > * all needed features to edit *code* > * help to edit code (code and symbol completion, parameters tips, > conversions, some code generation, suggestions, etc) > * tools to search and navigate through code easily and fast way > * don't be intrusive > * have every tool in hand (mainly by keyboard) > * totally configurable > * have predicable ways, consistency > * be extensible > * be stable and reliable > * others points that I don't remember now :-) +1 for all of these. For anything else, probably an open plugin architecture is the best, so all of the remaining bits (like PostIt notes, GTD stuff can be implemented and maintained by users). We have the full power of .hrb files as a base for such. Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: hbIDE - http://hbide.vouch.info/ - Needed your Reviews
Antonio Maniero wrote: > >> Just background color is there, not the number and round numbers (10,20, > 30, etc). I think you should overhaul Theme Manager to allow change > background color for any item just like all other IDEs. An item on theme > is > a text element like any other. Text element has font type, size, color, bg > color, italic tag, bold tag, underline tag, etc) > Ok, I got it. Will include soon. To be exact, not every element in themes manager belongs to a label having attributes such as type,size etc. Yah, line numbers are certainly in this category but rest every element is a syntax rule and is implemented differently than what we preceive for a text label. > For same reason that spc->tab is needed. To meet all programmers need not > just the ones using spaces for tabulation. > I would like if group also forwards opinion on this matter. >> Low->Upcase = Is already there. >> Up->Lowcase = Is already there. >> > > Is it in new release? > No, since begining. Selecet some text, click on left-side toolbar icon "ToUpper". >> A candidate for final "Setup" dialog, I have put it to last. >> But probably we must not go towards inculsion. Many of the >> repositories are immune to it. Also we do not advocate it in Harbour SVN. >> >> If HbIDE don't have this feature it will be the only one in the market. > We are primarily focussed on Xbase dialect compilers only. It is not our goal to make hbIDE universal as yet. So I will look forward to group decision. >> Yes, and a must have, and is on my todo list. >> But before I start, we must be very clear how and where the backups >> will saved. So far I am not been able to devise a proper location. >> Remember, hbIDE is a Project Builder and Text Editor two in one, >> Projects are independant of editing sessions, though I save a source >> if it falls in included project(s) before building. >> >> I totally agree. > So what is your and groups opinion in this regard. > > Usage Search (context menu) to find usage locations from a function. > > You can point and right-click on a name function (a call or declaration) and the IDE find all calls used on entire project. To know where a function was used is essential to refactoring. And Logic to build function list put us on more than half way to implement usage search. Without go deep on code I think this feature will be very ease to be implemented. This is available under "Find-in-Files" protocol. Tell me if that is not enough. >> > Copy to Clipboard with formation (keeping syntax highlite). >> > >> >> Where this information will be used ? >> Syntax highlighting are a rule and not an attribute of text itself. >> Yes, if we know the target where it will be used, we will encapsulate >> thus target to honot syntax-highlighting rules. >> >> To post on a blog, to create a document. Put on RTF format is my guess. > Should be target independent, export to clipboard with formatting is IDE > problem only. > Oh, I get it. But this is not possible as I stated earlier. Text editors are not a RTF oriented. They are plain text oriented and highlighting is applied to them under totally diiferent way which in turn does not offer those attributes to be copied. >> > Full screen mode. >> >> How I can toggle HbIDE to Full Screen mode? > If I am taking it right, click on "maximize" button on right of titlebar. Or am I misunderstandng you. >> > GoTo/View Declaration (context menu, maybe opening a new tab or >> splitting >> > editor) When parameters tips is not enough. >> >> You point and right-click a name function (just on calls) and you see the > function declaration (implementation) on a new tab or on a splitted > editor. > You have it. First time( after projects are defined ): Re-tag all projects through "Projects Functions" Every next time: Right-click on a function name in the editor and select "Goto Function". A new editor will open up. If there are more than one source will have that function's body, "Projects Functions List" dialog will show up for selection. >> > Show file size and other properties of current file on status bar. >> >> I agree. Maybe just file size is ok. Let's gonna think about improved the > Project explorer to put more information about the files. > I think I have included everything on the "Welcome" tab on "Stats" panel. Click on any node in "Projects" and you will be shown all sources contained within with many attributes, viz., size, last modified, etc. Tell me what else would/should be included there. > In name of flexibility status bar items need to be configurable. Many > items > there is useless for me but others is needed. The user should choose the > right items for him. This is turns status bar more useful to individuals > reducing the clutter. > This would certainly be a very good feature. I will try to implement it. >> > Task/ToDo List >> >> Not important now but is a simple li
Re: [Harbour] Re: hbIDE - http://hbide.vouch.info/ - Needed your Reviews
> > > No, since begining. Selecet some text, click on left-side toolbar icon > "ToUpper". > > My Fault, I just look on main menu edit. (inconsistency here) > > > We are primarily focussed on Xbase dialect compilers only. > It is not our goal to make hbIDE universal as yet. So I will look > forward to group decision. > For me (xBase programmer) HbIDE is useless if I can't choose spaces or tabs > > > > Usage Search (context menu) to find usage locations from a function. > > > > You can point and right-click on a name function (a call or declaration) > and the IDE find all calls used on entire project. To know where a function > was used is essential to refactoring. And Logic to build function list put > us on more than half way to implement usage search. Without go deep on code > I think this feature will be very ease to be implemented. > > > This is available under "Find-in-Files" protocol. Tell me if that is not > enough. > It's not the same. Typo in "Find-in-Files": Expressior I think ENTER should trigger the Find button action. > > > Oh, I get it. > But this is not possible as I stated earlier. Text editors are not a RTF > oriented. > They are plain text oriented and highlighting is applied to them under > totally > diiferent way which in turn does not offer those attributes to be copied. > > It's totally another thing, but I don't need this and I won't try to detail this. > > If I am taking it right, click on "maximize" button on right of titlebar. > Or am I misunderstandng you. > > It is not Full screen mode, but Viktor stated some problems related some platforms. Don't worry about that for now. Intead you can allow menu and status bar be hidden too. It's almost a Full Screen mode, like I use my Notepad++. > Note: color syntax details will certainly be missing. > Should every item be "named" like snippets or just ... > Also, should the contents be persistent or only for current session? > > I think per session is good enough, but optionally persistence is better :-) Try the good enough first and we see the results to think about enhancements to the feature. > > What type of switch you would like to have ? > I don't know it was just a question:-) > Something like a plugin system, but because the open > > nature of project, more flexible and more simple. > > > > Probably I need an example what you have in mind, to start with. > It should be easy though. > > I will develop this idea later. I think an API/plugin system is very important to the IDE. Even some features inside HbIDE should be "plugins". You could try to use the Harbour model about separation of core and "contribs/plugins" even when the plugin is 100% yours. Just to fill your dreams, think about slots defined by plugins on status bar, menu bar, toolbar, keyboard mapping, panels (new ones). Think about a ease way to plugins hijack editor behaviors to modify them. Just some free thoughts. []'s Maniero ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] SF.net SVN: harbour-project:[14406] trunk/harbour
Revision: 14406 http://harbour-project.svn.sourceforge.net/harbour-project/?rev=14406&view=rev Author: vszakats Date: 2010-04-28 17:06:52 + (Wed, 28 Apr 2010) Log Message: --- 2010-04-28 19:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/Makefile * src/rtl/getsys.prg + src/rtl/getsyshb.prg ! Moved HB_GETREADVAR() to separate source file. ! HB_GETREADVAR() fixed to use HB_ASCIIUPPER() like TGETLIST():GETREADVAR() instead of UPPER(). * src/rtl/tgetlist.prg % TGETLIST():GETREADVAR() now can use HB_GETREADVAR() instead of duplicating the code locally. * INSTALL + Added sort of "disclaimer" note to HB_BUILD_IMPLIB option. * include/hbextern.ch + Added missing TBREADER(). Modified Paths: -- trunk/harbour/ChangeLog trunk/harbour/INSTALL trunk/harbour/include/hbextern.ch trunk/harbour/src/rtl/Makefile trunk/harbour/src/rtl/getsys.prg trunk/harbour/src/rtl/tgetlist.prg Added Paths: --- trunk/harbour/src/rtl/getsyshb.prg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
Hi, > > // xml1.prg > > > #include "/home/ivan/src/harbour/contrib/xhb/hbxml.ch" Rather use -i option or point to xhb.hbc file. (or simply copy your sample to contrib/xhb/tests/ dir and issue hbmk2 from there) > function main() >local cFile:="./test.xml", cString >local cNote, cDiscount >local oDoc, oBook, oIterator, oCurrent > >cString:=memoread( cFile ) >if !( len(cString) > 0 ) > wait "xml file unavailable" > return NIL >endif >oDoc:=TXmlDocument( cString, HBXML_STYLE_NOESCAPE ) You need to replace 'TXmlDocument(' with 'TXmlDocument:New(' Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
Victor, If TXmlDocument( cString, HBXML_STYLE_NOESCAPE ) is a valid call, yet does not produce a correct object (given that I probably haven't seen the code), then can't TXmlDocument(...) check that :New is in the calling tree and produce a decent error? (Sorry if I'm stating or overlooked the obvious) Paul - Original Message - From: "Viktor Szakáts" To: "Harbour Project Main Developer List." Sent: Wednesday, April 28, 2010 1:58 PM Subject: Re: [Harbour] Error BASE/1099 Argument error: STR Hi, // xml1.prg #include "/home/ivan/src/harbour/contrib/xhb/hbxml.ch" Rather use -i option or point to xhb.hbc file. (or simply copy your sample to contrib/xhb/tests/ dir and issue hbmk2 from there) function main() local cFile:="./test.xml", cString local cNote, cDiscount local oDoc, oBook, oIterator, oCurrent cString:=memoread( cFile ) if !( len(cString) > 0 ) wait "xml file unavailable" return NIL endif oDoc:=TXmlDocument( cString, HBXML_STYLE_NOESCAPE ) You need to replace 'TXmlDocument(' with 'TXmlDocument:New(' Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
Hi Paul, > If TXmlDocument( cString, HBXML_STYLE_NOESCAPE ) is a valid call, yet does > not produce a correct object (given that I probably haven't seen the code), > then can't TXmlDocument(...) check that :New is in the calling tree and > produce a decent error? (Sorry if I'm stating or overlooked the obvious) Yes, it would be useful error to cover this case. This is a common problem when porting code from xhb to Harbour. I don't know how to implement it though. Anyone? Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
>> >> // xml1.prg >> >> >> #include "/home/ivan/src/harbour/contrib/xhb/hbxml.ch" > > Rather use -i option or point to xhb.hbc file. > (or simply copy your sample to contrib/xhb/tests/ dir > and issue hbmk2 from there) > >> function main() >> local cFile:="./test.xml", cString >> local cNote, cDiscount >> local oDoc, oBook, oIterator, oCurrent >> >> cString:=memoread( cFile ) >> if !( len(cString) > 0 ) >> wait "xml file unavailable" >> return NIL >> endif >> oDoc:=TXmlDocument( cString, HBXML_STYLE_NOESCAPE ) > > You need to replace 'TXmlDocument(' with 'TXmlDocument:New(' Typo. Replace it with: 'TXmlDocument():New(' Anyhow not everything is fine with xhb xml support, as I'm getting memory corruption with the posted sample when trying it with mingw. It runs fine with msvc64. Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
Viktor Szakáts wrote: Anyhow not everything is fine with xhb xml support, as I'm getting memory corruption with the posted sample when trying it with mingw. It runs fine with msvc64. I have noticed quite a few fixes over recent years/months to the XML source in xHarbour, it's possible that Harbour has missed something important. Regards Alex ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] SF.net SVN: harbour-project:[14407] trunk/harbour
Revision: 14407 http://harbour-project.svn.sourceforge.net/harbour-project/?rev=14407&view=rev Author: vszakats Date: 2010-04-28 21:01:20 + (Wed, 28 Apr 2010) Log Message: --- 2010-04-28 23:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + contrib/xhb/tests/xml1.prg + contrib/xhb/tests/test.xml + Added xml test code posted to list by "Ivan re". (after fix and formatting) ; TOFIX: This sample crashes with mingw. Modified Paths: -- trunk/harbour/ChangeLog Added Paths: --- trunk/harbour/contrib/xhb/tests/test.xml trunk/harbour/contrib/xhb/tests/xml1.prg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Error BASE/1099 Argument error: STR
>> Anyhow not everything is fine with xhb xml support, >> as I'm getting memory corruption with the posted >> sample when trying it with mingw. It runs fine >> with msvc64. > > I have noticed quite a few fixes over recent years/months to the XML source > in xHarbour, it's possible that Harbour has missed something important. Could be. I'm not very convinced about the whole quality of this xml implementation. The xhb patches didn't convey any good impressions either. Many of them were debated and fixed back and forth, so I lost track of it. It's also possible I broke something in this commit, while trying to apply recent xhb memory-leak patches: 2010-04-05 11:04 UTC+0200 Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] SF.net SVN: harbour-project:[14408] trunk/harbour
Revision: 14408 http://harbour-project.svn.sourceforge.net/harbour-project/?rev=14408&view=rev Author: vszakats Date: 2010-04-28 21:12:17 + (Wed, 28 Apr 2010) Log Message: --- 2010-04-28 23:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/xhb/hbxml.c ! REVERTED: 2010-04-05 11:04 UTC+0200 This means that these heavy leaks are again present in this xhb ported code, but at least it won't GPF. * contrib/xhb/tests/xml1.prg ! Minor to prev. Modified Paths: -- trunk/harbour/ChangeLog trunk/harbour/contrib/xhb/hbxml.c trunk/harbour/contrib/xhb/tests/xml1.prg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Patch for Pritpal
I wanted to create a QTableWidget and populate it with different values. My code is: for i:= 1 to len(aL) aAdd( oGridItem0x0 , "" ) t := QTableWidgetItem():new() t:setBackground( oBrushBackItem0x0 ) t:setForeground( oBrushForeItem0x0 ) t:setText( "cella "+str(i) ) oGrid:setItem( i-1, 0, t ) next The result was that only the last cell has value... this happens because when t is re:New()ed, the previous t is destroyed ... so ::setItem needs treatment for detaching it when calling setItem So please apply this patch: HB_FUNC( QT_QTABLEWIDGET_SETITEM ) { QGC_POINTER_QTableWidget * q; QGC_POINTER * p; HB_TRACE( HB_TR_DEBUG, ("Entering QTABLEWIDGET_SETITEM" ) ); q = ( QGC_POINTER_QTableWidget * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 4 ); if( p && p->ph && q && q->ph ) { HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETITEM() Qt oject: %p is attached to: %p", ( void * ) p->ph, ( void * ) q->ph ) ); p->bNew = HB_FALSE; ( q->ph )->setItem( hb_parni( 2 ), hb_parni( 3 ), ( QTableWidgetItem * ) p->ph ); } } Francesco PS: why didn't you use my patch to have the "exceptional" functions out of qth files ? ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Patch for Pritpal
A couple more... QTableWidget_setVerticalHeaderItem Description: Binary data QTableWidget_setHorizontalHeaderItem Description: Binary data ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Patch for Pritpal
francesco perillo wrote: > > PS: why didn't you use my patch to have the "exceptional" functions > out of qth files ? > Because we are not to deal with a whole new set of files which may go unmanageable in the long run. Also we agreed that this mechanism will be usedonly where we have problem with the destruction mecanism. > I wanted to create a QTableWidget and populate it with different values. > > My code is: > > for i:= 1 to len(aL) > aAdd( oGridItem0x0 , "" ) > t := QTableWidgetItem():new() > t:setBackground( oBrushBackItem0x0 ) > t:setForeground( oBrushForeItem0x0 ) > t:setText( "cella "+str(i) ) > oGrid:setItem( i-1, 0, t ) > next > > The result was that only the last cell has value... this happens > because when t is re:New()ed, the previous t is destroyed ... so > ::setItem needs treatment for detaching it when calling setItem > > So please apply this patch: > > HB_FUNC( QT_QTABLEWIDGET_SETITEM ) > { > QGC_POINTER_QTableWidget * q; > QGC_POINTER * p; > > HB_TRACE( HB_TR_DEBUG, ("Entering QTABLEWIDGET_SETITEM" ) ); > > q = ( QGC_POINTER_QTableWidget * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); > p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 4 ); > > if( p && p->ph && q && q->ph ) > { > HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETITEM() Qt oject: %p > is attached to: %p", ( void * ) p->ph, ( void * ) q->ph ) ); > p->bNew = HB_FALSE; > ( q->ph )->setItem( hb_parni( 2 ), hb_parni( 3 ), ( > QTableWidgetItem * ) p->ph ); > } > > } > Local aItems := {} for i:= 1 to len(aL) aAdd( oGridItem0x0 , "" ) t := QTableWidgetItem():new() t:setBackground( oBrushBackItem0x0 ) t:setForeground( oBrushForeItem0x0 ) t:setText( "cella "+str(i) ) oGrid:setItem( i-1, 0, t ) aadd( aItems, t ) next // And destructor for each aItm in aItems qItm := NIL next This mechanism has an advantage. You have all the control over items spread in different columns, and can later deal with them if there is a need of changes, for example, if you would like to let it be edited or changing the colors. This is how it looks close to Clipper syntax. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://harbour-devel.1590103.n2.nabble.com/Patch-for-Pritpal-tp4977113p4977369.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: Patch for Pritpal
> Also we agreed that this mechanism will be usedonly where we have > problem with the destruction mecanism. not really. this mechanism must be used when a object becomes owned by some other object to avoid a double destruction... Probably I should go directly to xbp (I see you wrote tons of code lines for the browse system) strictly following the published code and try to never read the source code because I "fear" that there are some "hacks" to overcome some hbqt problems... :-) > Local aItems := {} this was the first test I did in order to check that no other problems were present... and it worked. But I feel it is not a correct way... since there is no need to store them from a functional point of view i > > > > // And destructor > for each aItm in aItems > qItm := NIL > next > > This mechanism has an advantage. > You have all the control over items spread in different columns, > and can later deal with them if there is a need of changes, for example, > if you would like to let it be edited or changing the colors. I can do this using ::item(row,col) if necessary > This is how it looks close to Clipper syntax. But not to c++ samples... More, some other patches should be done, for example for QTableWidget::setCellWidget... please read the doc text... There another probable problem if the patches are not committed... if you have not compiled my patches try my unmodified sample but change only: oGrid:setItem( i-1, 0, t ) to oGrid:setItem( 0, 0, t ) // all items set at the same place does it GPF ? with setCellWidget it will according to the doc text Ciao, Francesco ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Patch for Pritpal
Hi Francesco The whole point is, if we go this direction, I am afraid a lot of .qth have to be changed. Everywhere there is a parent/child relation. Probably I do not feel comfortable this way. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://harbour-devel.1590103.n2.nabble.com/Patch-for-Pritpal-tp4977113p4977471.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Patch for Pritpal
Hi Consider this scenario: If this approach be taken, then it becomes impossible to release the memory occupied by those QTableWidgetItems any way until application is closed. Suppose in between you are to clear the table many times and need to reuse it, application will constinue to consume memory. We used this mechanism where we had a problem to to freeing the memory. In QTabelWidgetItem/QTreeWidgetItem, etc., where nodes can be in abundance, this is not appropriate. Hope my point will be clean by now. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://harbour-devel.1590103.n2.nabble.com/Patch-for-Pritpal-tp4977113p4977513.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Patch for Pritpal
Pritpal Bedi wrote: > > Consider this scenario: > > If this approach be taken, then it becomes > impossible to release the memory occupied by those > QTableWidgetItems any way until application is closed. > Suppose in between you are to clear the table many > times and need to reuse it, application will constinue to > consume memory. > > We used this mechanism where we had a problem to > to freeing the memory. In QTabelWidgetItem/QTreeWidgetItem, > etc., where nodes can be in abundance, this is not appropriate. > > Hope my point will be clean by now. > I think my above statement is _WRONG_. Please ignore it. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://harbour-devel.1590103.n2.nabble.com/Patch-for-Pritpal-tp4977113p4977544.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Harbour "random" GPFs
Viktor Szakáts wrote: > > Lately I mentioned having "random" GPFs with my live apps > since changing to Harbour r14336. I also mentioned they are > gone. This turned out not to be true, they are still present. > And today I am the victim of this strange behavior. Since morning I am struggling to locate where it does happen. I am implementing horizontal ruler in hbIDE and have to change/add some methods in hbqt_hbqplaintextedit.cpp/.h Sometime the same code goes through and I can see main window. Then I add a variable in .h ( just add ), link it, and voila it GPFs. I did not use this variable anywhere yet. Then I delete this declaration, but still GPFs. I build clean complete Harbour, GPF vanishes, I introduce something, again GPF. Certainly I am unable to exactly locate in which circumstances and under what flow it is generated. This is on my office machine. Later I will copy these two files on my laptop and will see what is the behavior and will report here. Just today has been wasted altogether without any output. It was just to inform. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://harbour-devel.1590103.n2.nabble.com/Harbour-random-GPFs-tp4968103p4977960.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: Patch for Pritpal
> Hi Francesco > > The whole point is, if we go this direction, > I am afraid a lot of .qth have to be changed. > Everywhere there is a parent/child relation. If this is required to fix HBQT, it should IMO be done eventually. It's not an argument against fixing things that it takes many source code changes IMO... Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] SF.net SVN: harbour-project:[14409] trunk/harbour
Revision: 14409 http://harbour-project.svn.sourceforge.net/harbour-project/?rev=14409&view=rev Author: vszakats Date: 2010-04-29 06:46:25 + (Thu, 29 Apr 2010) Log Message: --- 2010-04-29 08:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_osc.c + Added WIN_OSISWINXPORLATER(). Following Peter Rees in xhb. * contrib/xhb/Makefile + contrib/xhb/xwin_reg.c + contrib/xhb/xwin_ver.c * contrib/hbwin/Makefile - contrib/hbwin/legacycr.c - contrib/hbwin/legacycv.c ! Moved these legacy Windows functions to xhb lib from hbwin lib. This way we don't have to delete them after next release, plus they provide better compatibility as they are now also present in non-win builds (returning dummy values), just like in xhb. + Added OS_ISWINXP_OR_LATER() function. Modified Paths: -- trunk/harbour/ChangeLog trunk/harbour/contrib/hbwin/Makefile trunk/harbour/contrib/hbwin/win_osc.c trunk/harbour/contrib/xhb/Makefile Added Paths: --- trunk/harbour/contrib/xhb/xwin_reg.c trunk/harbour/contrib/xhb/xwin_ver.c Removed Paths: - trunk/harbour/contrib/hbwin/legacycr.c trunk/harbour/contrib/hbwin/legacycv.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour