Re: [DUG] Strange behavour - WebBrowser and ADO

2011-08-04 Thread Dennis Chuah
Folks, Hi. You guys may want to know the solution to this issue. If you call TWebBrowser.ExecWB, after it returns, you will find that the EmptyParam global variable is no longer the same value. It gets set to Unassigned. There is a bug logged on Quality Central:

Re: [DUG] Sending notification between programs

2010-08-18 Thread Dennis Chuah
John, Hi. What I'd suggest is you use FILE_NOTIFY_CHANGE_FILE_NAME. Program A creates the file and writes to it using a temporary filename. When it is done writing, it renames the file to something that program B recognises. This will trigger a FILE_NOTIFY_CHANGE_FILE_NAME and B can then

Re: [DUG] Sending notification between programs

2010-08-17 Thread Dennis Chuah
John, Hi. What you want to use is WinAPI: FindFirstChangeNotification, FindNextChangeNotification and FindCloseChangeNotification in program B. Essentially, A writes to a file, and renames it. This causes the handle returned by FindFirstChangeNotification to be signaled. You can test for

Re: [DUG] faster TreeView

2010-07-23 Thread Dennis Chuah
Hi. Check out Virtual Treeview http://www.soft-gems.net/. Very fast and very flexible. The programming paradigm is different, so there is a leaning curve. But once you get over that, you will find that it is the best treeview / grid component ever. Regards, Dennis.

Re: [DUG] Script Engines for use with Delphi

2010-03-22 Thread Dennis Chuah
Python for Delphi works very well. Python is open sourced and there is great support. Javascript (and vbscript) via Windows Script work fine too. Not as functional as Python but there is a bigger user base. -- From: Alistair Ward

Re: [DUG] MSSQL with D2007

2010-01-18 Thread Dennis Chuah
John, Hi. If you do not use data aware controls, or otherwise need TDataset, then I would recommend that you use ADO directly. Fast, simple, and does not have the overhead of TADOConnection, etc. I normally import the type library into Delphi, but you can also use the one that comes with

Re: [DUG] Just for the odd job.

2009-07-15 Thread Dennis Chuah
I don't belief it ... there are actually people still using Delphi 4. It has to be the next most buggy version of Delphi apart from 8. You can even get different EXEs just by compiling at different times of the day! My advise then would be for you to upgrade, even if it is just to get a more

Re: [DUG] PDFCreator

2007-11-08 Thread Dennis Chuah
A better PDF creator is Primo - just google for Primo PDF. Its freeware and produces better quality output. - Original Message - From: John [EMAIL PROTECTED] To: 'NZ Borland Developers Group - Delphi List' delphi@delphi.org.nz Sent: Thursday, November 08, 2007 8:09 PM Subject:

Re: [DUG] Expression Parser/Evaluator

2007-10-24 Thread Dennis Chuah
Try Python for Delphi. It can do all that you want below, plus a lot more. And besides, the price is right! - Original Message - From: David Brennan [EMAIL PROTECTED] To: DUG delphi@delphi.org.nz Sent: Wednesday, October 24, 2007 4:18 PM Subject: [DUG] Expression Parser/Evaluator

Re: [DUG] Debugger - variable values

2007-08-07 Thread Dennis Chuah
To see the contents of a string list, a quick way (turn on allow function calls): srcTemplateInputLines.Text or srcTemplateInputLines.CommaText to see an individual element: srcTemplateInputLines[0], or srcTemplateInputLines[1], ... - Original Message - From: John Bird [EMAIL

Re: [DUG] Pulling status bar text off another application

2007-07-30 Thread Dennis Chuah
Why don't you use automation to get access to the browser application object. From there you can use the HTML Dom to get access to the status bar text. - Original Message - From: Phil Scadden [EMAIL PROTECTED] To: delphi@delphi.org.nz Sent: Monday, July 30, 2007 2:57 PM Subject:

Re: [DUG] Pulling status bar text off another application

2007-07-30 Thread Dennis Chuah
PROTECTED] On Behalf Of Dennis Chuah Sent: 30 July 2007 18:49 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Pulling status bar text off another application Why don't you use automation to get access to the browser application object. From there you can use the HTML Dom to get

Re: [DUG] basic question

