Jump to content


Markus

Member Since 06 Mar 2006
Offline Last Active Jan 01 2009 02:25 PM
-----

Posts I've Made

In Topic: GetItemByName()

05 December 2006 - 12:26 PM

Hi Wim,

QUOTE (wvd_vegt @ Dec 4 2006, 09:43 PM) <{POST_SNAPBACK}>
Delphi is case in-sensitive there (and the function works on the Name property of the item only as I discovered) it would not matter at all (or am I wrong here?).


No, you're right. I was wrong in my assumption that you can assign the same name to multiple controls at run-time! Just tested that and it turned out that this results in an exception. Sorry for the fuss.

So, after all, I'm +1 on making the function case-insensitive. biggrin.gif

Cheers,
Markus

In Topic: GetItemByName()

04 December 2006 - 03:23 PM

Hi Wim,

QUOTE (wvd_vegt @ Dec 3 2006, 08:30 PM) <{POST_SNAPBACK}>
Is it an idea & possible to make this function case insensitive or would that break to much existing code?


Why would you want to make this function case-insensitive? This property is very useful when dealing with items at runtime, i.e. creating and destroying them at runtime. Considering this use-case there's one problem: You can assign the same string to multiple name properties. Therefore I'm against making this function case-insensitive as this would allow more redundant name property choices.

QUOTE (wvd_vegt @ Dec 3 2006, 08:30 PM) <{POST_SNAPBACK}>
Another request is to add a Name parameter to the AddChild call so you can compact code like:

CODE
NextInspector1.AddChild(TNxTextItem, 'Voornaam', 'VoornaamItem'). AsString := Klanten[ndx].Voornaam;


and
CODE
voornaam:=NextInspector1.Items.ItemByName['VoornaamItem'].AsString;


Yeah, I'm in favor of this change. Just define AddChild as this

CODE
function AddChild(ItemClass: TNxItemClass; S: string = ''; Name: String = ''): TNxPropertyItem;


and you're still compatible with one's old code.

Cheers,
Markus

In Topic: ComboBoxItem Bug

09 November 2006 - 09:58 PM

Hi Boki,

QUOTE (Boki (Berg) @ Nov 9 2006, 09:26 PM) <{POST_SNAPBACK}>
I hope that now in new release, all will be fine.


Well, I bet it won't be fine unless you're going to change something.

Cheers,
Markus

In Topic: ComboBoxItem Bug

09 November 2006 - 09:10 PM

Hi Boki,

this works. However, when using an older version of your components (one or two months) the PopupList behavior is completely different: There's always a highlighted item in the list even if you're leaving the control (in this case the last highlighted item stays highlighted) and the reported bug does not appear. With the latest version there's some kind of hover behavior that makes it possible to not have a highlighted item in the list.

This bug seems to be a regression introduced in one of the last updates.

Cheers,
Markus

In Topic: Delphi 5 compatibility

09 November 2006 - 03:12 PM

Hi Uli,

QUOTE (uli @ Nov 9 2006, 02:34 PM) <{POST_SNAPBACK}>
Nevertheless the compatibility stuff that I have got up to now looks similar to yours. However I wouldn't post it in public wink.gif , because it's copied from source under Borland copyright.


Well, most of the stuff is coming from FreePascal and public domain sources (at least I hope so - I don't remember exactly as the file is quite old wink.gif).

QUOTE (uli @ Nov 9 2006, 02:34 PM) <{POST_SNAPBACK}>
As far as I see you too have to patch Boki's sources to make use of your NxDelphi5Support unit, right? That's part of the work that I wanted to spare us with my suggestions (1)-(3).


Yep, that's the reason why I have set up my own NextInspector svn repository and keep it in sync with the latest updates/patches (there are also a lot of private patches in there). In general, I'm doing almost the same as you proposed in your first post. It works quite well this way.

Cheers,
Markus