2007-07-26 Thread Dennis Chuah
: Thursday, July 26, 2007 9:35 AM Subject: Re: [DUG] basic question On 7/26/07, Dennis Chuah [EMAIL PROTECTED] wrote: ... A constructor always instantiates an instance. Unless the constructor raises an exception. ___ NZ Borland Developers Group - Delphi

Re: [DUG] basic question

2007-07-26 Thread Dennis Chuah
of this. On 7/26/07, Dennis Chuah [EMAIL PROTECTED] wrote: A constructor ALWAYS creates an instance, even if it encounters an exception. The implicit exception handling code then finalises the instance. ___ NZ Borland Developers Group - Delphi mailing

Re: [DUG] basic question

2007-07-25 Thread Dennis Chuah
It is called a constructor ... subtle differences, but *significant*. Eg., you cannot return a Nil from a constructor. A constructor always instantiates an instance. As for the use of class methods ... plenty. Eg., use it to replace unit procedures and functions. Use it to implement

Re: [DUG]: Another custom component question

2003-11-16 Thread Dennis Chuah
Another custom component question Why don't you simply create two components? - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi Sent: Friday, November 14, 2003 9:14 AM Subject: [DUG]: Another custom component question Hi all I drop my custom TTable

Re: [DUG]: Packages problem

2003-11-16 Thread Dennis Chuah
Hmmm... strange problem. The Clipbrd unit is quite small and simple, but then again, you are dealing with a M$ product, so anything can happen. As a hack, why don't you simply copy the unit and put that into your package. You will need to give it a new unit name as the unit name space is

Re: [DUG]: Freeing exceptions?

2003-11-16 Thread Dennis Chuah
Message Is the below code a memory leak? procedure TSam.Samuel; var e: Exception; begin e := Exception.Create('Foobar'); end; Yes, every time the method is called. Is the below code okay? procedure TSam.TrySamuel; var e: Exception; begin e := Exception.Create('Foobar');

Re: [DUG]: Menus.pas Delphi 5 'Attempt to free a non-existing resource'

2003-11-12 Thread Dennis Chuah
if FItemsnil then FItems.Free; does nothing more than FItems.Free There is nothing wrong in that line of code - the items list is being freed - if you are getting an exception there, it might indicate that you are either freeing the menu twice, or there might have been some memory corruption.

Re: [DUG]: How do i GET this HTML...

2003-11-12 Thread Dennis Chuah
guesses Perhaps you need to preserve cookies? Perhaps the cgi / servlet only expects POST? Are you having to go through a proxy server? /guesses - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 2:41

Re: [DUG]: Automated build tool for packages

2003-11-04 Thread Dennis Chuah
To open source, you first need to decide which open source license to use. There are many variations, but essentially most of them boil down to variants of either MPL or GPL. You can create a project in SourceForge (http://sourceforge.net) - put your code there and its effectively open source.

Re: [DUG]: Capturing input focus

2003-11-04 Thread Dennis Chuah
Message TCustomControl is already a descendent of TWinControl. Haven't had this happen to me before, but check the ControlState property. Also how are you setting the focus to the control. Try using the keyboard (TAB key), or do it in code (SetFocus, ActiveControl). Do you handle the

Re: [DUG]: Just wondering...

2003-10-30 Thread Dennis Chuah
Actually, this is a misconception. The compiler cannot fold the code because Option.ItemIndex accesses a property, which translates to a method call, and therefore can have side-effects. (Yes folks, all property accesses are method calls, even if no accessor methods are defined and the property

Re: [DUG]: Just wondering...

2003-10-30 Thread Dennis Chuah
be noticeable but if one is more efficient than the other then why not use it from now on. Is it more efficient to store the value in a local boolean variable before applying to several components? Regards, Ross. - Original Message - From: Dennis Chuah [EMAIL PROTECTED] To: Multiple

Re: [DUG]: one for the MSDE people

2003-10-29 Thread Dennis Chuah
Message SQL Server uses the same database structure as MSDE, so should be compatible. If you are not using any new stuff in MSDE2000, the database should be backwards compatible. I usually script the database and run the script during installation. You can also run MSDE / SQL server in

Re: [DUG]: Delphi Testing Tools

2003-10-27 Thread Dennis Chuah
Gary, Download MemProof - its pretty good for locating memory leaks. GpProfiler is a another pretty good product, except it does not do packages. Dennis. - Original Message - From: GARY T BENNER [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday,

Re: [DUG]: IXMLDocument

2003-10-08 Thread Dennis Chuah
Download MSXML 4 from Microsoft (or get it from MSDN). Version 4 has more features and a few bugs fixed. Install it and use Delphi to create a PAS unit from the type library (msxml2_tlb). // Include the PAS unit into your unit. uses SysUtils, Classes, msxml2_tlb, Variants, ActiveX; var dom:

Re: [DUG]: Fw: MSDE tool

2003-10-07 Thread Dennis Chuah
A batch in SQL server is basically one or more queries executed in series by one database connection. - Original Message - From: Robert martin [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 11:49 AM Subject: Re: [DUG]: Fw: MSDE

Re: [DUG]: Fw: MSDE tool

2003-10-07 Thread Dennis Chuah
- From: Dennis Chuah [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 08, 2003 1:41 PM Subject: Re: [DUG]: Fw: MSDE tool A batch in SQL server is basically one or more queries executed in series by one database connection

Re: [DUG]: Moving to MSDE

2003-10-07 Thread Dennis Chuah
You do not have to develop in SQL server, you can use MSDE. Install the SQL server client tools that come with Small Business Server - the client installation is separate from the server install. - Original Message - From: Robert martin [EMAIL PROTECTED] To: Multiple recipients of list

Re: [DUG]: Frames

2003-10-02 Thread Dennis Chuah
When you create the frame at run time, set the owner of the frame to the tab sheet. - Original Message - From: Paul Mckenzie To: Multiple recipients of list delphi Sent: Friday, October 03, 2003 8:55 AM Subject: [DUG]: Frames I have an Application in which I create and delete TabPages

Re: [DUG]: random thread crashes

2003-09-24 Thread Dennis Chuah
methods but I am reading properties. Should I copy the value of all properties into say global variables before calling the thread? Regards, Ross Levis. - Original Message - From: Dennis Chuah [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday

Re: [DUG]: ImageList images

2003-09-24 Thread Dennis Chuah
Message Not sure if this will fix your problem, but there is a bug in the VCL - when toolbars are loaded in a form, in some instances, the associated image list becomes unassigned. The workaround is to reassign the image list in the FormShow - but only do it once per form. - Original Message

Re: [DUG]: random thread crashes

2003-09-23 Thread Dennis Chuah
The VCL is not thread safe and parts of it are not re-entrant. You might need to use synchronize to sync to your main thread before you call any VCL methods. - Original Message - From: Ross Levis To: Multiple recipients of list delphi Sent: Wednesday, September 24, 2003 11:52 AM

Re: [DUG]: Form size changing/scrolling?

2003-09-18 Thread Dennis Chuah
Sounds like you may have a font size / scaling issue. Can you try setting the form's Scaled property to False. This will display the form and its controls at the same size as when they were designed, but the controls may clip data - because the font size may be different. Alternatively, you

Re: [DUG]: Sharing a drawing surface

2003-09-18 Thread Dennis Chuah
at run time what plugins there are (looks for files in a directory). Is that what you meant? Phil. - Original Message - From: Dennis Chuah [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, September 18, 2003 7:19 AM Subject: Re: [DUG]: Sharing

Re: [DUG]: Sending emails with Outlook

2003-09-18 Thread Dennis Chuah
PROTECTED] web: http://www.software-solutions.co.nz -Original Message- From: Dennis Chuah [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2003 7:29 a.m. To: Multiple recipients of list delphi Subject: [DUG]: Sending emails with Outlook Folks, I am currently using automation

Re: [DUG]: Email questions

2003-09-18 Thread Dennis Chuah
Ah, another virus author... :) SMTP should be as reliable (or unreliable as the case may be) as MAPI, because at end of the day, SMTP is the mechanism where emails are forwarded in the internet, and SMTP does not guarantee delivery. In fact, there is also no guarantee that you will get a bounced

Re: [DUG]: Sharing a drawing surface

2003-09-17 Thread Dennis Chuah
Phil, You cannot share a DC between different processes - because they are in different address space. However, you can try to FindWindow to look for the window handle, and obtain a DC to paint on its surface. The other suggestion is to use an in-process (ie Active-X DLL) server. Dennis.

[DUG]: Sending emails with Outlook

2003-09-17 Thread Dennis Chuah
Folks, I am currently using automation to send emails using Outlook (no, I am not writing the next killer virus) and it works fine. But with the security upgrade and Outlook 2002, Outlook pops up a series of confirmation dialog boxes (presumably to allow the user to stop virii from using

Re: [DUG]: Button Caption

2003-08-31 Thread Dennis Chuah
Not sure if this will work, but it is worth a try. Create a sub-class of TButton and override the CreateParams method: procedure TButtonNew .CreateParams(var Params: TCreateParams); begin inherited; Params.Style := Params.Style or BS_LEFTTEXT; end; BS_LEFTTEXT is declared in the Windows

Re: [DUG]: How do I copy the state of one object to another?

2003-08-28 Thread Dennis Chuah
Yes, use RTTI - here is a simple example: type TDog = class (TComponent) private FColour: TColor; FSize: Integer; published property Colour: TColor read FColor write FColor; property Size: Integer read FInteger write FInteger; end; To clone this, you simply: var stm: TTStream;

Re: [DUG]: GetMenuBarInfo

2003-08-25 Thread Dennis Chuah
Pass the form's handle, not the menu bar's. - Original Message - From: Vaughan, Benjamin Carl [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Monday, August 25, 2003 1:11 PM Subject: [DUG]: GetMenuBarInfo Hi, I am currently attempting to get the size

Re: [DUG]: Best methods for representing a 3 dimensional array

2003-08-14 Thread Dennis Chuah
There is probably no generic best method - it all depends on what you want to do with the data. A few examples are: 1. Use dynamic arrays like you suggested. This is simple and does not violate any OO programming methodologies. Ie., it is OK to use dynamic arrays with OO. 2. Use

Re: [DUG]: Best methods for representing a 3 dimensional array

2003-08-09 Thread Dennis Chuah
It could also be a Graph structure - the child may need to know about its parent. It all depends on how the data is going to be used, but lets not confuse Dave too much :). - Original Message - From: Leigh Wanstead To: Multiple recipients of list delphi Sent: Wednesday, August 06, 2003

Re: [DUG]: What is the best way

2003-08-06 Thread Dennis Chuah
and if there is a device not catered for, I will just have to release a new EXE. BUT I still have one or 2 other ideas to look at too as well tho. Jeremy -Original Message- From: Dennis Chuah [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Wed, 6 Aug 2003 08:06:38 +1200

Re: [DUG]: What is the best way

2003-08-05 Thread Dennis Chuah
Message Design: Use interfaces or an abstract base class. Define the methods that do the data conversion in the interface / abstract base class. For each dat conversion method, create a concrete class that either implements the interface or sub-classes the abstract base class. Implementation:

Re: [DUG]: tregistry...

2003-07-23 Thread Dennis Chuah
I tend to avoid the registry like plague. It is slow, has all sorts of permissions issues and is not suitable for storing larger amounts of data (you can run out of registry storage space). Also I find too many programs stuff keys in the registry, bloating it up and making it unmanageable.

Re: [DUG]: Casting

2003-07-21 Thread Dennis Chuah
No, you cannot do it with a simple cast. var Newfile:string; temp: TStringList; begin temp := TStringList.Create; try temp.Text := Newfile; success := Burnfiles (temp); finally temp.Free; end; - Original Message - From: Alistair George [EMAIL PROTECTED] To:

Re: [DUG]: [Q] Stream.ReadComponent, Stream.WriteComponent problem....

2003-07-10 Thread Dennis Chuah
May be asking the obvious but is the Boo property of TNamMessageForComms published and not read-only? Which version of Delphi are you using? Also, is TNamMessageForComms a TComponent? - Original Message - From: Donovan J. Edye [EMAIL PROTECTED] To: Multiple recipients of list delphi

Re: [DUG]: Conversion

2003-06-28 Thread Dennis Chuah
popen is a function in Visual C's library. Basically, it creates a pipe, executes the process, cdrecord -atip, and redirect its output to the pipe. Unfortunately Delphi does not have a popen in the VCL, but you can achieve the same using a few lines of code that makes WinAPI calls. The

Re: [DUG]: I want to be subscriber of delphi.org.nz but without the messages flooding email

2003-06-28 Thread Dennis Chuah
I don't normally reply to non-technical messages like this to the list, but I make an exception for this one because I think it might be of benefit to others. If you object, please delete this message. Ben, Why don't you simply set your mail filtering rules to move all messages to your Deleted

Re: [DUG]: format function

2003-06-28 Thread Dennis Chuah
var A: array of TVarRec; Just beware - it is not as simple as it seems. For one, you will need to make sure strings referred to by TVarRec remains active until after the call to Format. - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list delphi

Re: [DUG]: Need component to imitate Windows Explorer

2003-06-26 Thread Dennis Chuah
Take a look at open sourced VirtualExplorerTree at http://groups.yahoo.com/group/VirtualExplorerTree/. or TurboPower Shell Shock (now open source) at http://sourceforge.net/projects/tpshellshock/ - Original Message - From: [EMAIL PROTECTED] To: Multiple recipients of list delphi Sent:

Re: [DUG]: Those const again

2003-06-18 Thread Dennis Chuah
Delphi handles typed constants just like any variables. The only difference is typed constants can have an initial value, which you can then safely change. Don't worry about overwriting string memory because internally, string variables are pointers to the string data. So, changing the string

Re: [DUG]: Interface Inheritance

2003-06-16 Thread Dennis Chuah
Let me simplify your example: type TNewClass = class(TInterfacedObject,ISecondDescendant); var First: IFirstDescendant; Second: ISecondDescendant; Second := TNewClass.Create; // Line 1 First := Second; // Line 2 The above compiles and works fine. Line 1 actually performs 2

Re: [DUG]: Delphi optimizer

2003-06-16 Thread Dennis Chuah
One danger with hand optimising ASM code is illustrated by your example. In the generated code: mov byte ptr [eax+$304], $0 writes 0 to BYTE location [eax+$304], whereas you mov [eax+$304], edx writing a DWORD into location [eax+$304], possibly overwriting memory. This sort of bugs can be

Re: [DUG]: Interface Inheritance (long)

2003-06-15 Thread Dennis Chuah
Simple answer is no. Your class *DOES NOT* support IFirstDescendant. You must explicitly tell the compiler that your class supports IFirstDescendant: TNewClass = class(TInterfacedObject,IFirstDescendant,ISecondDescendant) Interface inheritance is *DIFFERENT* from class inheritance. The idea

Re: [DUG]: Non-global Constants in a function

2003-06-15 Thread Dennis Chuah
What you read only applies to const parameters. I would continue to use method level consts and not move them to the unit level. In fact, I *never* use unit level vars, except for the Delphi generated main form code. Using method level is safer than unit level vars. Eg. in multi-threading

[DUG]: Re: Setting Windows Scheme Colours from Delphi - how?

2003-06-09 Thread Dennis Chuah
colour while others (especially new windows) display in the new colours. Regards, Dennis. - Original Message - From: Moretti, Giovanni [EMAIL PROTECTED] To: Dennis Chuah [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 10:44 AM Subject: Setting Windows Scheme Colours from Delphi - how? Hi

Re: [DUG]: Graphics problems

2003-03-20 Thread Dennis Chuah
A JPEG file usually uses a compression algorithm that is not losses, meaning, when you reconstruct the bitmap from a JPEG file it is different from the original bitmap from which the JPEG was created. This is done so as to achieve compression rates that are higher than loss-less compression

Re: [DUG]: PostMessage

2003-03-19 Thread Dennis Chuah
: Re: [DUG]: PostMessage Denis Thanks, that would prob work mind you shouldn't that be for f := 0 to Screen.FormCount-1 do our were you just testing me :-) Neven - Original Message - From: Dennis Chuah [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED

Re: [DUG]: Free TWebBrowser component for use with D7 Personal?

2003-03-18 Thread Dennis Chuah
Throw away the TWebBrowser implementation that comes with Delphi and take a look at this alternative: http://www.euromind.com/iedelphi/ Dennis. - Original Message - From: Moretti, Giovanni [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Tuesday, March

Re: [DUG]: PostMessage

2003-03-18 Thread Dennis Chuah
HWND_BROADCAST only works with SendMessage. Try this code instead: var f: Integer; begin for f := 0 to Screen.FormCount do Screen.Forms[f].Perform (WM_APPDATACHANGE, 0, 0); Dennis. - Original Message - From: Neven MacEwan [EMAIL PROTECTED] To: Multiple recipients of list

Re: [DUG]: [Q] A design issue...

2003-02-13 Thread Dennis Chuah
You will need a second thread to solve your problem. In a nutshell: 1. Display a modal dialogbox with a cancel button - this provides your block. 2. Run the lengthy process on a separate thread, but at regular intervals, check that the thread is terminated, and if it is, exit out of the

Re: [DUG]: [Q] Library Units -- Run Time Package?

2003-02-12 Thread Dennis Chuah
I would create 3 packages, a runtime only package for the common units, another runtime only package for the components and a design-time only package for the property editor stuff. - Original Message - From: Donovan J. Edye To: Multiple recipients of list delphi Sent: Wednesday,

Re: [DUG]: [Q] Library Units -- Run Time Package?

2003-02-12 Thread Dennis Chuah
If a package only has components and does not contain any property editors or code to register the components, then you OUGHT TO make it runtime only, but you DONT HAVE TO. However, if a package refers to Delphi's design time packages, then it MUST BE made a design-time only package. Does this

Re: [DUG]: Ellipsis truncation

2003-01-21 Thread Dennis Chuah
Call the WinAPI function DrawText (or it might have been DrawTextEx), and one of the options is to shorten the string with an ellipsis. You can also get DrawText to return the shortened string, rather than draw it on the canvas. Dennis. - Original Message - From: Nahum Wild [EMAIL

Re: [DUG]: Repaint/Refresh/Invalidate ???

2003-01-15 Thread Dennis Chuah
DrawMenuBar (Form.Handle); - Original Message - From: Paul Mckenzie To: Multiple recipients of list delphi Sent: Wednesday, January 15, 2003 1:30 PM Subject: [DUG]: Repaint/Refresh/Invalidate ??? Does anyone know how to force a menu to repaint itself ? Regards Paul McKenzie

Re: [DUG]: TPagecontrol

2003-01-12 Thread Dennis Chuah
The font property of the tab is used as the default font for its child controls if the ParentFont property is True. To display each tab differently, you will need to handle the page control's OnTabDraw event and draw the tab yourself (set OwnerDraw := True first). Dennis. - Original

Re: [DUG]: Adding Icons to the Menu bar....

2003-01-09 Thread Dennis Chuah
Why don't you use owner drawn menu items? When you draw the last item, make it large enough to accomodate the bitmaps, but draw the border so that the menu looks like it stops at the last item. - Original Message - From: Paul Mckenzie To: Multiple recipients of list delphi Sent: Friday,

Re: [DUG]: Automating Internet Explorer from Delphi

2002-11-26 Thread Dennis Chuah
procedure SetData; var doc: IHTMLdocument2; elem: IHTMLElement; begin doc := IE.document as IHTMLdocument2; elem := doc.all.item('mycontrol',0) as IHTMLElement; elem.value := 'SomeValue'; end; In the HTML document: form input type=text id=mycontrol HTH Dennis. -

Re: [DUG]: Friday Challange

2002-10-31 Thread Dennis Chuah
It depends on the size of your loop. If you are going to be appeding a great number of strings, then I would suggest a string buffer approach - where each iteration of the loop writes one string into the string buffer, while an int variable is incremented with the length of the string. Then

Re: [DUG]: Friday Challange

2002-10-31 Thread Dennis Chuah
- From: Dennis Chuah [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, November 01, 2002 9:36 AM Subject: Re: [DUG]: Friday Challange It depends on the size of your loop. If you are going to be appeding a great number of strings, then I would

Re: [DUG]: Polymorphic assignment to Color - How? (sometime it's a Property, sometimes not)

2002-10-23 Thread Dennis Chuah
This is a hack but... type TInternalControl = class (TControl); TInternalGraphicsObject = class (TGraphicsObject); procedure setObjectColour (obj: TObject;newColour: TColor); begin if obj is TControl then TInternalControl (obj).Color := newColour else if obj is TGraphicsObject then

Re: [DUG]: Polymorphic assignment to Color - How? (sometime it's a Property, sometimes not)

2002-10-23 Thread Dennis Chuah
You said the first bit is a hack. Well I don't see that you used any blunt instruments in getting access to protected properties. Just a little cheating. It is a hack because it assumes that a base class can be safely cast into a descendent. This is OK due to the nature of Delphi's code

Re: Re[2]: [DUG]: Treelist with checkbox

2002-10-22 Thread Dennis Chuah
Alistair, Hi. You can download theme manager from the same place as you download virtual tree view. All I do is to put both of them in the same directory, build and register the tree's design time package. You will need to add the dir to your project's search path. The tree view requires the

Re: [DUG]: COM Object error

2002-10-22 Thread Dennis Chuah
From memory, VB only supports apartment threading model. Depending on the type of load your server is going to experience, you could try: Have a worker thread that communicated with the VB COM object. The client connection threads will need to place the data somewhere, then wait for the worker

Re: [DUG]: Treelist with checkbox

2002-10-21 Thread Dennis Chuah
Virtual Tree from Mike Lischke (http://www.delphi-gems.com/VirtualTreeview/VT.php) has built in support for checkboxes. I think there is a derivative that shows the contents of directories as well - take a look at http://www.delphi-gems.com/VirtualTreeview/VTGallery.php. Dennis. - Original

Re: [DUG]: polymorphism problem

2002-10-17 Thread Dennis Chuah
I stepped through your code and it *DEFINITELY* calls TMetadata.Create. What you have done looks correct and this is certainly not a polymorphism pproblem. Few suggestions: 1. Check that you do not have $(DELPHI)\Lib in your project path - it should only be in the global library path. 2. What

Re: [DUG]: polymorphism problem

2002-10-17 Thread Dennis Chuah
the is-operator would have done a much tidier job? -Andreas -Original Message- From: [EMAIL PROTECTED] [mailto:owner-delphi;delphi.org.nz]On Behalf Of Dennis Chuah Sent: Friday, 18 October 2002 07:14 To: Multiple recipients of list delphi Subject: Re: [DUG]: polymorphism problem I

Re: [DUG]: polymorphism problem

2002-10-17 Thread Dennis Chuah
of list delphi [EMAIL PROTECTED] Sent: Friday, October 18, 2002 9:10 AM Subject: RE: [DUG]: polymorphism problem -Original Message- From: Dennis Chuah [mailto:dennis_cs_chuah;hotmail.com] Sent: Friday, 18 October 2002 7:14 a.m. To: Multiple recipients of list delphi Subject: Re: [DUG

Re: [DUG]: Strange RECORD behaviour

2002-10-17 Thread Dennis Chuah
I guess you are using VB3 or a 16-bit version of VB. If that is the case, then the variable sizes are: boolean - 2 bytes (-1 = true, 0 = false) integer - 2 bytes string * n - fixed length strings of n bytes total = 45 bytes In BP7: Boolean - not quite sure about the size in BP7, but in D1 I

Re: [DUG]: Toolbutton tbsCheck not working

2002-10-16 Thread Dennis Chuah
You probably need a newer version of Comctl32.dll for the Win98 machine. Dennis. - Original Message - From: Ross Levis [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Wednesday, October 16, 2002 3:16 PM Subject: [DUG]: Toolbutton tbsCheck not working

Re: [DUG]: Resume Next in Delphi

2002-10-14 Thread Dennis Chuah
There is no direct resume next support in Delphi, but Delphi does support goto's. Having said that, in my many years of programming in Delphi and before that in Turbo Pascal, I have never had to use the goto statement. VB does not support structured exception handling (SEH), so you end up

Re: [DUG]: Cannot focus a disabled or invisible window

2002-10-14 Thread Dennis Chuah
tblCompany.Edit; tblCompany.FieldByName('name').Value := txtNewValue.Text; tblCompany.Post; txtNewValue.Text := ''; txtHoneyPot.SetFocus; btnSaveEdit.Visible := false; txtNewValue.Visible := false; The line that is causing you grief is btnSaveEdit.Visible := false;.

Re: [DUG]: 64 bit ints

2002-08-18 Thread Dennis Chuah
Because IntToStr(Value: Integer) is faster (and smaller) than IntToStr(Value: Int64) - Delphi (apart from Delphi.NET) generates code for 32-bit processors, and thus any 64-bit code will require more CPU cycles. The linker is also able to optimise out the functions that are not referenced, thus

Re: [DUG]: [Q] Simple Streams Question in IDE

2002-08-08 Thread Dennis Chuah
If you are using D6, then it is a known debugger bug. If you watched any Int64 variable, you always end up with 0. Dennis. - Original Message - From: Donovan J. Edye [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, August 08, 2002 3:18 PM

Re: [DUG]: Interfaces (and classes that support them)

2002-08-08 Thread Dennis Chuah
Factory methods is the way to go. Personally, I prefer to use factory classes (actually factory interfaces). You certainly don't want to limit your design to inherit all implementation classes from the same base class, though, sometimes, it can be helpful to have an abstract base class that

RE: [DUG]: Const

2001-11-11 Thread Dennis Chuah
John, The first form is a typed constant. Delphi allocates a string variable and assigns it the value 'This is a test'. Depending on your compiler options (Assignable typed constants), Delphi may or may not allow this variable to be assigned. When you assign this to another variable, it is

RE: [DUG]: Autosize a TRadioButton

2001-10-16 Thread Dennis Chuah
Don't forget to hook the OnClick event of the label and change the radio button when it is clicked. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 17 October 2001 13:35 To: Multiple recipients of list delphi Subject: RE: [DUG]: Autosize a

RE: [DUG]: MDI

2001-10-09 Thread Dennis Chuah
Robert, Hi. That unfortunately is the nature of MDI - I tend to stay away from MDI these days. In any case, you can make your child forms remember which state they were in before, and when they next get activated, they can restore themselves to their last state. The alternative is to disable

[DUG]: Interesting Delphi 5 compiler bug

2001-09-25 Thread Dennis Chuah
The following compiles with an error in D5. type TSomeObject = class private procedure GetA (msg: TMessage); overload; message 1; function GetA: Integer; overload; public property A: Integer read GetA; end; It seems like D5's compiler is not able to correctly resolve the

RE: [DUG]: Interesting Delphi 5 compiler bug

2001-09-25 Thread Dennis Chuah
Strings and WideString method overloads now work). I think the function result is still not checked in D6. Myles. -Original Message- From: Dennis Chuah [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 26 September 2001 1:39 p.m. To: Multiple recipients of list delphi Subject: [DUG

RE: [DUG]: RadioButton requires 2 clicks

2001-09-24 Thread Dennis Chuah
Steve, The OnExit event is called if the control loses the focus to another control on the same form. The WM_KILLFOCUS message is handled by the base class and if the above condition is met, it fires off the OnExit event. Like all Windows applications, you will encounter problems if you cause

RE: [DUG]: Interbase X SQL Server

2001-09-13 Thread Dennis Chuah
Use native drivers. Don't use the native SQL Server driver as it is slow and full of bugs. Also, if you use dbgrids and client side cursors, it keeps record locks on SQL server until the user scrolls to the end of the recordset. This can then cause problems on other machines needing to write

RE: [DUG]: [Off Topic] Anyone know of an Entry Level position..

2001-09-11 Thread Dennis Chuah
Matt, Hi. You might like to send your CV to [EMAIL PROTECTED] Regards, Dennis. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, 10 September 2001 18:28 To: Multiple recipients of list delphi Subject: [DUG]: [Off Topic] Anyone know of an Entry Level

RE: [DUG]: Destroying Objects

2001-08-26 Thread Dennis Chuah
Ross, You don't have to because Free is a static class procedure defined in TObject, even if you cast the object, it would not have made a difference, except if you reintroduced Free in your class. However, I would like to point out a related issue. The default destructor of TObject (Destroy)

RE: [DUG]: TDataset - Recordcount

2001-08-23 Thread Dennis Chuah
I would change the query and do: Select count(*) as RecordCount from myTable where ID = 1 Then look at the value of the RecordCount field. Regards, Dennis. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 24 August 2001 08:45 To: Multiple recipients

[DUG]: Intermediate Delphi developer wanted

2001-08-12 Thread Dennis Chuah
Delphi Programmer - Genie Systems is a fast growing international software organization providing Commerce, Collaboration and Exchange® applications targeted at sub $1 billion corporations and divisions of Fortune500 corporations. Our applications provide access and integration

  1   2   3   4   >